This commit is contained in:
yuejiajun 2025-09-30 11:13:13 +08:00
parent 03d7f90b9d
commit e76ba43dab
4 changed files with 60 additions and 16 deletions

View File

@ -1,5 +1,6 @@
package com.example.demo.common.domain;
import com.mybatisflex.annotation.Column;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
@ -31,28 +32,61 @@ public class BaseDTO implements Serializable {
*/
@Schema(description = "ID")
private String id;
/**
* 创建时
* 命名空
*/
@Schema(description = "创建时")
private Date createdTime;
@Schema(description = "命名空")
private String nameSpace;
/**
* 创建人ID
* 排序字段
*/
@Schema(description = "创建人ID")
private String createdId;
@Schema(description = "排序字段")
private String sortName;
/**
* 更新时间
* 是否删除0未删除1已删除
*/
@Schema(description = "更新时间")
private Date updatedTime;
@Column(isLogicDelete = true)
@Schema(description = "是否删除")
private String isDelete;
/**
* 更新人ID
* 乐观锁版本号
*/
@Schema(description = "更新人ID")
private String updatedId;
@Column(version = true)
@Schema(description = "乐观锁版本号")
private Integer revision;
// 创建时间创建ID更新时间更新ID不允许前端或API直接控制
// /**
// * 创建时间
// */
// @Schema(description = "创建时间")
// private Date createdTime;
//
// /**
// * 创建人ID
// */
// @Schema(description = "创建人ID")
// private String createdId;
//
// /**
// * 更新时间
// */
// @Schema(description = "更新时间")
// private Date updatedTime;
//
// /**
// * 更新人ID
// */
// @Schema(description = "更新人ID")
// private String updatedId;
/**
* 租户ID
*/
@Schema(description = "租户ID")
private String tenantId;
}

View File

@ -65,6 +65,8 @@ public class MapperRuleController {
@PutMapping("/{ruleId}")
@Operation(summary = "更新映射规则", description = "更新指定的映射规则")
public Wrapper<MapperRuleVO> updateRule(
@Parameter(description = "规则ID", required = true)
@PathVariable String ruleId,
@Parameter(description = "映射规则数据", required = true)
@RequestBody MapperRuleDTO rule) {
try {

View File

@ -65,6 +65,8 @@ public class ParseRuleController {
@PutMapping("/{ruleId}")
@Operation(summary = "更新解析规则", description = "更新指定的解析规则")
public Wrapper<ParseRuleVO> updateRule(
@Parameter(description = "规则ID", required = true)
@PathVariable String ruleId,
@Parameter(description = "解析规则数据", required = true)
@RequestBody ParseRuleDTO rule) {
try {

View File

@ -27,6 +27,12 @@ public class FileRecordServiceImpl
extends BaseServiceImpl<FileRecordEntity, FileRecordVO, FileRecordDTO, FileRecordQueryDTO, FileRecordMapper>
implements FileRecordService {
/**
* 构造函数
*
* @param beanSearcher BeanSearcher实例用于高级查询
* @param transService 翻译服务实例用于字段翻译
*/
public FileRecordServiceImpl(
BeanSearcher beanSearcher,
TransService transService