diff --git a/src/main/java/com/ydool/staff/entity/Personnel.java b/src/main/java/com/ydool/staff/entity/Personnel.java index 6047652..5c8ad4f 100644 --- a/src/main/java/com/ydool/staff/entity/Personnel.java +++ b/src/main/java/com/ydool/staff/entity/Personnel.java @@ -67,7 +67,7 @@ public class Personnel extends BaseEntity { private String education; @ApiModelProperty(value = "是否应届毕业生") - private Boolean freshGraduate; + private Integer freshGraduate; @ApiModelProperty(value = "毕业院校") private String academy; diff --git a/src/main/java/com/ydool/staff/request/PersonnelRequest.java b/src/main/java/com/ydool/staff/request/PersonnelRequest.java index fb3a66d..c34dc3d 100644 --- a/src/main/java/com/ydool/staff/request/PersonnelRequest.java +++ b/src/main/java/com/ydool/staff/request/PersonnelRequest.java @@ -32,7 +32,7 @@ public class PersonnelRequest { @ApiModelProperty(value = "性别") @NotNull(message = "性别不能为空") - private Boolean gender; + private Integer gender; @ApiModelProperty(value = "出生日期") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") diff --git a/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java index 75a2b4e..62743e8 100644 --- a/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java @@ -33,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional; import org.thymeleaf.util.StringUtils; import javax.annotation.Resource; +import javax.validation.constraints.Null; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; @@ -249,7 +250,7 @@ public class PersonnelServiceImpl extends BaseService(); } public void saveAlteration(String details,Object before ,Object after,String type, String id){ @@ -258,8 +259,12 @@ public class PersonnelServiceImpl extends BaseService cardFile = Arrays.asList(file.split(",")); ArrayList attachmentDtos = new ArrayList<>(); - AttachmentDto dto = new AttachmentDto(); for (String s : cardFile) { + AttachmentDto dto = new AttachmentDto(); Attachment attachment = attachmentService.selectByIdAndPath(id, s); if (ObjectUtil.isNotEmpty(attachment)){ dto.setName(attachment.getName()); @@ -277,6 +282,7 @@ public class PersonnelServiceImpl extends BaseService