Compare commits
No commits in common. "b2dd5112c42bf9666dd6ba27df42dab3f97ea1cf" and "f5f2693e8eee0161b10b147717564aa870488b73" have entirely different histories.
b2dd5112c4
...
f5f2693e8e
|
@ -1,9 +1,11 @@
|
||||||
package com.mcwl.web.controller.resource;
|
package com.mcwl.web.controller.resource;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Dict;
|
||||||
import com.mcwl.common.constant.DictConstants;
|
import com.mcwl.common.constant.DictConstants;
|
||||||
import com.mcwl.common.core.controller.BaseController;
|
import com.mcwl.common.core.controller.BaseController;
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
import com.mcwl.common.core.domain.AjaxResult;
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
|
import com.mcwl.resource.domain.ModelProduct;
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
import com.mcwl.resource.domain.ModelVersion;
|
||||||
import com.mcwl.resource.service.ModelVersionService;
|
import com.mcwl.resource.service.ModelVersionService;
|
||||||
import com.mcwl.system.init.DictInit;
|
import com.mcwl.system.init.DictInit;
|
||||||
|
@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/** 模型版本
|
/** 模型版本
|
||||||
|
@ -82,16 +85,7 @@ public class ModelVersionController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情页 版本列表
|
|
||||||
* @param modelId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/selectByModelId")
|
|
||||||
public AjaxResult selectByModelId(@RequestParam Long modelId){
|
|
||||||
|
|
||||||
return modelVersionService.selectByModelId(modelId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "模型版本列表")
|
@ApiOperation(value = "模型版本列表")
|
||||||
@PostMapping("list")
|
@PostMapping("list")
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
package com.mcwl.web.controller.resource;
|
|
||||||
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.resource.domain.Report;
|
|
||||||
import com.mcwl.resource.domain.vo.PageVo;
|
|
||||||
import com.mcwl.resource.service.ReportService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 举报功能
|
|
||||||
* @author DaiZibo
|
|
||||||
* @date 2025/1/18
|
|
||||||
* @apiNote
|
|
||||||
*/
|
|
||||||
|
|
||||||
@RequestMapping("/report")
|
|
||||||
@RestController
|
|
||||||
public class ReportController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ReportService reportService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增举报内容
|
|
||||||
* @param report
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/addReport")
|
|
||||||
public AjaxResult addReport(@RequestBody Report report){
|
|
||||||
|
|
||||||
reportService.addReport(report);
|
|
||||||
return AjaxResult.success("举报成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询举报列表
|
|
||||||
* @param pageVo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/selectReport")
|
|
||||||
public AjaxResult selectReport(@RequestBody PageVo pageVo){
|
|
||||||
|
|
||||||
|
|
||||||
return reportService.selectReport(pageVo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除举报
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/deleteReport")
|
|
||||||
public AjaxResult deleteReport(@RequestParam Long id){
|
|
||||||
|
|
||||||
reportService.deleteReport(id);
|
|
||||||
return AjaxResult.success("删除成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改状态
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/updateStatus")
|
|
||||||
public AjaxResult updateStatus(@RequestParam Long id){
|
|
||||||
|
|
||||||
reportService.updateStatus(id);
|
|
||||||
return AjaxResult.success("修改成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -48,7 +48,7 @@ public class ToActivityController extends BaseController {
|
||||||
@PostMapping("finById")
|
@PostMapping("finById")
|
||||||
public AjaxResult finById(@RequestBody ToActivity toActivity)
|
public AjaxResult finById(@RequestBody ToActivity toActivity)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(toActivityService.getById(toActivity.getId()));
|
return AjaxResult.success(toActivityService.getById(toActivity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.mcwl.resource.domain;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.mcwl.common.core.domain.BaseEntity;
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
@ -10,7 +11,9 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,6 +44,11 @@ public class ModelProduct extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "名称")
|
@ApiModelProperty(value = "名称")
|
||||||
private String modelName;
|
private String modelName;
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String versionDescription;
|
||||||
/***
|
/***
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
|
@ -105,14 +113,7 @@ public class ModelProduct extends BaseEntity {
|
||||||
* 审核状态
|
* 审核状态
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "审核状态")
|
@ApiModelProperty(value = "审核状态")
|
||||||
private Integer auditStatus;
|
private Integer auditSatus;
|
||||||
|
|
||||||
/**
|
|
||||||
* 审核(1公开 2自见)
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "审核")
|
|
||||||
private Integer jurisdiction;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核失败原因
|
* 审核失败原因
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -35,9 +35,9 @@ public class ModelVersion extends BaseEntity {
|
||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 模型ID
|
* 模型id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "模型ID")
|
@ApiModelProperty(value = "模型id")
|
||||||
private Long modelId;
|
private Long modelId;
|
||||||
/**
|
/**
|
||||||
* 版本名称
|
* 版本名称
|
||||||
|
@ -45,9 +45,9 @@ public class ModelVersion extends BaseEntity {
|
||||||
@ApiModelProperty(value = "版本名称")
|
@ApiModelProperty(value = "版本名称")
|
||||||
private String versionName;
|
private String versionName;
|
||||||
/**
|
/**
|
||||||
* 模型类型ID
|
* 基础模型
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "模型类型ID")
|
@ApiModelProperty(value = "基础模型")
|
||||||
private Long modelType;
|
private Long modelType;
|
||||||
/**
|
/**
|
||||||
* 文件地址
|
* 文件地址
|
||||||
|
@ -84,21 +84,11 @@ public class ModelVersion extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "cfg")
|
@ApiModelProperty(value = "cfg")
|
||||||
private Integer cfg;
|
private Integer cfg;
|
||||||
/**
|
|
||||||
* 是否免费
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "是否免费")
|
|
||||||
private Integer isFree;
|
|
||||||
/**
|
/**
|
||||||
* 是否公开
|
* 是否公开
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "是否公开")
|
@ApiModelProperty(value = "是否公开")
|
||||||
private Integer isPublic;
|
private Integer isPublic;
|
||||||
/**
|
|
||||||
* 是否加密
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "是否加密")
|
|
||||||
private String isEncrypt;
|
|
||||||
/**
|
/**
|
||||||
* 是否在线使用
|
* 是否在线使用
|
||||||
*/
|
*/
|
||||||
|
@ -148,7 +138,7 @@ public class ModelVersion extends BaseEntity {
|
||||||
* 审核状态
|
* 审核状态
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "审核状态")
|
@ApiModelProperty(value = "审核状态")
|
||||||
private Integer auditStatus;
|
private Integer auditSatus;
|
||||||
/**
|
/**
|
||||||
* 审核失败原因
|
* 审核失败原因
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
package com.mcwl.resource.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 举报表
|
|
||||||
* @author DaiZibo
|
|
||||||
* @date 2025/1/18
|
|
||||||
* @apiNote
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Builder
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@TableName("report")
|
|
||||||
public class Report {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被举报的商品ID
|
|
||||||
*/
|
|
||||||
private Long productId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 举报人ID
|
|
||||||
*/
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 举报类型
|
|
||||||
*/
|
|
||||||
private Integer reportId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 区分举报内容(1模型 2图片 3工作流)
|
|
||||||
*/
|
|
||||||
private Integer type;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 举报描述
|
|
||||||
*/
|
|
||||||
private String text;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态(0未处理 1已处理)
|
|
||||||
*/
|
|
||||||
private Integer status = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 逻辑删除(0展示 2删除)
|
|
||||||
*/
|
|
||||||
private Integer delFlag = 0;
|
|
||||||
}
|
|
|
@ -2,6 +2,7 @@ package com.mcwl.resource.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
@ -21,7 +22,7 @@ import lombok.NoArgsConstructor;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(description = "活动")
|
@ApiModel(description = "活动")
|
||||||
@TableName("to_activity")
|
@TableName("to_activity")
|
||||||
public class ToActivity{
|
public class ToActivity extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,7 +9,6 @@ import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页+条件
|
* 分页+条件
|
||||||
*
|
|
||||||
* @author DaiZibo
|
* @author DaiZibo
|
||||||
* @date 2025/1/13
|
* @date 2025/1/13
|
||||||
* @apiNote
|
* @apiNote
|
||||||
|
@ -24,12 +23,10 @@ public class PageVo {
|
||||||
|
|
||||||
@ApiModelProperty(value = "页码")
|
@ApiModelProperty(value = "页码")
|
||||||
private Integer pageNumber;
|
private Integer pageNumber;
|
||||||
@ApiModelProperty(value = "每页条数")
|
@ApiModelProperty(value = "每页条数")
|
||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
@ApiModelProperty(value = "名称")
|
@ApiModelProperty(value = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private Integer order;
|
private Integer order;
|
||||||
@ApiModelProperty(value = "条件过滤")
|
|
||||||
private Integer type;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,6 @@ import java.util.List;
|
||||||
public interface ModelVersionMapper extends BaseMapper<ModelVersion> {
|
public interface ModelVersionMapper extends BaseMapper<ModelVersion> {
|
||||||
void addModelVersion(@Param("modelProduct") ModelProduct modelProduct, @Param("modelVersionList") List<ModelVersion> modelVersionList);
|
void addModelVersion(@Param("modelProduct") ModelProduct modelProduct, @Param("modelVersionList") List<ModelVersion> modelVersionList);
|
||||||
|
|
||||||
void updateByName(ModelVersion modelVersion);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.mcwl.resource.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.mcwl.resource.domain.Report;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author DaiZibo
|
|
||||||
* @date 2025/1/18
|
|
||||||
* @apiNote
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface ReportMapper extends BaseMapper<Report> {
|
|
||||||
}
|
|
|
@ -17,6 +17,4 @@ import org.apache.ibatis.annotations.Param;
|
||||||
public interface WorkFlowLikeMapper extends BaseMapper<WorkFlowLike> {
|
public interface WorkFlowLikeMapper extends BaseMapper<WorkFlowLike> {
|
||||||
WorkFlowLike getLike(@Param("userId") Long userId, @Param("modelId") Long modelId);
|
WorkFlowLike getLike(@Param("userId") Long userId, @Param("modelId") Long modelId);
|
||||||
|
|
||||||
void updateStatus(WorkFlowLike workFlowLike);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.mcwl.resource.service;
|
package com.mcwl.resource.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
import com.mcwl.resource.domain.ModelVersion;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -19,6 +18,4 @@ public interface ModelVersionService extends IService<ModelVersion> {
|
||||||
|
|
||||||
List<ModelVersion> selectLogininforList(ModelVersion modelVersion);
|
List<ModelVersion> selectLogininforList(ModelVersion modelVersion);
|
||||||
|
|
||||||
AjaxResult selectByModelId(Long modelId);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
package com.mcwl.resource.service;
|
|
||||||
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.resource.domain.Report;
|
|
||||||
import com.mcwl.resource.domain.vo.PageVo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 举报 业务层
|
|
||||||
*
|
|
||||||
* @author DaiZibo
|
|
||||||
* @date 2025/1/18
|
|
||||||
* @apiNote
|
|
||||||
*/
|
|
||||||
|
|
||||||
public interface ReportService {
|
|
||||||
void addReport(Report report);
|
|
||||||
|
|
||||||
AjaxResult selectReport(PageVo pageVo);
|
|
||||||
|
|
||||||
void deleteReport(Long id);
|
|
||||||
|
|
||||||
void updateStatus(Long id);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,8 +1,6 @@
|
||||||
package com.mcwl.resource.service.impl;
|
package com.mcwl.resource.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||||
|
@ -16,7 +14,6 @@ import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.common.core.redis.RedisCache;
|
import com.mcwl.common.core.redis.RedisCache;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
import com.mcwl.common.utils.StringUtils;
|
import com.mcwl.common.utils.StringUtils;
|
||||||
import com.mcwl.common.utils.baidu.BaiduCensor;
|
|
||||||
import com.mcwl.resource.domain.ModelProduct;
|
import com.mcwl.resource.domain.ModelProduct;
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
import com.mcwl.resource.domain.ModelVersion;
|
||||||
import com.mcwl.resource.domain.dto.ModelImagePageRes;
|
import com.mcwl.resource.domain.dto.ModelImagePageRes;
|
||||||
|
@ -31,7 +28,6 @@ import com.mcwl.system.init.DictInit;
|
||||||
import com.mcwl.system.service.ISysUserService;
|
import com.mcwl.system.service.ISysUserService;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -63,9 +59,6 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysUserService sysUserService;
|
private ISysUserService sysUserService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<ModelProduct> selectByUserId(MallProductVo mallProductVo) {
|
public Page<ModelProduct> selectByUserId(MallProductVo mallProductVo) {
|
||||||
|
@ -80,6 +73,8 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
||||||
mallProductLambdaQueryWrapper.eq(ModelProduct::getUserId,userId);
|
mallProductLambdaQueryWrapper.eq(ModelProduct::getUserId,userId);
|
||||||
mallProductLambdaQueryWrapper.eq(ModelProduct::getDelFlag,0);
|
mallProductLambdaQueryWrapper.eq(ModelProduct::getDelFlag,0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 开始时间和结束时间过滤
|
// 开始时间和结束时间过滤
|
||||||
if (mallProductVo.getStartTime() != null && mallProductVo.getEndTime() != null) {
|
if (mallProductVo.getStartTime() != null && mallProductVo.getEndTime() != null) {
|
||||||
// 查询开始时间和结束时间之间的商品
|
// 查询开始时间和结束时间之间的商品
|
||||||
|
@ -120,7 +115,7 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
||||||
page.addOrder(orderItem);
|
page.addOrder(orderItem);
|
||||||
|
|
||||||
LambdaQueryWrapper<ModelProduct> lqw = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ModelProduct> lqw = new LambdaQueryWrapper<>();
|
||||||
lqw.eq(imagePageRes.getStatus() != null, ModelProduct::getAuditStatus, imagePageRes.getStatus())
|
lqw.eq(imagePageRes.getStatus() != null, ModelProduct::getAuditSatus, imagePageRes.getStatus())
|
||||||
.eq(imagePageRes.getUserId() != null, ModelProduct::getUserId, imagePageRes.getUserId())
|
.eq(imagePageRes.getUserId() != null, ModelProduct::getUserId, imagePageRes.getUserId())
|
||||||
.ge(imagePageRes.getStartTime() != null, ModelProduct::getCreateTime, imagePageRes.getStartTime())
|
.ge(imagePageRes.getStartTime() != null, ModelProduct::getCreateTime, imagePageRes.getStartTime())
|
||||||
.le(imagePageRes.getEndTime() != null, ModelProduct::getCreateTime, imagePageRes.getEndTime());
|
.le(imagePageRes.getEndTime() != null, ModelProduct::getCreateTime, imagePageRes.getEndTime());
|
||||||
|
@ -170,160 +165,19 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
||||||
//批量添加版本
|
//批量添加版本
|
||||||
modelVersionMapper.addModelVersion(requestModel.getModelProduct(),requestModel.getModelVersionList());
|
modelVersionMapper.addModelVersion(requestModel.getModelProduct(),requestModel.getModelVersionList());
|
||||||
|
|
||||||
//执行审核方法
|
|
||||||
audit(requestModel);
|
|
||||||
|
|
||||||
return AjaxResult.success("添加成功,等待审核");
|
return AjaxResult.success("添加成功,等待审核");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void audit(RequestModel requestModel) {
|
|
||||||
|
|
||||||
// 执行审核操作
|
|
||||||
threadPoolTaskExecutor.submit(() -> {
|
|
||||||
ModelProduct modelProduct = requestModel.getModelProduct();
|
|
||||||
|
|
||||||
if (modelProduct != null){
|
|
||||||
|
|
||||||
if (modelProduct.getModelName() != null){
|
|
||||||
|
|
||||||
//审核名称
|
|
||||||
String s = BaiduCensor.TextCensor(modelProduct.getModelName()+","+modelProduct.getTags());
|
|
||||||
// 解析 JSON 字符串
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(s);
|
|
||||||
// 获取 'conclusion' 字段的值
|
|
||||||
String conclusion = jsonObject.getString("conclusion");
|
|
||||||
|
|
||||||
if (conclusion.equals("不合规")) {
|
|
||||||
|
|
||||||
//更改状态,添加原因 -> 结束任务
|
|
||||||
// 获取 'data' 数组
|
|
||||||
JSONArray dataArray = jsonObject.getJSONArray("data");
|
|
||||||
|
|
||||||
// 存储所有的失败原因
|
|
||||||
List<String> failureReasons = new ArrayList<>();
|
|
||||||
// 遍历 'data' 数组中的每个元素
|
|
||||||
for (Object itemObj : dataArray) {
|
|
||||||
JSONObject item = (JSONObject) itemObj;
|
|
||||||
String msg = item.getString("msg");
|
|
||||||
failureReasons.add(msg);
|
|
||||||
}
|
|
||||||
// 使用逗号拼接所有的失败原因
|
|
||||||
String concatenatedReasons = String.join(", ", failureReasons);
|
|
||||||
modelProduct.setAuditText(concatenatedReasons);
|
|
||||||
|
|
||||||
//修改状态以及失败原因
|
|
||||||
modelProduct.setAuditStatus(4);
|
|
||||||
baseMapper.updateById(modelProduct);
|
|
||||||
log.info("模型审核未通过");
|
|
||||||
//结束任务
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//修改为合格
|
|
||||||
modelProduct.setAuditText("");
|
|
||||||
modelProduct.setAuditStatus(modelProduct.getJurisdiction());
|
|
||||||
baseMapper.updateById(modelProduct);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
List<ModelVersion> modelVersionList = requestModel.getModelVersionList();
|
|
||||||
|
|
||||||
if (modelVersionList != null){
|
|
||||||
//审核版本
|
|
||||||
for (ModelVersion modelVersion : modelVersionList) {
|
|
||||||
modelVersion.setModelId(modelProduct.getId());
|
|
||||||
//版本名称
|
|
||||||
String s1 = BaiduCensor.TextCensor(modelVersion.getVersionName() + "," +
|
|
||||||
modelVersion.getVersionDescription()+","+modelVersion.getTriggerWords());
|
|
||||||
// 解析 JSON 字符串
|
|
||||||
JSONObject jsonObject1 = JSONObject.parseObject(s1);
|
|
||||||
// 获取 'conclusion' 字段的值
|
|
||||||
String conclusion1 = jsonObject1.getString("conclusion");
|
|
||||||
if (conclusion1.equals("不合规")) {
|
|
||||||
|
|
||||||
//更改版本状态->跳出循环 审核下一个版本
|
|
||||||
// 获取 'data' 数组
|
|
||||||
JSONArray dataArray1 = jsonObject1.getJSONArray("data");
|
|
||||||
// 存储所有的失败原因
|
|
||||||
List<String> failureReasons = new ArrayList<>();
|
|
||||||
// 遍历 'data' 数组中的每个元素
|
|
||||||
for (Object itemObj : dataArray1) {
|
|
||||||
JSONObject item = (JSONObject) itemObj;
|
|
||||||
String msg = item.getString("msg");
|
|
||||||
failureReasons.add(msg);
|
|
||||||
}
|
|
||||||
// 使用逗号拼接所有的失败原因
|
|
||||||
String concatenatedReasons = String.join(", ", failureReasons);
|
|
||||||
modelVersion.setAuditText(concatenatedReasons);
|
|
||||||
modelVersion.setAuditStatus(4);
|
|
||||||
//校验id是否存在 区别修改审核或者新增审核
|
|
||||||
if (modelVersion.getId() != null){
|
|
||||||
modelVersionMapper.updateById(modelVersion);
|
|
||||||
}else {
|
|
||||||
modelVersionMapper.updateByName(modelVersion);
|
|
||||||
}
|
|
||||||
log.info("版本审核未通过");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
//审核版本图片
|
|
||||||
String[] split = modelVersion.getFilePath().split(",");
|
|
||||||
for (String path : split) {
|
|
||||||
String s2 = BaiduCensor.ImageCnesor(path);
|
|
||||||
JSONObject jsonObject2 = JSONObject.parseObject(s2);
|
|
||||||
if (jsonObject2.getString("conclusion").equals("不合规")) {
|
|
||||||
|
|
||||||
//修改状态->跳出循环 判断下一个版本
|
|
||||||
// 获取 'data' 数组
|
|
||||||
JSONArray dataArray2 = jsonObject2.getJSONArray("data");
|
|
||||||
// 存储所有的失败原因
|
|
||||||
List<String> failureReasons = new ArrayList<>();
|
|
||||||
// 遍历 'data' 数组中的每个元素
|
|
||||||
for (Object itemObj : dataArray2) {
|
|
||||||
JSONObject item = (JSONObject) itemObj;
|
|
||||||
String msg = item.getString("msg");
|
|
||||||
failureReasons.add(msg);
|
|
||||||
}
|
|
||||||
// 使用逗号拼接所有的失败原因
|
|
||||||
String concatenatedReasons = String.join(", ", failureReasons);
|
|
||||||
modelVersion.setAuditText(concatenatedReasons);
|
|
||||||
modelVersion.setAuditStatus(4);
|
|
||||||
//校验id是否存在 区别修改审核或者新增审核
|
|
||||||
if (modelVersion.getId() != null){
|
|
||||||
modelVersionMapper.updateById(modelVersion);
|
|
||||||
}else {
|
|
||||||
modelVersionMapper.updateByName(modelVersion);
|
|
||||||
}
|
|
||||||
modelVersionMapper.updateByName(modelVersion);
|
|
||||||
log.info("图片审核未通过");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//修改版本成功审核状态
|
|
||||||
modelProduct.setAuditText("");
|
|
||||||
modelVersion.setAuditStatus(1);
|
|
||||||
modelVersionMapper.updateByName(modelVersion);
|
|
||||||
log.info("全部通过审核");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updaModel(RequestModel requestModel) {
|
public void updaModel(RequestModel requestModel) {
|
||||||
//修改模版的信息
|
//修改模版的信息
|
||||||
ModelProduct modelProduct = requestModel.getModelProduct();
|
ModelProduct modelProduct = requestModel.getModelProduct();
|
||||||
if (ObjectUtils.isNotEmpty(modelProduct)){
|
if (ObjectUtils.isEmpty(modelProduct)){
|
||||||
|
|
||||||
if (StringUtils.isNotNull(modelProduct.getId())){
|
|
||||||
modelProduct.setAuditStatus(3);
|
|
||||||
modelProduct.setUpdateTime(new Date());
|
|
||||||
postMapper.updateById(requestModel.getModelProduct());
|
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotNull(modelProduct.getId())){
|
||||||
|
modelProduct.setAuditSatus(3);
|
||||||
|
postMapper.updateModel(requestModel.getModelProduct());
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改工作流版本的信息
|
//修改工作流版本的信息
|
||||||
|
@ -331,7 +185,7 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
||||||
|
|
||||||
//批量修改
|
//批量修改
|
||||||
for (ModelVersion modelVersion : requestModel.getModelVersionList()) {
|
for (ModelVersion modelVersion : requestModel.getModelVersionList()) {
|
||||||
modelVersion.setAuditStatus(3);
|
modelVersion.setAuditSatus(3);
|
||||||
modelVersionMapper.updateById(modelVersion);
|
modelVersionMapper.updateById(modelVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,10 +194,8 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
||||||
getModelId()).build();
|
getModelId()).build();
|
||||||
model.setUpdateTime(new Date());
|
model.setUpdateTime(new Date());
|
||||||
postMapper.updateById(model);
|
postMapper.updateById(model);
|
||||||
}
|
|
||||||
|
|
||||||
//审核
|
}
|
||||||
audit(requestModel);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,17 +2,13 @@ package com.mcwl.resource.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.mcwl.common.constant.DictConstants;
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.common.utils.StringUtils;
|
import com.mcwl.common.utils.StringUtils;
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
import com.mcwl.resource.domain.ModelVersion;
|
||||||
import com.mcwl.resource.mapper.ModelVersionMapper;
|
import com.mcwl.resource.mapper.ModelVersionMapper;
|
||||||
import com.mcwl.resource.service.ModelVersionService;
|
import com.mcwl.resource.service.ModelVersionService;
|
||||||
import com.mcwl.system.init.DictInit;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**模型版本 业务实现层
|
/**模型版本 业务实现层
|
||||||
|
@ -53,30 +49,15 @@ public class ModelVersionServiceImpl extends ServiceImpl< ModelVersionMapper,Mo
|
||||||
return modelVersionMapper.selectList(queryWrapper);
|
return modelVersionMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaxResult selectByModelId(Long modelId) {
|
|
||||||
|
|
||||||
//根据模型ID查询所有的版本信息
|
|
||||||
LambdaQueryWrapper<ModelVersion> modelVersionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
modelVersionLambdaQueryWrapper.eq(ModelVersion::getModelId,modelId);
|
|
||||||
modelVersionLambdaQueryWrapper.eq(ModelVersion::getDelFlag,0);
|
|
||||||
|
|
||||||
List<ModelVersion> modelVersions = modelVersionMapper.selectList(modelVersionLambdaQueryWrapper);
|
|
||||||
for (ModelVersion modelVersion : modelVersions) {
|
|
||||||
|
|
||||||
ArrayList<String> arrayList = new ArrayList<>();
|
|
||||||
|
|
||||||
//获取
|
|
||||||
String[] split = modelVersion.getHigh().split(",");
|
|
||||||
|
|
||||||
for (String s : split) {
|
|
||||||
arrayList.add(DictInit.getDictValue(DictConstants.DICT_TYPE_MODEL_VERSION_HIGH,s));
|
|
||||||
}
|
|
||||||
|
|
||||||
modelVersion.setHighList(arrayList);
|
|
||||||
}
|
|
||||||
return AjaxResult.success(modelVersions);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
package com.mcwl.resource.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
|
||||||
import com.mcwl.resource.domain.Report;
|
|
||||||
import com.mcwl.resource.domain.vo.PageVo;
|
|
||||||
import com.mcwl.resource.mapper.ReportMapper;
|
|
||||||
import com.mcwl.resource.service.ReportService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 举报 业务实现层
|
|
||||||
*
|
|
||||||
* @author DaiZibo
|
|
||||||
* @date 2025/1/18
|
|
||||||
* @apiNote
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class ReportServiceImpl implements ReportService {
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ReportMapper reportMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addReport(Report report) {
|
|
||||||
|
|
||||||
report.setCreateTime(new Date());
|
|
||||||
report.setUserId(SecurityUtils.getUserId());
|
|
||||||
reportMapper.insert(report);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaxResult selectReport(PageVo pageVo) {
|
|
||||||
|
|
||||||
Page<Report> page = new Page<>(pageVo.getPageNumber(), pageVo.getPageSize());
|
|
||||||
|
|
||||||
//构造查询条件
|
|
||||||
LambdaQueryWrapper<Report> reportLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
reportLambdaQueryWrapper.eq(Report::getDelFlag, 0);
|
|
||||||
if (pageVo.getType() != null) {
|
|
||||||
reportLambdaQueryWrapper.eq(Report::getStatus, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return AjaxResult.success(reportMapper.selectPage(page, reportLambdaQueryWrapper));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deleteReport(Long id) {
|
|
||||||
|
|
||||||
Report report = new Report().builder().id(id)
|
|
||||||
.delFlag(2).build();
|
|
||||||
|
|
||||||
reportMapper.updateById(report);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateStatus(Long id) {
|
|
||||||
|
|
||||||
Report report = new Report().builder().id(id)
|
|
||||||
.status(1)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
reportMapper.updateById(report);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -40,13 +40,11 @@ public class WorkFlowCommentServiceImpl extends ServiceImpl<WorkFlowCommentMappe
|
||||||
@Override
|
@Override
|
||||||
public void comment(WorkFlowComment workFlowComment) {
|
public void comment(WorkFlowComment workFlowComment) {
|
||||||
Long parentId = workFlowComment.getParentId();
|
Long parentId = workFlowComment.getParentId();
|
||||||
if (parentId != null){
|
|
||||||
WorkFlowComment mic = workFlowCommentMapper.selectById(parentId);
|
WorkFlowComment mic = workFlowCommentMapper.selectById(parentId);
|
||||||
|
|
||||||
if (Objects.nonNull(parentId) && Objects.isNull(mic)) {
|
if (Objects.nonNull(parentId) && Objects.isNull(mic)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
workFlowComment.setUserId(SecurityUtils.getUserId());
|
workFlowComment.setUserId(SecurityUtils.getUserId());
|
||||||
workFlowComment.setCreateBy(SecurityUtils.getUsername());
|
workFlowComment.setCreateBy(SecurityUtils.getUsername());
|
||||||
workFlowComment.setUpdateBy(SecurityUtils.getUsername());
|
workFlowComment.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class WorkFlowLikeServiceImpl extends ServiceImpl<WorkFlowLikeMapper, Wor
|
||||||
workFlow.setLikeCount(workFlow.getLikeCount() + 1);
|
workFlow.setLikeCount(workFlow.getLikeCount() + 1);
|
||||||
}
|
}
|
||||||
// 更新点赞记录
|
// 更新点赞记录
|
||||||
baseMapper.updateStatus(workFlowLike);
|
baseMapper.updateById(workFlowLike);
|
||||||
// 更新图片点赞数
|
// 更新图片点赞数
|
||||||
workFlowMapper.updateById(workFlow);
|
workFlowMapper.updateById(workFlow);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -137,7 +137,6 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改为合格
|
//修改为合格
|
||||||
workFlow.setAuditText("");
|
|
||||||
workFlow.setAuditStatus(workFlow.getJurisdiction());
|
workFlow.setAuditStatus(workFlow.getJurisdiction());
|
||||||
flowMapper.updateById(workFlow);
|
flowMapper.updateById(workFlow);
|
||||||
}
|
}
|
||||||
|
@ -171,7 +170,7 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
|
||||||
}
|
}
|
||||||
// 使用逗号拼接所有的失败原因
|
// 使用逗号拼接所有的失败原因
|
||||||
String concatenatedReasons = String.join(", ", failureReasons);
|
String concatenatedReasons = String.join(", ", failureReasons);
|
||||||
workFlowVersion.setAuditText(concatenatedReasons);
|
workFlow.setAuditText(concatenatedReasons);
|
||||||
workFlowVersion.setAuditStatus(4);
|
workFlowVersion.setAuditStatus(4);
|
||||||
//校验id是否存在 区别修改审核或者新增审核
|
//校验id是否存在 区别修改审核或者新增审核
|
||||||
if (workFlowVersion.getId() != null){
|
if (workFlowVersion.getId() != null){
|
||||||
|
@ -203,7 +202,7 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
|
||||||
}
|
}
|
||||||
// 使用逗号拼接所有的失败原因
|
// 使用逗号拼接所有的失败原因
|
||||||
String concatenatedReasons = String.join(", ", failureReasons);
|
String concatenatedReasons = String.join(", ", failureReasons);
|
||||||
workFlowVersion.setAuditText(concatenatedReasons);
|
workFlow.setAuditText(concatenatedReasons);
|
||||||
workFlowVersion.setAuditStatus(4);
|
workFlowVersion.setAuditStatus(4);
|
||||||
//校验id是否存在 区别修改审核或者新增审核
|
//校验id是否存在 区别修改审核或者新增审核
|
||||||
if (workFlowVersion.getId() != null){
|
if (workFlowVersion.getId() != null){
|
||||||
|
@ -218,7 +217,6 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改版本成功审核状态
|
//修改版本成功审核状态
|
||||||
workFlow.setAuditText("");
|
|
||||||
workFlowVersion.setAuditStatus(1);
|
workFlowVersion.setAuditStatus(1);
|
||||||
workFlowVersionMapper.updateByName(workFlowVersion);
|
workFlowVersionMapper.updateByName(workFlowVersion);
|
||||||
log.info("全部通过审核");
|
log.info("全部通过审核");
|
||||||
|
|
|
@ -7,30 +7,24 @@
|
||||||
|
|
||||||
<insert id="addModelVersion">
|
<insert id="addModelVersion">
|
||||||
INSERT INTO model_version (
|
INSERT INTO model_version (
|
||||||
model_id,version_name, model_type, file_path, trigger_words, sampling, high, vae, cfg,
|
version_name, model_type, file_path, trigger_words, sampling, high, vae, cfg,
|
||||||
is_free, is_public, is_encrypt, is_online_use, allow_download_image,
|
is_free, is_public, is_encrypt, is_online_use, allow_download_image,
|
||||||
allow_software_use, allow_fusion, allow_commercial_use, allow_usage,
|
allow_software_use, allow_fusion, allow_commercial_use, allow_usage,
|
||||||
is_exclusive_model, sample_image_paths, hide_image_gen_info, audit_status,
|
is_exclusive_model, sample_image_paths, hide_image_gen_info, audit_status,
|
||||||
audit_text, del_flag
|
audit_text, del_flag
|
||||||
)
|
)
|
||||||
VALUES
|
VALUES
|
||||||
<foreach collection="modelVersionList" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(
|
(
|
||||||
#{modelProduct.id},#{item.versionName}, #{item.modelType}, #{item.filePath}, #{item.triggerWords},
|
#{item.versionName}, #{item.modelType}, #{item.filePath}, #{item.triggerWords},
|
||||||
#{item.sampling}, #{item.high}, #{item.vae}, #{item.cfg},
|
#{item.sampling}, #{item.high}, #{item.vae}, #{item.cfg},
|
||||||
#{item.isFree}, #{item.isPublic}, #{item.isEncrypt}, #{item.isOnlineUse},
|
#{item.isFree}, #{item.isPublic}, #{item.isEncrypt}, #{item.isOnlineUse},
|
||||||
#{item.allowDownloadImage}, #{item.allowSoftwareUse}, #{item.allowFusion},
|
#{item.allowDownloadImage}, #{item.allowSoftwareUse}, #{item.allowFusion},
|
||||||
#{item.allowCommercialUse}, #{item.allowUsage}, #{item.isExclusiveModel},
|
#{item.allowCommercialUse}, #{item.allowUsage}, #{item.isExclusiveModel},
|
||||||
#{item.sampleImagePaths}, #{item.hideImageGenInfo}, 3,
|
#{item.sampleImagePaths}, #{item.hideImageGenInfo}, #{item.auditStatus},
|
||||||
#{item.auditText},'0'
|
#{item.auditText}, #{item.delFlag}
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateByName">
|
|
||||||
update model_version set audit_status = #{auditStatus},
|
|
||||||
audit_text = #{auditText}
|
|
||||||
where version_name = #{versionName} and model_id = #{modelId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -4,23 +4,11 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.mcwl.resource.mapper.WorkFlowLikeMapper">
|
<mapper namespace="com.mcwl.resource.mapper.WorkFlowLikeMapper">
|
||||||
|
|
||||||
<update id="updateStatus">
|
|
||||||
UPDATE work_flow_like
|
|
||||||
SET user_id = #{userId},
|
|
||||||
work_flow_id = #{workFlowId},
|
|
||||||
create_by = #{createBy},
|
|
||||||
create_time = #{createTime},
|
|
||||||
update_by = #{updateBy},
|
|
||||||
update_time = #{updateTime},
|
|
||||||
del_flag = #{delFlag}
|
|
||||||
WHERE id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getLike" resultType="com.mcwl.resource.domain.WorkFlowLike">
|
<select id="getLike" resultType="com.mcwl.resource.domain.WorkFlowLike">
|
||||||
select id,
|
select id,
|
||||||
user_id,
|
user_id,
|
||||||
work_flow_id,
|
model_comment_id,
|
||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time,
|
||||||
update_by,
|
update_by,
|
||||||
|
@ -28,7 +16,6 @@
|
||||||
del_flag,
|
del_flag,
|
||||||
remark
|
remark
|
||||||
from work_flow_like
|
from work_flow_like
|
||||||
where user_id = #{userId}
|
where user_id = #{userId} and model_id = #{modelId}
|
||||||
and work_flow_id = #{modelId}
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue