parent
461b75cce2
commit
cb5dbc7919
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
|
@ -510,6 +510,10 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
|
|||
|
||||
List<ResponseWorkFlow> responseWorkFlowList = baseMapper.workFlowList(pageVo);
|
||||
|
||||
for (ResponseWorkFlow responseWorkFlow : responseWorkFlowList) {
|
||||
|
||||
responseWorkFlow.setType(DictInit.getDictValue(DictConstants.WORK_FLOW_TYPE_CHILD,responseWorkFlow.getType()));
|
||||
}
|
||||
|
||||
return new PageInfo<ResponseWorkFlow>(responseWorkFlowList);
|
||||
|
||||
|
|
Loading…
Reference in New Issue