diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/MailMarkService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/MailMarkService.java index 0c94975..a74017c 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/MailMarkService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/MailMarkService.java @@ -8,6 +8,9 @@ import com.biutag.lan.domain.MailMark; import com.biutag.lan.mapper.MailMarkMapper; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; +import java.util.List; + @Service public class MailMarkService extends ServiceImpl { @@ -22,4 +25,11 @@ public class MailMarkService extends ServiceImpl { return count(queryWrapper); } + public List listFor12345(LocalDateTime startTime, LocalDateTime endTime) { + return listObjs(new LambdaQueryWrapper() + .select(MailMark::getMailId) + .ge(MailMark::getCompletionTime, startTime) + .lt(MailMark::getCompletionTime, endTime), Object::toString); + } + } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java index 9c034f9..3487c0d 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java @@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.constants.AppConstants; import com.biutag.entity.setting.DictData; import com.biutag.entity.system.Dept; -import com.biutag.entity.system.PoliceDepart; import com.biutag.enums.DetermineType; import com.biutag.enums.MailState; import com.biutag.enums.RoleEnum; @@ -20,6 +19,7 @@ import com.biutag.exception.BusinessException; import com.biutag.lan.config.AdminThreadLocal; import com.biutag.lan.domain.*; import com.biutag.lan.domain.bo.*; +import com.biutag.lan.domain.validate.commons.MailIdValidate; import com.biutag.lan.domain.vo.DetermineMail; import com.biutag.lan.domain.vo.MailExtensionApprovalVo; import com.biutag.lan.domain.vo.MailFlowDetail; @@ -29,10 +29,8 @@ import com.biutag.lan.flow.*; import com.biutag.lan.flow.node.FirstSignFlow; import com.biutag.lan.mapper.MailMapper; import com.biutag.lan.mapper.WorkMapper; -import com.biutag.lan.domain.validate.commons.MailIdValidate; import com.biutag.mapper.MailNlpMapper; import com.biutag.mapper.system.DeptMapper; -import com.biutag.mapper.system.PoliceDepartMapper; import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -95,6 +93,8 @@ public class MailService extends ServiceImpl { @Lazy @Autowired private FlowConfig flowConfig; + @Autowired + private MailMarkService mailMarkService; public MailFlowDetail getMailFlowDetail(String mailId) { MailSource mailSource = mailSourceService.getById(mailId); @@ -593,7 +593,6 @@ public class MailService extends ServiceImpl { return list(new LambdaQueryWrapper().ne(Mail::getMailLevel, "高敏信件") .eq(Mail::getMailState, "completion") .eq(Mail::getSource, "mailbox") - .ge(Mail::getCreateTime, startTime) - .lt(Mail::getCreateTime, endTime)); + .in(Mail::getId, mailMarkService.listFor12345(startTime, endTime))); } } \ No newline at end of file diff --git a/mailbox-outer/src/main/java/com/biutag/outer/job/Job.java b/mailbox-outer/src/main/java/com/biutag/outer/job/Job.java index 21ff1a9..4e57d81 100644 --- a/mailbox-outer/src/main/java/com/biutag/outer/job/Job.java +++ b/mailbox-outer/src/main/java/com/biutag/outer/job/Job.java @@ -311,7 +311,7 @@ public class Job { /** * 推送12345信箱服务 30 s */ - @Scheduled(cron = "0 0 2 * * *") + @Scheduled(cron = "0 39 12 * * *") public void push12345() { log.info("推送12345信箱服务-----------------------------"); try {