package com.iailab.module.model.mpk.controller.admin; import com.iailab.framework.common.page.PageData; import com.iailab.framework.common.pojo.CommonResult; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.util.object.BeanUtils; import com.iailab.module.model.mpk.dto.ChartParamDTO; import com.iailab.module.model.mpk.dto.MpkFileDTO; import com.iailab.module.model.mpk.entity.ChartParamEntity; import com.iailab.module.model.mpk.entity.IconEntity; import com.iailab.module.model.mpk.service.ChartParamService; import com.iailab.module.model.mpk.vo.IconPageReqVO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.util.List; import java.util.Map; import static com.iailab.framework.common.pojo.CommonResult.success; /** * @description: * @author: dzd * @date: 2024/11/5 11:43 **/ @Tag(name = "图表参数") @RestController @RequestMapping("/model/chart/param") public class ChartParamController { @Autowired private ChartParamService chartParamService; @GetMapping("page") @Operation(summary = "分页") public CommonResult> page(@RequestParam Map params) { PageData page = chartParamService.page(params); return success(page); } @GetMapping("/get") @Operation(summary = "获得详情") public CommonResult get(@RequestParam("id") String id) { ChartParamEntity data = chartParamService.get(id); return success(data); } @PostMapping("/create") @Operation(summary = "创建") public CommonResult save(@RequestBody ChartParamEntity entity) { chartParamService.create(entity); return success(true); } @PutMapping("/update") @Operation(summary = "更新") public CommonResult update(@RequestBody ChartParamEntity entity) { chartParamService.update(entity); return success(true); } @DeleteMapping("/delete") public CommonResult delete(@RequestParam("id") String id) { chartParamService.delete(id); return success(true); } }