Compare commits

...

4 Commits

Author SHA1 Message Date
Diyu0904 de0f0fc2f9 加密后修改数据接口新增日志 2025-03-19 15:08:35 +08:00
Diyu0904 84f274bbc6 修改时间为东八区格式 2025-03-18 16:18:13 +08:00
Diyu0904 5726a63ec7 新增修改工作流/模型文件校验 2025-03-18 14:28:46 +08:00
Diyu0904 ed9cad897f 用户头像与背景放置在环境文件 2025-03-18 13:55:48 +08:00
18 changed files with 74 additions and 38 deletions

View File

@ -289,6 +289,7 @@ public class FileController {
@PostMapping("/updateFileData") @PostMapping("/updateFileData")
public R updateFileData(@RequestBody RequestFile requestFile){ public R updateFileData(@RequestBody RequestFile requestFile){
log.info("加密后获取到的数据:{}",requestFile);
return fileService.updateFileData(requestFile); return fileService.updateFileData(requestFile);
} }

View File

@ -2,20 +2,20 @@ package com.mcwl.web.controller.resource;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.mcwl.common.constant.HttpStatus;
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.domain.R; import com.mcwl.common.core.domain.R;
import com.mcwl.common.core.page.PageDomain;
import com.mcwl.common.core.page.TableDataInfo; import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.common.utils.SecurityUtils; import com.mcwl.common.utils.SecurityUtils;
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;
import com.mcwl.resource.domain.response.ResponseModelProduct;
import com.mcwl.resource.domain.request.RequestModel; import com.mcwl.resource.domain.request.RequestModel;
import com.mcwl.resource.domain.response.ResponseModelProduct;
import com.mcwl.resource.domain.vo.PageVo; import com.mcwl.resource.domain.vo.PageVo;
import com.mcwl.resource.mapper.ModelVersionMapper; import com.mcwl.resource.mapper.ModelVersionMapper;
import com.mcwl.resource.service.*; import com.mcwl.resource.service.ModelService;
import com.mcwl.system.service.impl.SysUserServiceImpl; import com.mcwl.system.service.impl.SysUserServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -95,6 +95,24 @@ public class MallProductController extends BaseController {
@ApiOperation(value = "修改模型") @ApiOperation(value = "修改模型")
@PostMapping("/update") @PostMapping("/update")
public AjaxResult updateModel(@RequestBody RequestModel requestModel) { public AjaxResult updateModel(@RequestBody RequestModel requestModel) {
for (ModelVersion modelVersion : requestModel.getModelVersionList()) {
//校验名字
ModelVersion modelVersion1 = modelVersionMapper.selectByFileName(modelVersion.getFileName());
if (modelVersion1 != null) {
return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"文件名字重复");
}
//校验hash
ModelVersion modelVersion2 = modelVersionMapper.selectByHash(modelVersion.getFileHash());
if (modelVersion2 != null){
return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"文件内容重复");
}
}
ModelProduct modelProduct = requestModel.getModelProduct(); ModelProduct modelProduct = requestModel.getModelProduct();
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getUserId();

View File

@ -2,13 +2,16 @@ package com.mcwl.web.controller.resource;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.mcwl.common.constant.HttpStatus;
import com.mcwl.common.core.controller.BaseController; import com.mcwl.common.core.controller.BaseController;
import com.mcwl.common.core.domain.R; import com.mcwl.common.core.domain.R;
import com.mcwl.resource.domain.WorkFlow; import com.mcwl.resource.domain.WorkFlow;
import com.mcwl.resource.domain.WorkFlowVersion;
import com.mcwl.resource.domain.dto.AddRequestWorkFlow; import com.mcwl.resource.domain.dto.AddRequestWorkFlow;
import com.mcwl.resource.domain.request.RequestWorkFlow; import com.mcwl.resource.domain.request.RequestWorkFlow;
import com.mcwl.resource.domain.response.ResponseWorkFlow; import com.mcwl.resource.domain.response.ResponseWorkFlow;
import com.mcwl.resource.domain.vo.PageVo; import com.mcwl.resource.domain.vo.PageVo;
import com.mcwl.resource.mapper.WorkFlowVersionMapper;
import com.mcwl.resource.service.WorkFlowService; import com.mcwl.resource.service.WorkFlowService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -40,6 +43,9 @@ public class WorkFlowController extends BaseController {
@Autowired @Autowired
private WorkFlowService workFlowService; private WorkFlowService workFlowService;
@Autowired
private WorkFlowVersionMapper workFlowVersionMapper;
/** /**
* *
@ -94,6 +100,23 @@ public class WorkFlowController extends BaseController {
@PostMapping("/updateWorkFlow") @PostMapping("/updateWorkFlow")
public R<Object> updateWorkFlow(@RequestBody RequestWorkFlow requestWorkFlow) { public R<Object> updateWorkFlow(@RequestBody RequestWorkFlow requestWorkFlow) {
for (WorkFlowVersion workFlowVersion : requestWorkFlow.getWorkFlowVersionList()) {
//校验名字
WorkFlowVersion workFlowVersion1 = workFlowVersionMapper.selectByFileName(workFlowVersion.getFileName());
if (workFlowVersion1 != null) {
return R.fail(HttpStatus.SHOW_ERROR_MSG,"文件名字重复");
}
//校验hash
WorkFlowVersion workFlowVersion2 = workFlowVersionMapper.selectByHash(workFlowVersion.getFileHash());
if (workFlowVersion2 != null){
return R.fail(HttpStatus.SHOW_ERROR_MSG,"文件内容重复");
}
}
workFlowService.updateWorkFlow(requestWorkFlow); workFlowService.updateWorkFlow(requestWorkFlow);
return R.ok(); return R.ok();

View File

@ -178,3 +178,8 @@ mqtt:
max-reconnect-attempts: 5 max-reconnect-attempts: 5
clean-session: true clean-session: true
#用户头像与背景
mcwl:
user:
avatar: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/7/53/3f5cc1d7-b062-4a22-9f7e-d442bc6dcf42.png
backgroundImg: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/8/2/c8387681-8138-4a29-a1c9-4a143da34c5a.png

View File

@ -13,10 +13,6 @@ mcwl:
# 验证码类型 math 数字计算 char 字符验证 # 验证码类型 math 数字计算 char 字符验证
captchaType: math captchaType: math
user:
avatar: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/7/53/3f5cc1d7-b062-4a22-9f7e-d442bc6dcf42.png
backgroundImg: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/8/2/c8387681-8138-4a29-a1c9-4a143da34c5a.png
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为8080 # 服务器的HTTP端口默认为8080

View File

@ -1,17 +1,16 @@
package com.mcwl.common.core.domain; package com.mcwl.common.core.domain;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/** /**
* Entity * Entity
@ -42,7 +41,7 @@ public class BaseEntity implements Serializable
private String updateBy; private String updateBy;
/** 更新时间 */ /** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@TableField(fill = FieldFill.UPDATE) @TableField(fill = FieldFill.UPDATE)
private Date updateTime; private Date updateTime;

View File

@ -1,14 +1,9 @@
package com.mcwl.memberCenter.domain.vo; package com.mcwl.memberCenter.domain.vo;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mcwl.common.core.domain.BaseEntity;
import com.mcwl.memberCenter.enums.PromotionEnum;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date; import java.util.Date;
@ -48,14 +43,14 @@ public class PromotionVo {
* *
*/ */
@ApiModelProperty(value = "活动开始时间") @ApiModelProperty(value = "活动开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startTime; private Date startTime;
/** /**
* *
*/ */
@ApiModelProperty(value = "活动结束时间") @ApiModelProperty(value = "活动结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTime; private Date endTime;

View File

@ -33,6 +33,6 @@ public class ConsumeVo {
// 消费时间 // 消费时间
@ApiModelProperty(value = "消费时间") @ApiModelProperty(value = "消费时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date consumeDate; private Date consumeDate;
} }

View File

@ -64,7 +64,7 @@ public class OrderTrade extends BaseEntity {
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date orderTime; private Date orderTime;
/** /**

View File

@ -33,7 +33,7 @@ public class WalletConsumeRecordVo {
* *
*/ */
@ApiModelProperty(value = "消费时间") @ApiModelProperty(value = "消费时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date orderTime; private Date orderTime;
} }

View File

@ -32,7 +32,7 @@ public class WalletRechargeRecordVo {
* *
*/ */
@ApiModelProperty(value = "下单时间") @ApiModelProperty(value = "下单时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date orderTime; private Date orderTime;

View File

@ -110,7 +110,7 @@ public class SysJob extends BaseEntity
this.cronExpression = cronExpression; this.cronExpression = cronExpression;
} }
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
public Date getNextValidTime() public Date getNextValidTime()
{ {
if (StringUtils.isNotEmpty(cronExpression)) if (StringUtils.isNotEmpty(cronExpression))

View File

@ -6,9 +6,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import java.util.Date; import java.util.Date;
/** /**
@ -35,14 +33,14 @@ public class ModelImagePageRes extends PageDomain {
* *
*/ */
@ApiModelProperty(value = "开始时间") @ApiModelProperty(value = "开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startTime; private Date startTime;
/** /**
* *
*/ */
@ApiModelProperty(value = "结束时间") @ApiModelProperty(value = "结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTime; private Date endTime;

View File

@ -39,7 +39,7 @@ public class AdviceVo {
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createTime; private Date createTime;

View File

@ -38,7 +38,7 @@ public class AttentionAdviceVo {
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createTime; private Date createTime;

View File

@ -57,7 +57,7 @@ public class CommentAdviceVo {
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createTime; private Date createTime;

View File

@ -48,7 +48,7 @@ public class SysLogininfor extends BaseEntity
private String msg; private String msg;
/** 访问时间 */ /** 访问时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date loginTime; private Date loginTime;

View File

@ -1,11 +1,12 @@
package com.mcwl.system.domain; package com.mcwl.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mcwl.common.annotation.Excel; import com.mcwl.common.annotation.Excel;
import com.mcwl.common.annotation.Excel.ColumnType; import com.mcwl.common.annotation.Excel.ColumnType;
import com.mcwl.common.core.domain.BaseEntity; import com.mcwl.common.core.domain.BaseEntity;
import java.util.Date;
/** /**
* oper_log * oper_log
* *
@ -79,7 +80,7 @@ public class SysOperLog extends BaseEntity
private String errorMsg; private String errorMsg;
/** 操作时间 */ /** 操作时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date operTime; private Date operTime;