Showing
24 changed files
with
323 additions
and
21 deletions
| 1 | package com.fedex.connect.customer.controller.biz.impl; | 1 | package com.fedex.connect.customer.controller.biz.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.dependencies.annotation.OperationMethodLog; | 3 | import com.fedex.connect.common.dependencies.annotation.OperationMethodLog; |
| 4 | -import com.fedex.connect.common.dependencies.date.model.LogShowModel; | ||
| 5 | import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | 4 | import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 6 | -import com.fedex.connect.common.dependencies.enums.BaseResponseCode; | ||
| 7 | -import com.fedex.connect.common.dependencies.util.CurrentUserInfo; | ||
| 8 | import com.fedex.connect.common.model.sys.User; | 5 | import com.fedex.connect.common.model.sys.User; |
| 9 | import com.fedex.connect.customer.controller.base.BaseController; | 6 | import com.fedex.connect.customer.controller.base.BaseController; |
| 10 | import com.fedex.connect.customer.controller.biz.IConsignmentController; | 7 | import com.fedex.connect.customer.controller.biz.IConsignmentController; |
| ... | @@ -38,16 +35,7 @@ public class ConsignmentController extends BaseController implements IConsignmen | ... | @@ -38,16 +35,7 @@ public class ConsignmentController extends BaseController implements IConsignmen |
| 38 | if (responseResultVo != null){ | 35 | if (responseResultVo != null){ |
| 39 | return responseResultVo; | 36 | return responseResultVo; |
| 40 | } | 37 | } |
| 41 | - User user = null; | 38 | + User user = getUserInfo(localeMessageUtil); |
| 42 | - try { | ||
| 43 | - user = CurrentUserInfo.getUser(); | ||
| 44 | - } catch (Exception e) { | ||
| 45 | - logger.error(LogShowModel.showException("Exception", e)); | ||
| 46 | - return ResponseVo.fail(localeMessageUtil.getMessage(BaseResponseCode.TOKEN_FORMAT_ERROR.getMsg())); | ||
| 47 | - } | ||
| 48 | - if (user == null) { | ||
| 49 | - return ResponseVo.fail(localeMessageUtil.getMessage(BaseResponseCode.OVERDUE_TOKEN_CODE.getMsg())); | ||
| 50 | - } | ||
| 51 | return consignmentService.add(bo,user); | 39 | return consignmentService.add(bo,user); |
| 52 | } | 40 | } |
| 53 | } | 41 | } | ... | ... |
| ... | @@ -18,7 +18,7 @@ public interface ConsignmentExtMapper { | ... | @@ -18,7 +18,7 @@ public interface ConsignmentExtMapper { |
| 18 | @Select("SELECT * FROM ( " + | 18 | @Select("SELECT * FROM ( " + |
| 19 | "SELECT * FROM T_BIZ_CONSIGNMENT " + | 19 | "SELECT * FROM T_BIZ_CONSIGNMENT " + |
| 20 | "WHERE CONSIGNMENT_CODE = #{consignmentCode} " + | 20 | "WHERE CONSIGNMENT_CODE = #{consignmentCode} " + |
| 21 | - "AND CREATE_TIME >= SYSDATE - 30 " + | 21 | + "AND CREATE_TIME >= SYSDATE - 30 " + |
| 22 | "ORDER BY CREATE_TIME DESC" + | 22 | "ORDER BY CREATE_TIME DESC" + |
| 23 | ") WHERE ROWNUM = 1") | 23 | ") WHERE ROWNUM = 1") |
| 24 | Consignment findByConsignmentCode(@Param("consignmentCode") String consignmentCode); | 24 | Consignment findByConsignmentCode(@Param("consignmentCode") String consignmentCode); | ... | ... |
| ... | @@ -4,6 +4,6 @@ import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; | ... | @@ -4,6 +4,6 @@ import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; |
| 4 | 4 | ||
| 5 | import java.util.List; | 5 | import java.util.List; |
| 6 | 6 | ||
| 7 | -public interface IAttachmentRepository { | 7 | +public interface IAttachmentExtRepository { |
| 8 | List<AttachmentHistoryDto> findHistory(Long bizId); | 8 | List<AttachmentHistoryDto> findHistory(Long bizId); |
| 9 | } | 9 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -2,13 +2,13 @@ package com.fedex.connect.customer.repository.repo.impl; | ... | @@ -2,13 +2,13 @@ package com.fedex.connect.customer.repository.repo.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; | 3 | import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; |
| 4 | import com.fedex.connect.customer.repository.base.BaseDao; | 4 | import com.fedex.connect.customer.repository.base.BaseDao; |
| 5 | -import com.fedex.connect.customer.repository.repo.IAttachmentRepository; | 5 | +import com.fedex.connect.customer.repository.repo.IAttachmentExtRepository; |
| 6 | import org.springframework.stereotype.Repository; | 6 | import org.springframework.stereotype.Repository; |
| 7 | 7 | ||
| 8 | import java.util.List; | 8 | import java.util.List; |
| 9 | 9 | ||
| 10 | @Repository | 10 | @Repository |
| 11 | -public class AttachmentExtRepositoryImpl extends BaseDao implements IAttachmentRepository { | 11 | +public class AttachmentExtRepositoryImpl extends BaseDao implements IAttachmentExtRepository { |
| 12 | @Override | 12 | @Override |
| 13 | public List<AttachmentHistoryDto> findHistory(Long bizId) { | 13 | public List<AttachmentHistoryDto> findHistory(Long bizId) { |
| 14 | return attachmentExtMapper.findHistory(bizId); | 14 | return attachmentExtMapper.findHistory(bizId); | ... | ... |
| ... | @@ -2,7 +2,7 @@ package com.fedex.connect.customer.service.base; | ... | @@ -2,7 +2,7 @@ package com.fedex.connect.customer.service.base; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | 4 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; |
| 5 | -import com.fedex.connect.customer.repository.repo.IAttachmentRepository; | 5 | +import com.fedex.connect.customer.repository.repo.IAttachmentExtRepository; |
| 6 | import com.fedex.connect.customer.repository.repo.IConsignmentExtRepository; | 6 | import com.fedex.connect.customer.repository.repo.IConsignmentExtRepository; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | 8 | ||
| ... | @@ -17,7 +17,7 @@ public class BaseService { | ... | @@ -17,7 +17,7 @@ public class BaseService { |
| 17 | protected IConsignmentExtRepository consignmentExtRepository; | 17 | protected IConsignmentExtRepository consignmentExtRepository; |
| 18 | 18 | ||
| 19 | @Autowired | 19 | @Autowired |
| 20 | - protected IAttachmentRepository attachmentRepository; | 20 | + protected IAttachmentExtRepository attachmentRepository; |
| 21 | 21 | ||
| 22 | /** | 22 | /** |
| 23 | * repository | 23 | * repository | ... | ... |
| ... | @@ -111,8 +111,39 @@ public class CacheSystem implements CommandLineRunner { | ... | @@ -111,8 +111,39 @@ public class CacheSystem implements CommandLineRunner { |
| 111 | return filter.isEmpty() ? null : filter.get(DigitConstants.DIGIT_ZERO); | 111 | return filter.isEmpty() ? null : filter.get(DigitConstants.DIGIT_ZERO); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | + /** | ||
| 115 | + * @Author Szl | ||
| 116 | + * @Description 功能说明 根据code获取用户类型指定字典项 | ||
| 117 | + * @Date 2024/11/7 | ||
| 118 | + * @param code | ||
| 119 | + * @return com.fedex.connect.common.model.bi.DictionaryEntries | ||
| 120 | + */ | ||
| 114 | public DictionaryEntries getDicUserLoginType(String code){ | 121 | public DictionaryEntries getDicUserLoginType(String code){ |
| 115 | List<DictionaryEntries> filter = dictionaryMap.get(DictionaryConstants.USER_LOGIN_TYPE).stream().filter(p -> code.equals(p.getCode())).collect(Collectors.toList()); | 122 | List<DictionaryEntries> filter = dictionaryMap.get(DictionaryConstants.USER_LOGIN_TYPE).stream().filter(p -> code.equals(p.getCode())).collect(Collectors.toList()); |
| 116 | return filter.isEmpty() ? null : filter.get(DigitConstants.DIGIT_ZERO); | 123 | return filter.isEmpty() ? null : filter.get(DigitConstants.DIGIT_ZERO); |
| 117 | } | 124 | } |
| 125 | + | ||
| 126 | + /** | ||
| 127 | + * @Author Szl | ||
| 128 | + * @Description 功能说明 根据code获取邮件类型指定字典项 | ||
| 129 | + * @Date 2024/11/7 | ||
| 130 | + * @param code | ||
| 131 | + * @return com.fedex.connect.common.model.bi.DictionaryEntries | ||
| 132 | + */ | ||
| 133 | + public DictionaryEntries getDicEmailType(String code){ | ||
| 134 | + List<DictionaryEntries> filter = dictionaryMap.get(DictionaryConstants.EMAIL_TYPE).stream().filter(p -> code.equals(p.getCode())).collect(Collectors.toList()); | ||
| 135 | + return filter.isEmpty() ? null : filter.get(DigitConstants.DIGIT_ZERO); | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + /** | ||
| 139 | + * @Author Szl | ||
| 140 | + * @Description 功能说明 根据code获取邮件状态指定字典项 | ||
| 141 | + * @Date 2024/11/7 | ||
| 142 | + * @param code | ||
| 143 | + * @return com.fedex.connect.common.model.bi.DictionaryEntries | ||
| 144 | + */ | ||
| 145 | + public DictionaryEntries getDicEmailStatus(String code){ | ||
| 146 | + List<DictionaryEntries> filter = dictionaryMap.get(DictionaryConstants.EMAIL_STATUS).stream().filter(p -> code.equals(p.getCode())).collect(Collectors.toList()); | ||
| 147 | + return filter.isEmpty() ? null : filter.get(DigitConstants.DIGIT_ZERO); | ||
| 148 | + } | ||
| 118 | } | 149 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -14,4 +14,8 @@ public interface DictionaryConstants { | ... | @@ -14,4 +14,8 @@ public interface DictionaryConstants { |
| 14 | String COUNTRY = "COUNTRY"; | 14 | String COUNTRY = "COUNTRY"; |
| 15 | //用户操作类型 | 15 | //用户操作类型 |
| 16 | String USER_LOGIN_TYPE = "USER_LOGIN_TYPE"; | 16 | String USER_LOGIN_TYPE = "USER_LOGIN_TYPE"; |
| 17 | + //邮件类型 | ||
| 18 | + String EMAIL_TYPE = "EMAIL_TYPE"; | ||
| 19 | + //邮件状态 | ||
| 20 | + String EMAIL_STATUS = "EMAIL_STATUS"; | ||
| 17 | } | 21 | } | ... | ... |
| 1 | +package com.fedex.connect.common.dependencies.enums.biz; | ||
| 2 | + | ||
| 3 | +public enum EmailStatusEnum { | ||
| 4 | + PENDING(0L,"pending","待发送"), | ||
| 5 | + SUCCESS(1L,"success","发送成功"), | ||
| 6 | + FAILED(2L,"failed","发送失败"), | ||
| 7 | + | ||
| 8 | + ; | ||
| 9 | + | ||
| 10 | + | ||
| 11 | + private Long code; | ||
| 12 | + private String enMsg; | ||
| 13 | + private String msg; | ||
| 14 | + | ||
| 15 | + EmailStatusEnum(Long code, String enMsg,String msg) { | ||
| 16 | + this.code = code; | ||
| 17 | + this.enMsg = enMsg; | ||
| 18 | + this.msg = msg; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + public Long getCode() { | ||
| 22 | + return code; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public void setCode(Long code) { | ||
| 26 | + this.code = code; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public String getEnMsg() { | ||
| 30 | + return enMsg; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + public void setEnMsg(String enMsg) { | ||
| 34 | + this.enMsg = enMsg; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public String getMsg() { | ||
| 38 | + return msg; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + public void setMsg(String msg) { | ||
| 42 | + this.msg = msg; | ||
| 43 | + } | ||
| 44 | +} |
| 1 | +package com.fedex.connect.common.dependencies.enums.biz; | ||
| 2 | + | ||
| 3 | +public enum EmailTypeEnum { | ||
| 4 | + PENDING(0L,"pushConFile","推送预清关文件"), | ||
| 5 | + | ||
| 6 | + ; | ||
| 7 | + | ||
| 8 | + | ||
| 9 | + private Long code; | ||
| 10 | + private String enMsg; | ||
| 11 | + private String msg; | ||
| 12 | + | ||
| 13 | + EmailTypeEnum(Long code, String enMsg,String msg) { | ||
| 14 | + this.code = code; | ||
| 15 | + this.enMsg = enMsg; | ||
| 16 | + this.msg = msg; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public Long getCode() { | ||
| 20 | + return code; | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + public void setCode(Long code) { | ||
| 24 | + this.code = code; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public String getEnMsg() { | ||
| 28 | + return enMsg; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public void setEnMsg(String enMsg) { | ||
| 32 | + this.enMsg = enMsg; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public String getMsg() { | ||
| 36 | + return msg; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + public void setMsg(String msg) { | ||
| 40 | + this.msg = msg; | ||
| 41 | + } | ||
| 42 | +} |
server/common-dependencies/src/main/java/com/fedex/connect/common/dependencies/util/ZipUtils.java
0 → 100644
| 1 | +package com.fedex.connect.common.dependencies.util; | ||
| 2 | + | ||
| 3 | +import org.springframework.stereotype.Component; | ||
| 4 | + | ||
| 5 | +import java.io.File; | ||
| 6 | +import java.io.FileInputStream; | ||
| 7 | +import java.io.IOException; | ||
| 8 | +import java.io.OutputStream; | ||
| 9 | +import java.util.List; | ||
| 10 | +import java.util.zip.ZipEntry; | ||
| 11 | +import java.util.zip.ZipOutputStream; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author mt | ||
| 15 | + * @Description zip压缩工具类 | ||
| 16 | + * @Date 2024/5/30 | ||
| 17 | + */ | ||
| 18 | +@Component | ||
| 19 | +public class ZipUtils { | ||
| 20 | + //缓冲区 | ||
| 21 | + private static final int BUFFER_SIZE = 2 * 1024; | ||
| 22 | + /** | ||
| 23 | + * 压缩成ZIP 方法2 | ||
| 24 | + * @param srcFiles 需要压缩的文件列表 | ||
| 25 | + * @param out 压缩文件输出流 | ||
| 26 | + * @throws Exception 压缩失败会抛出运行时异常 | ||
| 27 | + */ | ||
| 28 | + public void toZip(List<File> srcFiles , OutputStream out) throws Exception { | ||
| 29 | + ZipOutputStream zos = null ; | ||
| 30 | + try { | ||
| 31 | + zos = new ZipOutputStream(out); | ||
| 32 | + for (File srcFile : srcFiles) { | ||
| 33 | + byte[] buf = new byte[BUFFER_SIZE]; | ||
| 34 | + zos.putNextEntry(new ZipEntry(srcFile.getName())); | ||
| 35 | + int len; | ||
| 36 | + FileInputStream in = new FileInputStream(srcFile); | ||
| 37 | + while ((len = in.read(buf)) != -1){ | ||
| 38 | + zos.write(buf, 0, len); | ||
| 39 | + } | ||
| 40 | + zos.closeEntry(); | ||
| 41 | + in.close(); | ||
| 42 | + } | ||
| 43 | + } catch (Exception e) { | ||
| 44 | + throw e; | ||
| 45 | + }finally{ | ||
| 46 | + if(zos != null){ | ||
| 47 | + try { | ||
| 48 | + zos.close(); | ||
| 49 | + } catch (IOException e) { | ||
| 50 | + e.printStackTrace(); | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | +} |
server/task-schedule/src/main/java/com/fedex/connect/task/job/PushConsignmentFileEmailJob.java
0 → 100644
| 1 | +package com.fedex.connect.task.job; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.task.annotation.ProcessingTime; | ||
| 4 | +import com.fedex.connect.task.service.biz.IPushConsignmentFileService; | ||
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 6 | +import org.springframework.scheduling.annotation.Scheduled; | ||
| 7 | +import org.springframework.stereotype.Component; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author Szl | ||
| 11 | + * @Description 类说明 异步任务发送邮件到预清关组 | ||
| 12 | + * @Date 2024/11/7 | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class PushConsignmentFileEmailJob { | ||
| 16 | + | ||
| 17 | + @Autowired | ||
| 18 | + private IPushConsignmentFileService pushConsignmentFileService; | ||
| 19 | + | ||
| 20 | + @ProcessingTime | ||
| 21 | + @Scheduled(cron = "${export.task.allocation.pushConFile}") | ||
| 22 | + public void pushConsignmentFileTask() { | ||
| 23 | + pushConsignmentFileService.pushConsignmentFileTask(); | ||
| 24 | + } | ||
| 25 | +} |
server/task-schedule/src/main/java/com/fedex/connect/task/repository/base/AbstractDaoRepository.java
| ... | @@ -2,10 +2,9 @@ package com.fedex.connect.task.repository.base; | ... | @@ -2,10 +2,9 @@ package com.fedex.connect.task.repository.base; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper; | 3 | import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper; |
| 4 | import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper; | 4 | import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper; |
| 5 | +import com.fedex.connect.task.repository.dao.EmailExtMapper; | ||
| 5 | import com.fedex.connect.task.repository.dao.KafkaTemporaryStorageMapperExt; | 6 | import com.fedex.connect.task.repository.dao.KafkaTemporaryStorageMapperExt; |
| 6 | import com.fedex.connect.task.repository.dao.RedisSlabMapperExt; | 7 | import com.fedex.connect.task.repository.dao.RedisSlabMapperExt; |
| 7 | -import org.slf4j.Logger; | ||
| 8 | -import org.slf4j.LoggerFactory; | ||
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | 9 | ||
| 11 | public class AbstractDaoRepository { | 10 | public class AbstractDaoRepository { |
| ... | @@ -17,4 +16,6 @@ public class AbstractDaoRepository { | ... | @@ -17,4 +16,6 @@ public class AbstractDaoRepository { |
| 17 | protected KafkaStorageHistoryMapper kafkaStorageHistoryMapper; | 16 | protected KafkaStorageHistoryMapper kafkaStorageHistoryMapper; |
| 18 | @Autowired | 17 | @Autowired |
| 19 | protected RedisSlabMapperExt redisSlabMapperExt; | 18 | protected RedisSlabMapperExt redisSlabMapperExt; |
| 19 | + @Autowired | ||
| 20 | + protected EmailExtMapper emailExtMapper; | ||
| 20 | } | 21 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
server/task-schedule/src/main/java/com/fedex/connect/task/repository/dao/EmailExtMapper.java
0 → 100644
| 1 | +package com.fedex.connect.task.repository.dao; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.model.biz.Email; | ||
| 4 | +import org.apache.ibatis.annotations.Mapper; | ||
| 5 | + | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 8 | +@Mapper | ||
| 9 | +public interface EmailExtMapper { | ||
| 10 | + List<Email> findConPushEmails(Long typeId,Long statusId); | ||
| 11 | +} |
server/task-schedule/src/main/java/com/fedex/connect/task/repository/mapper/EmailExtMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | +<mapper namespace="com.fedex.connect.task.repository.dao.EmailExtMapper"> | ||
| 4 | + <select id="findConPushEmails" resultType="com.fedex.connect.common.model.biz.Email"> | ||
| 5 | + SELECT * | ||
| 6 | + FROM T_BIZ_EMAIL | ||
| 7 | + WHERE TYPE_ID = #{typeId} | ||
| 8 | + AND STATUS_ID = #{statusId} | ||
| 9 | + </select> | ||
| 10 | +</mapper> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +package com.fedex.connect.task.repository.repo.biz.impl; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.model.biz.Email; | ||
| 4 | +import com.fedex.connect.task.repository.base.AbstractDaoRepository; | ||
| 5 | +import com.fedex.connect.task.repository.repo.biz.IEmailExtRepository; | ||
| 6 | +import org.springframework.stereotype.Repository; | ||
| 7 | + | ||
| 8 | +import java.util.List; | ||
| 9 | + | ||
| 10 | +@Repository | ||
| 11 | +public class EmailRepositoryExtImpl extends AbstractDaoRepository implements IEmailExtRepository { | ||
| 12 | + public List<Email> findConPushEmails(Long typeId,Long statusId){ | ||
| 13 | + return emailExtMapper.findConPushEmails(typeId,statusId); | ||
| 14 | + } | ||
| 15 | + | ||
| 16 | +} |
| 1 | package com.fedex.connect.task.repository.repo.sys; | 1 | package com.fedex.connect.task.repository.repo.sys; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.model.sys.RedisSlab; | 3 | import com.fedex.connect.common.model.sys.RedisSlab; |
| 4 | +import org.springframework.stereotype.Repository; | ||
| 4 | 5 | ||
| 5 | import java.util.Date; | 6 | import java.util.Date; |
| 6 | import java.util.List; | 7 | import java.util.List; |
| 7 | 8 | ||
| 9 | +@Repository | ||
| 8 | public interface IRedisSlabExtRepository { | 10 | public interface IRedisSlabExtRepository { |
| 9 | List<RedisSlab> findValidRedisMsgList(Date curDate); | 11 | List<RedisSlab> findValidRedisMsgList(Date curDate); |
| 10 | } | 12 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | package com.fedex.connect.task.service.base; | 1 | package com.fedex.connect.task.service.base; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabRepository; | 3 | import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabRepository; |
| 4 | +import com.fedex.connect.task.repository.repo.biz.IEmailExtRepository; | ||
| 4 | import com.fedex.connect.task.repository.repo.sys.IKafkaStorageHistoryRepository; | 5 | import com.fedex.connect.task.repository.repo.sys.IKafkaStorageHistoryRepository; |
| 5 | import com.fedex.connect.task.repository.repo.sys.IKafkaTemporaryStorageRepository; | 6 | import com.fedex.connect.task.repository.repo.sys.IKafkaTemporaryStorageRepository; |
| 6 | import com.fedex.connect.task.repository.repo.sys.IRedisSlabExtRepository; | 7 | import com.fedex.connect.task.repository.repo.sys.IRedisSlabExtRepository; |
| ... | @@ -20,4 +21,6 @@ public class BaseService { | ... | @@ -20,4 +21,6 @@ public class BaseService { |
| 20 | protected IRedisSlabRepository redisSlabRepository; | 21 | protected IRedisSlabRepository redisSlabRepository; |
| 21 | @Autowired | 22 | @Autowired |
| 22 | protected IRedisSlabExtRepository redisRepository; | 23 | protected IRedisSlabExtRepository redisRepository; |
| 24 | + @Autowired | ||
| 25 | + protected IEmailExtRepository iEmailExtRepository; | ||
| 23 | } | 26 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | +package com.fedex.connect.task.service.biz.impl; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.dependencies.cache.CacheSystem; | ||
| 4 | +import com.fedex.connect.common.dependencies.enums.biz.EmailStatusEnum; | ||
| 5 | +import com.fedex.connect.common.dependencies.enums.biz.EmailTypeEnum; | ||
| 6 | +import com.fedex.connect.common.model.biz.Email; | ||
| 7 | +import com.fedex.connect.task.service.base.BaseService; | ||
| 8 | +import com.fedex.connect.task.service.biz.IPushConsignmentFileService; | ||
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 10 | +import org.springframework.stereotype.Service; | ||
| 11 | +import org.springframework.util.CollectionUtils; | ||
| 12 | + | ||
| 13 | +import java.util.List; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * @Author Szl | ||
| 17 | + * @Description 类说明 推送清关文件任务 | ||
| 18 | + * @Date 2024/11/7 | ||
| 19 | + */ | ||
| 20 | +@Service | ||
| 21 | +public class PushConsignmentFileServiceImpl extends BaseService implements IPushConsignmentFileService { | ||
| 22 | + | ||
| 23 | + @Autowired | ||
| 24 | + private CacheSystem cacheSystem; | ||
| 25 | + /** | ||
| 26 | + * @Author Szl | ||
| 27 | + * @Description 功能说明 推送清关文件 | ||
| 28 | + * @Date 2024/11/7 | ||
| 29 | + * @param | ||
| 30 | + * @return void | ||
| 31 | + */ | ||
| 32 | + @Override | ||
| 33 | + public void pushConsignmentFileTask(){ | ||
| 34 | + //查询需要发送的数据 | ||
| 35 | + List<Email> conPushEmails = iEmailExtRepository.findConPushEmails(cacheSystem.getDicEmailType(EmailTypeEnum.PENDING.getEnMsg()).getId(), cacheSystem.getDicEmailStatus(EmailStatusEnum.PENDING.getEnMsg()).getId()); | ||
| 36 | + //打zip包 | ||
| 37 | + if (!CollectionUtils.isEmpty(conPushEmails)){ | ||
| 38 | + for (Email conPushEmail : conPushEmails) { | ||
| 39 | + | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + //发送邮件 | ||
| 43 | + | ||
| 44 | + //更新邮件状态 | ||
| 45 | + | ||
| 46 | + | ||
| 47 | + } | ||
| 48 | +} |
| ... | @@ -14,6 +14,8 @@ export: | ... | @@ -14,6 +14,8 @@ export: |
| 14 | sendOb: 0 0/1 * * * ? | 14 | sendOb: 0 0/1 * * * ? |
| 15 | #推送ob zip包文件异常重试任务 | 15 | #推送ob zip包文件异常重试任务 |
| 16 | sendObRetry: 0 0/3 * * * ? | 16 | sendObRetry: 0 0/3 * * * ? |
| 17 | + #发送邮件到预清关组 | ||
| 18 | + pushConFile: 0 0/5 * * * ? | ||
| 17 | rpc: | 19 | rpc: |
| 18 | url: | 20 | url: |
| 19 | rpcKafkaReceive1: https://pjea0179.prod.apac.fedex.com:9002/icleartwkafka/rpcKafka/rpcKafkaReceive | 21 | rpcKafkaReceive1: https://pjea0179.prod.apac.fedex.com:9002/icleartwkafka/rpcKafka/rpcKafkaReceive | ... | ... |
| ... | @@ -14,6 +14,8 @@ export: | ... | @@ -14,6 +14,8 @@ export: |
| 14 | sendOb: 0 0/1 * * * ? | 14 | sendOb: 0 0/1 * * * ? |
| 15 | #推送ob zip包文件异常重试任务 | 15 | #推送ob zip包文件异常重试任务 |
| 16 | sendObRetry: 0 0/1 * * * ? | 16 | sendObRetry: 0 0/1 * * * ? |
| 17 | + #发送邮件到预清关组 | ||
| 18 | + pushConFile: 0 0/1 * * * ? | ||
| 17 | rpc: | 19 | rpc: |
| 18 | url: | 20 | url: |
| 19 | rpcKafkaReceive1: http://47.103.140.98:7010/icleartwkafka/rpcKafka/rpcKafkaReceive | 21 | rpcKafkaReceive1: http://47.103.140.98:7010/icleartwkafka/rpcKafka/rpcKafkaReceive | ... | ... |
| ... | @@ -14,6 +14,8 @@ export: | ... | @@ -14,6 +14,8 @@ export: |
| 14 | sendOb: 0 0/1 * * * ? | 14 | sendOb: 0 0/1 * * * ? |
| 15 | #推送ob zip包文件异常重试任务 | 15 | #推送ob zip包文件异常重试任务 |
| 16 | sendObRetry: 0 0/3 * * * ? | 16 | sendObRetry: 0 0/3 * * * ? |
| 17 | + #发送邮件到预清关组 | ||
| 18 | + pushConFile: 0 0/5 * * * ? | ||
| 17 | rpc: | 19 | rpc: |
| 18 | url: | 20 | url: |
| 19 | rpcKafkaReceive1: http://ujea0145.nonprod.apac.fedex.com:9001/icleartwkafka/rpcKafka/rpcKafkaReceive | 21 | rpcKafkaReceive1: http://ujea0145.nonprod.apac.fedex.com:9001/icleartwkafka/rpcKafka/rpcKafkaReceive | ... | ... |
-
Please register or login to post a comment