diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ReportController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ReportController.java index 27a0412..60a645a 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ReportController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ReportController.java @@ -1,11 +1,11 @@ package com.mcwl.web.controller.resource; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.R; import com.mcwl.resource.domain.Report; import com.mcwl.resource.domain.vo.PageVo; import com.mcwl.resource.service.ReportService; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.*; * @apiNote */ +@Api(tags = "举报") @RequestMapping("/report") @RestController public class ReportController { diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/Report.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/Report.java index 675a170..9f38a3d 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/domain/Report.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/Report.java @@ -2,6 +2,8 @@ package com.mcwl.resource.domain; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,6 +14,7 @@ import java.util.Date; /** * 举报表 + * * @author DaiZibo * @date 2025/1/18 * @apiNote @@ -21,53 +24,63 @@ import java.util.Date; @Data @NoArgsConstructor @AllArgsConstructor +@ApiModel(description = "举报表") @TableName("report") public class Report { /** * 主键ID */ + @ApiModelProperty(value = "举报ID") private Long id; /** * 被举报的商品ID */ + @ApiModelProperty(value = "被举报作品ID") private Long productId; /** * 举报人ID */ + @ApiModelProperty(value = "举报人ID") private Long userId; /** * 举报类型 */ + @ApiModelProperty(value = "举报类型 字典值") private Integer reportId; /** * 区分举报内容(1模型 2图片 3工作流) */ + @ApiModelProperty(value = "作品类型 (1模型 2图片 3工作流)") private Integer type; /** * 举报描述 */ + @ApiModelProperty(value = "举报描述") private String text; /** * 状态(0未处理 1已处理) */ + @ApiModelProperty(value = "状态(0未处理 1已处理 )") private Integer status = 0; /** * 创建时间 */ + @ApiModelProperty(value = "创建时间") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createTime; /** * 逻辑删除(0展示 2删除) */ + @ApiModelProperty(value = "逻辑删除(0展示 2删除)") private Integer delFlag = 0; } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/FileServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/FileServiceImpl.java index e5089da..02c2257 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/FileServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/FileServiceImpl.java @@ -1,6 +1,7 @@ package com.mcwl.resource.service.impl; import com.mcwl.common.core.domain.AjaxResult; +import com.mcwl.common.utils.StringUtils; import com.mcwl.resource.domain.ModelVersion; import com.mcwl.resource.domain.WorkFlowVersion; import com.mcwl.resource.mapper.ModelVersionMapper; @@ -27,6 +28,11 @@ public class FileServiceImpl implements FileService { @Override public AjaxResult selectFileName(String name, String type) { + if (StringUtils.isEmpty(type)){ + + return AjaxResult.error("请输入type"); + } + if (type.equals("model")) { ModelVersion modelVersion = versionMapper.selectByFileName(name); @@ -36,7 +42,7 @@ public class FileServiceImpl implements FileService { } return AjaxResult.success(modelVersion); - }else if (type.equals("workFlow")){ + }else if (type.equals("workflow")){ WorkFlowVersion workFlowVersion = workFlowVersionMapper.selectByFileName(name); if (workFlowVersion == null) { diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java index 56f342a..1565a76 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java @@ -510,6 +510,10 @@ public class WorkFlowServiceImpl extends ServiceImpl i List responseWorkFlowList = baseMapper.workFlowList(pageVo); + for (ResponseWorkFlow responseWorkFlow : responseWorkFlowList) { + + responseWorkFlow.setType(DictInit.getDictValue(DictConstants.WORK_FLOW_TYPE_CHILD,responseWorkFlow.getType())); + } return new PageInfo(responseWorkFlowList);