Browse Source

未下发到二级机构的信件可删除功能

master
laishajiang 2 years ago
parent
commit
76cbf48eba
  1. 4
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java
  2. 19
      mailbox-lan/src/main/java/com/biutag/lan/validate/commons/MailIdValidate.java

4
mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java

@ -29,6 +29,7 @@ import com.biutag.lan.flow.node.FirstSignFlow;
import com.biutag.lan.mapper.MailMapper;
import com.biutag.lan.mapper.MailSourceMapper;
import com.biutag.lan.mapper.WorkMapper;
import com.biutag.lan.validate.commons.MailIdValidate;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
@ -455,9 +456,6 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
}
public boolean delete(MailIdValidate mailId) {
if (mailId.getId()==null || mailId.getId().equals("")){
return false;
}
Mail mail = baseMapper.selectById(mailId.getId());
if (mailId.getId()!=null||!mailId.getId().equals("")){
if (mail.getFlowKey().equals(FlowNodeEnum.FIRST_SIGN.getKey())||mail.getFlowKey().equals(FlowNodeEnum.FIRST_DISTRIBUTE.getKey())){

19
mailbox-lan/src/main/java/com/biutag/lan/validate/commons/MailIdValidate.java

@ -0,0 +1,19 @@
package com.biutag.lan.validate.commons;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serializable;
@Data
@ApiModel("ID参数")
public class MailIdValidate implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank
@ApiModelProperty(value = "ID", required = true)
private String id;
}
Loading…
Cancel
Save