diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/leave/entity/domain/ExpertLeave.java b/pmapi/src/main/java/com/ningdatech/pmapi/leave/entity/domain/ExpertLeave.java index 4aca8d3..12ed67f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/leave/entity/domain/ExpertLeave.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/leave/entity/domain/ExpertLeave.java @@ -1,8 +1,6 @@ package com.ningdatech.pmapi.leave.entity.domain; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -48,15 +46,19 @@ public class ExpertLeave implements Serializable { private String creator; @ApiModelProperty("创建人") + @TableField(fill = FieldFill.INSERT_UPDATE) private Long createBy; @ApiModelProperty("创建时间") + @TableField(fill = FieldFill.INSERT) private LocalDateTime createOn; @ApiModelProperty("修改人") + @TableField(fill = FieldFill.INSERT_UPDATE) private Long updateBy; @ApiModelProperty("修改时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private LocalDateTime updateOn; @ApiModelProperty("请假开始时间") @@ -75,9 +77,4 @@ public class ExpertLeave implements Serializable { private Integer status; - public void setUpdateAndCreate(Long createBy, LocalDateTime createOn) { - this.updateBy = this.createBy = createBy; - this.updateOn = this.createOn = createOn; - } - } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java index 8246530..76bd25e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java @@ -150,7 +150,7 @@ public class LeaveManage { leave.setType(po.getType()); leave.setRemark(po.getPostscript()); leave.setLeaveUserId(leaveUserId); - leave.setUpdateAndCreate(applyUserId, now); + leave.setCreator(LoginUserUtil.getUsername()); List> leaveDetailTimes = new ArrayList<>(); if (type.equals(LeaveTypeEnum.FIXED_TERM) || type.equals(LeaveTypeEnum.LONG_TERM)) { boolean fixedTerm = CollUtil.isNotEmpty(po.getFixedType());