jinhui.wang

Merge remote-tracking branch 'origin/master' into ver1.0.0-wjh

Showing 195 changed files with 4282 additions and 2230 deletions
...@@ -9,6 +9,7 @@ cd ../../ ...@@ -9,6 +9,7 @@ cd ../../
9 base_dir=`pwd` 9 base_dir=`pwd`
10 pName='package' 10 pName='package'
11 server='server' 11 server='server'
12 +prefix='ipc-'
12 13
13 mkdir $base_dir/${pName} 14 mkdir $base_dir/${pName}
14 rm -f $base_dir/${pName}/*.war 15 rm -f $base_dir/${pName}/*.war
...@@ -30,7 +31,7 @@ echo '######## 打包模块: '${moduleName} ...@@ -30,7 +31,7 @@ echo '######## 打包模块: '${moduleName}
30 cd $base_dir/${server}/${moduleName} 31 cd $base_dir/${server}/${moduleName}
31 mvn clean install -Dmaven.test.skip=true -P$profile 32 mvn clean install -Dmaven.test.skip=true -P$profile
32 oriName=${moduleName}-${sVersion}_${profile}.war.original 33 oriName=${moduleName}-${sVersion}_${profile}.war.original
33 -tarName=${moduleName}-${version}_${profile}.war 34 +tarName=${prefix}${moduleName}-${version}_${profile}.war
34 cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName} 35 cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName}
35 echo '######## 打包完成目录: '$base_dir/${pName}/${tarName} 36 echo '######## 打包完成目录: '$base_dir/${pName}/${tarName}
36 37
...@@ -41,7 +42,7 @@ echo '######## 打包模块: '${moduleName} ...@@ -41,7 +42,7 @@ echo '######## 打包模块: '${moduleName}
41 cd $base_dir/${server}/${moduleName} 42 cd $base_dir/${server}/${moduleName}
42 mvn clean install -Dmaven.test.skip=true -P$profile 43 mvn clean install -Dmaven.test.skip=true -P$profile
43 oriName=${moduleName}-${sVersion}_${profile}.war.original 44 oriName=${moduleName}-${sVersion}_${profile}.war.original
44 -tarName=${moduleName}-${version}_${profile}.war 45 +tarName=${prefix}${moduleName}-${version}_${profile}.war
45 cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName} 46 cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName}
46 echo '######## 打包完成目录: '$base_dir/${pName}/${tarName} 47 echo '######## 打包完成目录: '$base_dir/${pName}/${tarName}
47 48
...@@ -52,7 +53,7 @@ echo '######## 打包模块: '${moduleName} ...@@ -52,7 +53,7 @@ echo '######## 打包模块: '${moduleName}
52 cd $base_dir/${server}/${moduleName} 53 cd $base_dir/${server}/${moduleName}
53 mvn clean install -Dmaven.test.skip=true -P$profile 54 mvn clean install -Dmaven.test.skip=true -P$profile
54 oriName=${moduleName}-${sVersion}_${profile}.war.original 55 oriName=${moduleName}-${sVersion}_${profile}.war.original
55 -tarName=${moduleName}-${version}_${profile}.war 56 +tarName=${prefix}${moduleName}-${version}_${profile}.war
56 cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName} 57 cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName}
57 echo '######## 打包完成目录: '$base_dir/${pName}/${tarName} 58 echo '######## 打包完成目录: '$base_dir/${pName}/${tarName}
58 59
...@@ -63,7 +64,7 @@ echo '######## 打包模块: '${moduleName} ...@@ -63,7 +64,7 @@ echo '######## 打包模块: '${moduleName}
63 cd $base_dir/${server}/${moduleName} 64 cd $base_dir/${server}/${moduleName}
64 mvn clean install -Dmaven.test.skip=true -P$profile 65 mvn clean install -Dmaven.test.skip=true -P$profile
65 oriName=${moduleName}-${sVersion}_${profile}.war.original 66 oriName=${moduleName}-${sVersion}_${profile}.war.original
66 -tarName=${moduleName}-${version}_${profile}.war 67 +tarName=${prefix}${moduleName}-${version}_${profile}.war
67 cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName} 68 cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName}
68 echo '######## 打包完成目录: '$base_dir/${pName}/${tarName} 69 echo '######## 打包完成目录: '$base_dir/${pName}/${tarName}
69 70
......
...@@ -14,8 +14,9 @@ public interface CustomerConstant { ...@@ -14,8 +14,9 @@ public interface CustomerConstant {
14 interface VALIDATE_KEYS{ 14 interface VALIDATE_KEYS{
15 //最大上传文件个数100个 15 //最大上传文件个数100个
16 Integer UPLOAD_FILE_MAX_TOTAL = 100; 16 Integer UPLOAD_FILE_MAX_TOTAL = 100;
17 - //最大上传总文件大小95M 17 + //文件大小95M
18 - Integer UPLOAD_FILE_MAX_SIZE = 95 * 1024 * 1024; 18 + Integer FILE_MAX_SIZE = 95;
19 + //最大上传总文件大小95kb
20 + Integer UPLOAD_FILE_MAX_SIZE = FILE_MAX_SIZE * 1024 * 1024;
19 } 21 }
20 - 22 +}
21 -}
...\ No newline at end of file ...\ No newline at end of file
......
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;
4 +import com.fedex.connect.common.dependencies.contants.AnnotationConstants;
5 +import com.fedex.connect.common.dependencies.util.FileUtil;
3 import com.fedex.connect.customer.controller.base.BaseController; 6 import com.fedex.connect.customer.controller.base.BaseController;
4 import com.fedex.connect.customer.controller.biz.IAttachmentController; 7 import com.fedex.connect.customer.controller.biz.IAttachmentController;
5 import io.swagger.annotations.Api; 8 import io.swagger.annotations.Api;
9 +import io.swagger.annotations.ApiOperation;
6 import lombok.extern.slf4j.Slf4j; 10 import lombok.extern.slf4j.Slf4j;
11 +import org.springframework.web.bind.annotation.GetMapping;
7 import org.springframework.web.bind.annotation.RequestMapping; 12 import org.springframework.web.bind.annotation.RequestMapping;
13 +import org.springframework.web.bind.annotation.RequestParam;
8 import org.springframework.web.bind.annotation.RestController; 14 import org.springframework.web.bind.annotation.RestController;
9 15
16 +import javax.servlet.http.HttpServletRequest;
17 +import javax.servlet.http.HttpServletResponse;
18 +
10 /** 19 /**
11 * @Author Szl 20 * @Author Szl
12 * @Description 类说明 附件相关 21 * @Description 类说明 附件相关
...@@ -18,4 +27,15 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -18,4 +27,15 @@ import org.springframework.web.bind.annotation.RestController;
18 @Api(value = "AttachmentControllerImpl", tags = {"附件操作相关"}) 27 @Api(value = "AttachmentControllerImpl", tags = {"附件操作相关"})
19 public class AttachmentController extends BaseController implements IAttachmentController { 28 public class AttachmentController extends BaseController implements IAttachmentController {
20 29
30 + @GetMapping(value = "/downLoadFile")
31 + @OperationMethodLog(describe = "business_log_20008",remarkType = AnnotationConstants.LOG_REMARK_TYPE_SPECIAL,status = AnnotationConstants.LOG_STATUS_SHOW)
32 + @ApiOperation(value = "下载单个文件")
33 + public void downLoadFile(HttpServletRequest request, HttpServletResponse response,
34 + @RequestParam(name = "path") String path, @RequestParam(name = "name") String name) throws Exception {
35 +
36 + name = new String(name.getBytes("UTF-8"), "ISO-8859-1");
37 + String contentType = FileUtil.getContentType(name);
38 + response.setHeader("Content-Disposition", "attachment;filename=" + name +";content-type:"+contentType);
39 + FileUtil.download(request, response, path + FileUtil.SIGN, name,contentType);
40 + }
21 } 41 }
......
...@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
26 public class UploadRecordController extends BaseController implements IUploadRecordController { 26 public class UploadRecordController extends BaseController implements IUploadRecordController {
27 27
28 @Override 28 @Override
29 - @PostMapping("/queryHistoryList/{consignmentId}") 29 + @PostMapping("/queryHistoryList")
30 @ApiOperation(value = "ResponseVo", notes = "运单历史上传记录查询") 30 @ApiOperation(value = "ResponseVo", notes = "运单历史上传记录查询")
31 @OperationMethodLog(describe = "business_log_20006") 31 @OperationMethodLog(describe = "business_log_20006")
32 public ResponseVo queryHistoryList(@RequestBody AttachmentHistoryQuery attachmentHistoryQuery) { 32 public ResponseVo queryHistoryList(@RequestBody AttachmentHistoryQuery attachmentHistoryQuery) {
......
...@@ -31,4 +31,6 @@ public class ConsignmentBo { ...@@ -31,4 +31,6 @@ public class ConsignmentBo {
31 //文件业务类型AWB,INV,PKL,OTH(分运单,发票,箱单和其它这四种类型) 31 //文件业务类型AWB,INV,PKL,OTH(分运单,发票,箱单和其它这四种类型)
32 @BaseNotBlank(describe = "business_field_31008") 32 @BaseNotBlank(describe = "business_field_31008")
33 private List<Attachment> attachmentBizTypeList; 33 private List<Attachment> attachmentBizTypeList;
34 + //是否使用DM005标志
35 + private Long ceFlag;
34 } 36 }
......
...@@ -8,5 +8,5 @@ public class ConsignmentAddDto { ...@@ -8,5 +8,5 @@ public class ConsignmentAddDto {
8 * 是否为该用户的运单 1:是 0:否 8 * 是否为该用户的运单 1:是 0:否
9 */ 9 */
10 private Integer isCreatorFlag; 10 private Integer isCreatorFlag;
11 - private Long consignmentId; 11 + private ConsignmentDto consignment;
12 } 12 }
......
1 +package com.fedex.connect.customer.data.dto;
2 +
3 +import com.fedex.connect.common.model.biz.Consignment;
4 +import lombok.Data;
5 +
6 +@Data
7 +public class ConsignmentDto extends Consignment {
8 + private Long ceFlag;
9 +}
...@@ -34,4 +34,6 @@ public class FindConsignmentsDto { ...@@ -34,4 +34,6 @@ public class FindConsignmentsDto {
34 private String userInputOriginCountryCode; 34 private String userInputOriginCountryCode;
35 35
36 private String userInputOriginCountry; 36 private String userInputOriginCountry;
37 +
38 + private Long ceFlag;
37 } 39 }
......
1 package com.fedex.connect.customer.data.query; 1 package com.fedex.connect.customer.data.query;
2 2
3 -import com.fedex.connect.common.dependencies.util.DateUtil;
4 import com.fedex.connect.common.dependencies.util.Utils; 3 import com.fedex.connect.common.dependencies.util.Utils;
5 import com.fedex.connect.customer.data.PageBase; 4 import com.fedex.connect.customer.data.PageBase;
6 import lombok.Data; 5 import lombok.Data;
7 import org.springframework.util.CollectionUtils; 6 import org.springframework.util.CollectionUtils;
8 7
9 import java.time.LocalDate; 8 import java.time.LocalDate;
10 -import java.time.ZoneId; 9 +import java.time.format.DateTimeFormatter;
11 -import java.util.Date;
12 import java.util.List; 10 import java.util.List;
13 11
14 /** 12 /**
...@@ -24,15 +22,34 @@ public class ConsignmentQuery extends PageBase { ...@@ -24,15 +22,34 @@ public class ConsignmentQuery extends PageBase {
24 if (Utils.isNotEmpty(query.getConsignmentCode())) { 22 if (Utils.isNotEmpty(query.getConsignmentCode())) {
25 query.setConsignmentCodeList(Utils.split(query.getConsignmentCode(), "[;\\n]")); 23 query.setConsignmentCodeList(Utils.split(query.getConsignmentCode(), "[;\\n]"));
26 } 24 }
27 - if(!CollectionUtils.isEmpty(query.getConsignmentCodeList())) { 25 + if(!CollectionUtils.isEmpty(query.getConsignmentCodeList()) && Utils.isEmpty(query.getCreateTimeFrom()) && Utils.isEmpty(query.getCreateTimeTo())) {
28 - query.setCreateTimeFrom(null); 26 + // 获取当前日期,减去180天
29 - query.setCreateTimeTo(null); 27 + LocalDate localDate = LocalDate.now().minusDays(180);
30 - } 28 +
31 - //如果没有输入查询条件,则默认查三天的数据 29 + // 设置 createTimeFrom 为 180 天前的日期(不带时分秒)
32 - if (CollectionUtils.isEmpty(query.getConsignmentCodeList()) && Utils.isEmpty(query.getConsignmentCode())){ 30 + String createTimeFrom = localDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
31 + query.setCreateTimeFrom(createTimeFrom);
32 +
33 + // 获取当前日期(不带时分秒)
34 + LocalDate currentDate = LocalDate.now();
35 +
36 + // 设置 createTimeTo 为今天的日期(不带时分秒)
37 + String createTimeTo = currentDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
38 + query.setCreateTimeTo(createTimeTo);
39 + }else if (Utils.isEmpty(query.getCreateTimeFrom()) && Utils.isEmpty(query.getCreateTimeTo())) {
40 + // 获取当前日期,减去3天
33 LocalDate localDate = LocalDate.now().minusDays(3); 41 LocalDate localDate = LocalDate.now().minusDays(3);
34 - query.setCreateTimeFrom(DateUtil.timeFormat(Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant()))); 42 +
35 - query.setCreateTimeTo(DateUtil.timeFormat(new Date())); 43 + // 设置 createTimeFrom 为 3 天前的日期(不带时分秒)
44 + String createTimeFrom = localDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
45 + query.setCreateTimeFrom(createTimeFrom);
46 +
47 + // 获取当前日期(不带时分秒)
48 + LocalDate currentDate = LocalDate.now();
49 +
50 + // 设置 createTimeTo 为今天的日期(不带时分秒)
51 + String createTimeTo = currentDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
52 + query.setCreateTimeTo(createTimeTo);
36 } 53 }
37 query.setStart(query.getStart()); 54 query.setStart(query.getStart());
38 return query; 55 return query;
......
...@@ -34,6 +34,10 @@ public enum ResponseCode { ...@@ -34,6 +34,10 @@ public enum ResponseCode {
34 MESSAGE_CODE_30014(30014,"business_exception_30014"), 34 MESSAGE_CODE_30014(30014,"business_exception_30014"),
35 MESSAGE_CODE_30015(30015,"business_success_30015"), 35 MESSAGE_CODE_30015(30015,"business_success_30015"),
36 MESSAGE_CODE_30016(30016,"business_exception_30016"), 36 MESSAGE_CODE_30016(30016,"business_exception_30016"),
37 + MESSAGE_CODE_30017(30017,"business_exception_30017"),
38 + MESSAGE_CODE_30018(30018,"business_exception_30018"),
39 + MESSAGE_CODE_30019(30019,"business_exception_30019"),
40 + MESSAGE_CODE_30020(30020,"business_exception_30020"),
37 41
38 /******打个样,编写样例*****/ 42 /******打个样,编写样例*****/
39 // MESSAGE_CODE_30001(30001,"business_exception_30001"), 43 // MESSAGE_CODE_30001(30001,"business_exception_30001"),
......
...@@ -4,6 +4,7 @@ import com.fedex.connect.common.dao.biz.*; ...@@ -4,6 +4,7 @@ import com.fedex.connect.common.dao.biz.*;
4 import com.fedex.connect.customer.repository.dao.AttachmentExtMapper; 4 import com.fedex.connect.customer.repository.dao.AttachmentExtMapper;
5 import com.fedex.connect.customer.repository.dao.ConsignmentExtMapper; 5 import com.fedex.connect.customer.repository.dao.ConsignmentExtMapper;
6 import com.fedex.connect.customer.repository.dao.UploadRecordExtMapper; 6 import com.fedex.connect.customer.repository.dao.UploadRecordExtMapper;
7 +import com.fedex.connect.customer.repository.dao.UserExtMapper;
7 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
8 9
9 public class BaseDao { 10 public class BaseDao {
...@@ -25,4 +26,6 @@ public class BaseDao { ...@@ -25,4 +26,6 @@ public class BaseDao {
25 protected EmailMapper emailMapper; 26 protected EmailMapper emailMapper;
26 @Autowired 27 @Autowired
27 protected UploadRecordExtMapper uploadRecordExtMapper; 28 protected UploadRecordExtMapper uploadRecordExtMapper;
29 + @Autowired
30 + protected UserExtMapper userExtMapper;
28 } 31 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -25,8 +25,9 @@ public interface ConsignmentExtMapper { ...@@ -25,8 +25,9 @@ public interface ConsignmentExtMapper {
25 ") WHERE ROWNUM = 1") 25 ") WHERE ROWNUM = 1")
26 Consignment findByConsignmentCode(@Param("consignmentCode") String consignmentCode, @Param("dateParam") LocalDate dateParam); 26 Consignment findByConsignmentCode(@Param("consignmentCode") String consignmentCode, @Param("dateParam") LocalDate dateParam);
27 27
28 - @Select("SELECT BC.* FROM T_BIZ_CONSIGNMENT BC LEFT JOIN T_BIZ_USER_CONSIGNMENT_MAPPING BUCM ON(BC.ID = BUCM.CONSIGNMENT_ID) " + 28 + @Select("SELECT BC.* FROM T_BIZ_CONSIGNMENT BC WHERE BC.ID = #{query.consignmentId}")
29 - "WHERE BC.ID = #{query.consignmentId} AND (BC.USER_UUID = #{query.userUuid} OR BUCM.USER_ID = #{query.userId})")
30 Consignment findConsignmentInfo(@Param("query") UserConsignmentInfoQuery query); 29 Consignment findConsignmentInfo(@Param("query") UserConsignmentInfoQuery query);
31 30
31 + @Select("SELECT ID FROM T_BIZ_CONSIGNMENT WHERE ID = #{id} FOR UPDATE NOWAIT")
32 + Long lockConsignmentRow(@Param("id") Long id);
32 } 33 }
......
1 +package com.fedex.connect.customer.repository.dao;
2 +
3 +import com.fedex.connect.common.model.sys.User;
4 +import org.apache.ibatis.annotations.Mapper;
5 +import org.apache.ibatis.annotations.Param;
6 +import org.apache.ibatis.annotations.Select;
7 +
8 +@Mapper
9 +public interface UserExtMapper {
10 + @Select("SELECT * FROM T_SYS_USER WHERE USER_UUID = #{uuid}")
11 + public User findUserByUuid(@Param("uuid") String uuid);
12 +}
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
33 c.SHIPPER_ACCOUNT, 33 c.SHIPPER_ACCOUNT,
34 c.USER_INPUT_SHIPPER_ACCOUNT, 34 c.USER_INPUT_SHIPPER_ACCOUNT,
35 c.USER_INPUT_ORIGIN_COUNTRY_CODE, 35 c.USER_INPUT_ORIGIN_COUNTRY_CODE,
36 - c.USER_INPUT_ORIGIN_COUNTRY 36 + c.USER_INPUT_ORIGIN_COUNTRY,
37 + MAX(m.CE_FLAG) AS CE_FLAG
37 </sql> 38 </sql>
38 39
39 <select id="findConsignments" resultType="com.fedex.connect.customer.data.dto.FindConsignmentsDto"> 40 <select id="findConsignments" resultType="com.fedex.connect.customer.data.dto.FindConsignmentsDto">
...@@ -47,14 +48,17 @@ ...@@ -47,14 +48,17 @@
47 (m.user_id = #{userId} AND m.consignment_id IS NOT NULL) 48 (m.user_id = #{userId} AND m.consignment_id IS NOT NULL)
48 OR c.user_uuid = #{uuid,jdbcType=VARCHAR} 49 OR c.user_uuid = #{uuid,jdbcType=VARCHAR}
49 ) 50 )
50 - <if test="statusCode != null and statusCode != ''"> 51 + <if test="statusCode != null and statusCode != '' and statusCode != 'null'">
51 AND c.STATUS_CODE = #{statusCode} 52 AND c.STATUS_CODE = #{statusCode}
52 </if> 53 </if>
54 + <if test="statusCode == 'null'">
55 + AND c.STATUS_CODE IS NULL
56 + </if>
53 <if test="createTimeFrom != null and createTimeFrom != ''"> 57 <if test="createTimeFrom != null and createTimeFrom != ''">
54 - AND c.CREATE_TIME &gt;= TO_DATE(#{createTimeFrom}, 'YYYY-MM-DD HH24:MI:SS') 58 + AND c.CREATE_TIME &gt; TO_DATE(#{createTimeFrom} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
55 </if> 59 </if>
56 <if test="createTimeTo != null and createTimeTo != ''"> 60 <if test="createTimeTo != null and createTimeTo != ''">
57 - AND c.CREATE_TIME &lt;= TO_DATE(#{createTimeTo}, 'YYYY-MM-DD HH24:MI:SS') 61 + AND c.CREATE_TIME &lt; TO_DATE(#{createTimeTo} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
58 </if> 62 </if>
59 <if test="consignmentCodeList != null and consignmentCodeList.size() != 0"> 63 <if test="consignmentCodeList != null and consignmentCodeList.size() != 0">
60 AND c.CONSIGNMENT_CODE IN 64 AND c.CONSIGNMENT_CODE IN
...@@ -62,6 +66,13 @@ ...@@ -62,6 +66,13 @@
62 #{item} 66 #{item}
63 </foreach> 67 </foreach>
64 </if> 68 </if>
69 + GROUP BY
70 + c.ID, c.CONSIGNMENT_CODE, c.RECIPIENT_CONTACT_NAME, c.RECIPIENT_COMPANY,
71 + c.ORIGIN_COUNTRY, c.DOC_NONDOC_FLAG, c.CREATE_USER_NAME, c.CREATE_TIME,
72 + c.MODIFY_TIME, c.STATUS_NAME, c.USER_UUID, c.SHIPPER_ACCOUNT,
73 + c.USER_INPUT_SHIPPER_ACCOUNT, c.USER_INPUT_ORIGIN_COUNTRY_CODE,
74 + c.USER_INPUT_ORIGIN_COUNTRY
75 + ORDER BY c.CREATE_TIME DESC
65 <include refid="OracleDialectSuffix" /> 76 <include refid="OracleDialectSuffix" />
66 </select> 77 </select>
67 78
...@@ -76,10 +87,10 @@ ...@@ -76,10 +87,10 @@
76 OR c.user_uuid = #{uuid,jdbcType=VARCHAR} 87 OR c.user_uuid = #{uuid,jdbcType=VARCHAR}
77 ) 88 )
78 <if test="createTimeFrom != null and createTimeFrom != ''"> 89 <if test="createTimeFrom != null and createTimeFrom != ''">
79 - AND c.CREATE_TIME &gt;= TO_DATE(#{createTimeFrom}, 'YYYY-MM-DD HH24:MI:SS') 90 + AND c.CREATE_TIME &gt; TO_DATE(#{createTimeFrom} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
80 </if> 91 </if>
81 <if test="createTimeTo != null and createTimeTo != ''"> 92 <if test="createTimeTo != null and createTimeTo != ''">
82 - AND c.CREATE_TIME &lt;= TO_DATE(#{createTimeTo}, 'YYYY-MM-DD HH24:MI:SS') 93 + AND c.CREATE_TIME &lt; TO_DATE(#{createTimeTo} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
83 </if> 94 </if>
84 <if test="consignmentCodeList != null and consignmentCodeList.size() != 0"> 95 <if test="consignmentCodeList != null and consignmentCodeList.size() != 0">
85 AND c.CONSIGNMENT_CODE IN 96 AND c.CONSIGNMENT_CODE IN
...@@ -91,4 +102,5 @@ ...@@ -91,4 +102,5 @@
91 102
92 103
93 104
105 +
94 </mapper> 106 </mapper>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
327 FROM 327 FROM
328 T_BIZ_UPLOAD_RECORD 328 T_BIZ_UPLOAD_RECORD
329 WHERE 329 WHERE
330 - CONSIGNMENT_ID = #{consignmentId} 330 + CONSIGNMENT_ID = #{consignmentId} ORDER BY ID DESC
331 <include refid="OracleDialectSuffix" /> 331 <include refid="OracleDialectSuffix" />
332 </select> 332 </select>
333 </mapper> 333 </mapper>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -23,4 +23,6 @@ public interface IConsignmentRepository { ...@@ -23,4 +23,6 @@ public interface IConsignmentRepository {
23 Consignment saveOrUpdate(Consignment entity); 23 Consignment saveOrUpdate(Consignment entity);
24 24
25 void saveOrUpdateAll(List<Consignment> list); 25 void saveOrUpdateAll(List<Consignment> list);
26 +
27 + void lockConsignmentRow(Long id);
26 } 28 }
......
...@@ -30,4 +30,14 @@ public interface IUserConsignmentMappingRepository { ...@@ -30,4 +30,14 @@ public interface IUserConsignmentMappingRepository {
30 * @return void 30 * @return void
31 */ 31 */
32 void saveOrUpdateAll(List<UserConsignmentMapping> list); 32 void saveOrUpdateAll(List<UserConsignmentMapping> list);
33 +
34 + /**
35 + * @Author Szl
36 + * @Description 功能说明 根据用户id和运单号查询mapping
37 + * @Date 2024/12/31
38 + * @param userId
39 + * @param consignmentCode
40 + * @return com.fedex.connect.common.model.biz.UserConsignmentMapping
41 + */
42 + UserConsignmentMapping findByUserIdAndConsignmentCode(Long userId,String consignmentCode);
33 } 43 }
......
1 +package com.fedex.connect.customer.repository.repo;
2 +
3 +import com.fedex.connect.common.model.sys.User;
4 +
5 +public interface IUserRepository {
6 + User findUserByUuid(String uuid);
7 +}
...@@ -8,6 +8,7 @@ import com.fedex.connect.customer.data.query.ConsignmentQuery; ...@@ -8,6 +8,7 @@ import com.fedex.connect.customer.data.query.ConsignmentQuery;
8 import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; 8 import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
9 import com.fedex.connect.customer.repository.base.BaseDao; 9 import com.fedex.connect.customer.repository.base.BaseDao;
10 import com.fedex.connect.customer.repository.repo.IConsignmentRepository; 10 import com.fedex.connect.customer.repository.repo.IConsignmentRepository;
11 +import org.apache.commons.lang3.StringUtils;
11 import org.springframework.stereotype.Repository; 12 import org.springframework.stereotype.Repository;
12 13
13 import java.time.LocalDate; 14 import java.time.LocalDate;
...@@ -45,14 +46,10 @@ public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRe ...@@ -45,14 +46,10 @@ public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRe
45 if (SystemDefaultUserConstants.SYSTEM_USER_KEYS.USER_NAME.equals(consignment.getCreateUserName())){ 46 if (SystemDefaultUserConstants.SYSTEM_USER_KEYS.USER_NAME.equals(consignment.getCreateUserName())){
46 consignment.setCreateUserName(user.getUserName()); 47 consignment.setCreateUserName(user.getUserName());
47 } 48 }
48 - if (!user.getUserUuid().equals(consignment.getUserUuid()) && !user.getAccountNo().equals(consignment.getShipperAccount())){ 49 + if (!StringUtils.equals(user.getUserUuid(), consignment.getUserUuid()) && (consignment.getCeFlag() != null && consignment.getCeFlag() == 0)) {
49 consignment.setRecipientContactName(null); 50 consignment.setRecipientContactName(null);
50 consignment.setRecipientCompany(null); 51 consignment.setRecipientCompany(null);
51 consignment.setDocNondocFlag(null); 52 consignment.setDocNondocFlag(null);
52 - consignment.setCreateUserName(null);
53 - consignment.setCreateTime(null);
54 - consignment.setModifyTime(null);
55 - consignment.setStatusName(null);
56 consignment.setUserUuid(null); 53 consignment.setUserUuid(null);
57 consignment.setShipperAccount(null); 54 consignment.setShipperAccount(null);
58 consignment.setOriginCountry(consignment.getUserInputOriginCountry()); 55 consignment.setOriginCountry(consignment.getUserInputOriginCountry());
...@@ -97,4 +94,16 @@ public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRe ...@@ -97,4 +94,16 @@ public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRe
97 } 94 }
98 }); 95 });
99 } 96 }
97 +
98 + /**
99 + * @Author mt
100 + * @Description 为运单表增加行级锁,行级锁使用主键id作为标志,否则可能锁表
101 + * @Date 2024/12/20
102 + * @param id
103 + * @return void
104 + */
105 + @Override
106 + public void lockConsignmentRow(Long id){
107 + consignmentExtMapper.lockConsignmentRow(id);
108 + }
100 } 109 }
......
...@@ -51,4 +51,22 @@ public class UserConsignmentMappingRepositoryImpl extends BaseDao implements IUs ...@@ -51,4 +51,22 @@ public class UserConsignmentMappingRepositoryImpl extends BaseDao implements IUs
51 } 51 }
52 }); 52 });
53 } 53 }
54 +
55 + /**
56 + * @Author Szl
57 + * @Description 功能说明 根据用户id和运单号查询mapping
58 + * @Date 2024/12/31
59 + * @param userId
60 + * @param consignmentCode
61 + * @return com.fedex.connect.common.model.biz.UserConsignmentMapping
62 + */
63 + @Override
64 + public UserConsignmentMapping findByUserIdAndConsignmentCode(Long userId,String consignmentCode){
65 + UserConsignmentMappingExample example = new UserConsignmentMappingExample();
66 + UserConsignmentMappingExample.Criteria criteria = example.createCriteria();
67 + criteria.andUserIdEqualTo(userId);
68 + criteria.andConsignmentCodeEqualTo(consignmentCode);
69 + criteria.andStatusEqualTo(StatusEnum.YES.getCode());
70 + return CollectionUtils.firstElement(userConsignmentMappingMapper.selectByExample(example));
71 + }
54 } 72 }
......
1 +package com.fedex.connect.customer.repository.repo.impl;
2 +
3 +import com.fedex.connect.common.model.sys.User;
4 +import com.fedex.connect.customer.repository.base.BaseDao;
5 +import com.fedex.connect.customer.repository.repo.IUserRepository;
6 +import org.springframework.stereotype.Repository;
7 +
8 +@Repository
9 +public class UserRepositoryImpl extends BaseDao implements IUserRepository {
10 + @Override
11 + public User findUserByUuid(String uuid) {
12 + return userExtMapper.findUserByUuid(uuid);
13 + }
14 +}
1 package com.fedex.connect.customer.service.biz; 1 package com.fedex.connect.customer.service.biz;
2 2
3 import com.fedex.connect.common.model.biz.Consignment; 3 import com.fedex.connect.common.model.biz.Consignment;
4 +import com.fedex.connect.common.model.biz.UploadRecord;
4 import com.fedex.connect.common.model.sys.User; 5 import com.fedex.connect.common.model.sys.User;
5 6
6 public interface IEmailService { 7 public interface IEmailService {
7 void saveNotificationEmail(Consignment consignment, User user) throws Exception; 8 void saveNotificationEmail(Consignment consignment, User user) throws Exception;
9 +
10 + void savePushConsignmentFileEmail(Consignment consignment, UploadRecord uploadRecord) throws Exception;
8 } 11 }
......
...@@ -78,8 +78,8 @@ public class AttachmentServiceImpl extends BaseService implements IAttachmentSer ...@@ -78,8 +78,8 @@ public class AttachmentServiceImpl extends BaseService implements IAttachmentSer
78 ++i; 78 ++i;
79 } 79 }
80 }catch(Exception ex){ 80 }catch(Exception ex){
81 - //如果上传过程中存在失败,则所有已上传的文件进行删除 81 + //如果上传过程中存在失败,则所有已上传的文件进行删除,已上传文件不进行删除
82 - attachmentUtil.deleteAttachments(attachmentList); 82 +// attachmentUtil.deleteAttachments(attachmentList);
83 throw ex; 83 throw ex;
84 } 84 }
85 return attachmentList; 85 return attachmentList;
......
...@@ -7,11 +7,13 @@ import com.fedex.connect.common.dependencies.util.Utils; ...@@ -7,11 +7,13 @@ import com.fedex.connect.common.dependencies.util.Utils;
7 import com.fedex.connect.common.model.biz.Consignment; 7 import com.fedex.connect.common.model.biz.Consignment;
8 import com.fedex.connect.common.model.sys.User; 8 import com.fedex.connect.common.model.sys.User;
9 import com.fedex.connect.customer.data.dto.FindConsignmentsDto; 9 import com.fedex.connect.customer.data.dto.FindConsignmentsDto;
10 -import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
11 import com.fedex.connect.customer.data.query.ConsignmentQuery; 10 import com.fedex.connect.customer.data.query.ConsignmentQuery;
11 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
12 import com.fedex.connect.customer.enums.ResponseCode; 12 import com.fedex.connect.customer.enums.ResponseCode;
13 import com.fedex.connect.customer.service.base.BaseService; 13 import com.fedex.connect.customer.service.base.BaseService;
14 import com.fedex.connect.customer.service.biz.IConsignmentQueryService; 14 import com.fedex.connect.customer.service.biz.IConsignmentQueryService;
15 +import com.fedex.connect.customer.util.service.biz.ConsignmentQueryUtil;
16 +import org.springframework.beans.factory.annotation.Autowired;
15 import org.springframework.stereotype.Service; 17 import org.springframework.stereotype.Service;
16 18
17 import java.util.List; 19 import java.util.List;
...@@ -24,6 +26,10 @@ import java.util.Objects; ...@@ -24,6 +26,10 @@ import java.util.Objects;
24 */ 26 */
25 @Service 27 @Service
26 public class ConsignmentQueryServiceImpl extends BaseService implements IConsignmentQueryService { 28 public class ConsignmentQueryServiceImpl extends BaseService implements IConsignmentQueryService {
29 +
30 + @Autowired
31 + ConsignmentQueryUtil consignmentQueryUtil;
32 +
27 /** 33 /**
28 * @Author Szl 34 * @Author Szl
29 * @Description 功能说明 运单查询 35 * @Description 功能说明 运单查询
...@@ -60,19 +66,12 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign ...@@ -60,19 +66,12 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign
60 * @param userConsignmentInfoQuery 66 * @param userConsignmentInfoQuery
61 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo 67 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
62 */ 68 */
63 - public ResponseVo findConsignmentInfo(UserConsignmentInfoQuery userConsignmentInfoQuery){ 69 + public ResponseVo findConsignmentInfo(UserConsignmentInfoQuery userConsignmentInfoQuery) {
64 Consignment consignment = consignmentRepository.findConsignmentInfo(userConsignmentInfoQuery); 70 Consignment consignment = consignmentRepository.findConsignmentInfo(userConsignmentInfoQuery);
65 - if(Objects.nonNull(consignment) 71 + /**
66 - && !consignment.getUserUuid().equals(userConsignmentInfoQuery.getUserUuid()) 72 + * 对查询数据进行筛选
67 - && !consignment.getShipperAccount().equals(userConsignmentInfoQuery.getShipperAccount())){ 73 + */
68 - Consignment consignmentTemp = new Consignment(); 74 + Consignment resultConsignment = consignmentQueryUtil.findConsignment(userConsignmentInfoQuery,consignment);
69 - consignmentTemp.setId(consignment.getId()); 75 + return responseUtils.success(resultConsignment);
70 - consignmentTemp.setConsignmentCode(consignment.getConsignmentCode());
71 - consignmentTemp.setShipperAccount(consignment.getShipperAccount());
72 - consignmentTemp.setOriginCountry(consignment.getOriginCountry());
73 - consignmentTemp.setDestinationCountry(consignment.getDestinationCountry());
74 - consignment = consignmentTemp;
75 - }
76 - return responseUtils.success(consignment);
77 } 76 }
78 -} 77 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,7 +2,11 @@ package com.fedex.connect.customer.service.biz.impl; ...@@ -2,7 +2,11 @@ package com.fedex.connect.customer.service.biz.impl;
2 2
3 import com.fedex.connect.common.dependencies.contants.DigitConstants; 3 import com.fedex.connect.common.dependencies.contants.DigitConstants;
4 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 4 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
5 -import com.fedex.connect.common.model.biz.*; 5 +import com.fedex.connect.common.dependencies.exception.OpErrorException;
6 +import com.fedex.connect.common.model.biz.Attachment;
7 +import com.fedex.connect.common.model.biz.Consignment;
8 +import com.fedex.connect.common.model.biz.UploadRecord;
9 +import com.fedex.connect.common.model.biz.UserConsignmentMapping;
6 import com.fedex.connect.common.model.sys.User; 10 import com.fedex.connect.common.model.sys.User;
7 import com.fedex.connect.customer.data.bo.AddBo; 11 import com.fedex.connect.customer.data.bo.AddBo;
8 import com.fedex.connect.customer.data.bo.ConsignmentBo; 12 import com.fedex.connect.customer.data.bo.ConsignmentBo;
...@@ -11,28 +15,25 @@ import com.fedex.connect.customer.enums.ResponseCode; ...@@ -11,28 +15,25 @@ import com.fedex.connect.customer.enums.ResponseCode;
11 import com.fedex.connect.customer.service.base.BaseService; 15 import com.fedex.connect.customer.service.base.BaseService;
12 import com.fedex.connect.customer.service.biz.IAttachmentService; 16 import com.fedex.connect.customer.service.biz.IAttachmentService;
13 import com.fedex.connect.customer.service.biz.IConsignmentService; 17 import com.fedex.connect.customer.service.biz.IConsignmentService;
14 -import com.fedex.connect.customer.service.biz.IEmailService;
15 import com.fedex.connect.customer.util.service.biz.ConsignmentUtil; 18 import com.fedex.connect.customer.util.service.biz.ConsignmentUtil;
16 -import com.fedex.connect.customer.util.service.biz.PushObUtil;
17 import com.fedex.connect.customer.util.service.biz.UploadRecordUtil; 19 import com.fedex.connect.customer.util.service.biz.UploadRecordUtil;
18 -import com.fedex.connect.customer.util.service.biz.UserConsignmentMappingUtil; 20 +import com.fedex.connect.customer.validate.controller.biz.AttachmentValidate;
21 +import lombok.extern.slf4j.Slf4j;
19 import org.apache.commons.lang3.StringUtils; 22 import org.apache.commons.lang3.StringUtils;
20 import org.springframework.beans.factory.annotation.Autowired; 23 import org.springframework.beans.factory.annotation.Autowired;
21 import org.springframework.stereotype.Service; 24 import org.springframework.stereotype.Service;
22 -import org.springframework.transaction.annotation.Transactional;
23 import org.springframework.web.multipart.MultipartFile; 25 import org.springframework.web.multipart.MultipartFile;
24 26
25 import java.time.LocalDate; 27 import java.time.LocalDate;
26 -import java.util.ArrayList;
27 import java.util.List; 28 import java.util.List;
28 import java.util.Objects; 29 import java.util.Objects;
29 -import java.util.Optional;
30 30
31 /** 31 /**
32 * @Author Szl 32 * @Author Szl
33 * @Description 类说明 运单操作相关service 33 * @Description 类说明 运单操作相关service
34 * @Date 2024/10/31 34 * @Date 2024/10/31
35 */ 35 */
36 +@Slf4j
36 @Service 37 @Service
37 public class ConsignmentServiceImpl extends BaseService implements IConsignmentService { 38 public class ConsignmentServiceImpl extends BaseService implements IConsignmentService {
38 @Autowired 39 @Autowired
...@@ -40,13 +41,9 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -40,13 +41,9 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
40 @Autowired 41 @Autowired
41 private UploadRecordUtil uploadRecordUtil; 42 private UploadRecordUtil uploadRecordUtil;
42 @Autowired 43 @Autowired
43 - private UserConsignmentMappingUtil userConsignmentMappingUtil;
44 - @Autowired
45 - private PushObUtil pushObUtil;
46 - @Autowired
47 private IAttachmentService attachmentService; 44 private IAttachmentService attachmentService;
48 @Autowired 45 @Autowired
49 - private IEmailService emailService; 46 + private AttachmentValidate attachmentValidate;
50 47
51 /** 48 /**
52 * @Author Szl 49 * @Author Szl
...@@ -57,6 +54,15 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -57,6 +54,15 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
57 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo 54 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
58 */ 55 */
59 public ResponseVo add(AddBo bo, User user){ 56 public ResponseVo add(AddBo bo, User user){
57 + ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
58 + if (StringUtils.isEmpty(bo.getConsignmentCode()) || !bo.getConsignmentCode().matches("\\d{12}")) {
59 + consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
60 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30017);
61 + }
62 + if (!StringUtils.isEmpty(bo.getShipperAccount()) && !bo.getShipperAccount().matches("\\d{9}")) {
63 + consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
64 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30019);
65 + }
60 //查询运单表是否存在已提交的运单 66 //查询运单表是否存在已提交的运单
61 LocalDate thirtyDaysAgo = LocalDate.now().minusDays(30); 67 LocalDate thirtyDaysAgo = LocalDate.now().minusDays(30);
62 Consignment consignment = consignmentRepository.findByConsignmentCode(bo.getConsignmentCode(),thirtyDaysAgo); 68 Consignment consignment = consignmentRepository.findByConsignmentCode(bo.getConsignmentCode(),thirtyDaysAgo);
...@@ -64,7 +70,6 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -64,7 +70,6 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
64 * 不存在则直接返回 70 * 不存在则直接返回
65 */ 71 */
66 if (consignment == null){ 72 if (consignment == null){
67 - ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
68 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ZERO); 73 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ZERO);
69 if (!StringUtils.isEmpty(bo.getShipperAccount())){ 74 if (!StringUtils.isEmpty(bo.getShipperAccount())){
70 if (Objects.equals(user.getAccountNo(),bo.getShipperAccount())){ 75 if (Objects.equals(user.getAccountNo(),bo.getShipperAccount())){
...@@ -73,7 +78,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -73,7 +78,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
73 /** 78 /**
74 * 不存在运单,并且没有填写shipperAccount,则直接返回 79 * 不存在运单,并且没有填写shipperAccount,则直接返回
75 */ 80 */
76 - return responseUtils.success(consignmentAddDto); 81 + return responseUtils.success(ResponseCode.MESSAGE_CODE_30020,consignmentAddDto);
77 } 82 }
78 }else { 83 }else {
79 /** 84 /**
...@@ -83,14 +88,23 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -83,14 +88,23 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
83 } 88 }
84 } 89 }
85 /** 90 /**
91 + * 存在运单则获取mapping表
92 + */
93 + UserConsignmentMapping byUserIdAndConsignmentCode = userConsignmentMappingRepository.findByUserIdAndConsignmentCode(user.getId(), consignment.getConsignmentCode());
94 + Long ceFlag = 1L;
95 + if (byUserIdAndConsignmentCode == null){
96 + ceFlag = 3L;
97 + }else if (byUserIdAndConsignmentCode.getCeFlag() != null){
98 + ceFlag = byUserIdAndConsignmentCode.getCeFlag();
99 + }
100 + /**
86 * 根据是否是DM501返回不同的提示 101 * 根据是否是DM501返回不同的提示
87 */ 102 */
88 - if (StringUtils.isEmpty(consignment.getUserUuid())){ 103 + if (StringUtils.isEmpty(consignment.getUserUuid()) && StringUtils.isEmpty(consignment.getShipperAccount())){
89 /** 104 /**
90 * 非501数据 105 * 非501数据
91 */ 106 */
92 if (StringUtils.isEmpty(bo.getShipperAccount())){ 107 if (StringUtils.isEmpty(bo.getShipperAccount())){
93 - ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
94 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO); 108 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
95 return responseUtils.success(consignmentAddDto); 109 return responseUtils.success(consignmentAddDto);
96 } 110 }
...@@ -99,7 +113,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -99,7 +113,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
99 /** 113 /**
100 * 501数据 114 * 501数据
101 */ 115 */
102 - return consignmentUtil.consignmentCheckWithCe(consignment,bo,user); 116 + return consignmentUtil.consignmentCheckWithCe(consignment,bo,user,ceFlag);
103 } 117 }
104 } 118 }
105 119
...@@ -122,6 +136,11 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -122,6 +136,11 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
122 consignmentBo.getAttachmentBizTypeList(), 136 consignmentBo.getAttachmentBizTypeList(),
123 user, 137 user,
124 consignmentBo.getConsignmentCode()); 138 consignmentBo.getConsignmentCode());
139 +
140 + /**
141 + * 拷贝附件后,需要再次进行附件信息验证
142 + */
143 + attachmentValidate.validateAttachment(attachmentList);
125 /** 144 /**
126 * 初始化运单信息 145 * 初始化运单信息
127 */ 146 */
...@@ -129,87 +148,24 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -129,87 +148,24 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
129 /** 148 /**
130 * 初始化上传记录信息 149 * 初始化上传记录信息
131 */ 150 */
132 - UploadRecord uploadRecord = uploadRecordUtil.initUploadRecord(consignment.getConsignmentCode()); 151 + UploadRecord uploadRecord = uploadRecordUtil.initUploadRecord(consignment.getConsignmentCode(),user);
133 /** 152 /**
134 * 保存运单相关信息 153 * 保存运单相关信息
135 */ 154 */
136 - this.submitInfo(consignment,attachmentList,uploadRecord,user); 155 + consignmentUtil.submitInfo(consignment,attachmentList,uploadRecord,user,consignmentBo.getCeFlag());
156 + }catch(OpErrorException ex){
157 + /**
158 + * 提交异常,需要删除对应已上传附件,已上传文件不进行删除
159 + */
160 +// attachmentService.deleteAttachments(attachmentList);
161 + throw ex;
137 }catch(Exception ex){ 162 }catch(Exception ex){
138 /** 163 /**
139 - * 提交异常,需要删除对应已上传附件 164 + * 提交异常,需要删除对应已上传附件,已上传文件不进行删除
140 */ 165 */
141 - attachmentService.deleteAttachments(attachmentList); 166 +// attachmentService.deleteAttachments(attachmentList);
142 responseUtils.fail(ResponseCode.MESSAGE_CODE_30016,ex); 167 responseUtils.fail(ResponseCode.MESSAGE_CODE_30016,ex);
143 } 168 }
144 return responseUtils.success(ResponseCode.MESSAGE_CODE_30015); 169 return responseUtils.success(ResponseCode.MESSAGE_CODE_30015);
145 } 170 }
146 -
147 - /**
148 - * @Author mt
149 - * @Description 保存运单相关信息
150 - * @Date 2024/11/19
151 - * @param consignment
152 - * @param attachmentList
153 - * @param uploadRecord
154 - * @param user
155 - * @return void
156 - */
157 - @Transactional(rollbackFor = Exception.class)
158 - public void submitInfo(Consignment consignment,
159 - List<Attachment> attachmentList,
160 - UploadRecord uploadRecord,
161 - User user) throws Exception{
162 - /**
163 - * 保存或更新运单表
164 - */
165 - consignmentRepository.saveOrUpdate(consignment);
166 - //设置上传记录表运单ID
167 - uploadRecord.setConsignmentId(consignment.getId());
168 - /**
169 - * 保存上传记录表
170 - */
171 - uploadRecordRepository.saveOrUpdate(uploadRecord);
172 - //设置附件表运单id,上传记录表id
173 - Optional.ofNullable(attachmentList).orElse(new ArrayList<>()).stream().filter(Objects::nonNull).forEach(p->{
174 - p.setBizId(consignment.getId());
175 - p.setUploadRecordId(uploadRecord.getId());
176 - });
177 - /**
178 - * 保存附件表信息
179 - */
180 - attachmentRepository.saveOrUpdateAll(attachmentList);
181 - //用户uuid与运单uuid不一致,则需要添加用户运单中间表信息
182 - if(!user.getUserUuid().equals(consignment.getUserUuid())){
183 - /**
184 - * 查找用户与运单关联信息
185 - */
186 - UserConsignmentMapping userConsignmentMapping = userConsignmentMappingRepository.findByUserIdConsignmentId(user.getId(),consignment.getId());
187 - if(Objects.isNull(userConsignmentMapping)){
188 - /**
189 - * 初始化插入预清关文件推送任务日志
190 - */
191 - userConsignmentMapping = userConsignmentMappingUtil.initUserConsignmentMapping(user.getId(),consignment.getId());
192 - /**
193 - * 初始化插入预清关文件推送任务日志
194 - */
195 - userConsignmentMappingRepository.saveOrUpdate(userConsignmentMapping);
196 - }
197 - }
198 - /**
199 - * Todo 初始化插入预清关文件推送任务日志,szl添加
200 - */
201 -
202 - /**
203 - * 初始化插入预清关文件邮件推送日志,mt添加
204 - */
205 - PushOb pushOb = pushObUtil.initPushOb(consignment,user);
206 - /**
207 - * 初始化插入提醒发件人邮件日志
208 - */
209 - emailService.saveNotificationEmail(consignment,user);
210 - /**
211 - * 推送进口文件主表
212 - */
213 - pushObRepository.saveOrUpdate(pushOb);
214 - }
215 } 171 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,6 +2,7 @@ package com.fedex.connect.customer.service.biz.impl; ...@@ -2,6 +2,7 @@ package com.fedex.connect.customer.service.biz.impl;
2 2
3 import com.fedex.connect.common.model.biz.Consignment; 3 import com.fedex.connect.common.model.biz.Consignment;
4 import com.fedex.connect.common.model.biz.Email; 4 import com.fedex.connect.common.model.biz.Email;
5 +import com.fedex.connect.common.model.biz.UploadRecord;
5 import com.fedex.connect.common.model.sys.User; 6 import com.fedex.connect.common.model.sys.User;
6 import com.fedex.connect.customer.service.base.BaseService; 7 import com.fedex.connect.customer.service.base.BaseService;
7 import com.fedex.connect.customer.service.biz.IEmailService; 8 import com.fedex.connect.customer.service.biz.IEmailService;
...@@ -26,7 +27,7 @@ public class EmailServiceImpl extends BaseService implements IEmailService { ...@@ -26,7 +27,7 @@ public class EmailServiceImpl extends BaseService implements IEmailService {
26 */ 27 */
27 @Override 28 @Override
28 public void saveNotificationEmail(Consignment consignment, User user) throws Exception { 29 public void saveNotificationEmail(Consignment consignment, User user) throws Exception {
29 - if (!StringUtils.isEmpty(consignment.getUserUuid()) && consignment.getUserUuid().equals(user.getUserUuid())){ 30 + if (StringUtils.isEmpty(consignment.getUserUuid()) || consignment.getUserUuid().equals(user.getUserUuid())) {
30 return; 31 return;
31 } 32 }
32 /** 33 /**
...@@ -39,4 +40,17 @@ public class EmailServiceImpl extends BaseService implements IEmailService { ...@@ -39,4 +40,17 @@ public class EmailServiceImpl extends BaseService implements IEmailService {
39 */ 40 */
40 emailRepository.save(email); 41 emailRepository.save(email);
41 } 42 }
43 +
44 + @Override
45 + public void savePushConsignmentFileEmail(Consignment consignment,UploadRecord uploadRecord) throws Exception {
46 + /**
47 + * 初始化Email对象
48 + */
49 + Email email = new Email();
50 + emailUtil.initPushConsignmentFileEmail(email,consignment, uploadRecord);
51 + /**
52 + * 保存入库
53 + */
54 + emailRepository.save(email);
55 + }
42 } 56 }
......
...@@ -38,7 +38,7 @@ public class UploadRecordServiceImpl extends BaseService implements IUploadRecor ...@@ -38,7 +38,7 @@ public class UploadRecordServiceImpl extends BaseService implements IUploadRecor
38 AttachmentHistoryDto attachmentHistoryDto = new AttachmentHistoryDto(); 38 AttachmentHistoryDto attachmentHistoryDto = new AttachmentHistoryDto();
39 attachmentHistoryDto.setUploadRecord(uploadRecord); 39 attachmentHistoryDto.setUploadRecord(uploadRecord);
40 attachmentHistoryDto.setCreatorFlag( 40 attachmentHistoryDto.setCreatorFlag(
41 - (uploadRecord.getCreateUserId() != null) ? 41 + (uploadRecord.getCreateUserId() != null) && uploadRecord.getCreateUserId().equals(user.getId()) ?
42 DigitConstants.DIGIT_ONE : DigitConstants.DIGIT_ZERO 42 DigitConstants.DIGIT_ONE : DigitConstants.DIGIT_ZERO
43 ); 43 );
44 attachmentHistoryDtos.add(attachmentHistoryDto); 44 attachmentHistoryDtos.add(attachmentHistoryDto);
......
...@@ -52,10 +52,10 @@ public class AttachmentUtil { ...@@ -52,10 +52,10 @@ public class AttachmentUtil {
52 private void initAttachment(Attachment attachment,String bizType,User user) throws Exception{ 52 private void initAttachment(Attachment attachment,String bizType,User user) throws Exception{
53 DictionaryEntries attachmentBizTypeEntries = cacheSystem.getDicAttachmentBizType(bizType); 53 DictionaryEntries attachmentBizTypeEntries = cacheSystem.getDicAttachmentBizType(bizType);
54 attachment.setBizTypeCode(attachmentBizTypeEntries.getCode()); 54 attachment.setBizTypeCode(attachmentBizTypeEntries.getCode());
55 - attachment.setBizTypeName(attachmentBizTypeEntries.getEnglishName()); 55 + attachment.setBizTypeName(attachmentBizTypeEntries.getDescription());
56 DictionaryEntries attachmentFileTypeEntries = cacheSystem.getDicAttachmentFileType(AttachmentFileTypeEnum.FILE.getCode()); 56 DictionaryEntries attachmentFileTypeEntries = cacheSystem.getDicAttachmentFileType(AttachmentFileTypeEnum.FILE.getCode());
57 attachment.setFileTypeCode(attachmentFileTypeEntries.getCode()); 57 attachment.setFileTypeCode(attachmentFileTypeEntries.getCode());
58 - attachment.setFileTypeName(attachmentFileTypeEntries.getEnglishName()); 58 + attachment.setFileTypeName(attachmentFileTypeEntries.getDescription());
59 attachment.setStatus(StatusEnum.YES.getCode()); 59 attachment.setStatus(StatusEnum.YES.getCode());
60 attachment.setCreateUserId(user.getId()); 60 attachment.setCreateUserId(user.getId());
61 attachment.setCreateUserName(user.getUserName()); 61 attachment.setCreateUserName(user.getUserName());
...@@ -142,6 +142,7 @@ public class AttachmentUtil { ...@@ -142,6 +142,7 @@ public class AttachmentUtil {
142 142
143 public static MultipartFile findFileByName(MultipartFile[] files, String fileName) { 143 public static MultipartFile findFileByName(MultipartFile[] files, String fileName) {
144 for (MultipartFile file : files) { 144 for (MultipartFile file : files) {
145 + log.info("fileName:" + file.getOriginalFilename());
145 if (file.getOriginalFilename().equals(fileName)) { 146 if (file.getOriginalFilename().equals(fileName)) {
146 return file; // 找到匹配的文件,返回该文件 147 return file; // 找到匹配的文件,返回该文件
147 } 148 }
......
1 +package com.fedex.connect.customer.util.service.biz;
2 +
3 +import com.fedex.connect.common.model.biz.Consignment;
4 +import com.fedex.connect.common.model.biz.UserConsignmentMapping;
5 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
6 +import com.fedex.connect.customer.repository.repo.IUserConsignmentMappingRepository;
7 +import lombok.extern.slf4j.Slf4j;
8 +import org.springframework.beans.factory.annotation.Autowired;
9 +import org.springframework.stereotype.Component;
10 +
11 +import java.util.Objects;
12 +
13 +/**
14 + * @Author mt
15 + * @Description 运单数据查询处理
16 + * @Date 2024/12/24
17 + */
18 +@Slf4j
19 +@Component
20 +public class ConsignmentQueryUtil {
21 + @Autowired
22 + protected IUserConsignmentMappingRepository userConsignmentMappingRepository;
23 + /**
24 + * @Author mt
25 + * @Description 运单查询数据筛选
26 + * @Date 2024/12/24
27 + * @param userConsignmentInfoQuery
28 + * @param consignment
29 + * @return com.fedex.connect.common.model.biz.Consignment
30 + */
31 + public Consignment findConsignment(UserConsignmentInfoQuery userConsignmentInfoQuery,Consignment consignment){
32 + /**
33 + * 查询mapping表
34 + */
35 + UserConsignmentMapping byUserIdAndConsignmentCode = userConsignmentMappingRepository.findByUserIdAndConsignmentCode(userConsignmentInfoQuery.getUserId(), consignment.getConsignmentCode());
36 + Consignment resultConsignment = null;
37 + if(Objects.nonNull(consignment)){
38 + //uuid相同,则将运单所有信息返回给到前端
39 + if(Objects.equals(userConsignmentInfoQuery.getUserUuid(),consignment.getUserUuid()) || (byUserIdAndConsignmentCode.getCeFlag() == null || byUserIdAndConsignmentCode.getCeFlag() == 1L)){
40 + //1:如果运单UUID与登录账号UUID相同或者用户shipperAccount与运单shipperAccount相同,则显示运单、收发件人信息,以及501信息
41 + resultConsignment = consignment;
42 + }else {
43 + //如果运单UUID与登录账号UUID不同,用户shipperAccount与运单录入的shipperAccount一致,则只显示用户录入的运单号、shipperAccount、始发国
44 + resultConsignment = new Consignment();
45 + resultConsignment.setId(consignment.getId());
46 + resultConsignment.setConsignmentCode(consignment.getConsignmentCode());
47 + resultConsignment.setUserInputOriginCountry(consignment.getUserInputOriginCountry());
48 + resultConsignment.setUserInputOriginCountryCode(consignment.getUserInputOriginCountryCode());
49 + resultConsignment.setUserInputShipperAccount(consignment.getUserInputShipperAccount());
50 + resultConsignment.setDestinationCountry(consignment.getDestinationCountry());
51 + resultConsignment.setDestinationCountryCode(consignment.getDestinationCountryCode());
52 + }
53 + }
54 + return resultConsignment;
55 + }
56 +}
...@@ -7,26 +7,31 @@ import com.fedex.connect.common.dependencies.enums.biz.ConsignmentStatusEnum; ...@@ -7,26 +7,31 @@ import com.fedex.connect.common.dependencies.enums.biz.ConsignmentStatusEnum;
7 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; 7 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
8 import com.fedex.connect.common.dependencies.util.ResponseUtils; 8 import com.fedex.connect.common.dependencies.util.ResponseUtils;
9 import com.fedex.connect.common.model.bi.DictionaryEntries; 9 import com.fedex.connect.common.model.bi.DictionaryEntries;
10 -import com.fedex.connect.common.model.biz.Consignment; 10 +import com.fedex.connect.common.model.biz.*;
11 import com.fedex.connect.common.model.sys.User; 11 import com.fedex.connect.common.model.sys.User;
12 import com.fedex.connect.customer.data.bo.AddBo; 12 import com.fedex.connect.customer.data.bo.AddBo;
13 import com.fedex.connect.customer.data.bo.ConsignmentBo; 13 import com.fedex.connect.customer.data.bo.ConsignmentBo;
14 import com.fedex.connect.customer.data.dto.ConsignmentAddDto; 14 import com.fedex.connect.customer.data.dto.ConsignmentAddDto;
15 +import com.fedex.connect.customer.data.dto.ConsignmentDto;
15 import com.fedex.connect.customer.enums.ResponseCode; 16 import com.fedex.connect.customer.enums.ResponseCode;
16 -import com.fedex.connect.customer.repository.repo.IConsignmentRepository; 17 +import com.fedex.connect.customer.repository.repo.*;
18 +import com.fedex.connect.customer.service.biz.IEmailService;
19 +import lombok.extern.slf4j.Slf4j;
17 import org.springframework.beans.BeanUtils; 20 import org.springframework.beans.BeanUtils;
18 import org.springframework.beans.factory.annotation.Autowired; 21 import org.springframework.beans.factory.annotation.Autowired;
19 import org.springframework.stereotype.Component; 22 import org.springframework.stereotype.Component;
23 +import org.springframework.transaction.annotation.Transactional;
20 import org.springframework.util.StringUtils; 24 import org.springframework.util.StringUtils;
21 25
22 -import java.util.Date; 26 +import java.time.LocalDate;
23 -import java.util.Objects; 27 +import java.util.*;
24 28
25 /** 29 /**
26 * @Author Szl 30 * @Author Szl
27 * @Description 类说明 运单相关util 31 * @Description 类说明 运单相关util
28 * @Date 2024/11/5 32 * @Date 2024/11/5
29 */ 33 */
34 +@Slf4j
30 @Component 35 @Component
31 public class ConsignmentUtil { 36 public class ConsignmentUtil {
32 @Autowired 37 @Autowired
...@@ -35,6 +40,20 @@ public class ConsignmentUtil { ...@@ -35,6 +40,20 @@ public class ConsignmentUtil {
35 ResponseUtils responseUtils; 40 ResponseUtils responseUtils;
36 @Autowired 41 @Autowired
37 IConsignmentRepository consignmentRepository; 42 IConsignmentRepository consignmentRepository;
43 + @Autowired
44 + UserConsignmentMappingUtil userConsignmentMappingUtil;
45 + @Autowired
46 + PushObUtil pushObUtil;
47 + @Autowired
48 + IEmailService emailService;
49 + @Autowired
50 + IUploadRecordRepository uploadRecordRepository;
51 + @Autowired
52 + IPushObRepository pushObRepository;
53 + @Autowired
54 + IAttachmentRepository attachmentRepository;
55 + @Autowired
56 + IUserConsignmentMappingRepository userConsignmentMappingRepository;
38 57
39 /** 58 /**
40 * @Author mt 59 * @Author mt
...@@ -51,27 +70,39 @@ public class ConsignmentUtil { ...@@ -51,27 +70,39 @@ public class ConsignmentUtil {
51 Date nowDate = new Date(); 70 Date nowDate = new Date();
52 //如果没有运单id,则是通过add添加进来的运单 71 //如果没有运单id,则是通过add添加进来的运单
53 if (Objects.isNull(consignment)) { 72 if (Objects.isNull(consignment)) {
54 - consignment = new Consignment(); 73 + //根据运单号查询运单表最近30天内是否存在已提交的运单
55 - //用户录入数据拷贝 74 + LocalDate thirtyDaysAgo = LocalDate.now().minusDays(30);
56 - BeanUtils.copyProperties(consignmentBo, consignment); 75 + consignment = consignmentRepository.findByConsignmentCode(consignmentBo.getConsignmentCode(),thirtyDaysAgo);
76 + //如果最近30天内没有提交过该运单,则新建
77 + if(consignment == null){
78 + consignment = new Consignment();
79 + /******提交信息记录******/
80 + consignment.setCreateTime(nowDate);
81 + consignment.setCreateUserName(user.getUserName());
82 + consignment.setCreateUserId(user.getId());
83 + }
84 + //运单号
85 + consignment.setConsignmentCode(consignmentBo.getConsignmentCode());
86 + //目的国全称
87 + consignment.setDestinationCountry(consignmentBo.getDestinationCountry());
88 + //目的国编码
89 + consignment.setDestinationCountryCode(consignmentBo.getDestinationCountryCode());
57 //用户录入shipperaccount 90 //用户录入shipperaccount
58 consignment.setUserInputShipperAccount(consignmentBo.getShipperAccount()); 91 consignment.setUserInputShipperAccount(consignmentBo.getShipperAccount());
59 //始发国名称 92 //始发国名称
60 consignment.setUserInputOriginCountry(consignmentBo.getOriginCountry()); 93 consignment.setUserInputOriginCountry(consignmentBo.getOriginCountry());
61 //始发国编码 94 //始发国编码
62 consignment.setUserInputOriginCountryCode(consignmentBo.getOriginCountryCode()); 95 consignment.setUserInputOriginCountryCode(consignmentBo.getOriginCountryCode());
63 - /******提交信息记录******/
64 - consignment.setFirstSubmitTime(nowDate);
65 - consignment.setFirstSubmitter(user.getUserName());
66 - consignment.setFirstSubmitterId(user.getId());
67 - consignment.setCreateTime(nowDate);
68 - consignment.setCreateUserName(user.getUserName());
69 - consignment.setCreateUserId(user.getId());
70 } else { 96 } else {
71 consignment.setModifyTime(nowDate); 97 consignment.setModifyTime(nowDate);
72 consignment.setModifyUserName(user.getUserName()); 98 consignment.setModifyUserName(user.getUserName());
73 consignment.setModifyUserId(user.getId()); 99 consignment.setModifyUserId(user.getId());
74 } 100 }
101 + if (StringUtils.isEmpty(consignment.getFirstSubmitter())){
102 + consignment.setFirstSubmitTime(nowDate);
103 + consignment.setFirstSubmitter(user.getUserName());
104 + consignment.setFirstSubmitterId(user.getId());
105 + }
75 //记录当前提交人信息 106 //记录当前提交人信息
76 consignment.setSubmitTime(nowDate); 107 consignment.setSubmitTime(nowDate);
77 consignment.setSubmitter(user.getUserName()); 108 consignment.setSubmitter(user.getUserName());
...@@ -99,13 +130,24 @@ public class ConsignmentUtil { ...@@ -99,13 +130,24 @@ public class ConsignmentUtil {
99 */ 130 */
100 public ResponseVo consignmentCheckWithNotCe(Consignment consignment, AddBo bo){ 131 public ResponseVo consignmentCheckWithNotCe(Consignment consignment, AddBo bo){
101 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto(); 132 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
102 - consignmentAddDto.setConsignmentId(consignment.getId()); 133 + if (isShipperAccountMatch(bo.getShipperAccount(), consignment.getUserInputShipperAccount())){
103 - if (isShipperAccountMatch(bo.getShipperAccount(), consignment.getShipperAccount())){
104 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE); 134 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
135 + ConsignmentDto consignmentUserInput = new ConsignmentDto();
136 + consignmentUserInput.setId(consignment.getId());
137 + consignmentUserInput.setConsignmentCode(consignment.getConsignmentCode());
138 + consignmentUserInput.setUserInputShipperAccount(consignment.getUserInputShipperAccount());
139 + consignmentUserInput.setUserInputOriginCountry(consignment.getUserInputOriginCountry());
140 + consignmentUserInput.setUserInputOriginCountryCode(consignment.getUserInputOriginCountryCode());
141 + consignmentUserInput.setOriginCountry(consignment.getUserInputOriginCountry());
142 + consignmentUserInput.setOriginCountryCode(consignment.getUserInputOriginCountryCode());
143 + consignmentUserInput.setShipperAccount(consignment.getUserInputShipperAccount());
144 + consignmentUserInput.setDestinationCountryCode(consignment.getDestinationCountryCode());
145 + consignmentUserInput.setDestinationCountry(consignment.getDestinationCountry());
146 + consignmentUserInput.setCeFlag(0L);
147 + consignmentAddDto.setConsignment(consignmentUserInput);
105 return responseUtils.success(consignmentAddDto); 148 return responseUtils.success(consignmentAddDto);
106 }else { 149 }else {
107 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_THREE); 150 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_THREE);
108 - consignmentAddDto.setConsignmentId(null);
109 return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto); 151 return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto);
110 } 152 }
111 } 153 }
...@@ -119,15 +161,17 @@ public class ConsignmentUtil { ...@@ -119,15 +161,17 @@ public class ConsignmentUtil {
119 * @param user 161 * @param user
120 * @return void 162 * @return void
121 */ 163 */
122 - public ResponseVo consignmentCheckWithCe(Consignment consignment, AddBo bo, User user) { 164 + public ResponseVo consignmentCheckWithCe(Consignment consignment, AddBo bo, User user,Long ceFlag) {
123 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto(); 165 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
124 - consignmentAddDto.setConsignmentId(consignment.getId()); 166 + ConsignmentDto consignmentDto = new ConsignmentDto();
125 - 167 + BeanUtils.copyProperties(consignment, consignmentDto);
126 /** 168 /**
127 * uuid相同,直接返回所有运单信息 169 * uuid相同,直接返回所有运单信息
128 */ 170 */
129 if (Objects.equals(consignment.getUserUuid(), user.getUserUuid())) { 171 if (Objects.equals(consignment.getUserUuid(), user.getUserUuid())) {
130 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE); 172 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
173 + consignmentDto.setCeFlag(1L);
174 + consignmentAddDto.setConsignment(consignmentDto);
131 return responseUtils.success(consignmentAddDto); 175 return responseUtils.success(consignmentAddDto);
132 } 176 }
133 177
...@@ -136,16 +180,34 @@ public class ConsignmentUtil { ...@@ -136,16 +180,34 @@ public class ConsignmentUtil {
136 */ 180 */
137 if (isShipperAccountMatch(user.getAccountNo(), consignment.getShipperAccount())) { 181 if (isShipperAccountMatch(user.getAccountNo(), consignment.getShipperAccount())) {
138 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE); 182 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
183 + consignmentDto.setCeFlag(1L);
184 + consignmentAddDto.setConsignment(consignmentDto);
139 return responseUtils.success(ResponseCode.MESSAGE_CODE_30004, consignmentAddDto); 185 return responseUtils.success(ResponseCode.MESSAGE_CODE_30004, consignmentAddDto);
140 } 186 }
141 187
142 /** 188 /**
189 + * mapping表判断,存在mapping则返回对应数据
190 + */
191 + if (ceFlag == 0){
192 + consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
193 + ConsignmentDto consignmentUserInput = new ConsignmentDto();
194 + this.initConByNotCe(consignmentUserInput,consignmentDto);
195 + consignmentDto.setCeFlag(0L);
196 + consignmentAddDto.setConsignment(consignmentUserInput);
197 + return responseUtils.success(consignmentAddDto);
198 + }else if (ceFlag == 1){
199 + consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
200 + consignmentDto.setCeFlag(1L);
201 + consignmentAddDto.setConsignment(consignmentDto);
202 + return responseUtils.success(consignmentAddDto);
203 + }
204 +
205 + /**
143 * uuid不一致且未填写shipperAccount 206 * uuid不一致且未填写shipperAccount
144 */ 207 */
145 if (!StringUtils.hasText(bo.getShipperAccount())){ 208 if (!StringUtils.hasText(bo.getShipperAccount())){
146 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO); 209 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
147 - consignmentAddDto.setConsignmentId(null); 210 + return responseUtils.success(ResponseCode.MESSAGE_CODE_30005,consignmentAddDto);
148 - return responseUtils.success(ResponseCode.MESSAGE_CODE_30012,consignmentAddDto);
149 } 211 }
150 212
151 /** 213 /**
...@@ -153,6 +215,8 @@ public class ConsignmentUtil { ...@@ -153,6 +215,8 @@ public class ConsignmentUtil {
153 */ 215 */
154 if (isShipperAccountMatch(bo.getShipperAccount(), consignment.getShipperAccount())) { 216 if (isShipperAccountMatch(bo.getShipperAccount(), consignment.getShipperAccount())) {
155 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE); 217 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
218 + consignmentDto.setCeFlag(1L);
219 + consignmentAddDto.setConsignment(consignmentDto);
156 return responseUtils.success(consignmentAddDto); 220 return responseUtils.success(consignmentAddDto);
157 } 221 }
158 222
...@@ -160,10 +224,13 @@ public class ConsignmentUtil { ...@@ -160,10 +224,13 @@ public class ConsignmentUtil {
160 if (!StringUtils.isEmpty(consignment.getUserInputShipperAccount())){ 224 if (!StringUtils.isEmpty(consignment.getUserInputShipperAccount())){
161 if (isShipperAccountMatch(bo.getShipperAccount(),consignment.getUserInputShipperAccount())){ 225 if (isShipperAccountMatch(bo.getShipperAccount(),consignment.getUserInputShipperAccount())){
162 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE); 226 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
227 + ConsignmentDto consignmentUserInput = new ConsignmentDto();
228 + this.initConByNotCe(consignmentUserInput,consignmentDto);
229 + consignmentDto.setCeFlag(0L);
230 + consignmentAddDto.setConsignment(consignmentUserInput);
163 return responseUtils.success(consignmentAddDto); 231 return responseUtils.success(consignmentAddDto);
164 }else { 232 }else {
165 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_THREE); 233 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_THREE);
166 - consignmentAddDto.setConsignmentId(null);
167 return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto); 234 return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto);
168 } 235 }
169 } 236 }
...@@ -172,7 +239,7 @@ public class ConsignmentUtil { ...@@ -172,7 +239,7 @@ public class ConsignmentUtil {
172 * 都不一致,但是输入了shipperAccount,则给出提示 239 * 都不一致,但是输入了shipperAccount,则给出提示
173 */ 240 */
174 if (StringUtils.hasText(bo.getShipperAccount())) { 241 if (StringUtils.hasText(bo.getShipperAccount())) {
175 - consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE); 242 + consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
176 return responseUtils.success(ResponseCode.MESSAGE_CODE_30005,consignmentAddDto); 243 return responseUtils.success(ResponseCode.MESSAGE_CODE_30005,consignmentAddDto);
177 } 244 }
178 245
...@@ -183,4 +250,94 @@ public class ConsignmentUtil { ...@@ -183,4 +250,94 @@ public class ConsignmentUtil {
183 private boolean isShipperAccountMatch(String account1, String account2) { 250 private boolean isShipperAccountMatch(String account1, String account2) {
184 return StringUtils.hasText(account1) && StringUtils.hasText(account2) && account1.equals(account2); 251 return StringUtils.hasText(account1) && StringUtils.hasText(account2) && account1.equals(account2);
185 } 252 }
186 -} 253 +
254 + private Consignment initConByNotCe(ConsignmentDto consignmentUserInput,ConsignmentDto consignment){
255 + consignmentUserInput.setId(consignment.getId());
256 + consignmentUserInput.setConsignmentCode(consignment.getConsignmentCode());
257 + consignmentUserInput.setUserInputShipperAccount(consignment.getUserInputShipperAccount());
258 + consignmentUserInput.setUserInputOriginCountry(consignment.getUserInputOriginCountry());
259 + consignmentUserInput.setUserInputOriginCountryCode(consignment.getUserInputOriginCountryCode());
260 + consignmentUserInput.setOriginCountry(consignment.getUserInputOriginCountry());
261 + consignmentUserInput.setOriginCountryCode(consignment.getUserInputOriginCountryCode());
262 + consignmentUserInput.setShipperAccount(consignment.getUserInputShipperAccount());
263 + consignmentUserInput.setDestinationCountryCode(consignment.getDestinationCountryCode());
264 + consignmentUserInput.setDestinationCountry(consignment.getDestinationCountry());
265 + return consignmentUserInput;
266 + }
267 +
268 + /**
269 + * @Author mt
270 + * @Description 保存运单相关信息
271 + * @Date 2024/11/19
272 + * @param consignment
273 + * @param attachmentList
274 + * @param uploadRecord
275 + * @param user
276 + * @return void
277 + */
278 + @Transactional(rollbackFor = Exception.class)
279 + public void submitInfo(Consignment consignment,
280 + List<Attachment> attachmentList,
281 + UploadRecord uploadRecord,
282 + User user,
283 + Long ceFlag) throws Exception{
284 + if(Objects.nonNull(consignment) && Objects.nonNull(consignment.getId())){
285 + try{
286 + //增加行级锁
287 + consignmentRepository.lockConsignmentRow(consignment.getId());
288 + }catch(Exception ex){
289 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30018,ex);
290 + }
291 + }
292 + /**
293 + * 保存或更新运单表
294 + */
295 + consignmentRepository.saveOrUpdate(consignment);
296 + //设置上传记录表运单ID
297 + uploadRecord.setConsignmentId(consignment.getId());
298 + /**
299 + * 保存上传记录表
300 + */
301 + uploadRecordRepository.saveOrUpdate(uploadRecord);
302 + //设置附件表运单id,上传记录表id
303 + Optional.ofNullable(attachmentList).orElse(new ArrayList<>()).stream().filter(Objects::nonNull).forEach(p->{
304 + p.setBizId(consignment.getId());
305 + p.setUploadRecordId(uploadRecord.getId());
306 + });
307 + /**
308 + * 保存附件表信息
309 + */
310 + attachmentRepository.saveOrUpdateAll(attachmentList);
311 + /**
312 + * 查找用户与运单关联信息
313 + */
314 + UserConsignmentMapping userConsignmentMapping = userConsignmentMappingRepository.findByUserIdConsignmentId(user.getId(),consignment.getId());
315 + if(Objects.isNull(userConsignmentMapping)){
316 + /**
317 + * 初始化插入预清关文件推送任务日志
318 + */
319 + userConsignmentMapping = userConsignmentMappingUtil.initUserConsignmentMapping(user.getId(),consignment);
320 + }
321 + userConsignmentMapping.setCeFlag(ceFlag);
322 + /**
323 + * 初始化插入预清关文件推送任务日志
324 + */
325 + userConsignmentMappingRepository.saveOrUpdate(userConsignmentMapping);
326 + /**
327 + * 初始化插入预清关文件推送日志,mt添加
328 + */
329 + PushOb pushOb = pushObUtil.initPushOb(consignment,uploadRecord,user);
330 + /**
331 + * 初始化插入提醒发件人邮件日志
332 + */
333 + emailService.saveNotificationEmail(consignment,user);
334 + /**
335 + * 初始化插入预清关文件邮件推送日志
336 + */
337 + emailService.savePushConsignmentFileEmail(consignment,uploadRecord);
338 + /**
339 + * 推送进口文件主表
340 + */
341 + pushObRepository.saveOrUpdate(pushOb);
342 + }
343 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,23 +2,49 @@ package com.fedex.connect.customer.util.service.biz; ...@@ -2,23 +2,49 @@ package com.fedex.connect.customer.util.service.biz;
2 2
3 import com.fedex.connect.common.dependencies.enums.biz.EmailStatusEnum; 3 import com.fedex.connect.common.dependencies.enums.biz.EmailStatusEnum;
4 import com.fedex.connect.common.dependencies.enums.biz.EmailTypeEnum; 4 import com.fedex.connect.common.dependencies.enums.biz.EmailTypeEnum;
5 +import com.fedex.connect.common.dependencies.template.clearanceEmail.DuplicateEmailTemplate;
5 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; 6 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
6 import com.fedex.connect.common.model.biz.Consignment; 7 import com.fedex.connect.common.model.biz.Consignment;
7 import com.fedex.connect.common.model.biz.Email; 8 import com.fedex.connect.common.model.biz.Email;
9 +import com.fedex.connect.common.model.biz.UploadRecord;
10 +import com.fedex.connect.customer.repository.repo.IUserRepository;
11 +import org.apache.commons.lang3.StringUtils;
12 +import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.stereotype.Component; 13 import org.springframework.stereotype.Component;
9 14
15 +import java.util.Optional;
16 +
10 @Component 17 @Component
11 public class EmailUtil { 18 public class EmailUtil {
19 + @Autowired
20 + private IUserRepository iUserRepository;
21 + @Autowired
22 + private DuplicateEmailTemplate duplicateEmailTemplate;
23 +
12 public void initNotificationEmail(Email email, Consignment consignment) throws Exception{ 24 public void initNotificationEmail(Email email, Consignment consignment) throws Exception{
13 email.setBizId(consignment.getId()); 25 email.setBizId(consignment.getId());
14 email.setBizCode(consignment.getConsignmentCode()); 26 email.setBizCode(consignment.getConsignmentCode());
15 - email.setToAddress(consignment.getShipperEmail()); 27 + String emailAddress = Optional.ofNullable(consignment.getUserUuid())
16 - email.setSubject(""); 28 + .map(iUserRepository::findUserByUuid)
17 - email.setSubject(""); 29 + .map(user -> StringUtils.defaultIfEmpty(user.getEmail(), consignment.getShipperEmail()))
30 + .orElse(consignment.getShipperEmail());
31 + email.setToAddress(emailAddress);
32 + email.setSubject(duplicateEmailTemplate.getTitle(email.getBizCode()));
18 email.setTypeName(EmailTypeEnum.NOTIFICATION_SENDER.getMsg()); 33 email.setTypeName(EmailTypeEnum.NOTIFICATION_SENDER.getMsg());
19 email.setTypeCode(EmailTypeEnum.NOTIFICATION_SENDER.getCode()); 34 email.setTypeCode(EmailTypeEnum.NOTIFICATION_SENDER.getCode());
20 email.setStatusName(EmailStatusEnum.PENDING.getMsg()); 35 email.setStatusName(EmailStatusEnum.PENDING.getMsg());
21 email.setStatusCode(EmailStatusEnum.PENDING.getCode()); 36 email.setStatusCode(EmailStatusEnum.PENDING.getCode());
22 AssignmentFieldUtils.assignmentTableBaseField(email); 37 AssignmentFieldUtils.assignmentTableBaseField(email);
23 } 38 }
39 +
40 + public void initPushConsignmentFileEmail(Email email, Consignment consignment,UploadRecord uploadRecord) throws Exception{
41 + email.setBizId(uploadRecord.getId());
42 + email.setBizCode(consignment.getConsignmentCode());
43 + email.setSubject("");
44 + email.setTypeName(EmailTypeEnum.PUSH_CON_FILE.getMsg());
45 + email.setTypeCode(EmailTypeEnum.PUSH_CON_FILE.getCode());
46 + email.setStatusName(EmailStatusEnum.PENDING.getMsg());
47 + email.setStatusCode(EmailStatusEnum.PENDING.getCode());
48 + AssignmentFieldUtils.assignmentTableBaseField(email);
49 + }
24 } 50 }
......
...@@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; ...@@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
7 import com.fedex.connect.common.model.bi.DictionaryEntries; 7 import com.fedex.connect.common.model.bi.DictionaryEntries;
8 import com.fedex.connect.common.model.biz.Consignment; 8 import com.fedex.connect.common.model.biz.Consignment;
9 import com.fedex.connect.common.model.biz.PushOb; 9 import com.fedex.connect.common.model.biz.PushOb;
10 +import com.fedex.connect.common.model.biz.UploadRecord;
10 import com.fedex.connect.common.model.sys.User; 11 import com.fedex.connect.common.model.sys.User;
11 import lombok.extern.slf4j.Slf4j; 12 import lombok.extern.slf4j.Slf4j;
12 import org.springframework.beans.factory.annotation.Autowired; 13 import org.springframework.beans.factory.annotation.Autowired;
...@@ -29,14 +30,15 @@ public class PushObUtil { ...@@ -29,14 +30,15 @@ public class PushObUtil {
29 * @param 30 * @param
30 * @return com.fedex.connect.common.model.biz.PushOb 31 * @return com.fedex.connect.common.model.biz.PushOb
31 */ 32 */
32 - public PushOb initPushOb(Consignment consignment, User user) throws Exception{ 33 + public PushOb initPushOb(Consignment consignment, UploadRecord uploadRecord, User user) throws Exception{
33 DictionaryEntries pushObStatus = cacheSystem.getDicPushObStatus(PushObStatusEnum.TO_BE_SENT.getCode()); 34 DictionaryEntries pushObStatus = cacheSystem.getDicPushObStatus(PushObStatusEnum.TO_BE_SENT.getCode());
34 PushOb pushOb = new PushOb(); 35 PushOb pushOb = new PushOb();
35 pushOb.setConsignmentId(consignment.getId()); 36 pushOb.setConsignmentId(consignment.getId());
36 pushOb.setConsignmentCode(consignment.getConsignmentCode()); 37 pushOb.setConsignmentCode(consignment.getConsignmentCode());
37 pushOb.setPushNum(DigitConstants.DIGIT_ZERO_LONG); 38 pushOb.setPushNum(DigitConstants.DIGIT_ZERO_LONG);
38 pushOb.setStatusCode(pushObStatus.getCode()); 39 pushOb.setStatusCode(pushObStatus.getCode());
39 - pushOb.setStatusName(pushObStatus.getEnglishName()); 40 + pushOb.setStatusName(pushObStatus.getDescription());
41 + pushOb.setUploadRecordId(uploadRecord.getId());
40 pushOb.setCreateUserId(user.getId()); 42 pushOb.setCreateUserId(user.getId());
41 pushOb.setCreateUserName(user.getUserName()); 43 pushOb.setCreateUserName(user.getUserName());
42 pushOb.setModifyUserId(user.getId()); 44 pushOb.setModifyUserId(user.getId());
......
...@@ -6,6 +6,7 @@ import com.fedex.connect.common.dependencies.enums.biz.ConsignmentStatusEnum; ...@@ -6,6 +6,7 @@ import com.fedex.connect.common.dependencies.enums.biz.ConsignmentStatusEnum;
6 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; 6 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
7 import com.fedex.connect.common.model.bi.DictionaryEntries; 7 import com.fedex.connect.common.model.bi.DictionaryEntries;
8 import com.fedex.connect.common.model.biz.UploadRecord; 8 import com.fedex.connect.common.model.biz.UploadRecord;
9 +import com.fedex.connect.common.model.sys.User;
9 import lombok.extern.slf4j.Slf4j; 10 import lombok.extern.slf4j.Slf4j;
10 import org.springframework.beans.factory.annotation.Autowired; 11 import org.springframework.beans.factory.annotation.Autowired;
11 import org.springframework.stereotype.Component; 12 import org.springframework.stereotype.Component;
...@@ -28,7 +29,7 @@ public class UploadRecordUtil { ...@@ -28,7 +29,7 @@ public class UploadRecordUtil {
28 * @param consignmentCode 29 * @param consignmentCode
29 * @return com.fedex.connect.common.model.biz.UploadRecord 30 * @return com.fedex.connect.common.model.biz.UploadRecord
30 */ 31 */
31 - public UploadRecord initUploadRecord(String consignmentCode) throws Exception{ 32 + public UploadRecord initUploadRecord(String consignmentCode, User user) throws Exception{
32 DictionaryEntries consignmentStatusDic = cacheSystem.getDicConsignmentStatus(ConsignmentStatusEnum.CONSIGNMENT_STATUS_01.getCode()); 33 DictionaryEntries consignmentStatusDic = cacheSystem.getDicConsignmentStatus(ConsignmentStatusEnum.CONSIGNMENT_STATUS_01.getCode());
33 UploadRecord uploadRecord = new UploadRecord(); 34 UploadRecord uploadRecord = new UploadRecord();
34 //记录当前运单号 35 //记录当前运单号
...@@ -36,6 +37,10 @@ public class UploadRecordUtil { ...@@ -36,6 +37,10 @@ public class UploadRecordUtil {
36 //记录当前运单状态 37 //记录当前运单状态
37 uploadRecord.setStatusCode(consignmentStatusDic.getCode()); 38 uploadRecord.setStatusCode(consignmentStatusDic.getCode());
38 uploadRecord.setStatusName(consignmentStatusDic.getEnglishName()); 39 uploadRecord.setStatusName(consignmentStatusDic.getEnglishName());
40 + uploadRecord.setCreateUserId(user.getId());
41 + uploadRecord.setCreateUserName(user.getUserName());
42 + uploadRecord.setModifyUserId(user.getId());
43 + uploadRecord.setModifyUserName(user.getUserName());
39 /** 44 /**
40 * 初始化基础字段 45 * 初始化基础字段
41 */ 46 */
......
...@@ -2,6 +2,7 @@ package com.fedex.connect.customer.util.service.biz; ...@@ -2,6 +2,7 @@ package com.fedex.connect.customer.util.service.biz;
2 2
3 import com.fedex.connect.common.dependencies.enums.base.StatusEnum; 3 import com.fedex.connect.common.dependencies.enums.base.StatusEnum;
4 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; 4 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
5 +import com.fedex.connect.common.model.biz.Consignment;
5 import com.fedex.connect.common.model.biz.UserConsignmentMapping; 6 import com.fedex.connect.common.model.biz.UserConsignmentMapping;
6 import lombok.extern.slf4j.Slf4j; 7 import lombok.extern.slf4j.Slf4j;
7 import org.springframework.stereotype.Component; 8 import org.springframework.stereotype.Component;
...@@ -22,10 +23,11 @@ public class UserConsignmentMappingUtil { ...@@ -22,10 +23,11 @@ public class UserConsignmentMappingUtil {
22 * @param 23 * @param
23 * @return com.fedex.connect.common.model.biz.PushOb 24 * @return com.fedex.connect.common.model.biz.PushOb
24 */ 25 */
25 - public UserConsignmentMapping initUserConsignmentMapping(Long userId,Long consignmentId) throws Exception{ 26 + public UserConsignmentMapping initUserConsignmentMapping(Long userId, Consignment consignment) throws Exception{
26 UserConsignmentMapping userConsignmentMapping = new UserConsignmentMapping(); 27 UserConsignmentMapping userConsignmentMapping = new UserConsignmentMapping();
27 userConsignmentMapping.setUserId(userId); 28 userConsignmentMapping.setUserId(userId);
28 - userConsignmentMapping.setConsignmentId(consignmentId); 29 + userConsignmentMapping.setConsignmentId(consignment.getId());
30 + userConsignmentMapping.setConsignmentCode(consignment.getConsignmentCode());
29 userConsignmentMapping.setStatus(StatusEnum.YES.getCode()); 31 userConsignmentMapping.setStatus(StatusEnum.YES.getCode());
30 AssignmentFieldUtils.assignmentTableBaseField(userConsignmentMapping); 32 AssignmentFieldUtils.assignmentTableBaseField(userConsignmentMapping);
31 return userConsignmentMapping; 33 return userConsignmentMapping;
......
1 package com.fedex.connect.customer.validate.controller.biz; 1 package com.fedex.connect.customer.validate.controller.biz;
2 2
3 -import com.fedex.connect.common.dependencies.contants.DigitConstants;
4 import com.fedex.connect.common.dependencies.util.ResponseUtils; 3 import com.fedex.connect.common.dependencies.util.ResponseUtils;
5 import com.fedex.connect.common.dependencies.util.Utils; 4 import com.fedex.connect.common.dependencies.util.Utils;
5 +import com.fedex.connect.common.model.biz.Attachment;
6 import com.fedex.connect.customer.constants.CustomerConstant; 6 import com.fedex.connect.customer.constants.CustomerConstant;
7 import com.fedex.connect.customer.data.bo.ConsignmentBo; 7 import com.fedex.connect.customer.data.bo.ConsignmentBo;
8 import com.fedex.connect.customer.enums.ResponseCode; 8 import com.fedex.connect.customer.enums.ResponseCode;
...@@ -34,20 +34,52 @@ public class AttachmentValidate { ...@@ -34,20 +34,52 @@ public class AttachmentValidate {
34 */ 34 */
35 public void validateFile(MultipartFile[] files, ConsignmentBo consignmentBo){ 35 public void validateFile(MultipartFile[] files, ConsignmentBo consignmentBo){
36 //文件为空 36 //文件为空
37 - if(Objects.isNull(files) 37 + if(Objects.isNull(consignmentBo)
38 - || files.length == DigitConstants.DIGIT_MINUS_ONE
39 - || Objects.isNull(consignmentBo)
40 || Objects.isNull(consignmentBo.getAttachmentBizTypeList())){ 38 || Objects.isNull(consignmentBo.getAttachmentBizTypeList())){
41 responseUtils.fail(ResponseCode.MESSAGE_CODE_30006); 39 responseUtils.fail(ResponseCode.MESSAGE_CODE_30006);
42 } 40 }
43 //上传最大文件个数限制 41 //上传最大文件个数限制
44 - if(files.length > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL){ 42 + if(Objects.nonNull(files) && files.length > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL){
45 responseUtils.fail(ResponseCode.MESSAGE_CODE_30007,CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL); 43 responseUtils.fail(ResponseCode.MESSAGE_CODE_30007,CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL);
46 } 44 }
47 //上传总文件大小限制 45 //上传总文件大小限制
48 List<Long> fileSizeList = new ArrayList<>(); 46 List<Long> fileSizeList = new ArrayList<>();
49 - for(MultipartFile file : files){ 47 + if(Objects.nonNull(files)) {
50 - fileSizeList.add(file.getSize()); 48 + for (MultipartFile file : files) {
49 + fileSizeList.add(file.getSize());
50 + }
51 + }
52 + //总文件大小
53 + Long totalSize = Utils.listOf(fileSizeList).stream().filter(Objects::nonNull)
54 + .mapToLong(f -> Optional.ofNullable(f).orElse(0L)).sum();
55 + //最大上传总文件大小超过95M
56 + if(totalSize > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_SIZE){
57 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30008,CustomerConstant.VALIDATE_KEYS.FILE_MAX_SIZE);
58 + }
59 + }
60 +
61 + /**
62 + * @Author mt
63 + * @Description 附件信息校验
64 + * @Date 2024/11/12
65 + * @param files
66 + * @return void
67 + */
68 + public void validateAttachment(List<Attachment> files){
69 + //文件为空
70 + if(Objects.isNull(files)){
71 + return;
72 + }
73 + //上传最大文件个数限制
74 + if(Objects.nonNull(files) && files.size() > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL){
75 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30007,CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL);
76 + }
77 + //上传总文件大小限制
78 + List<Long> fileSizeList = new ArrayList<>();
79 + if(Objects.nonNull(files)) {
80 + for (Attachment file : files) {
81 + fileSizeList.add(file.getFileSize());
82 + }
51 } 83 }
52 //总文件大小 84 //总文件大小
53 Long totalSize = Utils.listOf(fileSizeList).stream().filter(Objects::nonNull) 85 Long totalSize = Utils.listOf(fileSizeList).stream().filter(Objects::nonNull)
......
1 package com.fedex.connect.customer.validate.controller.biz; 1 package com.fedex.connect.customer.validate.controller.biz;
2 2
3 -import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
4 import com.fedex.connect.common.dependencies.util.ResponseUtils; 3 import com.fedex.connect.common.dependencies.util.ResponseUtils;
5 import com.fedex.connect.customer.enums.ResponseCode; 4 import com.fedex.connect.customer.enums.ResponseCode;
6 import org.springframework.beans.factory.annotation.Autowired; 5 import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -8,23 +8,7 @@ spring: ...@@ -8,23 +8,7 @@ spring:
8 #系统环境 8 #系统环境
9 env: dev 9 env: dev
10 10
11 -
12 export: 11 export:
13 - jwt:
14 - securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
15 - urlWhiteList:
16 - - /icleartw/auth
17 - - /icleartw/monitor/ok
18 - - /icleartw/sysUser/logout
19 - - /icleartw/swagger-resources
20 - - /icleartw/webjars
21 - uriWhiteList:
22 - - /icleartw/swagger-ui.html
23 - - /icleartw/swagger-ui/*
24 - - /icleartw/v2/api-docs
25 - - /icleartw/login.html
26 - expire_1H: 7200
27 - expire_1D: 604800
28 mail: 12 mail:
29 smtp: 13 smtp:
30 host: smtp.qiye.aliyun.com 14 host: smtp.qiye.aliyun.com
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: prod 6 env: prod
7 7
8 export: 8 export:
9 - jwt:
10 - securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
11 - urlWhiteList:
12 - - /icleartw/auth
13 - - /icleartw/monitor/ok
14 - - /icleartw/sysUser/logout
15 - - /icleartw/swagger-resources
16 - - /icleartw/webjars
17 - uriWhiteList:
18 - - /icleartw/swagger-ui.html
19 - - /icleartw/swagger-ui/*
20 - - /icleartw/v2/api-docs
21 - - /icleartw/login.html
22 - expire_1H: 7200
23 - expire_1D: 604800
24 mail: 9 mail:
25 smtp: 10 smtp:
26 host: mapper.gslb.fedex.com 11 host: mapper.gslb.fedex.com
...@@ -38,4 +23,4 @@ export: ...@@ -38,4 +23,4 @@ export:
38 23
39 upload: 24 upload:
40 path: 25 path:
41 - attachment: /app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect/upload/attachment
...\ No newline at end of file ...\ No newline at end of file
26 + attachment: /var/share/iClearPreCLR/upload/attachment
...\ No newline at end of file ...\ No newline at end of file
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: test 6 env: test
7 7
8 export: 8 export:
9 - jwt:
10 - securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
11 - urlWhiteList:
12 - - /icleartw/auth
13 - - /icleartw/monitor/ok
14 - - /icleartw/sysUser/logout
15 - - /icleartw/swagger-resources
16 - - /icleartw/webjars
17 - uriWhiteList:
18 - - /icleartw/swagger-ui.html
19 - - /icleartw/swagger-ui/*
20 - - /icleartw/v2/api-docs
21 - - /icleartw/login.html
22 - expire_1H: 7200
23 - expire_1D: 604800
24 mail: 9 mail:
25 smtp: 10 smtp:
26 host: smtp.qiye.aliyun.com 11 host: smtp.qiye.aliyun.com
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: uat 6 env: uat
7 7
8 export: 8 export:
9 - jwt:
10 - securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
11 - urlWhiteList:
12 - - /icleartw/auth
13 - - /icleartw/monitor/ok
14 - - /icleartw/sysUser/logout
15 - - /icleartw/swagger-resources
16 - - /icleartw/webjars
17 - uriWhiteList:
18 - - /icleartw/swagger-ui.html
19 - - /icleartw/swagger-ui/*
20 - - /icleartw/v2/api-docs
21 - - /icleartw/login.html
22 - expire_1H: 7200
23 - expire_1D: 604800
24 mail: 9 mail:
25 smtp: 10 smtp:
26 host: mapper.gslb.fedex.com 11 host: mapper.gslb.fedex.com
...@@ -38,4 +23,4 @@ export: ...@@ -38,4 +23,4 @@ export:
38 23
39 upload: 24 upload:
40 path: 25 path:
41 - attachment: /var/share/iclearConnect/upload/attachment
...\ No newline at end of file ...\ No newline at end of file
26 + attachment: /var/share/iClearPreCLR/upload/attachment
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -29,6 +29,7 @@ import: ...@@ -29,6 +29,7 @@ import:
29 - /biz-customer/user/logout 29 - /biz-customer/user/logout
30 - /biz-customer/swagger-resources 30 - /biz-customer/swagger-resources
31 - /biz-customer/webjars 31 - /biz-customer/webjars
32 + - /biz-customer/csrf
32 uriWhiteList: 33 uriWhiteList:
33 - /biz-customer/swagger-ui.html 34 - /biz-customer/swagger-ui.html
34 - /biz-customer/swagger-ui/* 35 - /biz-customer/swagger-ui/*
...@@ -43,4 +44,8 @@ mybatis: ...@@ -43,4 +44,8 @@ mybatis:
43 configuration: 44 configuration:
44 #开启驼峰与下划线转换 45 #开启驼峰与下划线转换
45 map-underscore-to-camel-case: true 46 map-underscore-to-camel-case: true
46 - call-setters-on-nulls: true
...\ No newline at end of file ...\ No newline at end of file
47 + call-setters-on-nulls: true
48 +#全局异常拦截是否生效
49 +common:
50 + exception-advice-webconfig:
51 + enable: true
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <configuration> 2 <configuration>
3 <springProfile name="dev,uat,prod"> 3 <springProfile name="dev,uat,prod">
4 <!-- 日志存放路径 --> 4 <!-- 日志存放路径 -->
5 - <property name="log.path" value="/var/fedex/iclearConnect/weblogic/iclearConnect/biz-customer" /> 5 + <property name="log.path" value="/var/fedex/iclconnect/weblogic/biz-customer" />
6 </springProfile> 6 </springProfile>
7 <springProfile name="test"> 7 <springProfile name="test">
8 <!-- 日志存放路径 --> 8 <!-- 日志存放路径 -->
......
1 +#******************系统操作日志记录,中文展示******************
2 +business_log_20001=添加运单
3 +business_log_20002=提交运单
4 +business_log_20003=运单查询
5 +business_log_20004=运单详细信息查询
6 +business_log_20005=根据运单ID查询用户上传记录
7 +business_log_20006=运单历史上传记录查询
8 +business_log_20007=上传历史附件记录
9 +business_log_20008=下载附件
10 +system_exception_20003=提示信息过长,未保存成功
11 +
12 +#******************鉴权相关提示,需要做国际化******************
13 +#authentication包
14 +#没有访问权限
15 +system_exception_10001=No access rights.
16 +#没有通过权限认证
17 +system_exception_10002=Failed to pass the authentication.
18 +#登录身份异常
19 +system_exception_10003=Login identity is abnormal.
20 +#登录超过8小时,请重新登录
21 +system_exception_10004=Login has exceeded 8 hours, please log in again.
22 +#登录已过期,请重新登录
23 +system_exception_10005=Login has expired, please log in again.
24 +
25 +#******************业务相关、需要做国际化******************
26 +#*********用于字段描述使用,不单独使用**********
27 +#发货人计费账号
28 +business_field_31001=shipper account
29 +#运单ID
30 +business_field_31002=tracking number ID
31 +#运单号
32 +business_field_31003=tracking number
33 +#始发国编码
34 +business_field_31004=origin country ID
35 +#始发国名称
36 +business_field_31005=origin country
37 +#目的国编码
38 +business_field_31006=destination country ID
39 +#目的国全称
40 +business_field_31007=destination country
41 +#文件业务类型
42 +business_field_31008=upload file type
43 +
44 +#*********具体响应到前端**********
45 +#{0}必填字段未填写
46 +business_exception_30001=Required fields not filled in.
47 +#单次最多可查询1000个运单号码
48 +business_exception_30002=A maximum of 1,000 waybill numbers can be queried at a time.
49 +#暂时没用,预留
50 +business_exception_30003={0}不正确,请重新输入
51 +business_exception_30004=The waybill you entered is generated by another user, whether continue uploading?
52 +business_exception_30005=The waybill you entered is generated by another account, whether continue uploading?
53 +#附件未上传
54 +business_exception_30006=Attachment not uploaded.
55 +#所有上传文件数量不超过{0}个文件
56 +business_exception_30007=The total number of uploaded files should not exceed 100 files.
57 +#所有上传文件总大小不超过{0}M
58 +business_exception_30008=The total size of all uploaded files should not exceed {0}MB.
59 +#暂时没用,预留
60 +business_exception_30009=运单或发票未上传
61 +#暂时没用,预留
62 +business_exception_30010=文件类型不在:运单、发票、箱单、其他
63 +#该运单已被其他人创建,不可以重复创建
64 +business_exception_30011=This waybill has been created by someone else and cannot be created again.
65 +#暂时没用,预留
66 +business_exception_30012=UUID不一致
67 +#文件名为:{0},上传失败,请检查后重试
68 +business_exception_30013=File name: {0}, upload failed, please check and try again
69 +#运单信息加载失败,请稍后重试
70 +business_exception_30014=Air waybill information loading failed, please try again later
71 +#提交成功
72 +business_success_30015=Submission successful
73 +#提交失败,请稍后重试!
74 +business_exception_30016=Submission failed, please try again later!
75 +#运单号填写错误,请检查!
76 +business_exception_30017=Air waybill number is incorrect, please check!
77 +#运单提交失败,该运单正在被其他用户操作,请稍后重试
78 +business_exception_30018=Air waybill submission failed, the waybill is being operated by other users, please try again later.
79 +#Shipper Account填写错误(Shipper Account是由9位数字组成)
80 +business_exception_30019=Incorrect Shipper Account(Shipper Account is composed of 9 digits).
81 +#您当前登录账号的shipper Account与您正在录入的shipperAccount不一致,请确认是否继续?
82 +business_exception_30020=The Shipper Account you are entering is inconsistent with your login Shipper Account. Please confirm whether to continue?
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,42 +6,77 @@ business_log_20004=运单详细信息查询 ...@@ -6,42 +6,77 @@ business_log_20004=运单详细信息查询
6 business_log_20005=根据运单ID查询用户上传记录 6 business_log_20005=根据运单ID查询用户上传记录
7 business_log_20006=运单历史上传记录查询 7 business_log_20006=运单历史上传记录查询
8 business_log_20007=上传历史附件记录 8 business_log_20007=上传历史附件记录
9 +business_log_20008=下载附件
9 system_exception_20003=提示信息过长,未保存成功 10 system_exception_20003=提示信息过长,未保存成功
10 11
11 #******************鉴权相关提示,需要做国际化****************** 12 #******************鉴权相关提示,需要做国际化******************
12 #authentication包 13 #authentication包
13 -system_exception_10001=没有访问权限 14 +#没有访问权限
14 -system_exception_10002=没有通过权限认证 15 +system_exception_10001=No access rights.
15 -system_exception_10003=登录身份异常 16 +#没有通过权限认证
16 -system_exception_10004=登录超过8小时,请重新登录 17 +system_exception_10002=Failed to pass the authentication.
17 -system_exception_10005=登录已过期 18 +#登录身份异常
18 -system_exception_10006=登录已过期,请重新登录 19 +system_exception_10003=Login identity is abnormal.
20 +#登录超过8小时,请重新登录
21 +system_exception_10004=Login has exceeded 8 hours, please log in again.
22 +#登录已过期,请重新登录
23 +system_exception_10005=Login has expired, please log in again.
19 24
20 #******************业务相关、需要做国际化****************** 25 #******************业务相关、需要做国际化******************
21 #*********用于字段描述使用,不单独使用********** 26 #*********用于字段描述使用,不单独使用**********
22 -business_field_31001=发货人计费账号 27 +#发货人计费账号
23 -business_field_31002=运单ID 28 +business_field_31001=shipper account
24 -business_field_31003=运单号 29 +#运单ID
25 -business_field_31004=原产国编码 30 +business_field_31002=tracking number ID
26 -business_field_31005=原产国名称 31 +#运单号
27 -business_field_31006=目的国编码 32 +business_field_31003=tracking number
28 -business_field_31007=目的国全称 33 +#始发国编码
29 -business_field_31008=文件业务类型 34 +business_field_31004=origin country ID
35 +#始发国名称
36 +business_field_31005=origin country
37 +#目的国编码
38 +business_field_31006=destination country ID
39 +#目的国全称
40 +business_field_31007=destination country
41 +#文件业务类型
42 +business_field_31008=upload file type
30 43
31 #*********具体响应到前端********** 44 #*********具体响应到前端**********
32 -business_exception_30001=#{0}必填字段未填写 45 +#{0}必填字段未填写
33 -business_exception_30002=单次最多可查询1000个运单号码 46 +business_exception_30001=Required fields not filled in.
34 -business_exception_30003=#{0}不正确,请重新输入 47 +#单次最多可查询1000个运单号码
35 -business_exception_30004=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation. 48 +business_exception_30002=A maximum of 1,000 waybill numbers can be queried at a time.
36 -business_exception_30005=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation. 49 +#暂时没用,预留
37 -business_exception_30006=附件上传不符合标准 50 +business_exception_30003={0}不正确,请重新输入
38 -business_exception_30007=所有上传文件数量不超过#{0}个文件 51 +business_exception_30004=The waybill you entered is generated by another user, whether continue uploading?
39 -business_exception_30008=所有上传文件总大小不超过#{0}M 52 +business_exception_30005=The waybill you entered is generated by another account, whether continue uploading?
53 +#附件未上传
54 +business_exception_30006=Attachment not uploaded.
55 +#所有上传文件数量不超过{0}个文件
56 +business_exception_30007=The total number of uploaded files should not exceed 100 files.
57 +#所有上传文件总大小不超过{0}M
58 +business_exception_30008=The total size of all uploaded files should not exceed {0}MB.
59 +#暂时没用,预留
40 business_exception_30009=运单或发票未上传 60 business_exception_30009=运单或发票未上传
61 +#暂时没用,预留
41 business_exception_30010=文件类型不在:运单、发票、箱单、其他 62 business_exception_30010=文件类型不在:运单、发票、箱单、其他
42 -business_exception_30011=该运单已被其他人创建,不可以重复创建 63 +#该运单已被其他人创建,不可以重复创建
64 +business_exception_30011=This waybill has been created by someone else and cannot be created again.
65 +#暂时没用,预留
43 business_exception_30012=UUID不一致 66 business_exception_30012=UUID不一致
44 -business_exception_30013=文件名为:#{0},上传失败,请检查后重试
45 -business_exception_30014=运单信息加载失败,请稍后重试
46 -business_success_30015=提交成功
47 -business_exception_30016=运单提交失败
...\ No newline at end of file ...\ No newline at end of file
67 +#文件名为:{0},上传失败,请检查后重试
68 +business_exception_30013=File name: {0}, upload failed, please check and try again
69 +#运单信息加载失败,请稍后重试
70 +business_exception_30014=Air waybill information loading failed, please try again later
71 +#提交成功
72 +business_success_30015=Submission successful
73 +#提交失败,请稍后重试!
74 +business_exception_30016=Submission failed, please try again later!
75 +#运单号填写错误,请检查!
76 +business_exception_30017=Air waybill number is incorrect, please check!
77 +#运单提交失败,该运单正在被其他用户操作,请稍后重试
78 +business_exception_30018=Air waybill submission failed, the waybill is being operated by other users, please try again later.
79 +#Shipper Account填写错误(Shipper Account是由9位数字组成)
80 +business_exception_30019=Incorrect Shipper Account(Shipper Account is composed of 9 digits).
81 +#您当前登录账号的shipper Account与您正在录入的shipperAccount不一致,请确认是否继续?
82 +business_exception_30020=The Shipper Account you are entering is inconsistent with your login Shipper Account. Please confirm whether to continue?
...\ No newline at end of file ...\ No newline at end of file
......
1 -#******************系统操作日志记录,中文展示******************
2 -business_log_20001=添加运单
3 -business_log_20002=提交运单
4 -business_log_20003=运单查询
5 -business_log_20004=运单详细信息查询
6 -business_log_20005=根据运单ID查询用户上传记录
7 -business_log_20006=运单历史上传记录查询
8 -business_log_20007=上传历史附件记录
9 -system_exception_20003=提示信息过长,未保存成功
10 -
11 -#******************鉴权相关提示,需要做国际化******************
12 -#authentication包
13 -system_exception_10001=没有访问权限
14 -system_exception_10002=没有通过权限认证
15 -system_exception_10003=登录身份异常
16 -system_exception_10004=登录超过8小时,请重新登录
17 -system_exception_10005=登录已过期
18 -system_exception_10006=登录已过期,请重新登录
19 -
20 -#******************业务相关、需要做国际化******************
21 -#*********用于字段描述使用,不单独使用**********
22 -business_field_31001=发货人计费账号
23 -business_field_31002=运单ID
24 -business_field_31003=运单号
25 -business_field_31004=原产国编码
26 -business_field_31005=原产国名称
27 -business_field_31006=目的国编码
28 -business_field_31007=目的国全称
29 -business_field_31008=文件业务类型
30 -
31 -#*********具体响应到前端**********
32 -business_exception_30001=${0}必填字段未填写
33 -business_exception_30002=单次最多可查询1000个运单号码
34 -business_exception_30003=${0}不正确,请重新输入
35 -business_exception_30004=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
36 -business_exception_30005=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
37 -business_exception_30006=附件上传不符合标准
38 -business_exception_30007=所有上传文件数量不超过50个文件
39 -business_exception_30008=所有上传文件总大小不超过50M
40 -business_exception_30009=运单或发票未上传
41 -business_exception_30010=文件类型不在:运单、发票、箱单、其他
42 -business_exception_30011=该运单已被其他人创建,不可以重复创建
43 -business_exception_30012=UUID不一致
44 -business_exception_30013=文件名为:#{0},上传失败,请检查后重试
45 -business_exception_30014=运单信息加载失败,请稍后重试
46 -business_success_30015=提交成功
47 -business_exception_30016=运单提交失败
...\ No newline at end of file ...\ No newline at end of file
1 +##******************系统操作日志记录,中文展示******************
2 +#business_log_20001=添加运单
3 +#business_log_20002=提交运单
4 +#business_log_20003=运单查询
5 +#business_log_20004=运单详细信息查询
6 +#business_log_20005=根据运单ID查询用户上传记录
7 +#business_log_20006=运单历史上传记录查询
8 +#business_log_20007=上传历史附件记录
9 +#business_log_20008=下载附件
10 +#system_exception_20003=提示信息过长,未保存成功
11 +#
12 +##******************鉴权相关提示,需要做国际化******************
13 +##authentication包
14 +#system_exception_10001=没有访问权限
15 +#system_exception_10002=没有通过权限认证
16 +#system_exception_10003=登录身份异常
17 +#system_exception_10004=登录超过8小时,请重新登录
18 +#system_exception_10005=登录已过期,请重新登录
19 +#
20 +##******************业务相关、需要做国际化******************
21 +##*********用于字段描述使用,不单独使用**********
22 +##business_field_31001=发货人计费账号
23 +#business_field_31001=shipper account
24 +##business_field_31002=运单ID
25 +#business_field_31002=tracking number ID
26 +##business_field_31003=运单号
27 +#business_field_31003=tracking number
28 +##business_field_31004=始发国编码
29 +#business_field_31004=origin country ID
30 +##business_field_31005=始发国名称
31 +#business_field_31005=origin country
32 +##business_field_31006=目的国编码
33 +#business_field_31006=destination country ID
34 +##business_field_31007=目的国全称
35 +#business_field_31007=destination country
36 +##business_field_31008=文件业务类型
37 +#business_field_31008=upload file type
38 +#
39 +##*********具体响应到前端**********
40 +#business_exception_30001={0}必填字段未填写
41 +#business_exception_30002=单次最多可查询1000个运单号码
42 +#business_exception_30003={0}不正确,请重新输入
43 +#business_exception_30004=The waybill you entered is generated by another user, whether continue uploading?
44 +#business_exception_30005=The waybill you entered is generated by another account, whether continue uploading?
45 +#business_exception_30006=附件未上传
46 +#business_exception_30007=所有上传文件数量不超过{0}个文件
47 +#business_exception_30008=所有上传文件总大小不超过{0}M
48 +#business_exception_30009=运单或发票未上传
49 +#business_exception_30010=文件类型不在:运单、发票、箱单、其他
50 +#business_exception_30011=该运单已被其他人创建,不可以重复创建
51 +#business_exception_30012=UUID不一致
52 +#business_exception_30013=文件名为:{0},上传失败,请检查后重试
53 +#business_exception_30014=运单信息加载失败,请稍后重试
54 +#business_success_30015=提交成功
55 +#business_exception_30016=提交失败,请稍后重试!
56 +#business_exception_30017=运单号填写错误,请检查!
57 +#business_exception_30018=运单提交失败,该运单正在被其他用户操作,请稍后重试
58 +#business_exception_30019=Shipper Account填写错误(Shipper Account是由9位数字组成)
59 +#business_exception_30020=您当前登录账号的shipper Account与您正在录入的shipperAccount不一致,请确认是否继续?
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,6 +2,7 @@ package com.fedex.connect.common.dao.log; ...@@ -2,6 +2,7 @@ package com.fedex.connect.common.dao.log;
2 2
3 import com.fedex.connect.common.model.log.Operation; 3 import com.fedex.connect.common.model.log.Operation;
4 import com.fedex.connect.common.model.log.OperationExample; 4 import com.fedex.connect.common.model.log.OperationExample;
5 +import com.fedex.connect.common.model.log.OperationWithBLOBs;
5 import java.util.List; 6 import java.util.List;
6 import org.apache.ibatis.annotations.Param; 7 import org.apache.ibatis.annotations.Param;
7 8
...@@ -12,25 +13,25 @@ public interface OperationMapper { ...@@ -12,25 +13,25 @@ public interface OperationMapper {
12 13
13 int deleteByPrimaryKey(Long id); 14 int deleteByPrimaryKey(Long id);
14 15
15 - int insert(Operation record); 16 + int insert(OperationWithBLOBs record);
16 17
17 - int insertSelective(Operation record); 18 + int insertSelective(OperationWithBLOBs record);
18 19
19 - List<Operation> selectByExampleWithBLOBs(OperationExample example); 20 + List<OperationWithBLOBs> selectByExampleWithBLOBs(OperationExample example);
20 21
21 List<Operation> selectByExample(OperationExample example); 22 List<Operation> selectByExample(OperationExample example);
22 23
23 - Operation selectByPrimaryKey(Long id); 24 + OperationWithBLOBs selectByPrimaryKey(Long id);
24 25
25 - int updateByExampleSelective(@Param("record") Operation record, @Param("example") OperationExample example); 26 + int updateByExampleSelective(@Param("record") OperationWithBLOBs record, @Param("example") OperationExample example);
26 27
27 - int updateByExampleWithBLOBs(@Param("record") Operation record, @Param("example") OperationExample example); 28 + int updateByExampleWithBLOBs(@Param("record") OperationWithBLOBs record, @Param("example") OperationExample example);
28 29
29 int updateByExample(@Param("record") Operation record, @Param("example") OperationExample example); 30 int updateByExample(@Param("record") Operation record, @Param("example") OperationExample example);
30 31
31 - int updateByPrimaryKeySelective(Operation record); 32 + int updateByPrimaryKeySelective(OperationWithBLOBs record);
32 33
33 - int updateByPrimaryKeyWithBLOBs(Operation record); 34 + int updateByPrimaryKeyWithBLOBs(OperationWithBLOBs record);
34 35
35 int updateByPrimaryKey(Operation record); 36 int updateByPrimaryKey(Operation record);
36 } 37 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
118 </if> 118 </if>
119 'true' as QUERYID, 119 'true' as QUERYID,
120 <include refid="Base_Column_List" /> 120 <include refid="Base_Column_List" />
121 - from ICLEARIMP.T_BIZ_CE_INFO 121 + from iclconnect.T_BIZ_CE_INFO
122 <if test="_parameter != null"> 122 <if test="_parameter != null">
123 <include refid="Example_Where_Clause" /> 123 <include refid="Example_Where_Clause" />
124 </if> 124 </if>
...@@ -130,15 +130,15 @@ ...@@ -130,15 +130,15 @@
130 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> 130 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
131 select 131 select
132 <include refid="Base_Column_List" /> 132 <include refid="Base_Column_List" />
133 - from ICLEARIMP.T_BIZ_CE_INFO 133 + from iclconnect.T_BIZ_CE_INFO
134 where ID = #{id,jdbcType=NUMERIC} 134 where ID = #{id,jdbcType=NUMERIC}
135 </select> 135 </select>
136 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> 136 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
137 - delete from ICLEARIMP.T_BIZ_CE_INFO 137 + delete from iclconnect.T_BIZ_CE_INFO
138 where ID = #{id,jdbcType=NUMERIC} 138 where ID = #{id,jdbcType=NUMERIC}
139 </delete> 139 </delete>
140 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.biz.CeInfoExample"> 140 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.biz.CeInfoExample">
141 - delete from ICLEARIMP.T_BIZ_CE_INFO 141 + delete from iclconnect.T_BIZ_CE_INFO
142 <if test="_parameter != null"> 142 <if test="_parameter != null">
143 <include refid="Example_Where_Clause" /> 143 <include refid="Example_Where_Clause" />
144 </if> 144 </if>
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
147 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 147 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
148 SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL 148 SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL
149 </selectKey> 149 </selectKey>
150 - insert into ICLEARIMP.T_BIZ_CE_INFO (ID, CONSIGNMENT_CODE, SEND_TIME, 150 + insert into iclconnect.T_BIZ_CE_INFO (ID, CONSIGNMENT_CODE, SEND_TIME,
151 SHIP_DATE, DEST_IATA_CODE, CREATE_TIME, 151 SHIP_DATE, DEST_IATA_CODE, CREATE_TIME,
152 CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME, 152 CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME,
153 MODIFY_USER_ID, MODIFY_USER_NAME, CUSTOMS_CURRENCY, 153 MODIFY_USER_ID, MODIFY_USER_NAME, CUSTOMS_CURRENCY,
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
180 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 180 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
181 SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL 181 SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL
182 </selectKey> 182 </selectKey>
183 - insert into ICLEARIMP.T_BIZ_CE_INFO 183 + insert into iclconnect.T_BIZ_CE_INFO
184 <trim prefix="(" suffix=")" suffixOverrides=","> 184 <trim prefix="(" suffix=")" suffixOverrides=",">
185 ID, 185 ID,
186 <if test="consignmentCode != null"> 186 <if test="consignmentCode != null">
...@@ -417,13 +417,13 @@ ...@@ -417,13 +417,13 @@
417 </trim> 417 </trim>
418 </insert> 418 </insert>
419 <select id="countByExample" parameterType="com.fedex.connect.common.model.biz.CeInfoExample" resultType="java.lang.Long"> 419 <select id="countByExample" parameterType="com.fedex.connect.common.model.biz.CeInfoExample" resultType="java.lang.Long">
420 - select count(*) from ICLEARIMP.T_BIZ_CE_INFO 420 + select count(*) from iclconnect.T_BIZ_CE_INFO
421 <if test="_parameter != null"> 421 <if test="_parameter != null">
422 <include refid="Example_Where_Clause" /> 422 <include refid="Example_Where_Clause" />
423 </if> 423 </if>
424 </select> 424 </select>
425 <update id="updateByExampleSelective" parameterType="map"> 425 <update id="updateByExampleSelective" parameterType="map">
426 - update ICLEARIMP.T_BIZ_CE_INFO 426 + update iclconnect.T_BIZ_CE_INFO
427 <set> 427 <set>
428 <if test="record.id != null"> 428 <if test="record.id != null">
429 ID = #{record.id,jdbcType=NUMERIC}, 429 ID = #{record.id,jdbcType=NUMERIC},
...@@ -548,7 +548,7 @@ ...@@ -548,7 +548,7 @@
548 </if> 548 </if>
549 </update> 549 </update>
550 <update id="updateByExample" parameterType="map"> 550 <update id="updateByExample" parameterType="map">
551 - update ICLEARIMP.T_BIZ_CE_INFO 551 + update iclconnect.T_BIZ_CE_INFO
552 set ID = #{record.id,jdbcType=NUMERIC}, 552 set ID = #{record.id,jdbcType=NUMERIC},
553 CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR}, 553 CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR},
554 SEND_TIME = #{record.sendTime,jdbcType=TIMESTAMP}, 554 SEND_TIME = #{record.sendTime,jdbcType=TIMESTAMP},
...@@ -593,7 +593,7 @@ ...@@ -593,7 +593,7 @@
593 </if> 593 </if>
594 </update> 594 </update>
595 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.biz.CeInfo"> 595 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.biz.CeInfo">
596 - update ICLEARIMP.T_BIZ_CE_INFO 596 + update iclconnect.T_BIZ_CE_INFO
597 <set> 597 <set>
598 <if test="consignmentCode != null"> 598 <if test="consignmentCode != null">
599 CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR}, 599 CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR},
...@@ -713,7 +713,7 @@ ...@@ -713,7 +713,7 @@
713 where ID = #{id,jdbcType=NUMERIC} 713 where ID = #{id,jdbcType=NUMERIC}
714 </update> 714 </update>
715 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.biz.CeInfo"> 715 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.biz.CeInfo">
716 - update ICLEARIMP.T_BIZ_CE_INFO 716 + update iclconnect.T_BIZ_CE_INFO
717 set CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR}, 717 set CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR},
718 SEND_TIME = #{sendTime,jdbcType=TIMESTAMP}, 718 SEND_TIME = #{sendTime,jdbcType=TIMESTAMP},
719 SHIP_DATE = #{shipDate,jdbcType=TIMESTAMP}, 719 SHIP_DATE = #{shipDate,jdbcType=TIMESTAMP},
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
19 <result column="MODIFY_TIME" jdbcType="TIMESTAMP" property="modifyTime" /> 19 <result column="MODIFY_TIME" jdbcType="TIMESTAMP" property="modifyTime" />
20 <result column="MODIFY_USER_ID" jdbcType="NUMERIC" property="modifyUserId" /> 20 <result column="MODIFY_USER_ID" jdbcType="NUMERIC" property="modifyUserId" />
21 <result column="MODIFY_USER_NAME" jdbcType="VARCHAR" property="modifyUserName" /> 21 <result column="MODIFY_USER_NAME" jdbcType="VARCHAR" property="modifyUserName" />
22 + <result column="UPLOAD_RECORD_ID" jdbcType="NUMERIC" property="uploadRecordId" />
22 </resultMap> 23 </resultMap>
23 <sql id="Example_Where_Clause"> 24 <sql id="Example_Where_Clause">
24 <where> 25 <where>
...@@ -81,7 +82,7 @@ ...@@ -81,7 +82,7 @@
81 <sql id="Base_Column_List"> 82 <sql id="Base_Column_List">
82 ID, CONSIGNMENT_CODE, CONSIGNMENT_ID, PUSH_TIME, STATUS_CODE, STATUS_NAME, PUSH_NUM, 83 ID, CONSIGNMENT_CODE, CONSIGNMENT_ID, PUSH_TIME, STATUS_CODE, STATUS_NAME, PUSH_NUM,
83 FILE_PATH, FILE_BACK_PATH, FILE_NAME, REMARK, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME, 84 FILE_PATH, FILE_BACK_PATH, FILE_NAME, REMARK, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME,
84 - MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME 85 + MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME, UPLOAD_RECORD_ID
85 </sql> 86 </sql>
86 <select id="selectByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultMap="BaseResultMap"> 87 <select id="selectByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultMap="BaseResultMap">
87 <include refid="OracleDialectPrefix" /> 88 <include refid="OracleDialectPrefix" />
...@@ -125,13 +126,15 @@ ...@@ -125,13 +126,15 @@
125 PUSH_NUM, FILE_PATH, FILE_BACK_PATH, 126 PUSH_NUM, FILE_PATH, FILE_BACK_PATH,
126 FILE_NAME, REMARK, CREATE_TIME, 127 FILE_NAME, REMARK, CREATE_TIME,
127 CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME, 128 CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME,
128 - MODIFY_USER_ID, MODIFY_USER_NAME) 129 + MODIFY_USER_ID, MODIFY_USER_NAME, UPLOAD_RECORD_ID
130 + )
129 values (#{id,jdbcType=NUMERIC}, #{consignmentCode,jdbcType=VARCHAR}, #{consignmentId,jdbcType=NUMERIC}, 131 values (#{id,jdbcType=NUMERIC}, #{consignmentCode,jdbcType=VARCHAR}, #{consignmentId,jdbcType=NUMERIC},
130 #{pushTime,jdbcType=TIMESTAMP}, #{statusCode,jdbcType=VARCHAR}, #{statusName,jdbcType=VARCHAR}, 132 #{pushTime,jdbcType=TIMESTAMP}, #{statusCode,jdbcType=VARCHAR}, #{statusName,jdbcType=VARCHAR},
131 #{pushNum,jdbcType=NUMERIC}, #{filePath,jdbcType=VARCHAR}, #{fileBackPath,jdbcType=VARCHAR}, 133 #{pushNum,jdbcType=NUMERIC}, #{filePath,jdbcType=VARCHAR}, #{fileBackPath,jdbcType=VARCHAR},
132 #{fileName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 134 #{fileName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
133 #{createUserId,jdbcType=NUMERIC}, #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, 135 #{createUserId,jdbcType=NUMERIC}, #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
134 - #{modifyUserId,jdbcType=NUMERIC}, #{modifyUserName,jdbcType=VARCHAR}) 136 + #{modifyUserId,jdbcType=NUMERIC}, #{modifyUserName,jdbcType=VARCHAR}, #{uploadRecordId,jdbcType=NUMERIC}
137 + )
135 </insert> 138 </insert>
136 <insert id="insertSelective" parameterType="com.fedex.connect.common.model.biz.PushOb"> 139 <insert id="insertSelective" parameterType="com.fedex.connect.common.model.biz.PushOb">
137 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 140 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
...@@ -188,6 +191,9 @@ ...@@ -188,6 +191,9 @@
188 <if test="modifyUserName != null"> 191 <if test="modifyUserName != null">
189 MODIFY_USER_NAME, 192 MODIFY_USER_NAME,
190 </if> 193 </if>
194 + <if test="uploadRecordId != null">
195 + UPLOAD_RECORD_ID,
196 + </if>
191 </trim> 197 </trim>
192 <trim prefix="values (" suffix=")" suffixOverrides=","> 198 <trim prefix="values (" suffix=")" suffixOverrides=",">
193 #{id,jdbcType=NUMERIC}, 199 #{id,jdbcType=NUMERIC},
...@@ -239,6 +245,9 @@ ...@@ -239,6 +245,9 @@
239 <if test="modifyUserName != null"> 245 <if test="modifyUserName != null">
240 #{modifyUserName,jdbcType=VARCHAR}, 246 #{modifyUserName,jdbcType=VARCHAR},
241 </if> 247 </if>
248 + <if test="uploadRecordId != null">
249 + #{uploadRecordId,jdbcType=NUMERIC},
250 + </if>
242 </trim> 251 </trim>
243 </insert> 252 </insert>
244 <select id="countByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultType="java.lang.Long"> 253 <select id="countByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultType="java.lang.Long">
...@@ -301,6 +310,9 @@ ...@@ -301,6 +310,9 @@
301 <if test="record.modifyUserName != null"> 310 <if test="record.modifyUserName != null">
302 MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR}, 311 MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
303 </if> 312 </if>
313 + <if test="record.uploadRecordId != null">
314 + UPLOAD_RECORD_ID = #{record.uploadRecordId,jdbcType=NUMERIC},
315 + </if>
304 </set> 316 </set>
305 <if test="_parameter != null"> 317 <if test="_parameter != null">
306 <include refid="Update_By_Example_Where_Clause" /> 318 <include refid="Update_By_Example_Where_Clause" />
...@@ -324,7 +336,8 @@ ...@@ -324,7 +336,8 @@
324 CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR}, 336 CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR},
325 MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP}, 337 MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP},
326 MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC}, 338 MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC},
327 - MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR} 339 + MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
340 + UPLOAD_RECORD_ID = #{record.uploadRecordId,jdbcType=NUMERIC}
328 <if test="_parameter != null"> 341 <if test="_parameter != null">
329 <include refid="Update_By_Example_Where_Clause" /> 342 <include refid="Update_By_Example_Where_Clause" />
330 </if> 343 </if>
...@@ -380,6 +393,9 @@ ...@@ -380,6 +393,9 @@
380 <if test="modifyUserName != null"> 393 <if test="modifyUserName != null">
381 MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR}, 394 MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
382 </if> 395 </if>
396 + <if test="uploadRecordId != null">
397 + UPLOAD_RECORD_ID = #{uploadRecordId,jdbcType=NUMERIC},
398 + </if>
383 </set> 399 </set>
384 where ID = #{id,jdbcType=NUMERIC} 400 where ID = #{id,jdbcType=NUMERIC}
385 </update> 401 </update>
...@@ -400,7 +416,8 @@ ...@@ -400,7 +416,8 @@
400 CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR}, 416 CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR},
401 MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP}, 417 MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP},
402 MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC}, 418 MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC},
403 - MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR} 419 + MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
420 + UPLOAD_RECORD_ID = #{uploadRecordId,jdbcType=NUMERIC}
404 where ID = #{id,jdbcType=NUMERIC} 421 where ID = #{id,jdbcType=NUMERIC}
405 </update> 422 </update>
406 <sql id="OracleDialectPrefix"> 423 <sql id="OracleDialectPrefix">
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
13 <result column="MODIFY_USER_ID" jdbcType="NUMERIC" property="modifyUserId" /> 13 <result column="MODIFY_USER_ID" jdbcType="NUMERIC" property="modifyUserId" />
14 <result column="MODIFY_USER_NAME" jdbcType="VARCHAR" property="modifyUserName" /> 14 <result column="MODIFY_USER_NAME" jdbcType="VARCHAR" property="modifyUserName" />
15 <result column="CONSIGNMENT_CODE" jdbcType="VARCHAR" property="consignmentCode" /> 15 <result column="CONSIGNMENT_CODE" jdbcType="VARCHAR" property="consignmentCode" />
16 + <result column="CE_FLAG" jdbcType="NUMERIC" property="ceFlag" />
16 </resultMap> 17 </resultMap>
17 <sql id="Example_Where_Clause"> 18 <sql id="Example_Where_Clause">
18 <where> 19 <where>
...@@ -74,7 +75,7 @@ ...@@ -74,7 +75,7 @@
74 </sql> 75 </sql>
75 <sql id="Base_Column_List"> 76 <sql id="Base_Column_List">
76 ID, USER_ID, CONSIGNMENT_ID, STATUS, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME, 77 ID, USER_ID, CONSIGNMENT_ID, STATUS, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME,
77 - MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME, CONSIGNMENT_CODE 78 + MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME, CONSIGNMENT_CODE, CE_FLAG
78 </sql> 79 </sql>
79 <select id="selectByExample" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMappingExample" resultMap="BaseResultMap"> 80 <select id="selectByExample" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMappingExample" resultMap="BaseResultMap">
80 <include refid="OracleDialectPrefix" /> 81 <include refid="OracleDialectPrefix" />
...@@ -84,7 +85,7 @@ ...@@ -84,7 +85,7 @@
84 </if> 85 </if>
85 'true' as QUERYID, 86 'true' as QUERYID,
86 <include refid="Base_Column_List" /> 87 <include refid="Base_Column_List" />
87 - from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 88 + from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
88 <if test="_parameter != null"> 89 <if test="_parameter != null">
89 <include refid="Example_Where_Clause" /> 90 <include refid="Example_Where_Clause" />
90 </if> 91 </if>
...@@ -96,15 +97,15 @@ ...@@ -96,15 +97,15 @@
96 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> 97 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
97 select 98 select
98 <include refid="Base_Column_List" /> 99 <include refid="Base_Column_List" />
99 - from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 100 + from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
100 where ID = #{id,jdbcType=NUMERIC} 101 where ID = #{id,jdbcType=NUMERIC}
101 </select> 102 </select>
102 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> 103 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
103 - delete from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 104 + delete from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
104 where ID = #{id,jdbcType=NUMERIC} 105 where ID = #{id,jdbcType=NUMERIC}
105 </delete> 106 </delete>
106 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMappingExample"> 107 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMappingExample">
107 - delete from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 108 + delete from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
108 <if test="_parameter != null"> 109 <if test="_parameter != null">
109 <include refid="Example_Where_Clause" /> 110 <include refid="Example_Where_Clause" />
110 </if> 111 </if>
...@@ -113,20 +114,20 @@ ...@@ -113,20 +114,20 @@
113 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 114 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
114 SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL 115 SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL
115 </selectKey> 116 </selectKey>
116 - insert into ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING (ID, USER_ID, CONSIGNMENT_ID, 117 + insert into iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING (ID, USER_ID, CONSIGNMENT_ID,
117 STATUS, CREATE_TIME, CREATE_USER_ID, 118 STATUS, CREATE_TIME, CREATE_USER_ID,
118 CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID, 119 CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID,
119 - MODIFY_USER_NAME, CONSIGNMENT_CODE) 120 + MODIFY_USER_NAME, CONSIGNMENT_CODE, CE_FLAG)
120 values (#{id,jdbcType=NUMERIC}, #{userId,jdbcType=NUMERIC}, #{consignmentId,jdbcType=NUMERIC}, 121 values (#{id,jdbcType=NUMERIC}, #{userId,jdbcType=NUMERIC}, #{consignmentId,jdbcType=NUMERIC},
121 #{status,jdbcType=NUMERIC}, #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=NUMERIC}, 122 #{status,jdbcType=NUMERIC}, #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=NUMERIC},
122 #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyUserId,jdbcType=NUMERIC}, 123 #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyUserId,jdbcType=NUMERIC},
123 - #{modifyUserName,jdbcType=VARCHAR}, #{consignmentCode,jdbcType=VARCHAR}) 124 + #{modifyUserName,jdbcType=VARCHAR}, #{consignmentCode,jdbcType=VARCHAR}, #{ceFlag,jdbcType=NUMERIC})
124 </insert> 125 </insert>
125 <insert id="insertSelective" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMapping"> 126 <insert id="insertSelective" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMapping">
126 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 127 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
127 SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL 128 SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL
128 </selectKey> 129 </selectKey>
129 - insert into ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 130 + insert into iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
130 <trim prefix="(" suffix=")" suffixOverrides=","> 131 <trim prefix="(" suffix=")" suffixOverrides=",">
131 ID, 132 ID,
132 <if test="userId != null"> 133 <if test="userId != null">
...@@ -159,6 +160,9 @@ ...@@ -159,6 +160,9 @@
159 <if test="consignmentCode != null"> 160 <if test="consignmentCode != null">
160 CONSIGNMENT_CODE, 161 CONSIGNMENT_CODE,
161 </if> 162 </if>
163 + <if test="ceFlag != null">
164 + CE_FLAG,
165 + </if>
162 </trim> 166 </trim>
163 <trim prefix="values (" suffix=")" suffixOverrides=","> 167 <trim prefix="values (" suffix=")" suffixOverrides=",">
164 #{id,jdbcType=NUMERIC}, 168 #{id,jdbcType=NUMERIC},
...@@ -192,16 +196,19 @@ ...@@ -192,16 +196,19 @@
192 <if test="consignmentCode != null"> 196 <if test="consignmentCode != null">
193 #{consignmentCode,jdbcType=VARCHAR}, 197 #{consignmentCode,jdbcType=VARCHAR},
194 </if> 198 </if>
199 + <if test="ceFlag != null">
200 + #{ceFlag,jdbcType=NUMERIC},
201 + </if>
195 </trim> 202 </trim>
196 </insert> 203 </insert>
197 <select id="countByExample" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMappingExample" resultType="java.lang.Long"> 204 <select id="countByExample" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMappingExample" resultType="java.lang.Long">
198 - select count(*) from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 205 + select count(*) from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
199 <if test="_parameter != null"> 206 <if test="_parameter != null">
200 <include refid="Example_Where_Clause" /> 207 <include refid="Example_Where_Clause" />
201 </if> 208 </if>
202 </select> 209 </select>
203 <update id="updateByExampleSelective" parameterType="map"> 210 <update id="updateByExampleSelective" parameterType="map">
204 - update ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 211 + update iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
205 <set> 212 <set>
206 <if test="record.id != null"> 213 <if test="record.id != null">
207 ID = #{record.id,jdbcType=NUMERIC}, 214 ID = #{record.id,jdbcType=NUMERIC},
...@@ -236,13 +243,16 @@ ...@@ -236,13 +243,16 @@
236 <if test="record.consignmentCode != null"> 243 <if test="record.consignmentCode != null">
237 CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR}, 244 CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR},
238 </if> 245 </if>
246 + <if test="record.ceFlag != null">
247 + CE_FLAG = #{record.ceFlag,jdbcType=NUMERIC},
248 + </if>
239 </set> 249 </set>
240 <if test="_parameter != null"> 250 <if test="_parameter != null">
241 <include refid="Update_By_Example_Where_Clause" /> 251 <include refid="Update_By_Example_Where_Clause" />
242 </if> 252 </if>
243 </update> 253 </update>
244 <update id="updateByExample" parameterType="map"> 254 <update id="updateByExample" parameterType="map">
245 - update ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 255 + update iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
246 set ID = #{record.id,jdbcType=NUMERIC}, 256 set ID = #{record.id,jdbcType=NUMERIC},
247 USER_ID = #{record.userId,jdbcType=NUMERIC}, 257 USER_ID = #{record.userId,jdbcType=NUMERIC},
248 CONSIGNMENT_ID = #{record.consignmentId,jdbcType=NUMERIC}, 258 CONSIGNMENT_ID = #{record.consignmentId,jdbcType=NUMERIC},
...@@ -254,12 +264,13 @@ ...@@ -254,12 +264,13 @@
254 MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC}, 264 MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC},
255 MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR}, 265 MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
256 CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR} 266 CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR}
267 + CE_FLAG = #{record.ceFlag,jdbcType=NUMERIC}
257 <if test="_parameter != null"> 268 <if test="_parameter != null">
258 <include refid="Update_By_Example_Where_Clause" /> 269 <include refid="Update_By_Example_Where_Clause" />
259 </if> 270 </if>
260 </update> 271 </update>
261 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMapping"> 272 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMapping">
262 - update ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 273 + update iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
263 <set> 274 <set>
264 <if test="userId != null"> 275 <if test="userId != null">
265 USER_ID = #{userId,jdbcType=NUMERIC}, 276 USER_ID = #{userId,jdbcType=NUMERIC},
...@@ -291,11 +302,14 @@ ...@@ -291,11 +302,14 @@
291 <if test="consignmentCode != null"> 302 <if test="consignmentCode != null">
292 CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR}, 303 CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR},
293 </if> 304 </if>
305 + <if test="ceFlag != null">
306 + CE_FLAG = #{ceFlag,jdbcType=NUMERIC},
307 + </if>
294 </set> 308 </set>
295 where ID = #{id,jdbcType=NUMERIC} 309 where ID = #{id,jdbcType=NUMERIC}
296 </update> 310 </update>
297 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMapping"> 311 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMapping">
298 - update ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 312 + update iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
299 set USER_ID = #{userId,jdbcType=NUMERIC}, 313 set USER_ID = #{userId,jdbcType=NUMERIC},
300 CONSIGNMENT_ID = #{consignmentId,jdbcType=NUMERIC}, 314 CONSIGNMENT_ID = #{consignmentId,jdbcType=NUMERIC},
301 STATUS = #{status,jdbcType=NUMERIC}, 315 STATUS = #{status,jdbcType=NUMERIC},
...@@ -306,6 +320,7 @@ ...@@ -306,6 +320,7 @@
306 MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC}, 320 MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC},
307 MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR}, 321 MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
308 CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR} 322 CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR}
323 + CE_FLAG = #{ceFlag,jdbcType=NUMERIC}
309 where ID = #{id,jdbcType=NUMERIC} 324 where ID = #{id,jdbcType=NUMERIC}
310 </update> 325 </update>
311 <sql id="OracleDialectPrefix"> 326 <sql id="OracleDialectPrefix">
......
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
9 <result column="MODULE" jdbcType="VARCHAR" property="module" /> 9 <result column="MODULE" jdbcType="VARCHAR" property="module" />
10 <result column="DESCRIBE" jdbcType="VARCHAR" property="describe" /> 10 <result column="DESCRIBE" jdbcType="VARCHAR" property="describe" />
11 <result column="URL" jdbcType="VARCHAR" property="url" /> 11 <result column="URL" jdbcType="VARCHAR" property="url" />
12 - <result column="REQUEST_PARAMETERS" jdbcType="VARCHAR" property="requestParameters" />
13 - <result column="RESULT" jdbcType="VARCHAR" property="result" />
14 - <result column="STATUS" jdbcType="NUMERIC" property="status" />
15 <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" /> 12 <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
16 <result column="CREATE_USER_ID" jdbcType="NUMERIC" property="createUserId" /> 13 <result column="CREATE_USER_ID" jdbcType="NUMERIC" property="createUserId" />
17 <result column="CREATE_USER_NAME" jdbcType="VARCHAR" property="createUserName" /> 14 <result column="CREATE_USER_NAME" jdbcType="VARCHAR" property="createUserName" />
...@@ -21,9 +18,12 @@ ...@@ -21,9 +18,12 @@
21 <result column="REQUEST_TIME" jdbcType="TIMESTAMP" property="requestTime" /> 18 <result column="REQUEST_TIME" jdbcType="TIMESTAMP" property="requestTime" />
22 <result column="RESPONSE_TIME" jdbcType="TIMESTAMP" property="responseTime" /> 19 <result column="RESPONSE_TIME" jdbcType="TIMESTAMP" property="responseTime" />
23 <result column="EXCEUTE_CONSUME" jdbcType="NUMERIC" property="exceuteConsume" /> 20 <result column="EXCEUTE_CONSUME" jdbcType="NUMERIC" property="exceuteConsume" />
21 + <result column="STATUS" jdbcType="NUMERIC" property="status" />
24 </resultMap> 22 </resultMap>
25 - <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.fedex.connect.common.model.log.Operation"> 23 + <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.fedex.connect.common.model.log.OperationWithBLOBs">
26 <result column="REMARK" jdbcType="CLOB" property="remark" /> 24 <result column="REMARK" jdbcType="CLOB" property="remark" />
25 + <result column="REQUEST_PARAMETERS" jdbcType="CLOB" property="requestParameters" />
26 + <result column="RESULT" jdbcType="CLOB" property="result" />
27 </resultMap> 27 </resultMap>
28 <sql id="Example_Where_Clause"> 28 <sql id="Example_Where_Clause">
29 <where> 29 <where>
...@@ -84,12 +84,12 @@ ...@@ -84,12 +84,12 @@
84 </where> 84 </where>
85 </sql> 85 </sql>
86 <sql id="Base_Column_List"> 86 <sql id="Base_Column_List">
87 - ID, USER_ID, LOGIN_NAME, USER_NAME, MODULE, DESCRIBE, URL, REQUEST_PARAMETERS, RESULT, 87 + ID, USER_ID, LOGIN_NAME, USER_NAME, MODULE, DESCRIBE, URL, CREATE_TIME, CREATE_USER_ID,
88 - STATUS, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID, 88 + CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME, REQUEST_TIME, RESPONSE_TIME,
89 - MODIFY_USER_NAME, REQUEST_TIME, RESPONSE_TIME, EXCEUTE_CONSUME 89 + EXCEUTE_CONSUME, STATUS
90 </sql> 90 </sql>
91 <sql id="Blob_Column_List"> 91 <sql id="Blob_Column_List">
92 - REMARK 92 + REMARK, REQUEST_PARAMETERS, RESULT
93 </sql> 93 </sql>
94 <select id="selectByExampleWithBLOBs" parameterType="com.fedex.connect.common.model.log.OperationExample" resultMap="ResultMapWithBLOBs"> 94 <select id="selectByExampleWithBLOBs" parameterType="com.fedex.connect.common.model.log.OperationExample" resultMap="ResultMapWithBLOBs">
95 select 95 select
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
100 <include refid="Base_Column_List" /> 100 <include refid="Base_Column_List" />
101 , 101 ,
102 <include refid="Blob_Column_List" /> 102 <include refid="Blob_Column_List" />
103 - from ICLEARIMP.T_LOG_OPERATION 103 + from iclconnect.T_LOG_OPERATION
104 <if test="_parameter != null"> 104 <if test="_parameter != null">
105 <include refid="Example_Where_Clause" /> 105 <include refid="Example_Where_Clause" />
106 </if> 106 </if>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
116 </if> 116 </if>
117 'true' as QUERYID, 117 'true' as QUERYID,
118 <include refid="Base_Column_List" /> 118 <include refid="Base_Column_List" />
119 - from ICLEARIMP.T_LOG_OPERATION 119 + from iclconnect.T_LOG_OPERATION
120 <if test="_parameter != null"> 120 <if test="_parameter != null">
121 <include refid="Example_Where_Clause" /> 121 <include refid="Example_Where_Clause" />
122 </if> 122 </if>
...@@ -130,43 +130,43 @@ ...@@ -130,43 +130,43 @@
130 <include refid="Base_Column_List" /> 130 <include refid="Base_Column_List" />
131 , 131 ,
132 <include refid="Blob_Column_List" /> 132 <include refid="Blob_Column_List" />
133 - from ICLEARIMP.T_LOG_OPERATION 133 + from iclconnect.T_LOG_OPERATION
134 where ID = #{id,jdbcType=NUMERIC} 134 where ID = #{id,jdbcType=NUMERIC}
135 </select> 135 </select>
136 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> 136 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
137 - delete from ICLEARIMP.T_LOG_OPERATION 137 + delete from iclconnect.T_LOG_OPERATION
138 where ID = #{id,jdbcType=NUMERIC} 138 where ID = #{id,jdbcType=NUMERIC}
139 </delete> 139 </delete>
140 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.log.OperationExample"> 140 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.log.OperationExample">
141 - delete from ICLEARIMP.T_LOG_OPERATION 141 + delete from iclconnect.T_LOG_OPERATION
142 <if test="_parameter != null"> 142 <if test="_parameter != null">
143 <include refid="Example_Where_Clause" /> 143 <include refid="Example_Where_Clause" />
144 </if> 144 </if>
145 </delete> 145 </delete>
146 - <insert id="insert" parameterType="com.fedex.connect.common.model.log.Operation"> 146 + <insert id="insert" parameterType="com.fedex.connect.common.model.log.OperationWithBLOBs">
147 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 147 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
148 SELECT SEQ_T_LOG_OPERATION.NEXTVAL FROM DUAL 148 SELECT SEQ_T_LOG_OPERATION.NEXTVAL FROM DUAL
149 </selectKey> 149 </selectKey>
150 - insert into ICLEARIMP.T_LOG_OPERATION (ID, USER_ID, LOGIN_NAME, 150 + insert into iclconnect.T_LOG_OPERATION (ID, USER_ID, LOGIN_NAME,
151 USER_NAME, MODULE, DESCRIBE, 151 USER_NAME, MODULE, DESCRIBE,
152 - URL, REQUEST_PARAMETERS, RESULT, 152 + URL, CREATE_TIME, CREATE_USER_ID,
153 - STATUS, CREATE_TIME, CREATE_USER_ID,
154 CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID, 153 CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID,
155 MODIFY_USER_NAME, REQUEST_TIME, RESPONSE_TIME, 154 MODIFY_USER_NAME, REQUEST_TIME, RESPONSE_TIME,
156 - EXCEUTE_CONSUME, REMARK) 155 + EXCEUTE_CONSUME, STATUS, REMARK,
156 + REQUEST_PARAMETERS, RESULT)
157 values (#{id,jdbcType=NUMERIC}, #{userId,jdbcType=NUMERIC}, #{loginName,jdbcType=VARCHAR}, 157 values (#{id,jdbcType=NUMERIC}, #{userId,jdbcType=NUMERIC}, #{loginName,jdbcType=VARCHAR},
158 #{userName,jdbcType=VARCHAR}, #{module,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR}, 158 #{userName,jdbcType=VARCHAR}, #{module,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR},
159 - #{url,jdbcType=VARCHAR}, #{requestParameters,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, 159 + #{url,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=NUMERIC},
160 - #{status,jdbcType=NUMERIC}, #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=NUMERIC},
161 #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyUserId,jdbcType=NUMERIC}, 160 #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyUserId,jdbcType=NUMERIC},
162 #{modifyUserName,jdbcType=VARCHAR}, #{requestTime,jdbcType=TIMESTAMP}, #{responseTime,jdbcType=TIMESTAMP}, 161 #{modifyUserName,jdbcType=VARCHAR}, #{requestTime,jdbcType=TIMESTAMP}, #{responseTime,jdbcType=TIMESTAMP},
163 - #{exceuteConsume,jdbcType=NUMERIC}, #{remark,jdbcType=CLOB}) 162 + #{exceuteConsume,jdbcType=NUMERIC}, #{status,jdbcType=NUMERIC}, #{remark,jdbcType=CLOB},
163 + #{requestParameters,jdbcType=CLOB}, #{result,jdbcType=CLOB})
164 </insert> 164 </insert>
165 - <insert id="insertSelective" parameterType="com.fedex.connect.common.model.log.Operation"> 165 + <insert id="insertSelective" parameterType="com.fedex.connect.common.model.log.OperationWithBLOBs">
166 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 166 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
167 SELECT SEQ_T_LOG_OPERATION.NEXTVAL FROM DUAL 167 SELECT SEQ_T_LOG_OPERATION.NEXTVAL FROM DUAL
168 </selectKey> 168 </selectKey>
169 - insert into ICLEARIMP.T_LOG_OPERATION 169 + insert into iclconnect.T_LOG_OPERATION
170 <trim prefix="(" suffix=")" suffixOverrides=","> 170 <trim prefix="(" suffix=")" suffixOverrides=",">
171 ID, 171 ID,
172 <if test="userId != null"> 172 <if test="userId != null">
...@@ -187,15 +187,6 @@ ...@@ -187,15 +187,6 @@
187 <if test="url != null"> 187 <if test="url != null">
188 URL, 188 URL,
189 </if> 189 </if>
190 - <if test="requestParameters != null">
191 - REQUEST_PARAMETERS,
192 - </if>
193 - <if test="result != null">
194 - RESULT,
195 - </if>
196 - <if test="status != null">
197 - STATUS,
198 - </if>
199 <if test="createTime != null"> 190 <if test="createTime != null">
200 CREATE_TIME, 191 CREATE_TIME,
201 </if> 192 </if>
...@@ -223,9 +214,18 @@ ...@@ -223,9 +214,18 @@
223 <if test="exceuteConsume != null"> 214 <if test="exceuteConsume != null">
224 EXCEUTE_CONSUME, 215 EXCEUTE_CONSUME,
225 </if> 216 </if>
217 + <if test="status != null">
218 + STATUS,
219 + </if>
226 <if test="remark != null"> 220 <if test="remark != null">
227 REMARK, 221 REMARK,
228 </if> 222 </if>
223 + <if test="requestParameters != null">
224 + REQUEST_PARAMETERS,
225 + </if>
226 + <if test="result != null">
227 + RESULT,
228 + </if>
229 </trim> 229 </trim>
230 <trim prefix="values (" suffix=")" suffixOverrides=","> 230 <trim prefix="values (" suffix=")" suffixOverrides=",">
231 #{id,jdbcType=NUMERIC}, 231 #{id,jdbcType=NUMERIC},
...@@ -247,15 +247,6 @@ ...@@ -247,15 +247,6 @@
247 <if test="url != null"> 247 <if test="url != null">
248 #{url,jdbcType=VARCHAR}, 248 #{url,jdbcType=VARCHAR},
249 </if> 249 </if>
250 - <if test="requestParameters != null">
251 - #{requestParameters,jdbcType=VARCHAR},
252 - </if>
253 - <if test="result != null">
254 - #{result,jdbcType=VARCHAR},
255 - </if>
256 - <if test="status != null">
257 - #{status,jdbcType=NUMERIC},
258 - </if>
259 <if test="createTime != null"> 250 <if test="createTime != null">
260 #{createTime,jdbcType=TIMESTAMP}, 251 #{createTime,jdbcType=TIMESTAMP},
261 </if> 252 </if>
...@@ -283,19 +274,28 @@ ...@@ -283,19 +274,28 @@
283 <if test="exceuteConsume != null"> 274 <if test="exceuteConsume != null">
284 #{exceuteConsume,jdbcType=NUMERIC}, 275 #{exceuteConsume,jdbcType=NUMERIC},
285 </if> 276 </if>
277 + <if test="status != null">
278 + #{status,jdbcType=NUMERIC},
279 + </if>
286 <if test="remark != null"> 280 <if test="remark != null">
287 #{remark,jdbcType=CLOB}, 281 #{remark,jdbcType=CLOB},
288 </if> 282 </if>
283 + <if test="requestParameters != null">
284 + #{requestParameters,jdbcType=CLOB},
285 + </if>
286 + <if test="result != null">
287 + #{result,jdbcType=CLOB},
288 + </if>
289 </trim> 289 </trim>
290 </insert> 290 </insert>
291 <select id="countByExample" parameterType="com.fedex.connect.common.model.log.OperationExample" resultType="java.lang.Long"> 291 <select id="countByExample" parameterType="com.fedex.connect.common.model.log.OperationExample" resultType="java.lang.Long">
292 - select count(*) from ICLEARIMP.T_LOG_OPERATION 292 + select count(*) from iclconnect.T_LOG_OPERATION
293 <if test="_parameter != null"> 293 <if test="_parameter != null">
294 <include refid="Example_Where_Clause" /> 294 <include refid="Example_Where_Clause" />
295 </if> 295 </if>
296 </select> 296 </select>
297 <update id="updateByExampleSelective" parameterType="map"> 297 <update id="updateByExampleSelective" parameterType="map">
298 - update ICLEARIMP.T_LOG_OPERATION 298 + update iclconnect.T_LOG_OPERATION
299 <set> 299 <set>
300 <if test="record.id != null"> 300 <if test="record.id != null">
301 ID = #{record.id,jdbcType=NUMERIC}, 301 ID = #{record.id,jdbcType=NUMERIC},
...@@ -318,15 +318,6 @@ ...@@ -318,15 +318,6 @@
318 <if test="record.url != null"> 318 <if test="record.url != null">
319 URL = #{record.url,jdbcType=VARCHAR}, 319 URL = #{record.url,jdbcType=VARCHAR},
320 </if> 320 </if>
321 - <if test="record.requestParameters != null">
322 - REQUEST_PARAMETERS = #{record.requestParameters,jdbcType=VARCHAR},
323 - </if>
324 - <if test="record.result != null">
325 - RESULT = #{record.result,jdbcType=VARCHAR},
326 - </if>
327 - <if test="record.status != null">
328 - STATUS = #{record.status,jdbcType=NUMERIC},
329 - </if>
330 <if test="record.createTime != null"> 321 <if test="record.createTime != null">
331 CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP}, 322 CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
332 </if> 323 </if>
...@@ -354,16 +345,25 @@ ...@@ -354,16 +345,25 @@
354 <if test="record.exceuteConsume != null"> 345 <if test="record.exceuteConsume != null">
355 EXCEUTE_CONSUME = #{record.exceuteConsume,jdbcType=NUMERIC}, 346 EXCEUTE_CONSUME = #{record.exceuteConsume,jdbcType=NUMERIC},
356 </if> 347 </if>
348 + <if test="record.status != null">
349 + STATUS = #{record.status,jdbcType=NUMERIC},
350 + </if>
357 <if test="record.remark != null"> 351 <if test="record.remark != null">
358 REMARK = #{record.remark,jdbcType=CLOB}, 352 REMARK = #{record.remark,jdbcType=CLOB},
359 </if> 353 </if>
354 + <if test="record.requestParameters != null">
355 + REQUEST_PARAMETERS = #{record.requestParameters,jdbcType=CLOB},
356 + </if>
357 + <if test="record.result != null">
358 + RESULT = #{record.result,jdbcType=CLOB},
359 + </if>
360 </set> 360 </set>
361 <if test="_parameter != null"> 361 <if test="_parameter != null">
362 <include refid="Update_By_Example_Where_Clause" /> 362 <include refid="Update_By_Example_Where_Clause" />
363 </if> 363 </if>
364 </update> 364 </update>
365 <update id="updateByExampleWithBLOBs" parameterType="map"> 365 <update id="updateByExampleWithBLOBs" parameterType="map">
366 - update ICLEARIMP.T_LOG_OPERATION 366 + update iclconnect.T_LOG_OPERATION
367 set ID = #{record.id,jdbcType=NUMERIC}, 367 set ID = #{record.id,jdbcType=NUMERIC},
368 USER_ID = #{record.userId,jdbcType=NUMERIC}, 368 USER_ID = #{record.userId,jdbcType=NUMERIC},
369 LOGIN_NAME = #{record.loginName,jdbcType=VARCHAR}, 369 LOGIN_NAME = #{record.loginName,jdbcType=VARCHAR},
...@@ -371,9 +371,6 @@ ...@@ -371,9 +371,6 @@
371 MODULE = #{record.module,jdbcType=VARCHAR}, 371 MODULE = #{record.module,jdbcType=VARCHAR},
372 DESCRIBE = #{record.describe,jdbcType=VARCHAR}, 372 DESCRIBE = #{record.describe,jdbcType=VARCHAR},
373 URL = #{record.url,jdbcType=VARCHAR}, 373 URL = #{record.url,jdbcType=VARCHAR},
374 - REQUEST_PARAMETERS = #{record.requestParameters,jdbcType=VARCHAR},
375 - RESULT = #{record.result,jdbcType=VARCHAR},
376 - STATUS = #{record.status,jdbcType=NUMERIC},
377 CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP}, 374 CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
378 CREATE_USER_ID = #{record.createUserId,jdbcType=NUMERIC}, 375 CREATE_USER_ID = #{record.createUserId,jdbcType=NUMERIC},
379 CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR}, 376 CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR},
...@@ -383,13 +380,16 @@ ...@@ -383,13 +380,16 @@
383 REQUEST_TIME = #{record.requestTime,jdbcType=TIMESTAMP}, 380 REQUEST_TIME = #{record.requestTime,jdbcType=TIMESTAMP},
384 RESPONSE_TIME = #{record.responseTime,jdbcType=TIMESTAMP}, 381 RESPONSE_TIME = #{record.responseTime,jdbcType=TIMESTAMP},
385 EXCEUTE_CONSUME = #{record.exceuteConsume,jdbcType=NUMERIC}, 382 EXCEUTE_CONSUME = #{record.exceuteConsume,jdbcType=NUMERIC},
386 - REMARK = #{record.remark,jdbcType=CLOB} 383 + STATUS = #{record.status,jdbcType=NUMERIC},
384 + REMARK = #{record.remark,jdbcType=CLOB},
385 + REQUEST_PARAMETERS = #{record.requestParameters,jdbcType=CLOB},
386 + RESULT = #{record.result,jdbcType=CLOB}
387 <if test="_parameter != null"> 387 <if test="_parameter != null">
388 <include refid="Update_By_Example_Where_Clause" /> 388 <include refid="Update_By_Example_Where_Clause" />
389 </if> 389 </if>
390 </update> 390 </update>
391 <update id="updateByExample" parameterType="map"> 391 <update id="updateByExample" parameterType="map">
392 - update ICLEARIMP.T_LOG_OPERATION 392 + update iclconnect.T_LOG_OPERATION
393 set ID = #{record.id,jdbcType=NUMERIC}, 393 set ID = #{record.id,jdbcType=NUMERIC},
394 USER_ID = #{record.userId,jdbcType=NUMERIC}, 394 USER_ID = #{record.userId,jdbcType=NUMERIC},
395 LOGIN_NAME = #{record.loginName,jdbcType=VARCHAR}, 395 LOGIN_NAME = #{record.loginName,jdbcType=VARCHAR},
...@@ -397,9 +397,6 @@ ...@@ -397,9 +397,6 @@
397 MODULE = #{record.module,jdbcType=VARCHAR}, 397 MODULE = #{record.module,jdbcType=VARCHAR},
398 DESCRIBE = #{record.describe,jdbcType=VARCHAR}, 398 DESCRIBE = #{record.describe,jdbcType=VARCHAR},
399 URL = #{record.url,jdbcType=VARCHAR}, 399 URL = #{record.url,jdbcType=VARCHAR},
400 - REQUEST_PARAMETERS = #{record.requestParameters,jdbcType=VARCHAR},
401 - RESULT = #{record.result,jdbcType=VARCHAR},
402 - STATUS = #{record.status,jdbcType=NUMERIC},
403 CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP}, 400 CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
404 CREATE_USER_ID = #{record.createUserId,jdbcType=NUMERIC}, 401 CREATE_USER_ID = #{record.createUserId,jdbcType=NUMERIC},
405 CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR}, 402 CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR},
...@@ -408,13 +405,14 @@ ...@@ -408,13 +405,14 @@
408 MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR}, 405 MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
409 REQUEST_TIME = #{record.requestTime,jdbcType=TIMESTAMP}, 406 REQUEST_TIME = #{record.requestTime,jdbcType=TIMESTAMP},
410 RESPONSE_TIME = #{record.responseTime,jdbcType=TIMESTAMP}, 407 RESPONSE_TIME = #{record.responseTime,jdbcType=TIMESTAMP},
411 - EXCEUTE_CONSUME = #{record.exceuteConsume,jdbcType=NUMERIC} 408 + EXCEUTE_CONSUME = #{record.exceuteConsume,jdbcType=NUMERIC},
409 + STATUS = #{record.status,jdbcType=NUMERIC}
412 <if test="_parameter != null"> 410 <if test="_parameter != null">
413 <include refid="Update_By_Example_Where_Clause" /> 411 <include refid="Update_By_Example_Where_Clause" />
414 </if> 412 </if>
415 </update> 413 </update>
416 - <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.log.Operation"> 414 + <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.log.OperationWithBLOBs">
417 - update ICLEARIMP.T_LOG_OPERATION 415 + update iclconnect.T_LOG_OPERATION
418 <set> 416 <set>
419 <if test="userId != null"> 417 <if test="userId != null">
420 USER_ID = #{userId,jdbcType=NUMERIC}, 418 USER_ID = #{userId,jdbcType=NUMERIC},
...@@ -434,15 +432,6 @@ ...@@ -434,15 +432,6 @@
434 <if test="url != null"> 432 <if test="url != null">
435 URL = #{url,jdbcType=VARCHAR}, 433 URL = #{url,jdbcType=VARCHAR},
436 </if> 434 </if>
437 - <if test="requestParameters != null">
438 - REQUEST_PARAMETERS = #{requestParameters,jdbcType=VARCHAR},
439 - </if>
440 - <if test="result != null">
441 - RESULT = #{result,jdbcType=VARCHAR},
442 - </if>
443 - <if test="status != null">
444 - STATUS = #{status,jdbcType=NUMERIC},
445 - </if>
446 <if test="createTime != null"> 435 <if test="createTime != null">
447 CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}, 436 CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
448 </if> 437 </if>
...@@ -470,23 +459,29 @@ ...@@ -470,23 +459,29 @@
470 <if test="exceuteConsume != null"> 459 <if test="exceuteConsume != null">
471 EXCEUTE_CONSUME = #{exceuteConsume,jdbcType=NUMERIC}, 460 EXCEUTE_CONSUME = #{exceuteConsume,jdbcType=NUMERIC},
472 </if> 461 </if>
462 + <if test="status != null">
463 + STATUS = #{status,jdbcType=NUMERIC},
464 + </if>
473 <if test="remark != null"> 465 <if test="remark != null">
474 REMARK = #{remark,jdbcType=CLOB}, 466 REMARK = #{remark,jdbcType=CLOB},
475 </if> 467 </if>
468 + <if test="requestParameters != null">
469 + REQUEST_PARAMETERS = #{requestParameters,jdbcType=CLOB},
470 + </if>
471 + <if test="result != null">
472 + RESULT = #{result,jdbcType=CLOB},
473 + </if>
476 </set> 474 </set>
477 where ID = #{id,jdbcType=NUMERIC} 475 where ID = #{id,jdbcType=NUMERIC}
478 </update> 476 </update>
479 - <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.fedex.connect.common.model.log.Operation"> 477 + <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.fedex.connect.common.model.log.OperationWithBLOBs">
480 - update ICLEARIMP.T_LOG_OPERATION 478 + update iclconnect.T_LOG_OPERATION
481 set USER_ID = #{userId,jdbcType=NUMERIC}, 479 set USER_ID = #{userId,jdbcType=NUMERIC},
482 LOGIN_NAME = #{loginName,jdbcType=VARCHAR}, 480 LOGIN_NAME = #{loginName,jdbcType=VARCHAR},
483 USER_NAME = #{userName,jdbcType=VARCHAR}, 481 USER_NAME = #{userName,jdbcType=VARCHAR},
484 MODULE = #{module,jdbcType=VARCHAR}, 482 MODULE = #{module,jdbcType=VARCHAR},
485 DESCRIBE = #{describe,jdbcType=VARCHAR}, 483 DESCRIBE = #{describe,jdbcType=VARCHAR},
486 URL = #{url,jdbcType=VARCHAR}, 484 URL = #{url,jdbcType=VARCHAR},
487 - REQUEST_PARAMETERS = #{requestParameters,jdbcType=VARCHAR},
488 - RESULT = #{result,jdbcType=VARCHAR},
489 - STATUS = #{status,jdbcType=NUMERIC},
490 CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}, 485 CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
491 CREATE_USER_ID = #{createUserId,jdbcType=NUMERIC}, 486 CREATE_USER_ID = #{createUserId,jdbcType=NUMERIC},
492 CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR}, 487 CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR},
...@@ -496,20 +491,20 @@ ...@@ -496,20 +491,20 @@
496 REQUEST_TIME = #{requestTime,jdbcType=TIMESTAMP}, 491 REQUEST_TIME = #{requestTime,jdbcType=TIMESTAMP},
497 RESPONSE_TIME = #{responseTime,jdbcType=TIMESTAMP}, 492 RESPONSE_TIME = #{responseTime,jdbcType=TIMESTAMP},
498 EXCEUTE_CONSUME = #{exceuteConsume,jdbcType=NUMERIC}, 493 EXCEUTE_CONSUME = #{exceuteConsume,jdbcType=NUMERIC},
499 - REMARK = #{remark,jdbcType=CLOB} 494 + STATUS = #{status,jdbcType=NUMERIC},
495 + REMARK = #{remark,jdbcType=CLOB},
496 + REQUEST_PARAMETERS = #{requestParameters,jdbcType=CLOB},
497 + RESULT = #{result,jdbcType=CLOB}
500 where ID = #{id,jdbcType=NUMERIC} 498 where ID = #{id,jdbcType=NUMERIC}
501 </update> 499 </update>
502 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.log.Operation"> 500 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.log.Operation">
503 - update ICLEARIMP.T_LOG_OPERATION 501 + update iclconnect.T_LOG_OPERATION
504 set USER_ID = #{userId,jdbcType=NUMERIC}, 502 set USER_ID = #{userId,jdbcType=NUMERIC},
505 LOGIN_NAME = #{loginName,jdbcType=VARCHAR}, 503 LOGIN_NAME = #{loginName,jdbcType=VARCHAR},
506 USER_NAME = #{userName,jdbcType=VARCHAR}, 504 USER_NAME = #{userName,jdbcType=VARCHAR},
507 MODULE = #{module,jdbcType=VARCHAR}, 505 MODULE = #{module,jdbcType=VARCHAR},
508 DESCRIBE = #{describe,jdbcType=VARCHAR}, 506 DESCRIBE = #{describe,jdbcType=VARCHAR},
509 URL = #{url,jdbcType=VARCHAR}, 507 URL = #{url,jdbcType=VARCHAR},
510 - REQUEST_PARAMETERS = #{requestParameters,jdbcType=VARCHAR},
511 - RESULT = #{result,jdbcType=VARCHAR},
512 - STATUS = #{status,jdbcType=NUMERIC},
513 CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}, 508 CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
514 CREATE_USER_ID = #{createUserId,jdbcType=NUMERIC}, 509 CREATE_USER_ID = #{createUserId,jdbcType=NUMERIC},
515 CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR}, 510 CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR},
...@@ -518,7 +513,8 @@ ...@@ -518,7 +513,8 @@
518 MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR}, 513 MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
519 REQUEST_TIME = #{requestTime,jdbcType=TIMESTAMP}, 514 REQUEST_TIME = #{requestTime,jdbcType=TIMESTAMP},
520 RESPONSE_TIME = #{responseTime,jdbcType=TIMESTAMP}, 515 RESPONSE_TIME = #{responseTime,jdbcType=TIMESTAMP},
521 - EXCEUTE_CONSUME = #{exceuteConsume,jdbcType=NUMERIC} 516 + EXCEUTE_CONSUME = #{exceuteConsume,jdbcType=NUMERIC},
517 + STATUS = #{status,jdbcType=NUMERIC}
522 where ID = #{id,jdbcType=NUMERIC} 518 where ID = #{id,jdbcType=NUMERIC}
523 </update> 519 </update>
524 <sql id="OracleDialectPrefix"> 520 <sql id="OracleDialectPrefix">
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
98 <include refid="Base_Column_List" /> 98 <include refid="Base_Column_List" />
99 , 99 ,
100 <include refid="Blob_Column_List" /> 100 <include refid="Blob_Column_List" />
101 - from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 101 + from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
102 <if test="_parameter != null"> 102 <if test="_parameter != null">
103 <include refid="Example_Where_Clause" /> 103 <include refid="Example_Where_Clause" />
104 </if> 104 </if>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
114 </if> 114 </if>
115 'true' as QUERYID, 115 'true' as QUERYID,
116 <include refid="Base_Column_List" /> 116 <include refid="Base_Column_List" />
117 - from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 117 + from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
118 <if test="_parameter != null"> 118 <if test="_parameter != null">
119 <include refid="Example_Where_Clause" /> 119 <include refid="Example_Where_Clause" />
120 </if> 120 </if>
...@@ -128,15 +128,15 @@ ...@@ -128,15 +128,15 @@
128 <include refid="Base_Column_List" /> 128 <include refid="Base_Column_List" />
129 , 129 ,
130 <include refid="Blob_Column_List" /> 130 <include refid="Blob_Column_List" />
131 - from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 131 + from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
132 where ID = #{id,jdbcType=NUMERIC} 132 where ID = #{id,jdbcType=NUMERIC}
133 </select> 133 </select>
134 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> 134 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
135 - delete from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 135 + delete from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
136 where ID = #{id,jdbcType=NUMERIC} 136 where ID = #{id,jdbcType=NUMERIC}
137 </delete> 137 </delete>
138 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistoryExample"> 138 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistoryExample">
139 - delete from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 139 + delete from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
140 <if test="_parameter != null"> 140 <if test="_parameter != null">
141 <include refid="Example_Where_Clause" /> 141 <include refid="Example_Where_Clause" />
142 </if> 142 </if>
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
145 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 145 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
146 SELECT SEQ_T_SYS_KAFKA_STORAGE_HISTORY.NEXTVAL FROM DUAL 146 SELECT SEQ_T_SYS_KAFKA_STORAGE_HISTORY.NEXTVAL FROM DUAL
147 </selectKey> 147 </selectKey>
148 - insert into ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY (ID, MESSAGE_ID, MESSAGE_CODE, 148 + insert into iclconnect.T_SYS_KAFKA_STORAGE_HISTORY (ID, MESSAGE_ID, MESSAGE_CODE,
149 SENDER_ID, RECEIVER_ID, SEND_TIME, 149 SENDER_ID, RECEIVER_ID, SEND_TIME,
150 CONSIGNMENT_CODE, FREQUENCY, STATUS, 150 CONSIGNMENT_CODE, FREQUENCY, STATUS,
151 STATUS_NAME, REMARK, CREATE_TIME, 151 STATUS_NAME, REMARK, CREATE_TIME,
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
164 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 164 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
165 SELECT SEQ_T_SYS_KAFKA_STORAGE_HISTORY.NEXTVAL FROM DUAL 165 SELECT SEQ_T_SYS_KAFKA_STORAGE_HISTORY.NEXTVAL FROM DUAL
166 </selectKey> 166 </selectKey>
167 - insert into ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 167 + insert into iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
168 <trim prefix="(" suffix=")" suffixOverrides=","> 168 <trim prefix="(" suffix=")" suffixOverrides=",">
169 ID, 169 ID,
170 <if test="messageId != null"> 170 <if test="messageId != null">
...@@ -275,13 +275,13 @@ ...@@ -275,13 +275,13 @@
275 </trim> 275 </trim>
276 </insert> 276 </insert>
277 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistoryExample" resultType="java.lang.Long"> 277 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistoryExample" resultType="java.lang.Long">
278 - select count(*) from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 278 + select count(*) from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
279 <if test="_parameter != null"> 279 <if test="_parameter != null">
280 <include refid="Example_Where_Clause" /> 280 <include refid="Example_Where_Clause" />
281 </if> 281 </if>
282 </select> 282 </select>
283 <update id="updateByExampleSelective" parameterType="map"> 283 <update id="updateByExampleSelective" parameterType="map">
284 - update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 284 + update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
285 <set> 285 <set>
286 <if test="record.id != null"> 286 <if test="record.id != null">
287 ID = #{record.id,jdbcType=NUMERIC}, 287 ID = #{record.id,jdbcType=NUMERIC},
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
343 </if> 343 </if>
344 </update> 344 </update>
345 <update id="updateByExampleWithBLOBs" parameterType="map"> 345 <update id="updateByExampleWithBLOBs" parameterType="map">
346 - update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 346 + update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
347 set ID = #{record.id,jdbcType=NUMERIC}, 347 set ID = #{record.id,jdbcType=NUMERIC},
348 MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR}, 348 MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR},
349 MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR}, 349 MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR},
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
367 </if> 367 </if>
368 </update> 368 </update>
369 <update id="updateByExample" parameterType="map"> 369 <update id="updateByExample" parameterType="map">
370 - update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 370 + update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
371 set ID = #{record.id,jdbcType=NUMERIC}, 371 set ID = #{record.id,jdbcType=NUMERIC},
372 MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR}, 372 MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR},
373 MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR}, 373 MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR},
...@@ -390,7 +390,7 @@ ...@@ -390,7 +390,7 @@
390 </if> 390 </if>
391 </update> 391 </update>
392 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistory"> 392 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistory">
393 - update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 393 + update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
394 <set> 394 <set>
395 <if test="messageId != null"> 395 <if test="messageId != null">
396 MESSAGE_ID = #{messageId,jdbcType=VARCHAR}, 396 MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
...@@ -447,7 +447,7 @@ ...@@ -447,7 +447,7 @@
447 where ID = #{id,jdbcType=NUMERIC} 447 where ID = #{id,jdbcType=NUMERIC}
448 </update> 448 </update>
449 <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistory"> 449 <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistory">
450 - update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 450 + update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
451 set MESSAGE_ID = #{messageId,jdbcType=VARCHAR}, 451 set MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
452 MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR}, 452 MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR},
453 SENDER_ID = #{senderId,jdbcType=VARCHAR}, 453 SENDER_ID = #{senderId,jdbcType=VARCHAR},
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
468 where ID = #{id,jdbcType=NUMERIC} 468 where ID = #{id,jdbcType=NUMERIC}
469 </update> 469 </update>
470 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistory"> 470 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistory">
471 - update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 471 + update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
472 set MESSAGE_ID = #{messageId,jdbcType=VARCHAR}, 472 set MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
473 MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR}, 473 MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR},
474 SENDER_ID = #{senderId,jdbcType=VARCHAR}, 474 SENDER_ID = #{senderId,jdbcType=VARCHAR},
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
98 <include refid="Base_Column_List" /> 98 <include refid="Base_Column_List" />
99 , 99 ,
100 <include refid="Blob_Column_List" /> 100 <include refid="Blob_Column_List" />
101 - from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 101 + from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
102 <if test="_parameter != null"> 102 <if test="_parameter != null">
103 <include refid="Example_Where_Clause" /> 103 <include refid="Example_Where_Clause" />
104 </if> 104 </if>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
114 </if> 114 </if>
115 'true' as QUERYID, 115 'true' as QUERYID,
116 <include refid="Base_Column_List" /> 116 <include refid="Base_Column_List" />
117 - from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 117 + from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
118 <if test="_parameter != null"> 118 <if test="_parameter != null">
119 <include refid="Example_Where_Clause" /> 119 <include refid="Example_Where_Clause" />
120 </if> 120 </if>
...@@ -128,15 +128,15 @@ ...@@ -128,15 +128,15 @@
128 <include refid="Base_Column_List" /> 128 <include refid="Base_Column_List" />
129 , 129 ,
130 <include refid="Blob_Column_List" /> 130 <include refid="Blob_Column_List" />
131 - from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 131 + from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
132 where ID = #{id,jdbcType=NUMERIC} 132 where ID = #{id,jdbcType=NUMERIC}
133 </select> 133 </select>
134 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> 134 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
135 - delete from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 135 + delete from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
136 where ID = #{id,jdbcType=NUMERIC} 136 where ID = #{id,jdbcType=NUMERIC}
137 </delete> 137 </delete>
138 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorageExample"> 138 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorageExample">
139 - delete from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 139 + delete from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
140 <if test="_parameter != null"> 140 <if test="_parameter != null">
141 <include refid="Example_Where_Clause" /> 141 <include refid="Example_Where_Clause" />
142 </if> 142 </if>
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
145 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 145 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
146 SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL 146 SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL
147 </selectKey> 147 </selectKey>
148 - insert into ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE (ID, MESSAGE_ID, MESSAGE_CODE, 148 + insert into iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE (ID, MESSAGE_ID, MESSAGE_CODE,
149 SENDER_ID, RECEIVER_ID, SEND_TIME, 149 SENDER_ID, RECEIVER_ID, SEND_TIME,
150 CONSIGNMENT_CODE, FREQUENCY, STATUS, 150 CONSIGNMENT_CODE, FREQUENCY, STATUS,
151 STATUS_NAME, REMARK, CREATE_TIME, 151 STATUS_NAME, REMARK, CREATE_TIME,
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
164 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 164 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
165 SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL 165 SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL
166 </selectKey> 166 </selectKey>
167 - insert into ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 167 + insert into iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
168 <trim prefix="(" suffix=")" suffixOverrides=","> 168 <trim prefix="(" suffix=")" suffixOverrides=",">
169 ID, 169 ID,
170 <if test="messageId != null"> 170 <if test="messageId != null">
...@@ -275,13 +275,13 @@ ...@@ -275,13 +275,13 @@
275 </trim> 275 </trim>
276 </insert> 276 </insert>
277 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorageExample" resultType="java.lang.Long"> 277 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorageExample" resultType="java.lang.Long">
278 - select count(*) from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 278 + select count(*) from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
279 <if test="_parameter != null"> 279 <if test="_parameter != null">
280 <include refid="Example_Where_Clause" /> 280 <include refid="Example_Where_Clause" />
281 </if> 281 </if>
282 </select> 282 </select>
283 <update id="updateByExampleSelective" parameterType="map"> 283 <update id="updateByExampleSelective" parameterType="map">
284 - update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 284 + update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
285 <set> 285 <set>
286 <if test="record.id != null"> 286 <if test="record.id != null">
287 ID = #{record.id,jdbcType=NUMERIC}, 287 ID = #{record.id,jdbcType=NUMERIC},
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
343 </if> 343 </if>
344 </update> 344 </update>
345 <update id="updateByExampleWithBLOBs" parameterType="map"> 345 <update id="updateByExampleWithBLOBs" parameterType="map">
346 - update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 346 + update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
347 set ID = #{record.id,jdbcType=NUMERIC}, 347 set ID = #{record.id,jdbcType=NUMERIC},
348 MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR}, 348 MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR},
349 MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR}, 349 MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR},
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
367 </if> 367 </if>
368 </update> 368 </update>
369 <update id="updateByExample" parameterType="map"> 369 <update id="updateByExample" parameterType="map">
370 - update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 370 + update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
371 set ID = #{record.id,jdbcType=NUMERIC}, 371 set ID = #{record.id,jdbcType=NUMERIC},
372 MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR}, 372 MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR},
373 MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR}, 373 MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR},
...@@ -390,7 +390,7 @@ ...@@ -390,7 +390,7 @@
390 </if> 390 </if>
391 </update> 391 </update>
392 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorage"> 392 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorage">
393 - update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 393 + update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
394 <set> 394 <set>
395 <if test="messageId != null"> 395 <if test="messageId != null">
396 MESSAGE_ID = #{messageId,jdbcType=VARCHAR}, 396 MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
...@@ -447,7 +447,7 @@ ...@@ -447,7 +447,7 @@
447 where ID = #{id,jdbcType=NUMERIC} 447 where ID = #{id,jdbcType=NUMERIC}
448 </update> 448 </update>
449 <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorage"> 449 <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorage">
450 - update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 450 + update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
451 set MESSAGE_ID = #{messageId,jdbcType=VARCHAR}, 451 set MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
452 MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR}, 452 MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR},
453 SENDER_ID = #{senderId,jdbcType=VARCHAR}, 453 SENDER_ID = #{senderId,jdbcType=VARCHAR},
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
468 where ID = #{id,jdbcType=NUMERIC} 468 where ID = #{id,jdbcType=NUMERIC}
469 </update> 469 </update>
470 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorage"> 470 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorage">
471 - update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 471 + update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
472 set MESSAGE_ID = #{messageId,jdbcType=VARCHAR}, 472 set MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
473 MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR}, 473 MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR},
474 SENDER_ID = #{senderId,jdbcType=VARCHAR}, 474 SENDER_ID = #{senderId,jdbcType=VARCHAR},
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
90 </if> 90 </if>
91 'true' as QUERYID, 91 'true' as QUERYID,
92 <include refid="Base_Column_List" /> 92 <include refid="Base_Column_List" />
93 - from ICLEARIMP.T_SYS_PARAM_CONFIG 93 + from iclconnect.T_SYS_PARAM_CONFIG
94 <if test="_parameter != null"> 94 <if test="_parameter != null">
95 <include refid="Example_Where_Clause" /> 95 <include refid="Example_Where_Clause" />
96 </if> 96 </if>
...@@ -102,15 +102,15 @@ ...@@ -102,15 +102,15 @@
102 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> 102 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
103 select 103 select
104 <include refid="Base_Column_List" /> 104 <include refid="Base_Column_List" />
105 - from ICLEARIMP.T_SYS_PARAM_CONFIG 105 + from iclconnect.T_SYS_PARAM_CONFIG
106 where ID = #{id,jdbcType=NUMERIC} 106 where ID = #{id,jdbcType=NUMERIC}
107 </select> 107 </select>
108 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> 108 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
109 - delete from ICLEARIMP.T_SYS_PARAM_CONFIG 109 + delete from iclconnect.T_SYS_PARAM_CONFIG
110 where ID = #{id,jdbcType=NUMERIC} 110 where ID = #{id,jdbcType=NUMERIC}
111 </delete> 111 </delete>
112 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample"> 112 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample">
113 - delete from ICLEARIMP.T_SYS_PARAM_CONFIG 113 + delete from iclconnect.T_SYS_PARAM_CONFIG
114 <if test="_parameter != null"> 114 <if test="_parameter != null">
115 <include refid="Example_Where_Clause" /> 115 <include refid="Example_Where_Clause" />
116 </if> 116 </if>
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
119 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 119 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
120 SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL 120 SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL
121 </selectKey> 121 </selectKey>
122 - insert into ICLEARIMP.T_SYS_PARAM_CONFIG (ID, CODE, NAME, 122 + insert into iclconnect.T_SYS_PARAM_CONFIG (ID, CODE, NAME,
123 VALUE, TYPE_CODE, TYPE_NAME, 123 VALUE, TYPE_CODE, TYPE_NAME,
124 STATUS, DESCRIPTION, CREATE_TIME, 124 STATUS, DESCRIPTION, CREATE_TIME,
125 CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME, 125 CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME,
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
136 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 136 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
137 SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL 137 SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL
138 </selectKey> 138 </selectKey>
139 - insert into ICLEARIMP.T_SYS_PARAM_CONFIG 139 + insert into iclconnect.T_SYS_PARAM_CONFIG
140 <trim prefix="(" suffix=")" suffixOverrides=","> 140 <trim prefix="(" suffix=")" suffixOverrides=",">
141 ID, 141 ID,
142 <if test="code != null"> 142 <if test="code != null">
...@@ -241,13 +241,13 @@ ...@@ -241,13 +241,13 @@
241 </trim> 241 </trim>
242 </insert> 242 </insert>
243 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample" resultType="java.lang.Long"> 243 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample" resultType="java.lang.Long">
244 - select count(*) from ICLEARIMP.T_SYS_PARAM_CONFIG 244 + select count(*) from iclconnect.T_SYS_PARAM_CONFIG
245 <if test="_parameter != null"> 245 <if test="_parameter != null">
246 <include refid="Example_Where_Clause" /> 246 <include refid="Example_Where_Clause" />
247 </if> 247 </if>
248 </select> 248 </select>
249 <update id="updateByExampleSelective" parameterType="map"> 249 <update id="updateByExampleSelective" parameterType="map">
250 - update ICLEARIMP.T_SYS_PARAM_CONFIG 250 + update iclconnect.T_SYS_PARAM_CONFIG
251 <set> 251 <set>
252 <if test="record.id != null"> 252 <if test="record.id != null">
253 ID = #{record.id,jdbcType=NUMERIC}, 253 ID = #{record.id,jdbcType=NUMERIC},
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
306 </if> 306 </if>
307 </update> 307 </update>
308 <update id="updateByExample" parameterType="map"> 308 <update id="updateByExample" parameterType="map">
309 - update ICLEARIMP.T_SYS_PARAM_CONFIG 309 + update iclconnect.T_SYS_PARAM_CONFIG
310 set ID = #{record.id,jdbcType=NUMERIC}, 310 set ID = #{record.id,jdbcType=NUMERIC},
311 CODE = #{record.code,jdbcType=VARCHAR}, 311 CODE = #{record.code,jdbcType=VARCHAR},
312 NAME = #{record.name,jdbcType=VARCHAR}, 312 NAME = #{record.name,jdbcType=VARCHAR},
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
329 </if> 329 </if>
330 </update> 330 </update>
331 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.ParamConfig"> 331 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.ParamConfig">
332 - update ICLEARIMP.T_SYS_PARAM_CONFIG 332 + update iclconnect.T_SYS_PARAM_CONFIG
333 <set> 333 <set>
334 <if test="code != null"> 334 <if test="code != null">
335 CODE = #{code,jdbcType=VARCHAR}, 335 CODE = #{code,jdbcType=VARCHAR},
...@@ -383,7 +383,7 @@ ...@@ -383,7 +383,7 @@
383 where ID = #{id,jdbcType=NUMERIC} 383 where ID = #{id,jdbcType=NUMERIC}
384 </update> 384 </update>
385 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.ParamConfig"> 385 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.ParamConfig">
386 - update ICLEARIMP.T_SYS_PARAM_CONFIG 386 + update iclconnect.T_SYS_PARAM_CONFIG
387 set CODE = #{code,jdbcType=VARCHAR}, 387 set CODE = #{code,jdbcType=VARCHAR},
388 NAME = #{name,jdbcType=VARCHAR}, 388 NAME = #{name,jdbcType=VARCHAR},
389 VALUE = #{value,jdbcType=VARCHAR}, 389 VALUE = #{value,jdbcType=VARCHAR},
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
99 </if> 99 </if>
100 'true' as QUERYID, 100 'true' as QUERYID,
101 <include refid="Base_Column_List" /> 101 <include refid="Base_Column_List" />
102 - from ICLEARIMP.T_SYS_USER 102 + from iclconnect.T_SYS_USER
103 <if test="_parameter != null"> 103 <if test="_parameter != null">
104 <include refid="Example_Where_Clause" /> 104 <include refid="Example_Where_Clause" />
105 </if> 105 </if>
...@@ -111,15 +111,15 @@ ...@@ -111,15 +111,15 @@
111 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> 111 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
112 select 112 select
113 <include refid="Base_Column_List" /> 113 <include refid="Base_Column_List" />
114 - from ICLEARIMP.T_SYS_USER 114 + from iclconnect.T_SYS_USER
115 where ID = #{id,jdbcType=NUMERIC} 115 where ID = #{id,jdbcType=NUMERIC}
116 </select> 116 </select>
117 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> 117 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
118 - delete from ICLEARIMP.T_SYS_USER 118 + delete from iclconnect.T_SYS_USER
119 where ID = #{id,jdbcType=NUMERIC} 119 where ID = #{id,jdbcType=NUMERIC}
120 </delete> 120 </delete>
121 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.UserExample"> 121 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.UserExample">
122 - delete from ICLEARIMP.T_SYS_USER 122 + delete from iclconnect.T_SYS_USER
123 <if test="_parameter != null"> 123 <if test="_parameter != null">
124 <include refid="Example_Where_Clause" /> 124 <include refid="Example_Where_Clause" />
125 </if> 125 </if>
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
128 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 128 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
129 SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL 129 SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL
130 </selectKey> 130 </selectKey>
131 - insert into ICLEARIMP.T_SYS_USER (ID, LOGIN_NAME, USER_NAME, 131 + insert into iclconnect.T_SYS_USER (ID, LOGIN_NAME, USER_NAME,
132 PASSWORD, USER_UUID, EMAIL, 132 PASSWORD, USER_UUID, EMAIL,
133 PHONE, COMPANY_NAME, ACCOUNT_NO, 133 PHONE, COMPANY_NAME, ACCOUNT_NO,
134 UNIFIED_BUSINESS_NUM, CUSTOMS_SERIAL_NUM, TYPE_CODE, 134 UNIFIED_BUSINESS_NUM, CUSTOMS_SERIAL_NUM, TYPE_CODE,
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
151 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 151 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
152 SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL 152 SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL
153 </selectKey> 153 </selectKey>
154 - insert into ICLEARIMP.T_SYS_USER 154 + insert into iclconnect.T_SYS_USER
155 <trim prefix="(" suffix=")" suffixOverrides=","> 155 <trim prefix="(" suffix=")" suffixOverrides=",">
156 ID, 156 ID,
157 <if test="loginName != null"> 157 <if test="loginName != null">
...@@ -298,13 +298,13 @@ ...@@ -298,13 +298,13 @@
298 </trim> 298 </trim>
299 </insert> 299 </insert>
300 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.UserExample" resultType="java.lang.Long"> 300 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.UserExample" resultType="java.lang.Long">
301 - select count(*) from ICLEARIMP.T_SYS_USER 301 + select count(*) from iclconnect.T_SYS_USER
302 <if test="_parameter != null"> 302 <if test="_parameter != null">
303 <include refid="Example_Where_Clause" /> 303 <include refid="Example_Where_Clause" />
304 </if> 304 </if>
305 </select> 305 </select>
306 <update id="updateByExampleSelective" parameterType="map"> 306 <update id="updateByExampleSelective" parameterType="map">
307 - update ICLEARIMP.T_SYS_USER 307 + update iclconnect.T_SYS_USER
308 <set> 308 <set>
309 <if test="record.id != null"> 309 <if test="record.id != null">
310 ID = #{record.id,jdbcType=NUMERIC}, 310 ID = #{record.id,jdbcType=NUMERIC},
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
384 </if> 384 </if>
385 </update> 385 </update>
386 <update id="updateByExample" parameterType="map"> 386 <update id="updateByExample" parameterType="map">
387 - update ICLEARIMP.T_SYS_USER 387 + update iclconnect.T_SYS_USER
388 set ID = #{record.id,jdbcType=NUMERIC}, 388 set ID = #{record.id,jdbcType=NUMERIC},
389 LOGIN_NAME = #{record.loginName,jdbcType=VARCHAR}, 389 LOGIN_NAME = #{record.loginName,jdbcType=VARCHAR},
390 USER_NAME = #{record.userName,jdbcType=VARCHAR}, 390 USER_NAME = #{record.userName,jdbcType=VARCHAR},
...@@ -414,7 +414,7 @@ ...@@ -414,7 +414,7 @@
414 </if> 414 </if>
415 </update> 415 </update>
416 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.User"> 416 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.User">
417 - update ICLEARIMP.T_SYS_USER 417 + update iclconnect.T_SYS_USER
418 <set> 418 <set>
419 <if test="loginName != null"> 419 <if test="loginName != null">
420 LOGIN_NAME = #{loginName,jdbcType=VARCHAR}, 420 LOGIN_NAME = #{loginName,jdbcType=VARCHAR},
...@@ -489,7 +489,7 @@ ...@@ -489,7 +489,7 @@
489 where ID = #{id,jdbcType=NUMERIC} 489 where ID = #{id,jdbcType=NUMERIC}
490 </update> 490 </update>
491 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.User"> 491 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.User">
492 - update ICLEARIMP.T_SYS_USER 492 + update iclconnect.T_SYS_USER
493 set LOGIN_NAME = #{loginName,jdbcType=VARCHAR}, 493 set LOGIN_NAME = #{loginName,jdbcType=VARCHAR},
494 USER_NAME = #{userName,jdbcType=VARCHAR}, 494 USER_NAME = #{userName,jdbcType=VARCHAR},
495 PASSWORD = #{password,jdbcType=VARCHAR}, 495 PASSWORD = #{password,jdbcType=VARCHAR},
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
83 </if> 83 </if>
84 'true' as QUERYID, 84 'true' as QUERYID,
85 <include refid="Base_Column_List" /> 85 <include refid="Base_Column_List" />
86 - from ICLEARIMP.T_SYS_USER_ROLE 86 + from iclconnect.T_SYS_USER_ROLE
87 <if test="_parameter != null"> 87 <if test="_parameter != null">
88 <include refid="Example_Where_Clause" /> 88 <include refid="Example_Where_Clause" />
89 </if> 89 </if>
...@@ -95,15 +95,15 @@ ...@@ -95,15 +95,15 @@
95 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> 95 <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
96 select 96 select
97 <include refid="Base_Column_List" /> 97 <include refid="Base_Column_List" />
98 - from ICLEARIMP.T_SYS_USER_ROLE 98 + from iclconnect.T_SYS_USER_ROLE
99 where ID = #{id,jdbcType=NUMERIC} 99 where ID = #{id,jdbcType=NUMERIC}
100 </select> 100 </select>
101 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> 101 <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
102 - delete from ICLEARIMP.T_SYS_USER_ROLE 102 + delete from iclconnect.T_SYS_USER_ROLE
103 where ID = #{id,jdbcType=NUMERIC} 103 where ID = #{id,jdbcType=NUMERIC}
104 </delete> 104 </delete>
105 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.UserRoleExample"> 105 <delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.UserRoleExample">
106 - delete from ICLEARIMP.T_SYS_USER_ROLE 106 + delete from iclconnect.T_SYS_USER_ROLE
107 <if test="_parameter != null"> 107 <if test="_parameter != null">
108 <include refid="Example_Where_Clause" /> 108 <include refid="Example_Where_Clause" />
109 </if> 109 </if>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
112 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 112 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
113 SELECT SEQ_T_SYS_USER_ROLE.NEXTVAL FROM DUAL 113 SELECT SEQ_T_SYS_USER_ROLE.NEXTVAL FROM DUAL
114 </selectKey> 114 </selectKey>
115 - insert into ICLEARIMP.T_SYS_USER_ROLE (ID, USER_ID, ROLE_ID, 115 + insert into iclconnect.T_SYS_USER_ROLE (ID, USER_ID, ROLE_ID,
116 STATUS, CREATE_TIME, CREATE_USER_ID, 116 STATUS, CREATE_TIME, CREATE_USER_ID,
117 CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID, 117 CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID,
118 MODIFY_USER_NAME) 118 MODIFY_USER_NAME)
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
125 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 125 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
126 SELECT SEQ_T_SYS_USER_ROLE.NEXTVAL FROM DUAL 126 SELECT SEQ_T_SYS_USER_ROLE.NEXTVAL FROM DUAL
127 </selectKey> 127 </selectKey>
128 - insert into ICLEARIMP.T_SYS_USER_ROLE 128 + insert into iclconnect.T_SYS_USER_ROLE
129 <trim prefix="(" suffix=")" suffixOverrides=","> 129 <trim prefix="(" suffix=")" suffixOverrides=",">
130 ID, 130 ID,
131 <if test="userId != null"> 131 <if test="userId != null">
...@@ -188,13 +188,13 @@ ...@@ -188,13 +188,13 @@
188 </trim> 188 </trim>
189 </insert> 189 </insert>
190 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.UserRoleExample" resultType="java.lang.Long"> 190 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.UserRoleExample" resultType="java.lang.Long">
191 - select count(*) from ICLEARIMP.T_SYS_USER_ROLE 191 + select count(*) from iclconnect.T_SYS_USER_ROLE
192 <if test="_parameter != null"> 192 <if test="_parameter != null">
193 <include refid="Example_Where_Clause" /> 193 <include refid="Example_Where_Clause" />
194 </if> 194 </if>
195 </select> 195 </select>
196 <update id="updateByExampleSelective" parameterType="map"> 196 <update id="updateByExampleSelective" parameterType="map">
197 - update ICLEARIMP.T_SYS_USER_ROLE 197 + update iclconnect.T_SYS_USER_ROLE
198 <set> 198 <set>
199 <if test="record.id != null"> 199 <if test="record.id != null">
200 ID = #{record.id,jdbcType=NUMERIC}, 200 ID = #{record.id,jdbcType=NUMERIC},
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
232 </if> 232 </if>
233 </update> 233 </update>
234 <update id="updateByExample" parameterType="map"> 234 <update id="updateByExample" parameterType="map">
235 - update ICLEARIMP.T_SYS_USER_ROLE 235 + update iclconnect.T_SYS_USER_ROLE
236 set ID = #{record.id,jdbcType=NUMERIC}, 236 set ID = #{record.id,jdbcType=NUMERIC},
237 USER_ID = #{record.userId,jdbcType=NUMERIC}, 237 USER_ID = #{record.userId,jdbcType=NUMERIC},
238 ROLE_ID = #{record.roleId,jdbcType=NUMERIC}, 238 ROLE_ID = #{record.roleId,jdbcType=NUMERIC},
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
248 </if> 248 </if>
249 </update> 249 </update>
250 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.UserRole"> 250 <update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.UserRole">
251 - update ICLEARIMP.T_SYS_USER_ROLE 251 + update iclconnect.T_SYS_USER_ROLE
252 <set> 252 <set>
253 <if test="userId != null"> 253 <if test="userId != null">
254 USER_ID = #{userId,jdbcType=NUMERIC}, 254 USER_ID = #{userId,jdbcType=NUMERIC},
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
281 where ID = #{id,jdbcType=NUMERIC} 281 where ID = #{id,jdbcType=NUMERIC}
282 </update> 282 </update>
283 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.UserRole"> 283 <update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.UserRole">
284 - update ICLEARIMP.T_SYS_USER_ROLE 284 + update iclconnect.T_SYS_USER_ROLE
285 set USER_ID = #{userId,jdbcType=NUMERIC}, 285 set USER_ID = #{userId,jdbcType=NUMERIC},
286 ROLE_ID = #{roleId,jdbcType=NUMERIC}, 286 ROLE_ID = #{roleId,jdbcType=NUMERIC},
287 STATUS = #{status,jdbcType=NUMERIC}, 287 STATUS = #{status,jdbcType=NUMERIC},
......
...@@ -9,7 +9,7 @@ import java.util.Date; ...@@ -9,7 +9,7 @@ import java.util.Date;
9 9
10 /** 10 /**
11 * DESC: CE501报文业务表,增加需要加密标志 11 * DESC: CE501报文业务表,增加需要加密标志
12 - * TABLE: ICLEARIMP.T_BIZ_CE_INFO 12 + * TABLE: iclconnect.T_BIZ_CE_INFO
13 */ 13 */
14 @SensitiveEntity 14 @SensitiveEntity
15 public class CeInfo implements Serializable { 15 public class CeInfo implements Serializable {
......
...@@ -94,6 +94,11 @@ public class PushOb implements Serializable { ...@@ -94,6 +94,11 @@ public class PushOb implements Serializable {
94 */ 94 */
95 private String modifyUserName; 95 private String modifyUserName;
96 96
97 + /**
98 + * 用户上传记录表ID
99 + */
100 + private Long uploadRecordId;
101 +
97 private static final long serialVersionUID = 1L; 102 private static final long serialVersionUID = 1L;
98 103
99 public Long getId() { 104 public Long getId() {
...@@ -232,6 +237,14 @@ public class PushOb implements Serializable { ...@@ -232,6 +237,14 @@ public class PushOb implements Serializable {
232 this.modifyUserName = modifyUserName == null ? null : modifyUserName.trim(); 237 this.modifyUserName = modifyUserName == null ? null : modifyUserName.trim();
233 } 238 }
234 239
240 + public Long getUploadRecordId() {
241 + return uploadRecordId;
242 + }
243 +
244 + public void setUploadRecordId(Long uploadRecordId) {
245 + this.uploadRecordId = uploadRecordId;
246 + }
247 +
235 @Override 248 @Override
236 public String toString() { 249 public String toString() {
237 StringBuilder sb = new StringBuilder(); 250 StringBuilder sb = new StringBuilder();
...@@ -255,6 +268,7 @@ public class PushOb implements Serializable { ...@@ -255,6 +268,7 @@ public class PushOb implements Serializable {
255 sb.append(", modifyTime=").append(modifyTime); 268 sb.append(", modifyTime=").append(modifyTime);
256 sb.append(", modifyUserId=").append(modifyUserId); 269 sb.append(", modifyUserId=").append(modifyUserId);
257 sb.append(", modifyUserName=").append(modifyUserName); 270 sb.append(", modifyUserName=").append(modifyUserName);
271 + sb.append(", uploadRecordId=").append(uploadRecordId);
258 sb.append(", serialVersionUID=").append(serialVersionUID); 272 sb.append(", serialVersionUID=").append(serialVersionUID);
259 sb.append("]"); 273 sb.append("]");
260 return sb.toString(); 274 return sb.toString();
......
...@@ -35,12 +35,12 @@ public class PushObDetail implements Serializable { ...@@ -35,12 +35,12 @@ public class PushObDetail implements Serializable {
35 private String statusName; 35 private String statusName;
36 36
37 /** 37 /**
38 - * 推送文件类型字典CODE,关联数据字典表。指定字典目录CODE:PUSH_OB_FILE_TYPE 38 + * 推送文件类型字典CODE,关联数据字典表。指定字典目录CODE:ATTACHMENT_BIZ_TYPE,取值Ext1 字段值
39 */ 39 */
40 private String fileTypeCode; 40 private String fileTypeCode;
41 41
42 /** 42 /**
43 - * 推送文件类型名称(XXX、XXX 43 + * 推送文件类型名称(AWB、INV、PKL、OTH
44 */ 44 */
45 private String fileType; 45 private String fileType;
46 46
......
...@@ -1234,6 +1234,66 @@ public class PushObExample { ...@@ -1234,6 +1234,66 @@ public class PushObExample {
1234 addCriterion("MODIFY_USER_NAME not between", value1, value2, "modifyUserName"); 1234 addCriterion("MODIFY_USER_NAME not between", value1, value2, "modifyUserName");
1235 return (Criteria) this; 1235 return (Criteria) this;
1236 } 1236 }
1237 +
1238 + public Criteria andUploadRecordIdIsNull() {
1239 + addCriterion("UPLOAD_RECORD_ID is null");
1240 + return (Criteria) this;
1241 + }
1242 +
1243 + public Criteria andUploadRecordIdIsNotNull() {
1244 + addCriterion("UPLOAD_RECORD_ID is not null");
1245 + return (Criteria) this;
1246 + }
1247 +
1248 + public Criteria andUploadRecordIdEqualTo(Long value) {
1249 + addCriterion("UPLOAD_RECORD_ID =", value, "uploadRecordId");
1250 + return (Criteria) this;
1251 + }
1252 +
1253 + public Criteria andUploadRecordIdNotEqualTo(Long value) {
1254 + addCriterion("UPLOAD_RECORD_ID <>", value, "uploadRecordId");
1255 + return (Criteria) this;
1256 + }
1257 +
1258 + public Criteria andUploadRecordIdGreaterThan(Long value) {
1259 + addCriterion("UPLOAD_RECORD_ID >", value, "uploadRecordId");
1260 + return (Criteria) this;
1261 + }
1262 +
1263 + public Criteria andUploadRecordIdGreaterThanOrEqualTo(Long value) {
1264 + addCriterion("UPLOAD_RECORD_ID >=", value, "uploadRecordId");
1265 + return (Criteria) this;
1266 + }
1267 +
1268 + public Criteria andUploadRecordIdLessThan(Long value) {
1269 + addCriterion("UPLOAD_RECORD_ID <", value, "uploadRecordId");
1270 + return (Criteria) this;
1271 + }
1272 +
1273 + public Criteria andUploadRecordIdLessThanOrEqualTo(Long value) {
1274 + addCriterion("UPLOAD_RECORD_ID <=", value, "uploadRecordId");
1275 + return (Criteria) this;
1276 + }
1277 +
1278 + public Criteria andUploadRecordIdIn(List<Long> values) {
1279 + addCriterion("UPLOAD_RECORD_ID in", values, "uploadRecordId");
1280 + return (Criteria) this;
1281 + }
1282 +
1283 + public Criteria andUploadRecordIdNotIn(List<Long> values) {
1284 + addCriterion("UPLOAD_RECORD_ID not in", values, "uploadRecordId");
1285 + return (Criteria) this;
1286 + }
1287 +
1288 + public Criteria andUploadRecordIdBetween(Long value1, Long value2) {
1289 + addCriterion("UPLOAD_RECORD_ID between", value1, value2, "uploadRecordId");
1290 + return (Criteria) this;
1291 + }
1292 +
1293 + public Criteria andUploadRecordIdNotBetween(Long value1, Long value2) {
1294 + addCriterion("UPLOAD_RECORD_ID not between", value1, value2, "uploadRecordId");
1295 + return (Criteria) this;
1296 + }
1237 } 1297 }
1238 1298
1239 public static class Criteria extends GeneratedCriteria { 1299 public static class Criteria extends GeneratedCriteria {
......
...@@ -5,7 +5,7 @@ import java.util.Date; ...@@ -5,7 +5,7 @@ import java.util.Date;
5 5
6 /** 6 /**
7 * DESC: 用户运单关系映射表 7 * DESC: 用户运单关系映射表
8 - * TABLE: ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING 8 + * TABLE: iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
9 */ 9 */
10 public class UserConsignmentMapping implements Serializable { 10 public class UserConsignmentMapping implements Serializable {
11 /** 11 /**
...@@ -63,6 +63,11 @@ public class UserConsignmentMapping implements Serializable { ...@@ -63,6 +63,11 @@ public class UserConsignmentMapping implements Serializable {
63 */ 63 */
64 private String consignmentCode; 64 private String consignmentCode;
65 65
66 + /**
67 + * 是否使用CE数据标志(0“非501数据,1:501数据)
68 + */
69 + private Long ceFlag;
70 +
66 private static final long serialVersionUID = 1L; 71 private static final long serialVersionUID = 1L;
67 72
68 public Long getId() { 73 public Long getId() {
...@@ -153,6 +158,18 @@ public class UserConsignmentMapping implements Serializable { ...@@ -153,6 +158,18 @@ public class UserConsignmentMapping implements Serializable {
153 this.consignmentCode = consignmentCode == null ? null : consignmentCode.trim(); 158 this.consignmentCode = consignmentCode == null ? null : consignmentCode.trim();
154 } 159 }
155 160
161 + public Long getCeFlag() {
162 + return ceFlag;
163 + }
164 +
165 + public void setCeFlag(Long ceFlag) {
166 + this.ceFlag = ceFlag;
167 + }
168 +
169 + public static long getSerialVersionUID() {
170 + return serialVersionUID;
171 + }
172 +
156 @Override 173 @Override
157 public String toString() { 174 public String toString() {
158 StringBuilder sb = new StringBuilder(); 175 StringBuilder sb = new StringBuilder();
......
...@@ -61,7 +61,7 @@ public class EmailHistory implements Serializable { ...@@ -61,7 +61,7 @@ public class EmailHistory implements Serializable {
61 /** 61 /**
62 * 发送次数(0-3次) 62 * 发送次数(0-3次)
63 */ 63 */
64 - private Long sendNum; 64 + private int sendNum;
65 65
66 /** 66 /**
67 * 邮件发送时间 67 * 邮件发送时间
...@@ -190,11 +190,11 @@ public class EmailHistory implements Serializable { ...@@ -190,11 +190,11 @@ public class EmailHistory implements Serializable {
190 this.statusName = statusName == null ? null : statusName.trim(); 190 this.statusName = statusName == null ? null : statusName.trim();
191 } 191 }
192 192
193 - public Long getSendNum() { 193 + public int getSendNum() {
194 return sendNum; 194 return sendNum;
195 } 195 }
196 196
197 - public void setSendNum(Long sendNum) { 197 + public void setSendNum(int sendNum) {
198 this.sendNum = sendNum; 198 this.sendNum = sendNum;
199 } 199 }
200 200
......
...@@ -5,7 +5,7 @@ import java.util.Date; ...@@ -5,7 +5,7 @@ import java.util.Date;
5 5
6 /** 6 /**
7 * DESC: 操作日志 7 * DESC: 操作日志
8 - * TABLE: ICLEARIMP.T_LOG_OPERATION 8 + * TABLE: iclconnect.T_LOG_OPERATION
9 */ 9 */
10 public class Operation implements Serializable { 10 public class Operation implements Serializable {
11 /** 11 /**
...@@ -44,21 +44,6 @@ public class Operation implements Serializable { ...@@ -44,21 +44,6 @@ public class Operation implements Serializable {
44 private String url; 44 private String url;
45 45
46 /** 46 /**
47 - * 请求参数
48 - */
49 - private String requestParameters;
50 -
51 - /**
52 - * 操作结果
53 - */
54 - private String result;
55 -
56 - /**
57 - * 状态(0:展示、1:不展示)
58 - */
59 - private Long status;
60 -
61 - /**
62 * 创建时间 47 * 创建时间
63 */ 48 */
64 private Date createTime; 49 private Date createTime;
...@@ -104,9 +89,9 @@ public class Operation implements Serializable { ...@@ -104,9 +89,9 @@ public class Operation implements Serializable {
104 private Long exceuteConsume; 89 private Long exceuteConsume;
105 90
106 /** 91 /**
107 - * 备注 92 + * 状态(0:展示、1:不展示)
108 */ 93 */
109 - private String remark; 94 + private Long status;
110 95
111 private static final long serialVersionUID = 1L; 96 private static final long serialVersionUID = 1L;
112 97
...@@ -166,30 +151,6 @@ public class Operation implements Serializable { ...@@ -166,30 +151,6 @@ public class Operation implements Serializable {
166 this.url = url == null ? null : url.trim(); 151 this.url = url == null ? null : url.trim();
167 } 152 }
168 153
169 - public String getRequestParameters() {
170 - return requestParameters;
171 - }
172 -
173 - public void setRequestParameters(String requestParameters) {
174 - this.requestParameters = requestParameters == null ? null : requestParameters.trim();
175 - }
176 -
177 - public String getResult() {
178 - return result;
179 - }
180 -
181 - public void setResult(String result) {
182 - this.result = result == null ? null : result.trim();
183 - }
184 -
185 - public Long getStatus() {
186 - return status;
187 - }
188 -
189 - public void setStatus(Long status) {
190 - this.status = status;
191 - }
192 -
193 public Date getCreateTime() { 154 public Date getCreateTime() {
194 return createTime; 155 return createTime;
195 } 156 }
...@@ -262,12 +223,12 @@ public class Operation implements Serializable { ...@@ -262,12 +223,12 @@ public class Operation implements Serializable {
262 this.exceuteConsume = exceuteConsume; 223 this.exceuteConsume = exceuteConsume;
263 } 224 }
264 225
265 - public String getRemark() { 226 + public Long getStatus() {
266 - return remark; 227 + return status;
267 } 228 }
268 229
269 - public void setRemark(String remark) { 230 + public void setStatus(Long status) {
270 - this.remark = remark == null ? null : remark.trim(); 231 + this.status = status;
271 } 232 }
272 233
273 @Override 234 @Override
...@@ -283,9 +244,6 @@ public class Operation implements Serializable { ...@@ -283,9 +244,6 @@ public class Operation implements Serializable {
283 sb.append(", module=").append(module); 244 sb.append(", module=").append(module);
284 sb.append(", describe=").append(describe); 245 sb.append(", describe=").append(describe);
285 sb.append(", url=").append(url); 246 sb.append(", url=").append(url);
286 - sb.append(", requestParameters=").append(requestParameters);
287 - sb.append(", result=").append(result);
288 - sb.append(", status=").append(status);
289 sb.append(", createTime=").append(createTime); 247 sb.append(", createTime=").append(createTime);
290 sb.append(", createUserId=").append(createUserId); 248 sb.append(", createUserId=").append(createUserId);
291 sb.append(", createUserName=").append(createUserName); 249 sb.append(", createUserName=").append(createUserName);
...@@ -295,7 +253,7 @@ public class Operation implements Serializable { ...@@ -295,7 +253,7 @@ public class Operation implements Serializable {
295 sb.append(", requestTime=").append(requestTime); 253 sb.append(", requestTime=").append(requestTime);
296 sb.append(", responseTime=").append(responseTime); 254 sb.append(", responseTime=").append(responseTime);
297 sb.append(", exceuteConsume=").append(exceuteConsume); 255 sb.append(", exceuteConsume=").append(exceuteConsume);
298 - sb.append(", remark=").append(remark); 256 + sb.append(", status=").append(status);
299 sb.append(", serialVersionUID=").append(serialVersionUID); 257 sb.append(", serialVersionUID=").append(serialVersionUID);
300 sb.append("]"); 258 sb.append("]");
301 return sb.toString(); 259 return sb.toString();
......
...@@ -595,206 +595,6 @@ public class OperationExample { ...@@ -595,206 +595,6 @@ public class OperationExample {
595 return (Criteria) this; 595 return (Criteria) this;
596 } 596 }
597 597
598 - public Criteria andRequestParametersIsNull() {
599 - addCriterion("REQUEST_PARAMETERS is null");
600 - return (Criteria) this;
601 - }
602 -
603 - public Criteria andRequestParametersIsNotNull() {
604 - addCriterion("REQUEST_PARAMETERS is not null");
605 - return (Criteria) this;
606 - }
607 -
608 - public Criteria andRequestParametersEqualTo(String value) {
609 - addCriterion("REQUEST_PARAMETERS =", value, "requestParameters");
610 - return (Criteria) this;
611 - }
612 -
613 - public Criteria andRequestParametersNotEqualTo(String value) {
614 - addCriterion("REQUEST_PARAMETERS <>", value, "requestParameters");
615 - return (Criteria) this;
616 - }
617 -
618 - public Criteria andRequestParametersGreaterThan(String value) {
619 - addCriterion("REQUEST_PARAMETERS >", value, "requestParameters");
620 - return (Criteria) this;
621 - }
622 -
623 - public Criteria andRequestParametersGreaterThanOrEqualTo(String value) {
624 - addCriterion("REQUEST_PARAMETERS >=", value, "requestParameters");
625 - return (Criteria) this;
626 - }
627 -
628 - public Criteria andRequestParametersLessThan(String value) {
629 - addCriterion("REQUEST_PARAMETERS <", value, "requestParameters");
630 - return (Criteria) this;
631 - }
632 -
633 - public Criteria andRequestParametersLessThanOrEqualTo(String value) {
634 - addCriterion("REQUEST_PARAMETERS <=", value, "requestParameters");
635 - return (Criteria) this;
636 - }
637 -
638 - public Criteria andRequestParametersLike(String value) {
639 - addCriterion("REQUEST_PARAMETERS like", value, "requestParameters");
640 - return (Criteria) this;
641 - }
642 -
643 - public Criteria andRequestParametersNotLike(String value) {
644 - addCriterion("REQUEST_PARAMETERS not like", value, "requestParameters");
645 - return (Criteria) this;
646 - }
647 -
648 - public Criteria andRequestParametersIn(List<String> values) {
649 - addCriterion("REQUEST_PARAMETERS in", values, "requestParameters");
650 - return (Criteria) this;
651 - }
652 -
653 - public Criteria andRequestParametersNotIn(List<String> values) {
654 - addCriterion("REQUEST_PARAMETERS not in", values, "requestParameters");
655 - return (Criteria) this;
656 - }
657 -
658 - public Criteria andRequestParametersBetween(String value1, String value2) {
659 - addCriterion("REQUEST_PARAMETERS between", value1, value2, "requestParameters");
660 - return (Criteria) this;
661 - }
662 -
663 - public Criteria andRequestParametersNotBetween(String value1, String value2) {
664 - addCriterion("REQUEST_PARAMETERS not between", value1, value2, "requestParameters");
665 - return (Criteria) this;
666 - }
667 -
668 - public Criteria andResultIsNull() {
669 - addCriterion("RESULT is null");
670 - return (Criteria) this;
671 - }
672 -
673 - public Criteria andResultIsNotNull() {
674 - addCriterion("RESULT is not null");
675 - return (Criteria) this;
676 - }
677 -
678 - public Criteria andResultEqualTo(String value) {
679 - addCriterion("RESULT =", value, "result");
680 - return (Criteria) this;
681 - }
682 -
683 - public Criteria andResultNotEqualTo(String value) {
684 - addCriterion("RESULT <>", value, "result");
685 - return (Criteria) this;
686 - }
687 -
688 - public Criteria andResultGreaterThan(String value) {
689 - addCriterion("RESULT >", value, "result");
690 - return (Criteria) this;
691 - }
692 -
693 - public Criteria andResultGreaterThanOrEqualTo(String value) {
694 - addCriterion("RESULT >=", value, "result");
695 - return (Criteria) this;
696 - }
697 -
698 - public Criteria andResultLessThan(String value) {
699 - addCriterion("RESULT <", value, "result");
700 - return (Criteria) this;
701 - }
702 -
703 - public Criteria andResultLessThanOrEqualTo(String value) {
704 - addCriterion("RESULT <=", value, "result");
705 - return (Criteria) this;
706 - }
707 -
708 - public Criteria andResultLike(String value) {
709 - addCriterion("RESULT like", value, "result");
710 - return (Criteria) this;
711 - }
712 -
713 - public Criteria andResultNotLike(String value) {
714 - addCriterion("RESULT not like", value, "result");
715 - return (Criteria) this;
716 - }
717 -
718 - public Criteria andResultIn(List<String> values) {
719 - addCriterion("RESULT in", values, "result");
720 - return (Criteria) this;
721 - }
722 -
723 - public Criteria andResultNotIn(List<String> values) {
724 - addCriterion("RESULT not in", values, "result");
725 - return (Criteria) this;
726 - }
727 -
728 - public Criteria andResultBetween(String value1, String value2) {
729 - addCriterion("RESULT between", value1, value2, "result");
730 - return (Criteria) this;
731 - }
732 -
733 - public Criteria andResultNotBetween(String value1, String value2) {
734 - addCriterion("RESULT not between", value1, value2, "result");
735 - return (Criteria) this;
736 - }
737 -
738 - public Criteria andStatusIsNull() {
739 - addCriterion("STATUS is null");
740 - return (Criteria) this;
741 - }
742 -
743 - public Criteria andStatusIsNotNull() {
744 - addCriterion("STATUS is not null");
745 - return (Criteria) this;
746 - }
747 -
748 - public Criteria andStatusEqualTo(Long value) {
749 - addCriterion("STATUS =", value, "status");
750 - return (Criteria) this;
751 - }
752 -
753 - public Criteria andStatusNotEqualTo(Long value) {
754 - addCriterion("STATUS <>", value, "status");
755 - return (Criteria) this;
756 - }
757 -
758 - public Criteria andStatusGreaterThan(Long value) {
759 - addCriterion("STATUS >", value, "status");
760 - return (Criteria) this;
761 - }
762 -
763 - public Criteria andStatusGreaterThanOrEqualTo(Long value) {
764 - addCriterion("STATUS >=", value, "status");
765 - return (Criteria) this;
766 - }
767 -
768 - public Criteria andStatusLessThan(Long value) {
769 - addCriterion("STATUS <", value, "status");
770 - return (Criteria) this;
771 - }
772 -
773 - public Criteria andStatusLessThanOrEqualTo(Long value) {
774 - addCriterion("STATUS <=", value, "status");
775 - return (Criteria) this;
776 - }
777 -
778 - public Criteria andStatusIn(List<Long> values) {
779 - addCriterion("STATUS in", values, "status");
780 - return (Criteria) this;
781 - }
782 -
783 - public Criteria andStatusNotIn(List<Long> values) {
784 - addCriterion("STATUS not in", values, "status");
785 - return (Criteria) this;
786 - }
787 -
788 - public Criteria andStatusBetween(Long value1, Long value2) {
789 - addCriterion("STATUS between", value1, value2, "status");
790 - return (Criteria) this;
791 - }
792 -
793 - public Criteria andStatusNotBetween(Long value1, Long value2) {
794 - addCriterion("STATUS not between", value1, value2, "status");
795 - return (Criteria) this;
796 - }
797 -
798 public Criteria andCreateTimeIsNull() { 598 public Criteria andCreateTimeIsNull() {
799 addCriterion("CREATE_TIME is null"); 599 addCriterion("CREATE_TIME is null");
800 return (Criteria) this; 600 return (Criteria) this;
...@@ -1354,6 +1154,66 @@ public class OperationExample { ...@@ -1354,6 +1154,66 @@ public class OperationExample {
1354 addCriterion("EXCEUTE_CONSUME not between", value1, value2, "exceuteConsume"); 1154 addCriterion("EXCEUTE_CONSUME not between", value1, value2, "exceuteConsume");
1355 return (Criteria) this; 1155 return (Criteria) this;
1356 } 1156 }
1157 +
1158 + public Criteria andStatusIsNull() {
1159 + addCriterion("STATUS is null");
1160 + return (Criteria) this;
1161 + }
1162 +
1163 + public Criteria andStatusIsNotNull() {
1164 + addCriterion("STATUS is not null");
1165 + return (Criteria) this;
1166 + }
1167 +
1168 + public Criteria andStatusEqualTo(Long value) {
1169 + addCriterion("STATUS =", value, "status");
1170 + return (Criteria) this;
1171 + }
1172 +
1173 + public Criteria andStatusNotEqualTo(Long value) {
1174 + addCriterion("STATUS <>", value, "status");
1175 + return (Criteria) this;
1176 + }
1177 +
1178 + public Criteria andStatusGreaterThan(Long value) {
1179 + addCriterion("STATUS >", value, "status");
1180 + return (Criteria) this;
1181 + }
1182 +
1183 + public Criteria andStatusGreaterThanOrEqualTo(Long value) {
1184 + addCriterion("STATUS >=", value, "status");
1185 + return (Criteria) this;
1186 + }
1187 +
1188 + public Criteria andStatusLessThan(Long value) {
1189 + addCriterion("STATUS <", value, "status");
1190 + return (Criteria) this;
1191 + }
1192 +
1193 + public Criteria andStatusLessThanOrEqualTo(Long value) {
1194 + addCriterion("STATUS <=", value, "status");
1195 + return (Criteria) this;
1196 + }
1197 +
1198 + public Criteria andStatusIn(List<Long> values) {
1199 + addCriterion("STATUS in", values, "status");
1200 + return (Criteria) this;
1201 + }
1202 +
1203 + public Criteria andStatusNotIn(List<Long> values) {
1204 + addCriterion("STATUS not in", values, "status");
1205 + return (Criteria) this;
1206 + }
1207 +
1208 + public Criteria andStatusBetween(Long value1, Long value2) {
1209 + addCriterion("STATUS between", value1, value2, "status");
1210 + return (Criteria) this;
1211 + }
1212 +
1213 + public Criteria andStatusNotBetween(Long value1, Long value2) {
1214 + addCriterion("STATUS not between", value1, value2, "status");
1215 + return (Criteria) this;
1216 + }
1357 } 1217 }
1358 1218
1359 public static class Criteria extends GeneratedCriteria { 1219 public static class Criteria extends GeneratedCriteria {
......
1 +package com.fedex.connect.common.model.log;
2 +
3 +import java.io.Serializable;
4 +
5 +/**
6 + * DESC: 操作日志
7 + * TABLE: iclconnect.T_LOG_OPERATION
8 + */
9 +public class OperationWithBLOBs extends Operation implements Serializable {
10 + /**
11 + * 备注
12 + */
13 + private String remark;
14 +
15 + /**
16 + * 请求参数
17 + */
18 + private String requestParameters;
19 +
20 + /**
21 + * 请求结果
22 + */
23 + private String result;
24 +
25 + private static final long serialVersionUID = 1L;
26 +
27 + public String getRemark() {
28 + return remark;
29 + }
30 +
31 + public void setRemark(String remark) {
32 + this.remark = remark == null ? null : remark.trim();
33 + }
34 +
35 + public String getRequestParameters() {
36 + return requestParameters;
37 + }
38 +
39 + public void setRequestParameters(String requestParameters) {
40 + this.requestParameters = requestParameters == null ? null : requestParameters.trim();
41 + }
42 +
43 + public String getResult() {
44 + return result;
45 + }
46 +
47 + public void setResult(String result) {
48 + this.result = result == null ? null : result.trim();
49 + }
50 +
51 + @Override
52 + public String toString() {
53 + StringBuilder sb = new StringBuilder();
54 + sb.append(getClass().getSimpleName());
55 + sb.append(" [");
56 + sb.append("Hash = ").append(hashCode());
57 + sb.append(", remark=").append(remark);
58 + sb.append(", requestParameters=").append(requestParameters);
59 + sb.append(", result=").append(result);
60 + sb.append(", serialVersionUID=").append(serialVersionUID);
61 + sb.append("]");
62 + return sb.toString();
63 + }
64 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -5,7 +5,7 @@ import java.util.Date; ...@@ -5,7 +5,7 @@ import java.util.Date;
5 5
6 /** 6 /**
7 * DESC: KAFKA数据历史表 7 * DESC: KAFKA数据历史表
8 - * TABLE: ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY 8 + * TABLE: iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
9 */ 9 */
10 public class KafkaStorageHistory implements Serializable { 10 public class KafkaStorageHistory implements Serializable {
11 /** 11 /**
......
...@@ -5,7 +5,7 @@ import java.util.Date; ...@@ -5,7 +5,7 @@ import java.util.Date;
5 5
6 /** 6 /**
7 * DESC: KAFKA临时表 7 * DESC: KAFKA临时表
8 - * TABLE: ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE 8 + * TABLE: iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
9 */ 9 */
10 public class KafkaTemporaryStorage implements Serializable { 10 public class KafkaTemporaryStorage implements Serializable {
11 /** 11 /**
......
...@@ -5,7 +5,7 @@ import java.util.Date; ...@@ -5,7 +5,7 @@ import java.util.Date;
5 5
6 /** 6 /**
7 * DESC: 系统参数配置表 7 * DESC: 系统参数配置表
8 - * TABLE: ICLEARIMP.T_SYS_PARAM_CONFIG 8 + * TABLE: iclconnect.T_SYS_PARAM_CONFIG
9 */ 9 */
10 public class ParamConfig implements Serializable { 10 public class ParamConfig implements Serializable {
11 /** 11 /**
......
...@@ -8,7 +8,7 @@ import java.util.Date; ...@@ -8,7 +8,7 @@ import java.util.Date;
8 8
9 /** 9 /**
10 * DESC: 用户表 10 * DESC: 用户表
11 - * TABLE: ICLEARIMP.T_SYS_USER 11 + * TABLE: iclconnect.T_SYS_USER
12 */ 12 */
13 @SensitiveEntity 13 @SensitiveEntity
14 public class User implements Serializable { 14 public class User implements Serializable {
......
...@@ -5,7 +5,7 @@ import java.util.Date; ...@@ -5,7 +5,7 @@ import java.util.Date;
5 5
6 /** 6 /**
7 * DESC: 用户角色表 7 * DESC: 用户角色表
8 - * TABLE: ICLEARIMP.T_SYS_USER_ROLE 8 + * TABLE: iclconnect.T_SYS_USER_ROLE
9 */ 9 */
10 public class UserRole implements Serializable { 10 public class UserRole implements Serializable {
11 /** 11 /**
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
40 sys:系统 系统相关表,例如kafka表 40 sys:系统 系统相关表,例如kafka表
41 log: 日志 日志记录表,例如邮件发送日志表 41 log: 日志 日志记录表,例如邮件发送日志表
42 --> 42 -->
43 - <javaModelGenerator targetPackage="com.fedex.connect.common.model.sys" targetProject="src/main/java"> 43 + <javaModelGenerator targetPackage="com.fedex.connect.common.model.biz" targetProject="src/main/java">
44 <!---enableSubPackages:如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性--> 44 <!---enableSubPackages:如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性-->
45 <property name="enableSubPackages" value="false"/> 45 <property name="enableSubPackages" value="false"/>
46 <!--该属性只对MyBatis3有效,如果true就会使用构造方法入参,如果false就会使用setter方式。默认为false--> 46 <!--该属性只对MyBatis3有效,如果true就会使用构造方法入参,如果false就会使用setter方式。默认为false-->
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
52 </javaModelGenerator> 52 </javaModelGenerator>
53 53
54 <!-- 生成映射文件*.xml的位置--> 54 <!-- 生成映射文件*.xml的位置-->
55 - <sqlMapGenerator targetPackage="mapper.sys" targetProject="src/main/java/com/fedex/connect/common"> 55 + <sqlMapGenerator targetPackage="mapper.biz" targetProject="src/main/java/com/fedex/connect/common">
56 <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false--> 56 <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
57 <property name="enableSubPackages" value="false"/> 57 <property name="enableSubPackages" value="false"/>
58 </sqlMapGenerator> 58 </sqlMapGenerator>
59 59
60 <!-- 生成DAO的包名和位置 --> 60 <!-- 生成DAO的包名和位置 -->
61 - <javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.sys" targetProject="src/main/java"> 61 + <javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.biz" targetProject="src/main/java">
62 <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false--> 62 <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
63 <property name="enableSubPackages" value="false"/> 63 <property name="enableSubPackages" value="false"/>
64 </javaClientGenerator> 64 </javaClientGenerator>
...@@ -135,14 +135,12 @@ ...@@ -135,14 +135,12 @@
135 <!-- selectByExampleQueryId="true">--> 135 <!-- selectByExampleQueryId="true">-->
136 <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB.NEXTVAL FROM DUAL" />--> 136 <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB.NEXTVAL FROM DUAL" />-->
137 <!-- </table>--> 137 <!-- </table>-->
138 -<!-- <table tableName="T_BIZ_PUSH_OB_DETAIL" domainObjectName="PushObDetail"--> 138 + <table tableName="T_BIZ_PUSH_OB_DETAIL" domainObjectName="PushObDetail"
139 -<!-- enableCountByExample="true" enableUpdateByExample="true"--> 139 + enableCountByExample="true" enableUpdateByExample="true"
140 -<!-- enableDeleteByExample="true" enableSelectByExample="true"--> 140 + enableDeleteByExample="true" enableSelectByExample="true"
141 -<!-- selectByExampleQueryId="true">--> 141 + selectByExampleQueryId="true">
142 -<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB_DETAIL.NEXTVAL FROM DUAL" />--> 142 + <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB_DETAIL.NEXTVAL FROM DUAL" />
143 -<!-- </table>--> 143 + </table>
144 -
145 -
146 144
147 <!-- <table tableName="T_BI_PORTCLEAR_EMAIL_MAPPING" domainObjectName="PortclearEmailMapping"--> 145 <!-- <table tableName="T_BI_PORTCLEAR_EMAIL_MAPPING" domainObjectName="PortclearEmailMapping"-->
148 <!-- enableCountByExample="true" enableUpdateByExample="true"--> 146 <!-- enableCountByExample="true" enableUpdateByExample="true"-->
...@@ -169,12 +167,12 @@ ...@@ -169,12 +167,12 @@
169 <!-- selectByExampleQueryId="true">--> 167 <!-- selectByExampleQueryId="true">-->
170 <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL" />--> 168 <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL" />-->
171 <!-- </table>--> 169 <!-- </table>-->
172 - <table schema="ICLEARIMP" tableName="T_SYS_PARAM_CONFIG" domainObjectName="ParamConfig" 170 +<!-- <table schema="ICLEARIMP" tableName="T_SYS_PARAM_CONFIG" domainObjectName="ParamConfig"-->
173 - enableCountByExample="true" enableUpdateByExample="true" 171 +<!-- enableCountByExample="true" enableUpdateByExample="true"-->
174 - enableDeleteByExample="true" enableSelectByExample="true" 172 +<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
175 - selectByExampleQueryId="true"> 173 +<!-- selectByExampleQueryId="true">-->
176 - <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL" /> 174 +<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL" />-->
177 - </table> 175 +<!-- </table>-->
178 <!-- <table tableName="T_SYS_PRIVILEGE" domainObjectName="Privilege"--> 176 <!-- <table tableName="T_SYS_PRIVILEGE" domainObjectName="Privilege"-->
179 <!-- enableCountByExample="true" enableUpdateByExample="true"--> 177 <!-- enableCountByExample="true" enableUpdateByExample="true"-->
180 <!-- enableDeleteByExample="true" enableSelectByExample="true"--> 178 <!-- enableDeleteByExample="true" enableSelectByExample="true"-->
...@@ -193,12 +191,12 @@ ...@@ -193,12 +191,12 @@
193 <!-- selectByExampleQueryId="true">--> 191 <!-- selectByExampleQueryId="true">-->
194 <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_ROLE_PRIVILEGE.NEXTVAL FROM DUAL" />--> 192 <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_ROLE_PRIVILEGE.NEXTVAL FROM DUAL" />-->
195 <!-- </table>--> 193 <!-- </table>-->
196 - <table schema="ICLEARIMP" tableName="T_SYS_USER" domainObjectName="User" 194 +<!-- <table schema="ICLEARIMP" tableName="T_SYS_USER" domainObjectName="User"-->
197 - enableCountByExample="true" enableUpdateByExample="true" 195 +<!-- enableCountByExample="true" enableUpdateByExample="true"-->
198 - enableDeleteByExample="true" enableSelectByExample="true" 196 +<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
199 - selectByExampleQueryId="true"> 197 +<!-- selectByExampleQueryId="true">-->
200 - <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" /> 198 +<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" />-->
201 - </table> 199 +<!-- </table>-->
202 <!-- <table schema="ICLEARIMP" tableName="T_SYS_USER_ROLE" domainObjectName="UserRole"--> 200 <!-- <table schema="ICLEARIMP" tableName="T_SYS_USER_ROLE" domainObjectName="UserRole"-->
203 <!-- enableCountByExample="true" enableUpdateByExample="true"--> 201 <!-- enableCountByExample="true" enableUpdateByExample="true"-->
204 <!-- enableDeleteByExample="true" enableSelectByExample="true"--> 202 <!-- enableDeleteByExample="true" enableSelectByExample="true"-->
......
...@@ -2,6 +2,8 @@ package com.fedex.connect.common.dependencies.aspect; ...@@ -2,6 +2,8 @@ package com.fedex.connect.common.dependencies.aspect;
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.contants.AnnotationConstants; 4 import com.fedex.connect.common.dependencies.contants.AnnotationConstants;
5 +import com.fedex.connect.common.dependencies.contants.BaseConstants;
6 +import com.fedex.connect.common.dependencies.contants.SystemDefaultUserConstants;
5 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 7 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
6 import com.fedex.connect.common.dependencies.enums.BaseResponseCode; 8 import com.fedex.connect.common.dependencies.enums.BaseResponseCode;
7 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; 9 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
...@@ -10,6 +12,7 @@ import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; ...@@ -10,6 +12,7 @@ import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
10 import com.fedex.connect.common.dependencies.util.CurrentUserInfo; 12 import com.fedex.connect.common.dependencies.util.CurrentUserInfo;
11 import com.fedex.connect.common.dependencies.util.JsonUtils; 13 import com.fedex.connect.common.dependencies.util.JsonUtils;
12 import com.fedex.connect.common.model.log.Operation; 14 import com.fedex.connect.common.model.log.Operation;
15 +import com.fedex.connect.common.model.log.OperationWithBLOBs;
13 import com.fedex.connect.common.model.sys.User; 16 import com.fedex.connect.common.model.sys.User;
14 import org.aspectj.lang.JoinPoint; 17 import org.aspectj.lang.JoinPoint;
15 import org.aspectj.lang.ProceedingJoinPoint; 18 import org.aspectj.lang.ProceedingJoinPoint;
...@@ -119,7 +122,7 @@ public class OperationLogAspect { ...@@ -119,7 +122,7 @@ public class OperationLogAspect {
119 String describe = localeMessageUtil.getMessage(operationMethodLog.describe()); 122 String describe = localeMessageUtil.getMessage(operationMethodLog.describe());
120 String method = request.getMethod(); 123 String method = request.getMethod();
121 124
122 - Operation log = new Operation(); 125 + OperationWithBLOBs log = new OperationWithBLOBs();
123 log.setRequestParameters(requestParameters); 126 log.setRequestParameters(requestParameters);
124 log.setUrl(url); 127 log.setUrl(url);
125 log.setDescribe(describe); 128 log.setDescribe(describe);
...@@ -128,6 +131,7 @@ public class OperationLogAspect { ...@@ -128,6 +131,7 @@ public class OperationLogAspect {
128 131
129 //获取用户信息。 login,logout,oss登录特殊处理 132 //获取用户信息。 login,logout,oss登录特殊处理
130 User user = CurrentUserInfo.getUser(); 133 User user = CurrentUserInfo.getUser();
134 + log.setLoginName(user.getLoginName());
131 log.setUserId(user.getId()); 135 log.setUserId(user.getId());
132 log.setUserName(user.getUserName()); 136 log.setUserName(user.getUserName());
133 //请求时间 137 //请求时间
...@@ -172,7 +176,12 @@ public class OperationLogAspect { ...@@ -172,7 +176,12 @@ public class OperationLogAspect {
172 log.setResult(resultJson); 176 log.setResult(resultJson);
173 } 177 }
174 //基础字段赋值 178 //基础字段赋值
175 - AssignmentFieldUtils.assignmentTableBaseField(log); 179 + log.setCreateTime(new Date());
180 + log.setCreateUserId(SystemDefaultUserConstants.SYSTEM_USER_KEYS.ID);
181 + log.setCreateUserName(SystemDefaultUserConstants.SYSTEM_USER_KEYS.USER_NAME);
182 + log.setModifyTime(new Date());
183 + log.setModifyUserId(SystemDefaultUserConstants.SYSTEM_USER_KEYS.ID);
184 + log.setModifyUserName(SystemDefaultUserConstants.SYSTEM_USER_KEYS.USER_NAME);
176 // 日志插入数据库 185 // 日志插入数据库
177 logger.info("插入日志:" + JsonUtils.objectToJson(log)); 186 logger.info("插入日志:" + JsonUtils.objectToJson(log));
178 operationRepository.insert(log); 187 operationRepository.insert(log);
......
...@@ -129,7 +129,7 @@ public class JwtAuthorizationFilter extends BasicAuthenticationFilter { ...@@ -129,7 +129,7 @@ public class JwtAuthorizationFilter extends BasicAuthenticationFilter {
129 response.setHeader("Token", newToken);*/ 129 response.setHeader("Token", newToken);*/
130 } catch (ExpiredJwtException ee) { 130 } catch (ExpiredJwtException ee) {
131 //已经过期了,直接踢 131 //已经过期了,直接踢
132 - logger.error("CODE : {} requestURL:{},reason:{}",BaseResponseCode.MESSAGE_CODE_10004.getCode() , request.getRequestURL(),"ExpiredJwtException ",ee); 132 + logger.error("CODE : {} requestURL:{},reason:{}",BaseResponseCode.MESSAGE_CODE_10005.getCode() , request.getRequestURL(),"ExpiredJwtException ",ee);
133 Claims claims = ee.getClaims(); 133 Claims claims = ee.getClaims();
134 String id = claims.getId(); 134 String id = claims.getId();
135 Map<String, Object> result = new HashMap<>(); 135 Map<String, Object> result = new HashMap<>();
......
...@@ -20,7 +20,7 @@ public class BasicController { ...@@ -20,7 +20,7 @@ public class BasicController {
20 throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10003.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10003.getMsg()),e); 20 throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10003.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10003.getMsg()),e);
21 } 21 }
22 if (user == null) { 22 if (user == null) {
23 - throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10006.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10006.getMsg())); 23 + throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10005.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10005.getMsg()));
24 } 24 }
25 return user; 25 return user;
26 } 26 }
......
...@@ -3,16 +3,19 @@ package com.fedex.connect.common.dependencies.config; ...@@ -3,16 +3,19 @@ package com.fedex.connect.common.dependencies.config;
3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 import com.fedex.connect.common.dependencies.exception.BaseException; 4 import com.fedex.connect.common.dependencies.exception.BaseException;
5 import com.fedex.connect.common.dependencies.exception.OpErrorException; 5 import com.fedex.connect.common.dependencies.exception.OpErrorException;
6 +import lombok.extern.slf4j.Slf4j;
6 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 7 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
7 import org.springframework.web.bind.annotation.ExceptionHandler; 8 import org.springframework.web.bind.annotation.ExceptionHandler;
8 import org.springframework.web.bind.annotation.RestControllerAdvice; 9 import org.springframework.web.bind.annotation.RestControllerAdvice;
9 10
11 +@Slf4j
10 @ConditionalOnProperty(prefix = "common.exception-advice-webconfig", name = "enable", havingValue = "true") 12 @ConditionalOnProperty(prefix = "common.exception-advice-webconfig", name = "enable", havingValue = "true")
11 @RestControllerAdvice 13 @RestControllerAdvice
12 public class ControllerExceptionAdvice { 14 public class ControllerExceptionAdvice {
13 15
14 @ExceptionHandler(Exception.class) 16 @ExceptionHandler(Exception.class)
15 public ResponseVo exceptionHandler(Exception ex) { 17 public ResponseVo exceptionHandler(Exception ex) {
18 + log.error(ex.getMessage(),ex);
16 ResponseVo res = new ResponseVo(); 19 ResponseVo res = new ResponseVo();
17 res.setSuccess(false); 20 res.setSuccess(false);
18 res.setCode(599); 21 res.setCode(599);
...@@ -22,6 +25,7 @@ public class ControllerExceptionAdvice { ...@@ -22,6 +25,7 @@ public class ControllerExceptionAdvice {
22 25
23 @ExceptionHandler(BaseException.class) 26 @ExceptionHandler(BaseException.class)
24 public ResponseVo baseExceptionHandler(BaseException ex) { 27 public ResponseVo baseExceptionHandler(BaseException ex) {
28 + log.error(ex.getMessage(),ex);
25 ResponseVo res = new ResponseVo(); 29 ResponseVo res = new ResponseVo();
26 res.setSuccess(false); 30 res.setSuccess(false);
27 res.setCode(ex.getCode().intValue()); 31 res.setCode(ex.getCode().intValue());
...@@ -31,6 +35,7 @@ public class ControllerExceptionAdvice { ...@@ -31,6 +35,7 @@ public class ControllerExceptionAdvice {
31 35
32 @ExceptionHandler(OpErrorException.class) 36 @ExceptionHandler(OpErrorException.class)
33 public ResponseVo opErrorExceptionHandler(OpErrorException ex) { 37 public ResponseVo opErrorExceptionHandler(OpErrorException ex) {
38 + log.error(ex.getMessage(),ex);
34 ResponseVo res = new ResponseVo(); 39 ResponseVo res = new ResponseVo();
35 res.setSuccess(false); 40 res.setSuccess(false);
36 res.setCode(ex.getCode()); 41 res.setCode(ex.getCode());
......
...@@ -70,7 +70,7 @@ public interface BaseSeparatorConstants { ...@@ -70,7 +70,7 @@ public interface BaseSeparatorConstants {
70 String SEPARATOR_ASTERISK = "*"; 70 String SEPARATOR_ASTERISK = "*";
71 71
72 /** 72 /**
73 - * @Description 星号 73 + * @Description 反斜杠
74 * @Author mt 74 * @Author mt
75 * @Date 2024-11-11 75 * @Date 2024-11-11
76 */ 76 */
......
1 package com.fedex.connect.common.dependencies.data.bo; 1 package com.fedex.connect.common.dependencies.data.bo;
2 2
3 +import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
3 import com.fedex.connect.common.dependencies.util.DateUtil; 4 import com.fedex.connect.common.dependencies.util.DateUtil;
4 import com.fedex.connect.common.model.sys.RedisSlab; 5 import com.fedex.connect.common.model.sys.RedisSlab;
5 6
...@@ -13,11 +14,17 @@ public class RedisSlabBo { ...@@ -13,11 +14,17 @@ public class RedisSlabBo {
13 dao.setRedisMsg(value); 14 dao.setRedisMsg(value);
14 dao.setValidDuration(validDuration != 0 ? Long.valueOf(validDuration) : 0L); 15 dao.setValidDuration(validDuration != 0 ? Long.valueOf(validDuration) : 0L);
15 dao.setDisTime(DateUtil.getHoursAgoTime(validDuration)); 16 dao.setDisTime(DateUtil.getHoursAgoTime(validDuration));
16 - dao.setCreateTime(new Date()); 17 + try {
18 + /**
19 + * 初始化表基础字段
20 + */
21 + AssignmentFieldUtils.assignmentTableBaseField(dao);
22 + }catch(Exception ex){
23 + ex.printStackTrace();
24 + }
17 return dao; 25 return dao;
18 } 26 }
19 27
20 -
21 /** 28 /**
22 * ID自增 29 * ID自增
23 */ 30 */
......
...@@ -12,7 +12,6 @@ public enum BaseResponseCode { ...@@ -12,7 +12,6 @@ public enum BaseResponseCode {
12 MESSAGE_CODE_10003(10003,"system_exception_10003"), 12 MESSAGE_CODE_10003(10003,"system_exception_10003"),
13 MESSAGE_CODE_10004(10004,"system_exception_10004"), 13 MESSAGE_CODE_10004(10004,"system_exception_10004"),
14 MESSAGE_CODE_10005(10005,"system_exception_10005"), 14 MESSAGE_CODE_10005(10005,"system_exception_10005"),
15 - MESSAGE_CODE_10006(10006,"system_exception_10006"),
16 ; 15 ;
17 private Integer code; 16 private Integer code;
18 private String msg; 17 private String msg;
......
...@@ -65,4 +65,14 @@ public enum AttachmentBizTypeEnum { ...@@ -65,4 +65,14 @@ public enum AttachmentBizTypeEnum {
65 } 65 }
66 return null; // 如果没有找到匹配的 code,返回 null 66 return null; // 如果没有找到匹配的 code,返回 null
67 } 67 }
68 +
69 + public static String getCodeByExt1(String ext1) {
70 + for (AttachmentBizTypeEnum type : AttachmentBizTypeEnum.values()) {
71 + if (type.getExt1().equals(ext1)) {
72 + return type.getCode();
73 + }
74 + }
75 + return null; // 如果没有找到匹配的 ext1,返回 null
76 + }
77 +
68 } 78 }
......
...@@ -12,6 +12,7 @@ public enum EmailTypeEnum { ...@@ -12,6 +12,7 @@ public enum EmailTypeEnum {
12 PUSH_CON_FILE("emailType_01","Push Pre-Customs Clearance Files","推送预清关文件"), 12 PUSH_CON_FILE("emailType_01","Push Pre-Customs Clearance Files","推送预清关文件"),
13 NOTIFICATION_SENDER("emailType_02","Remind Sender","提醒发件人"), 13 NOTIFICATION_SENDER("emailType_02","Remind Sender","提醒发件人"),
14 SEND_FAILED_EMAIL("emailType_03", "Error Email Alert","错误邮件预警"), 14 SEND_FAILED_EMAIL("emailType_03", "Error Email Alert","错误邮件预警"),
15 + SEND_OB("ob", "ob","推送ob"),
15 16
16 ; 17 ;
17 18
...@@ -31,10 +32,10 @@ public enum EmailTypeEnum { ...@@ -31,10 +32,10 @@ public enum EmailTypeEnum {
31 } 32 }
32 33
33 // 获取 enMsg 根据 code 34 // 获取 enMsg 根据 code
34 - public static String getEnMsgByCode(String code) { 35 + public static String getMsgByCode(String code) {
35 for (EmailTypeEnum emailType : EmailTypeEnum.values()) { 36 for (EmailTypeEnum emailType : EmailTypeEnum.values()) {
36 if (emailType.code.equals(code)) { 37 if (emailType.code.equals(code)) {
37 - return emailType.enMsg; 38 + return emailType.msg;
38 } 39 }
39 } 40 }
40 return null; // 如果找不到对应的 code,返回 null 41 return null; // 如果找不到对应的 code,返回 null
......
...@@ -2,7 +2,7 @@ package com.fedex.connect.common.dependencies.enums.sys; ...@@ -2,7 +2,7 @@ package com.fedex.connect.common.dependencies.enums.sys;
2 2
3 public enum UserTypeEnum { 3 public enum UserTypeEnum {
4 LOCAL("userType_01","LOCAL","本地账号"), 4 LOCAL("userType_01","LOCAL","本地账号"),
5 - FCL("userType_02","FCL","FCL账号"); 5 + FCL("userType_02","fedex.com User Account","FCL账号");
6 6
7 private String code; 7 private String code;
8 private String enMsg; 8 private String enMsg;
......
...@@ -2,14 +2,13 @@ package com.fedex.connect.common.dependencies.repository.base; ...@@ -2,14 +2,13 @@ package com.fedex.connect.common.dependencies.repository.base;
2 2
3 import com.fedex.connect.common.dao.bi.DictionaryEntriesMapper; 3 import com.fedex.connect.common.dao.bi.DictionaryEntriesMapper;
4 import com.fedex.connect.common.dao.log.OperationMapper; 4 import com.fedex.connect.common.dao.log.OperationMapper;
5 -import com.fedex.connect.common.dao.sys.ParamConfigMapper;
6 import com.fedex.connect.common.dao.sys.RedisSlabMapper; 5 import com.fedex.connect.common.dao.sys.RedisSlabMapper;
7 -import com.fedex.connect.common.dependencies.repository.dao.UserMapperExt; 6 +import com.fedex.connect.common.dependencies.repository.dao.UserBaseMapper;
8 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
9 8
10 public class BaseDao { 9 public class BaseDao {
11 @Autowired 10 @Autowired
12 - protected UserMapperExt userMapperExt; 11 + protected UserBaseMapper userBaseMapper;
13 @Autowired 12 @Autowired
14 protected RedisSlabMapper redisSlabMapper; 13 protected RedisSlabMapper redisSlabMapper;
15 @Autowired 14 @Autowired
......
...@@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Param; ...@@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Param;
6 import org.apache.ibatis.annotations.Select; 6 import org.apache.ibatis.annotations.Select;
7 7
8 @Mapper 8 @Mapper
9 -public interface UserMapperExt { 9 +public interface UserBaseMapper {
10 @Select( "<script>" + 10 @Select( "<script>" +
11 "select * from T_SYS_USER where ID = #{id} AND STATUS = 1 " + 11 "select * from T_SYS_USER where ID = #{id} AND STATUS = 1 " +
12 "</script>") 12 "</script>")
......
...@@ -5,6 +5,6 @@ import com.fedex.connect.common.model.bi.DictionaryEntriesExample; ...@@ -5,6 +5,6 @@ import com.fedex.connect.common.model.bi.DictionaryEntriesExample;
5 5
6 import java.util.List; 6 import java.util.List;
7 7
8 -public interface IDictionaryEntriesRepository { 8 +public interface IDictionaryEntriesBaseRepository {
9 List<DictionaryEntries> findAll(DictionaryEntriesExample example); 9 List<DictionaryEntries> findAll(DictionaryEntriesExample example);
10 } 10 }
......
...@@ -2,7 +2,7 @@ package com.fedex.connect.common.dependencies.repository.repo.bi.impl; ...@@ -2,7 +2,7 @@ package com.fedex.connect.common.dependencies.repository.repo.bi.impl;
2 2
3 import com.fedex.connect.common.dependencies.contants.DatabaseConstants; 3 import com.fedex.connect.common.dependencies.contants.DatabaseConstants;
4 import com.fedex.connect.common.dependencies.repository.base.BaseDao; 4 import com.fedex.connect.common.dependencies.repository.base.BaseDao;
5 -import com.fedex.connect.common.dependencies.repository.repo.bi.IDictionaryEntriesRepository; 5 +import com.fedex.connect.common.dependencies.repository.repo.bi.IDictionaryEntriesBaseRepository;
6 import com.fedex.connect.common.model.bi.DictionaryEntries; 6 import com.fedex.connect.common.model.bi.DictionaryEntries;
7 import com.fedex.connect.common.model.bi.DictionaryEntriesExample; 7 import com.fedex.connect.common.model.bi.DictionaryEntriesExample;
8 import org.springframework.stereotype.Repository; 8 import org.springframework.stereotype.Repository;
...@@ -10,7 +10,7 @@ import org.springframework.stereotype.Repository; ...@@ -10,7 +10,7 @@ import org.springframework.stereotype.Repository;
10 import java.util.List; 10 import java.util.List;
11 11
12 @Repository 12 @Repository
13 -public class DictionaryEntriesImpl extends BaseDao implements IDictionaryEntriesRepository { 13 +public class DictionaryEntriesBaseImpl extends BaseDao implements IDictionaryEntriesBaseRepository {
14 14
15 @Override 15 @Override
16 public List<DictionaryEntries> findAll(DictionaryEntriesExample example) { 16 public List<DictionaryEntries> findAll(DictionaryEntriesExample example) {
......
1 package com.fedex.connect.common.dependencies.repository.repo.log; 1 package com.fedex.connect.common.dependencies.repository.repo.log;
2 2
3 -import com.fedex.connect.common.model.log.Operation; 3 +import com.fedex.connect.common.model.log.OperationWithBLOBs;
4 4
5 /** 5 /**
6 * @Author mt 6 * @Author mt
...@@ -8,5 +8,5 @@ import com.fedex.connect.common.model.log.Operation; ...@@ -8,5 +8,5 @@ import com.fedex.connect.common.model.log.Operation;
8 * @Date 2024/11/6 8 * @Date 2024/11/6
9 */ 9 */
10 public interface IOperationRepository { 10 public interface IOperationRepository {
11 - void insert(Operation record); 11 + void insert(OperationWithBLOBs record);
12 } 12 }
......
...@@ -2,7 +2,7 @@ package com.fedex.connect.common.dependencies.repository.repo.log.impl; ...@@ -2,7 +2,7 @@ package com.fedex.connect.common.dependencies.repository.repo.log.impl;
2 2
3 import com.fedex.connect.common.dependencies.repository.base.BaseDao; 3 import com.fedex.connect.common.dependencies.repository.base.BaseDao;
4 import com.fedex.connect.common.dependencies.repository.repo.log.IOperationRepository; 4 import com.fedex.connect.common.dependencies.repository.repo.log.IOperationRepository;
5 -import com.fedex.connect.common.model.log.Operation; 5 +import com.fedex.connect.common.model.log.OperationWithBLOBs;
6 import org.springframework.stereotype.Repository; 6 import org.springframework.stereotype.Repository;
7 7
8 /** 8 /**
...@@ -12,7 +12,7 @@ import org.springframework.stereotype.Repository; ...@@ -12,7 +12,7 @@ import org.springframework.stereotype.Repository;
12 */ 12 */
13 @Repository 13 @Repository
14 public class OperationRepositoryImpl extends BaseDao implements IOperationRepository { 14 public class OperationRepositoryImpl extends BaseDao implements IOperationRepository {
15 - public void insert(Operation record){ 15 + public void insert(OperationWithBLOBs record){
16 operationMapper.insert(record); 16 operationMapper.insert(record);
17 } 17 }
18 } 18 }
......
...@@ -5,7 +5,7 @@ import com.fedex.connect.common.model.sys.RedisSlabExample; ...@@ -5,7 +5,7 @@ import com.fedex.connect.common.model.sys.RedisSlabExample;
5 5
6 import java.util.List; 6 import java.util.List;
7 7
8 -public interface IRedisSlabRepository { 8 +public interface IRedisSlabBaseRepository {
9 int insert(RedisSlab record); 9 int insert(RedisSlab record);
10 10
11 List<RedisSlab> selectByExample(RedisSlabExample example); 11 List<RedisSlab> selectByExample(RedisSlabExample example);
......
...@@ -2,6 +2,6 @@ package com.fedex.connect.common.dependencies.repository.repo.sys; ...@@ -2,6 +2,6 @@ package com.fedex.connect.common.dependencies.repository.repo.sys;
2 2
3 import com.fedex.connect.common.model.sys.User; 3 import com.fedex.connect.common.model.sys.User;
4 4
5 -public interface IUserRepository { 5 +public interface IUserBaseRepository {
6 User findOne(Long id); 6 User findOne(Long id);
7 } 7 }
...\ No newline at end of file ...\ No newline at end of file
......
1 package com.fedex.connect.common.dependencies.repository.repo.sys.impl; 1 package com.fedex.connect.common.dependencies.repository.repo.sys.impl;
2 2
3 import com.fedex.connect.common.dependencies.repository.base.BaseDao; 3 import com.fedex.connect.common.dependencies.repository.base.BaseDao;
4 -import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabRepository; 4 +import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabBaseRepository;
5 import com.fedex.connect.common.model.sys.RedisSlab; 5 import com.fedex.connect.common.model.sys.RedisSlab;
6 import com.fedex.connect.common.model.sys.RedisSlabExample; 6 import com.fedex.connect.common.model.sys.RedisSlabExample;
7 import org.springframework.stereotype.Repository; 7 import org.springframework.stereotype.Repository;
...@@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; ...@@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository;
9 import java.util.List; 9 import java.util.List;
10 10
11 @Repository 11 @Repository
12 -public class RedisSlabRepositoryImpl extends BaseDao implements IRedisSlabRepository { 12 +public class RedisSlabBaseRepositoryImpl extends BaseDao implements IRedisSlabBaseRepository {
13 13
14 @Override 14 @Override
15 public int insert(RedisSlab record) { 15 public int insert(RedisSlab record) {
......
1 package com.fedex.connect.common.dependencies.repository.repo.sys.impl; 1 package com.fedex.connect.common.dependencies.repository.repo.sys.impl;
2 2
3 import com.fedex.connect.common.dependencies.repository.base.BaseDao; 3 import com.fedex.connect.common.dependencies.repository.base.BaseDao;
4 -import com.fedex.connect.common.dependencies.repository.repo.sys.IUserRepository; 4 +import com.fedex.connect.common.dependencies.repository.repo.sys.IUserBaseRepository;
5 import com.fedex.connect.common.model.sys.User; 5 import com.fedex.connect.common.model.sys.User;
6 import org.springframework.stereotype.Repository; 6 import org.springframework.stereotype.Repository;
7 7
8 @Repository 8 @Repository
9 -public class UserRepositoryImpl extends BaseDao implements IUserRepository { 9 +public class UserBaseRepositoryImpl extends BaseDao implements IUserBaseRepository {
10 10
11 @Override 11 @Override
12 public User findOne(Long id){ 12 public User findOne(Long id){
13 - return this.userMapperExt.findOne(id); 13 + return this.userBaseMapper.findOne(id);
14 } 14 }
15 } 15 }
......
1 package com.fedex.connect.common.dependencies.service.base; 1 package com.fedex.connect.common.dependencies.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.IRedisSlabBaseRepository;
4 -import com.fedex.connect.common.dependencies.repository.repo.bi.IDictionaryEntriesRepository; 4 +import com.fedex.connect.common.dependencies.repository.repo.bi.IDictionaryEntriesBaseRepository;
5 import org.springframework.beans.factory.annotation.Autowired; 5 import org.springframework.beans.factory.annotation.Autowired;
6 6
7 /** 7 /**
...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
11 */ 11 */
12 public class BaseService { 12 public class BaseService {
13 @Autowired 13 @Autowired
14 - protected IRedisSlabRepository redisSlabRepository; 14 + protected IRedisSlabBaseRepository redisSlabRepository;
15 @Autowired 15 @Autowired
16 - protected IDictionaryEntriesRepository dictionaryEntriesRepository; 16 + protected IDictionaryEntriesBaseRepository dictionaryEntriesRepository;
17 } 17 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -28,17 +28,18 @@ public class DuplicateEmailTemplate implements EmailTemplate { ...@@ -28,17 +28,18 @@ public class DuplicateEmailTemplate implements EmailTemplate {
28 } 28 }
29 29
30 interface CLEARANCE_TITLE{ 30 interface CLEARANCE_TITLE{
31 - String TITLE = "Sender Reminder:"; 31 + String TITLE = "Notification: declaration documents submitted ({0})";
32 } 32 }
33 33
34 interface CLEARANCE_BODY{ 34 interface CLEARANCE_BODY{
35 - String DESCRIPTION = "<p>Sender Reminder: The task will poll every {0} minutes after the system starts.</p>\n"; 35 + String DESCRIPTION = "<p>This email is a reminder email, please do not reply!</p>\n";
36 36
37 String BODY = "<div><div style='margin-left:4%;'>" + 37 String BODY = "<div><div style='margin-left:4%;'>" +
38 - "<p align='center'><img src='{0}'></p>" + 38 + "<p>FedEx iClear Connect System Notification:</p>" +
39 - "<p align='center'><img src='{1}'></p>" + 39 + "<p>&nbsp;&nbsp;&nbsp;&nbsp;Please note that the declaration documents of waybill with tracking number {0} has been submitted by someone else!</p>" +
40 - "<p>Import Pre-Clearance System Notification:</p>" + 40 + "</font><br/><br/>" +
41 - "<p>&nbsp;&nbsp;&nbsp;&nbsp;{2}The consignment has been created and uploaded by another user.</p>" + 41 + "<div style=color:#808080;font-style:Arial;font-size:14px;margin: auto;margin-bottom: 5px;>" +
42 - "</font><br/><br/>"; 42 + "{1}\n" +
43 + "</div>";
43 } 44 }
44 } 45 }
......
...@@ -32,28 +32,27 @@ public class SendFailedEmailTemplate implements EmailTemplate { ...@@ -32,28 +32,27 @@ public class SendFailedEmailTemplate implements EmailTemplate {
32 32
33 33
34 interface FAILED_EMAIL_TITLE{ 34 interface FAILED_EMAIL_TITLE{
35 - String TITLE = "Failure Alert"; 35 + String TITLE = "接口调用失败详情";
36 } 36 }
37 37
38 interface FAILED_EMAIL_BODY{ 38 interface FAILED_EMAIL_BODY{
39 - String DESCRIPTION = "<p>1.[File Push] Task: The system performs a polling every {0} minutes after startup.</p>\n" + 39 + String DESCRIPTION = "<p>1.【文件推送】任务,系统启动后每{0}分钟轮巡一次。</p>\n" +
40 - " <p>2.[Push Pre-Clearance File] Task: The system performs a polling every {1} minutes after startup.</p>\n" + 40 + " <p>2.【推送预清关文件】任务,系统启动后每{1}分钟轮巡一次。</p>\n" +
41 - " <p>3.[Remind Sender] Task: The system performs a polling every {2} minutes after startup.</p>\n" + 41 + " <p>3.【提醒发件人】任务,系统启动后每{2}分钟轮巡一次。</p>\n" +
42 - " <p>Note: Email Sending Mechanism:</p>\n" + 42 + " <p>备注:邮件发送机制:</p>\n" +
43 - " <p>This alert email task is executed every {3} minutes after the system starts. If any of the three scheduled tasks mentioned above have a final determination of failed records exceeding {4} for the day, an email notification will be automatically sent to FedEx IT. Each interface will display the latest {5} failed tracking numbers, the total number of calls made during the day, and the total number of failed calls for the day.</p>\n" + 43 + " <p>该预警邮件任务,系统启动后每30分钟执行一次,当日上述3个定时任务,有任何一个任务的最终判定为失败的记录数量大于5,则自动发送邮件通知FedEX IT,每个接口显示最新10条失败运单号、当日调用总次数、当日调用失败总次数。</p>\n" ;
44 - " <p style=\"font-size:10px;\">(Note: All task-related numbers can be adjusted in the system configuration interface.)</p>";
45 44
46 String TABLE = "<table style=\"width: 100%;table-layout: fixed;padding: 20px;width: 100%;border-collapse: collapse;\">\n" + 45 String TABLE = "<table style=\"width: 100%;table-layout: fixed;padding: 20px;width: 100%;border-collapse: collapse;\">\n" +
47 "<tr>\n" + 46 "<tr>\n" +
48 "<td style=\"border: 0px;text-align: left;padding: 8px;\">\n" + 47 "<td style=\"border: 0px;text-align: left;padding: 8px;\">\n" +
49 "<div style=\"margin: auto;padding: 20px;\">\n" + 48 "<div style=\"margin: auto;padding: 20px;\">\n" +
50 - "<h2 style=\"text-align: center;\">Task Push Failure Details</h2>\n" + 49 + "<h2 style=\"text-align: center;\">接口调用失败详情</h2>\n" +
51 "<table style=\"width: 100%;border-collapse: collapse;\">\n" + 50 "<table style=\"width: 100%;border-collapse: collapse;\">\n" +
52 "<tr>\n" + 51 "<tr>\n" +
53 - "<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">Task Name</th>\n" + 52 + "<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">任务名称</th>\n" +
54 - "<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">Failed Tracking Number</th>\n" + 53 + "<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">失败的运单号</th>\n" +
55 - "<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">Total Number</th>\n" + 54 + "<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">总数</th>\n" +
56 - "<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">Failure Count</th>\n" + 55 + "<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">失败数量</th>\n" +
57 "</tr>\n" + 56 "</tr>\n" +
58 "{0}\n" + 57 "{0}\n" +
59 "</table>\n" + 58 "</table>\n" +
......
1 package com.fedex.connect.common.dependencies.util; 1 package com.fedex.connect.common.dependencies.util;
2 2
3 import com.fedex.connect.common.dependencies.annotation.BaseNotBlank; 3 import com.fedex.connect.common.dependencies.annotation.BaseNotBlank;
4 +import com.fedex.connect.common.dependencies.exception.OpErrorException;
4 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; 5 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
5 import org.springframework.beans.factory.annotation.Autowired; 6 import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.stereotype.Component; 7 import org.springframework.stereotype.Component;
...@@ -54,8 +55,10 @@ public class BaseValidateUtils { ...@@ -54,8 +55,10 @@ public class BaseValidateUtils {
54 if(errorList.size() > 0){ 55 if(errorList.size() > 0){
55 responseUtils.fail(codeEnum,errorList); 56 responseUtils.fail(codeEnum,errorList);
56 } 57 }
58 + }catch(OpErrorException ex){
59 + throw ex;
57 }catch(Exception ex){ 60 }catch(Exception ex){
58 - responseUtils.fail(codeEnum); 61 + responseUtils.fail(codeEnum,ex);
59 } 62 }
60 } 63 }
61 } 64 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -24,6 +24,7 @@ public class DateUtil { ...@@ -24,6 +24,7 @@ public class DateUtil {
24 public static final String PATTERN_DATE_TIME_ORACLE = "yyyy-MM-dd hh:mi:ss"; 24 public static final String PATTERN_DATE_TIME_ORACLE = "yyyy-MM-dd hh:mi:ss";
25 public static final String PATTERN_DATE_TIME_MS = "yyyy-mm-dd hh24:mi:ss"; 25 public static final String PATTERN_DATE_TIME_MS = "yyyy-mm-dd hh24:mi:ss";
26 public static final String PATTERN_yyyyMMddHHmmss = "yyyyMMddHHmmss"; 26 public static final String PATTERN_yyyyMMddHHmmss = "yyyyMMddHHmmss";
27 + public static final String YYYYMMDDHH24MMSSSSS = "yyyyMMddHHmmssSSS";
27 28
28 private static SimpleDateFormat dateFormat = new SimpleDateFormat(); 29 private static SimpleDateFormat dateFormat = new SimpleDateFormat();
29 30
...@@ -47,6 +48,19 @@ public class DateUtil { ...@@ -47,6 +48,19 @@ public class DateUtil {
47 dateFormat.applyPattern(PATTERN_DATE_TIME); 48 dateFormat.applyPattern(PATTERN_DATE_TIME);
48 return dateFormat.format(date); 49 return dateFormat.format(date);
49 } 50 }
51 +
52 + /**
53 + * 用默认格式格式化日期
54 + *
55 + * @param date
56 + * @return
57 + */
58 + public static String yyyyMMddHH24mmssSSS(Date date) {
59 + SimpleDateFormat dateFormat = new SimpleDateFormat();
60 + dateFormat.applyPattern(YYYYMMDDHH24MMSSSSS);
61 + return dateFormat.format(date);
62 + }
63 +
50 /** 64 /**
51 * 用指定格式格式化日期 65 * 用指定格式格式化日期
52 * 66 *
......
1 +package com.fedex.connect.common.dependencies.util;
2 +
3 +import org.apache.poi.util.IOUtils;
4 +import org.slf4j.Logger;
5 +import org.slf4j.LoggerFactory;
6 +import org.springframework.util.StreamUtils;
7 +import org.springframework.web.multipart.MultipartFile;
8 +
9 +import javax.servlet.http.HttpServletRequest;
10 +import javax.servlet.http.HttpServletResponse;
11 +import java.io.*;
12 +import java.net.URL;
13 +import java.net.URLConnection;
14 +import java.nio.file.*;
15 +import java.nio.file.attribute.BasicFileAttributes;
16 +import java.text.SimpleDateFormat;
17 +import java.util.Arrays;
18 +import java.util.Date;
19 +
20 +//import org.junit.platform.commons.util.StringUtils;
21 +
22 +/**
23 + * Created by liyang on 2017/4/22.
24 + */
25 +public class FileUtil {
26 +
27 + private static Logger log= LoggerFactory.getLogger(FileUtil.class);
28 +
29 +
30 + private static final int BUFFER_SIZE = 16 * 1024;
31 +
32 + public static final String SIGN = "/";
33 +
34 + private static final SimpleDateFormat DATE_FORMAT_YYYYMM = new SimpleDateFormat("yyyyMM");
35 + private static final SimpleDateFormat DATE_FORMAT_YYYYMMDDHHMMSSSSS = new SimpleDateFormat("yyyyMMdd_HHmmss_SSS");
36 +
37 +
38 + public static String getContentType(String fileName) {
39 + // 使用 URLConnection 根据文件名获取 MIME 类型
40 + String contentType = URLConnection.guessContentTypeFromName(fileName);
41 + if (contentType == null) {
42 + // 如果无法推测出 MIME 类型,则默认为 "application/octet-stream"
43 + contentType = "application/octet-stream";
44 + }
45 + return contentType;
46 + }
47 +
48 + /**
49 + * 文件上传到服务器
50 + *
51 + * @param file
52 + * @param updatePath
53 + * @param entityName
54 + * @return
55 + * @throws IOException
56 + */
57 + public static File fileUpload(MultipartFile file, String updatePath,
58 + String entityName) throws IOException {
59 + byte[] bytes = file.getBytes();
60 + if (bytes == null || bytes.length == 0) {
61 + return null;
62 + }
63 + if (updatePath.endsWith(SIGN)){
64 + updatePath = updatePath.substring(0, updatePath.lastIndexOf("SIGN"));
65 + }
66 + String finalTargetFolder = updatePath + SIGN + DATE_FORMAT_YYYYMM.format(new Date());
67 + File rootFolder = new File(finalTargetFolder);
68 + // 文件夹不存在,则创建文件夹
69 + if (!rootFolder.exists()) {
70 + rootFolder.mkdirs();
71 + }
72 + // 生成文件名
73 + String[] nameSplit = file.getOriginalFilename().split("\\.");
74 + File finalFile = new File(finalTargetFolder + SIGN + entityName + "_"
75 + + DATE_FORMAT_YYYYMMDDHHMMSSSSS.format(new Date()) + "."
76 + + nameSplit[nameSplit.length - 1]);
77 + // 写文件
78 + if (!file.isEmpty()) {
79 + file.transferTo(finalFile);
80 + }
81 + return finalFile;
82 + }
83 +
84 + /**
85 + * 文件上传到服务器
86 + *
87 + * @param file
88 + * @param updatePath
89 + * @param entityName
90 + * @param superAddition 追加目录
91 + * @return
92 + * @throws IOException
93 + */
94 + public static File fileUpload(MultipartFile file, String updatePath,
95 + String entityName, String superAddition) throws IOException {
96 +/* byte[] bytes = file.getBytes();
97 + if (bytes == null || bytes.length == 0) {
98 + return null;
99 + }*/
100 + if (updatePath.endsWith(SIGN)){
101 + updatePath = updatePath.substring(0, updatePath.lastIndexOf(SIGN));
102 + }
103 + String finalTargetFolder = updatePath + SIGN + DATE_FORMAT_YYYYMM.format(new Date()) + SIGN + superAddition;
104 + log.info(finalTargetFolder);
105 + File rootFolder = new File(finalTargetFolder);
106 + // 文件夹不存在,则创建文件夹
107 + if (!rootFolder.exists()) {
108 + rootFolder.mkdirs();
109 + }
110 + // 生成文件名
111 + String[] nameSplit = file.getOriginalFilename().split("\\.");
112 + File finalFile = new File(finalTargetFolder + SIGN + entityName + "_"
113 + + DATE_FORMAT_YYYYMMDDHHMMSSSSS.format(new Date()) + "."
114 + + nameSplit[nameSplit.length - 1]);
115 + log.info(Arrays.toString(nameSplit));
116 + // 写文件
117 + //if (!file.isEmpty()) {
118 + /*import org.apache.commons.io.FileUtils;
119 + FileUtils.copyInputStreamToFile(file.getInputStream(), finalFile);*/
120 + //具体参考:https://blog.csdn.net/canduecho/article/details/131598461
121 + try (OutputStream outputStream = new FileOutputStream(finalFile)) {
122 + StreamUtils.copy(file.getInputStream(), outputStream);
123 + }
124 + //}
125 + return finalFile;
126 + }
127 +
128 + /**
129 + * 下载
130 + *
131 + * @param request
132 + * @param response
133 + * @param storeName
134 + * @param contentType
135 + * @throws Exception
136 + */
137 + public static void download(HttpServletRequest request,
138 + HttpServletResponse response, String folder,
139 + String storeName, String contentType)
140 + throws Exception {
141 + response.setContentType("text/html;charset=UTF-8");
142 + request.setCharacterEncoding("UTF-8");
143 + BufferedInputStream bis = null;
144 + BufferedOutputStream bos = null;
145 +
146 + String downLoadPath = folder + storeName;
147 +
148 + long fileLength = new File(downLoadPath).length();
149 +
150 + response.setContentType(contentType);
151 + response.setHeader("Content-Length", String.valueOf(fileLength));
152 +
153 + bis = new BufferedInputStream(new FileInputStream(downLoadPath));
154 + bos = new BufferedOutputStream(response.getOutputStream());
155 + byte[] buff = new byte[2048];
156 + int bytesRead;
157 + while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
158 + bos.write(buff, 0, bytesRead);
159 + }
160 + bis.close();
161 + bos.close();
162 + }
163 +
164 + /**
165 + * 下载
166 + *
167 + * @param request
168 + * @param response
169 + * @param storeName
170 + * @param contentType
171 + * @param realName
172 + * @throws Exception
173 + */
174 + public static void download(HttpServletRequest request,
175 + HttpServletResponse response, String folder,
176 + String storeName, String contentType, String realName)
177 + throws Exception {
178 + response.setContentType("text/html;charset=UTF-8");
179 + request.setCharacterEncoding("UTF-8");
180 + BufferedInputStream bis = null;
181 + BufferedOutputStream bos = null;
182 +
183 + // String ctxPath = uploadFolder + SIGN;
184 + String downLoadPath = folder + storeName;
185 +
186 + long fileLength = new File(downLoadPath).length();
187 +
188 + response.setContentType(contentType);
189 + response.setHeader("Content-disposition", "attachment; filename=\""
190 + + new String(realName.getBytes("GBK"), "ISO8859-1") + "\"");
191 + response.setHeader("Content-Length", String.valueOf(fileLength));
192 +
193 + bis = new BufferedInputStream(new FileInputStream(downLoadPath));
194 + bos = new BufferedOutputStream(response.getOutputStream());
195 + byte[] buff = new byte[2048];
196 + int bytesRead;
197 + while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
198 + bos.write(buff, 0, bytesRead);
199 + }
200 + bis.close();
201 + bos.close();
202 + }
203 +
204 + /**
205 + * copy文件
206 + *
207 + * @param oldLoad 需要下载文件路径
208 + * @param newLoad 需要copy路径
209 + */
210 + public static void copyFile(String oldLoad, String newLoad, String fileNme) {
211 + InputStream inputStream = null;
212 + OutputStream outputStream = null;
213 + try {
214 + File rootFolder = new File(newLoad);
215 + //文件夹不存在,则创建文件夹
216 + if (!rootFolder.exists()) {
217 + rootFolder.mkdirs();
218 + }
219 + //图片下载
220 + URL url = new URL(oldLoad);
221 + URLConnection conn = url.openConnection();
222 + inputStream = conn.getInputStream();
223 + outputStream = new FileOutputStream(new File(newLoad + "//" + fileNme));
224 + IOUtils.copy(inputStream, outputStream);
225 + } catch (IOException e) {
226 + System.err.println(e);
227 + } finally {
228 + IOUtils.closeQuietly(inputStream);
229 + IOUtils.closeQuietly(outputStream);
230 + }
231 +
232 +
233 + }
234 +
235 + /**
236 + * 创建文件
237 + *
238 + * @param filepath
239 + * @throws IOException
240 + */
241 + public static void createFile(String filepath) throws IOException {
242 + File file = new File(filepath);
243 + if (!file.exists()) {
244 + file.createNewFile();
245 + }
246 + }
247 +
248 + public static void copyAndRenameFile(String sourceFile, String targetPath, String newFileName) {
249 + File in = new File(sourceFile);
250 + File out = new File(targetPath); // 目标文件夹
251 + try {
252 + Files.copy(in.toPath(), out.toPath().resolve(newFileName), StandardCopyOption.REPLACE_EXISTING);
253 + } catch (IOException e) {
254 + e.printStackTrace();
255 + }
256 + }
257 +
258 +
259 + public static void createFolder(String folderPath){
260 + try{
261 + File file = new File(folderPath);
262 + file.mkdirs();
263 + }catch (Exception e){
264 + e.printStackTrace();
265 + log.error("createFolder() error:{}",e);
266 + }
267 + }
268 +
269 +
270 + public static boolean deleteAllFile(String dir) {
271 + File dirFile = new File(dir);
272 + if ((!dirFile.exists()) || (!dirFile.isDirectory())) {
273 + log.info("删除文件夹失败:{} 不存在!",dir);
274 + return false;
275 + }
276 + boolean flag = true;
277 + // 删除文件夹中的所有文件包括子文件夹
278 + File[] files = dirFile.listFiles();
279 + for (int i = 0; i < files.length; i++) {
280 + // 删除子文件
281 + if (files[i].isFile()) {
282 + flag = FileUtil.deleteFile(files[i].getAbsolutePath());
283 + if (!flag){
284 + break;
285 + }
286 + // 删除子文件夹
287 + }else if (files[i].isDirectory()) {
288 + flag = FileUtil.deleteAllFile(files[i].getAbsolutePath());
289 + if (!flag){
290 + break;
291 + }
292 + }
293 + }
294 + if (!flag) {
295 + log.info("删除文件夹{}失败!",dir);
296 + return false;
297 + }
298 + // 删除当前文件夹
299 + if (dirFile.delete()) {
300 + log.info("删除文件夹" + dir + "成功!");
301 + return true;
302 + } else {
303 + return false;
304 + }
305 + }
306 +
307 +
308 +
309 + public static boolean deleteFile(String fileName) {
310 + try{
311 + File file = new File(fileName);
312 + if (file.exists() && file.isFile()) {
313 + if (file.delete()) {
314 + log.info("删除文件" + fileName + "成功!");
315 + return true;
316 + } else {
317 + log.info("删除文件" + fileName + "失败!");
318 + return false;
319 + }
320 + } else {
321 + log.info(fileName + "不存在!");
322 + return false;
323 + }
324 + }catch (Exception e){
325 + log.error("deleteFile() fileName:{} error:{},",fileName,e);
326 + }
327 + return false;
328 + }
329 +
330 +
331 + public static String getFileNameWithoutSuffix(String fileName){
332 + return fileName.substring(0, fileName.lastIndexOf("."));
333 + }
334 +
335 +
336 + public static void copyFiles(String sourceFolder, String targetFolder) throws IOException {
337 + Path sourcePath = Paths.get(sourceFolder);
338 + Path targetPath = Paths.get(targetFolder);
339 +
340 + if (!Files.exists(targetPath)) {
341 + Files.createDirectories(targetPath);
342 + }
343 +
344 + Files.walkFileTree(sourcePath, new SimpleFileVisitor<Path>() {
345 + @Override
346 + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
347 + Path destination = targetPath.resolve(sourcePath.relativize(file));
348 + Files.copy(file, destination, StandardCopyOption.REPLACE_EXISTING);
349 + return FileVisitResult.CONTINUE;
350 + }
351 +
352 + @Override
353 + public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
354 + return FileVisitResult.CONTINUE;
355 + }
356 + });
357 + }
358 +}
...@@ -85,7 +85,7 @@ public class JsonToJava { ...@@ -85,7 +85,7 @@ public class JsonToJava {
85 */ 85 */
86 public static boolean createJsonFile(String jsonString, String filePath, String fileName) { 86 public static boolean createJsonFile(String jsonString, String filePath, String fileName) {
87 boolean flag = true; 87 boolean flag = true;
88 - String fullPath = filePath + File.separator + fileName + ".json"; 88 + String fullPath = filePath + File.separator + fileName;
89 89
90 // 生成json格式文件 90 // 生成json格式文件
91 try { 91 try {
......
...@@ -3,7 +3,7 @@ package com.fedex.connect.common.dependencies.util; ...@@ -3,7 +3,7 @@ package com.fedex.connect.common.dependencies.util;
3 import com.fedex.connect.common.dependencies.authentication.SecurityConstants; 3 import com.fedex.connect.common.dependencies.authentication.SecurityConstants;
4 import com.fedex.connect.common.dependencies.contants.RedisConstants; 4 import com.fedex.connect.common.dependencies.contants.RedisConstants;
5 import com.fedex.connect.common.dependencies.date.dto.SecurityUserDetails; 5 import com.fedex.connect.common.dependencies.date.dto.SecurityUserDetails;
6 -import com.fedex.connect.common.dependencies.repository.repo.sys.IUserRepository; 6 +import com.fedex.connect.common.dependencies.repository.repo.sys.IUserBaseRepository;
7 import com.fedex.connect.common.model.sys.User; 7 import com.fedex.connect.common.model.sys.User;
8 import io.jsonwebtoken.Claims; 8 import io.jsonwebtoken.Claims;
9 import io.jsonwebtoken.Jwts; 9 import io.jsonwebtoken.Jwts;
...@@ -26,7 +26,7 @@ import java.util.stream.Collectors; ...@@ -26,7 +26,7 @@ import java.util.stream.Collectors;
26 */ 26 */
27 public class JwtTokenUtils { 27 public class JwtTokenUtils {
28 28
29 - private static final IUserRepository userRepository = SpringBeanUtil.getBean(IUserRepository.class); 29 + private static final IUserBaseRepository userRepository = SpringBeanUtil.getBean(IUserBaseRepository.class);
30 30
31 /** 31 /**
32 * 生成足够的安全随机密钥,以适合符合规范的签名 32 * 生成足够的安全随机密钥,以适合符合规范的签名
......
...@@ -262,4 +262,43 @@ public class NIOFileUtils { ...@@ -262,4 +262,43 @@ public class NIOFileUtils {
262 } 262 }
263 return false; 263 return false;
264 } 264 }
265 +
266 + /**
267 + * @Author mt
268 + * @Description 移动文件
269 + * @Date 2024/5/30
270 + * @param sourcePath
271 + * @param targetPath
272 + * @return void
273 + */
274 + public void moveFile(String sourcePath,String targetPath) throws Exception{
275 + //覆盖方式移动
276 + Files.move(Paths.get(sourcePath),Paths.get(targetPath),StandardCopyOption.REPLACE_EXISTING);
277 + }
278 +
279 + /**
280 + * @Author mt
281 + * @Description 判断文件是否存在
282 + * @Date 2024/9/10
283 + * @param filePath
284 + * @return boolean
285 + */
286 + public boolean fileExists(String filePath){
287 + return new File(filePath).exists();
288 + }
289 +
290 + /**
291 + * @Author mt
292 + * @Description 如果文件夹不存在则创建文件夹
293 + * @Date 2024/5/29
294 + * @param targetFolder
295 + * @return void
296 + */
297 + public void mkdirs(String targetFolder){
298 + File folder = new File(targetFolder);
299 + // 文件夹不存在,则创建文件夹
300 + if (!folder.exists()) {
301 + folder.mkdirs();
302 + }
303 + }
265 } 304 }
......
...@@ -82,11 +82,16 @@ public class ResponseUtils { ...@@ -82,11 +82,16 @@ public class ResponseUtils {
82 82
83 public <T> ResponseVo success(Object codeEnum,T data) { 83 public <T> ResponseVo success(Object codeEnum,T data) {
84 ResponseCodeBo responseCodeBo = this.ref(codeEnum); 84 ResponseCodeBo responseCodeBo = this.ref(codeEnum);
85 - return new ResponseVo<>(responseCodeBo.getCode(),responseCodeBo.getErrMsg(),data); 85 + return new ResponseVo<>(200,responseCodeBo.getErrMsg(),data);
86 } 86 }
87 87
88 public <T> ResponseVo success(T data) { 88 public <T> ResponseVo success(T data) {
89 - return new ResponseVo<>(data); 89 + if (data instanceof Enum) {
90 + ResponseCodeBo responseCodeBo = this.ref(data);
91 + return new ResponseVo<>(200, responseCodeBo.getErrMsg(), null);
92 + } else {
93 + return new ResponseVo<>(data);
94 + }
90 } 95 }
91 96
92 public String msg(String msg){ 97 public String msg(String msg){
......
...@@ -497,7 +497,7 @@ public class StringExtUtil { ...@@ -497,7 +497,7 @@ public class StringExtUtil {
497 * @param val ID值 497 * @param val ID值
498 * @return 498 * @return
499 */ 499 */
500 - public static String idLeftPadStr(Long val){ 500 + public static String idLeftPadStr(Long val, Integer len){
501 if (val == null){ 501 if (val == null){
502 return null; 502 return null;
503 } 503 }
...@@ -505,9 +505,8 @@ public class StringExtUtil { ...@@ -505,9 +505,8 @@ public class StringExtUtil {
505 return "0"; 505 return "0";
506 } 506 }
507 String valStr = val.toString(); 507 String valStr = val.toString();
508 - int len = valStr.length(); 508 + if (valStr.length() <= len){
509 - if (valStr.length() <= 10){ 509 + return StringUtils.leftPad(valStr,len,"0");
510 - return StringUtils.leftPad(valStr,10,"0");
511 } else { 510 } else {
512 return valStr; 511 return valStr;
513 } 512 }
...@@ -554,4 +553,10 @@ public class StringExtUtil { ...@@ -554,4 +553,10 @@ public class StringExtUtil {
554 } 553 }
555 } 554 }
556 555
556 + public static void main(String[] args){
557 + String fileName = "202410271_20241027113156.pdf";
558 + String f = fileName.substring(fileName.lastIndexOf("."));
559 + System.out.println(f);
560 + }
561 +
557 } 562 }
......
...@@ -47,6 +47,8 @@ public interface Constant { ...@@ -47,6 +47,8 @@ public interface Constant {
47 String TW = "TW"; 47 String TW = "TW";
48 //收件人国家 48 //收件人国家
49 String CN = "CN"; 49 String CN = "CN";
50 + //DM501消息的UUID为空,赋值默认值
51 + String UUID_DEFAULT = "10000";
50 } 52 }
51 //ceInfo转换为consignment忽略字段 53 //ceInfo转换为consignment忽略字段
52 interface CE_CONSIGNMENT_COPY_IGNORE_PROP_KEYS{ 54 interface CE_CONSIGNMENT_COPY_IGNORE_PROP_KEYS{
...@@ -54,6 +56,7 @@ public interface Constant { ...@@ -54,6 +56,7 @@ public interface Constant {
54 BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.USER_INPUT_SHIPPER_ACCOUNT, 56 BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.USER_INPUT_SHIPPER_ACCOUNT,
55 BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.USER_INPUT_ORIGIN_COUNTRY_CODE, 57 BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.USER_INPUT_ORIGIN_COUNTRY_CODE,
56 BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.USER_INPUT_ORIGIN_COUNTRY, 58 BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.USER_INPUT_ORIGIN_COUNTRY,
59 + BaseConstants.BASE_TABLE_COLUMN_KEYS.ID,
57 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_TIME, 60 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_TIME,
58 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_USER_ID, 61 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_USER_ID,
59 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_USER_NAME, 62 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_USER_NAME,
......
...@@ -52,7 +52,7 @@ public class Dm501Consignments implements Serializable { ...@@ -52,7 +52,7 @@ public class Dm501Consignments implements Serializable {
52 //扫描状态日期 52 //扫描状态日期
53 Date scanDate; 53 Date scanDate;
54 //用户uuid 54 //用户uuid
55 - String uuid; 55 + String userId;
56 //发件人邮箱 56 //发件人邮箱
57 String shipperEmail; 57 String shipperEmail;
58 58
......
...@@ -2,10 +2,13 @@ package com.fedex.connect.kafka.repository.base; ...@@ -2,10 +2,13 @@ package com.fedex.connect.kafka.repository.base;
2 2
3 import com.fedex.connect.common.dao.biz.CeInfoMapper; 3 import com.fedex.connect.common.dao.biz.CeInfoMapper;
4 import com.fedex.connect.common.dao.biz.ConsignmentMapper; 4 import com.fedex.connect.common.dao.biz.ConsignmentMapper;
5 +import com.fedex.connect.common.dao.biz.EmailMapper;
5 import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper; 6 import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper;
6 import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper; 7 import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper;
7 import com.fedex.connect.kafka.repository.dao.CeInfoMapperExt; 8 import com.fedex.connect.kafka.repository.dao.CeInfoMapperExt;
8 import com.fedex.connect.kafka.repository.dao.KafkaTemporaryStorageMapperExt; 9 import com.fedex.connect.kafka.repository.dao.KafkaTemporaryStorageMapperExt;
10 +import com.fedex.connect.kafka.repository.dao.UserConsignmentMappingMapperExt;
11 +import com.fedex.connect.kafka.repository.dao.UserMapperExt;
9 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
10 13
11 public class BaseRepository { 14 public class BaseRepository {
...@@ -21,4 +24,10 @@ public class BaseRepository { ...@@ -21,4 +24,10 @@ public class BaseRepository {
21 protected CeInfoMapperExt ceInfoMapperExt; 24 protected CeInfoMapperExt ceInfoMapperExt;
22 @Autowired 25 @Autowired
23 protected KafkaTemporaryStorageMapperExt kafkaTemporaryStorageMapperExt; 26 protected KafkaTemporaryStorageMapperExt kafkaTemporaryStorageMapperExt;
27 + @Autowired
28 + protected UserMapperExt userMapperExt;
29 + @Autowired
30 + protected EmailMapper emailMapper;
31 + @Autowired
32 + protected UserConsignmentMappingMapperExt userConsignmentMappingMapperExt;
24 } 33 }
...\ No newline at end of file ...\ No newline at end of file
......
1 +package com.fedex.connect.kafka.repository.dao;
2 +
3 +import org.apache.ibatis.annotations.Mapper;
4 +import org.apache.ibatis.annotations.Param;
5 +import org.apache.ibatis.annotations.Update;
6 +
7 +@Mapper
8 +public interface UserConsignmentMappingMapperExt {
9 +
10 + @Update( "<script>" +
11 + "UPDATE T_BIZ_USER_CONSIGNMENT_MAPPING SET CE_FLAG = 1 WHERE ID IN( " +
12 + "SELECT CM.ID FROM T_BIZ_USER_CONSIGNMENT_MAPPING CM INNER JOIN T_SYS_USER SU ON(CM.USER_ID = SU.ID) WHERE SU.ACCOUNT_NO = #{shipperAccount} OR SU.USER_UUID = #{uuid})" +
13 + "</script>")
14 + void updateUserChmMappingByAnUuId(@Param("shipperAccount") String shipperAccount,@Param("uuid") String uuid);
15 +}
...\ No newline at end of file ...\ No newline at end of file
1 +package com.fedex.connect.kafka.repository.dao;
2 +
3 +import com.fedex.connect.common.model.sys.User;
4 +import org.apache.ibatis.annotations.Mapper;
5 +import org.apache.ibatis.annotations.Param;
6 +import org.apache.ibatis.annotations.Select;
7 +
8 +/**
9 + * @Author mt
10 + * @Description CE数据Mapper
11 + * @Date 2024/4/22
12 + */
13 +@Mapper
14 +public interface UserMapperExt {
15 + /**
16 + * 获取创建时间为1个月内CE数据
17 + * @return
18 + */
19 + @Select( "<script>" +
20 + "SELECT * FROM T_SYS_USER WHERE USER_UUID = #{uuid} AND ROWNUM &lt;= 1" +
21 + "</script>")
22 + User findUserByUUid(@Param("uuid") String uuid);
23 +
24 + @Select( "<script>" +
25 + "SELECT * FROM T_SYS_USER WHERE ID = #{id}" +
26 + "</script>")
27 + User selectUserById(@Param("id") Long id);
28 +}
...\ No newline at end of file ...\ No newline at end of file
1 +package com.fedex.connect.kafka.repository.repo;
2 +
3 +import com.fedex.connect.common.model.biz.Email;
4 +
5 +public interface IEmailRepository {
6 + void save(Email entity);
7 +}
1 +package com.fedex.connect.kafka.repository.repo;
2 +
3 +public interface IUserConsignmentMappingRepository {
4 + void updateUserChmMappingByAnUuId(String shipperAccount, String uuid);
5 +}
1 +package com.fedex.connect.kafka.repository.repo;
2 +
3 +import com.fedex.connect.common.model.sys.User;
4 +
5 +public interface IUserRepository {
6 + User findUserByUUid(String uuid);
7 + User selectUserById(Long id);
8 +}
1 +package com.fedex.connect.kafka.repository.repo.impl;
2 +
3 +import com.fedex.connect.common.model.biz.Email;
4 +import com.fedex.connect.kafka.repository.base.BaseRepository;
5 +import com.fedex.connect.kafka.repository.repo.IEmailRepository;
6 +import org.springframework.stereotype.Repository;
7 +
8 +@Repository
9 +public class EmailRepositoryImpl extends BaseRepository implements IEmailRepository {
10 + public void save(Email entity){
11 + if(entity != null) {
12 + if (entity.getId() == null || entity.getId() <= 0) {
13 + emailMapper.insertSelective(entity);
14 + } else if (entity.getId() != null && entity.getId() > 0){
15 + emailMapper.updateByPrimaryKeySelective(entity);
16 + }
17 + }
18 + }
19 +}
1 +package com.fedex.connect.kafka.repository.repo.impl;
2 +
3 +import com.fedex.connect.kafka.repository.base.BaseRepository;
4 +import com.fedex.connect.kafka.repository.repo.IUserConsignmentMappingRepository;
5 +import org.springframework.stereotype.Repository;
6 +
7 +/**
8 + * @Author mt
9 + * @Description 用户运单映射
10 + * @Date 2025/1/2
11 + */
12 +@Repository
13 +public class UserConsignmentMappingRepositoryImpl extends BaseRepository implements IUserConsignmentMappingRepository {
14 + /**
15 + * @Author mt
16 + * @Description 根据shipperAccount、uuid更新用户运单映射表ce标志
17 + * @Date 2025/1/2
18 + * @param shipperAccount
19 + * @param uuid
20 + * @return void
21 + */
22 + public void updateUserChmMappingByAnUuId(String shipperAccount, String uuid){
23 + userConsignmentMappingMapperExt.updateUserChmMappingByAnUuId(shipperAccount,uuid);
24 + }
25 +}
...\ No newline at end of file ...\ No newline at end of file
1 +package com.fedex.connect.kafka.repository.repo.impl;
2 +
3 +import com.fedex.connect.common.model.sys.User;
4 +import com.fedex.connect.kafka.repository.base.BaseRepository;
5 +import com.fedex.connect.kafka.repository.repo.IUserRepository;
6 +import org.springframework.stereotype.Repository;
7 +
8 +/**
9 + * @Author mt
10 + * @Description 用户信息repository
11 + * @Date 2024/12/19
12 + */
13 +@Repository
14 +public class UserRepositoryImpl extends BaseRepository implements IUserRepository {
15 + /**
16 + * @Author mt
17 + * @Description 根据uuid查找用户信息
18 + * @Date 2024/12/19
19 + * @param uuid
20 + * @return com.fedex.connect.common.model.sys.User
21 + */
22 + @Override
23 + public User findUserByUUid(String uuid) {
24 + return userMapperExt.findUserByUUid(uuid);
25 + }
26 +
27 + @Override
28 + public User selectUserById(Long id){
29 + return userMapperExt.selectUserById(id);
30 + }
31 +}
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
4 import com.fedex.connect.common.dependencies.util.Utils; 4 import com.fedex.connect.common.dependencies.util.Utils;
5 import com.fedex.connect.common.model.biz.CeInfo; 5 import com.fedex.connect.common.model.biz.CeInfo;
6 import com.fedex.connect.common.model.biz.Consignment; 6 import com.fedex.connect.common.model.biz.Consignment;
7 +import com.fedex.connect.common.model.biz.Email;
7 import com.fedex.connect.common.model.sys.KafkaTemporaryStorage; 8 import com.fedex.connect.common.model.sys.KafkaTemporaryStorage;
8 import com.fedex.connect.kafka.data.dto.DmProcessResults; 9 import com.fedex.connect.kafka.data.dto.DmProcessResults;
9 import com.fedex.connect.kafka.data.dto.dm.dm501.Dm501Consignments; 10 import com.fedex.connect.kafka.data.dto.dm.dm501.Dm501Consignments;
...@@ -14,7 +15,6 @@ import com.fedex.connect.kafka.util.Dm501Util; ...@@ -14,7 +15,6 @@ import com.fedex.connect.kafka.util.Dm501Util;
14 import lombok.extern.slf4j.Slf4j; 15 import lombok.extern.slf4j.Slf4j;
15 import org.springframework.beans.factory.annotation.Autowired; 16 import org.springframework.beans.factory.annotation.Autowired;
16 import org.springframework.stereotype.Service; 17 import org.springframework.stereotype.Service;
17 -import org.springframework.transaction.annotation.Transactional;
18 18
19 import java.util.List; 19 import java.util.List;
20 import java.util.Objects; 20 import java.util.Objects;
...@@ -53,10 +53,17 @@ public class Dm501ServiceImpl extends BaseService implements IDm501Service { ...@@ -53,10 +53,17 @@ public class Dm501ServiceImpl extends BaseService implements IDm501Service {
53 processResults.setConsignmentCode(consignment501.getTrackingNumber()); 53 processResults.setConsignmentCode(consignment501.getTrackingNumber());
54 //该运单号不存在创建时间为1个月内CE数据 54 //该运单号不存在创建时间为1个月内CE数据
55 if (Objects.isNull(bizCeInfo)) { 55 if (Objects.isNull(bizCeInfo)) {
56 - CeInfo ceInfo = dm501Util.generateCeInfo(consignment501,kafKaTemporaryStorage.getSendTime()); 56 + CeInfo ceInfo = dm501Util.generateCeInfo(consignment501,kafKaTemporaryStorage.getSendTime(),processResults);
57 - //ce数据解析正常,进行后续操作 57 + //ce信息为空,则不记录运单表
58 - Consignment consignment = dm501Util.generateConsignment(ceInfo); 58 + if(Objects.nonNull(ceInfo)){
59 - this.saveCeInfoAndConsignment(ceInfo,consignment); 59 + //ce数据解析正常,进行后续操作
60 + Email email = new Email();
61 + Consignment consignment = dm501Util.generateConsignment(ceInfo,email);
62 + /**
63 + * 保存ce信息、以及运单表信息
64 + */
65 + dm501Util.saveCeInfoAndConsignment(ceInfo,consignment,email);
66 + }
60 } 67 }
61 }catch(Exception ex){ 68 }catch(Exception ex){
62 log.error("DM501消息处理异常:{}", ex.getMessage(),ex); 69 log.error("DM501消息处理异常:{}", ex.getMessage(),ex);
...@@ -64,20 +71,4 @@ public class Dm501ServiceImpl extends BaseService implements IDm501Service { ...@@ -64,20 +71,4 @@ public class Dm501ServiceImpl extends BaseService implements IDm501Service {
64 }); 71 });
65 return processResults; 72 return processResults;
66 } 73 }
67 -
68 - /**
69 - * @Author mt
70 - * @Description 保存ce信息、以及运单表信息
71 - * @Date 2024/11/1
72 - * @param ceInfo
73 - * @param consignment
74 - * @return void
75 - */
76 - @Transactional(rollbackFor = Exception.class)
77 - public void saveCeInfoAndConsignment(CeInfo ceInfo, Consignment consignment){
78 - ceInfoRepository.save(ceInfo);
79 - //绑定ceInfo表Id
80 - consignment.setCeInfoId(ceInfo.getId());
81 - consignmentRepository.save(consignment);
82 - }
83 } 74 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -3,12 +3,14 @@ package com.fedex.connect.kafka.service.impl; ...@@ -3,12 +3,14 @@ package com.fedex.connect.kafka.service.impl;
3 import com.fasterxml.jackson.databind.ObjectMapper; 3 import com.fasterxml.jackson.databind.ObjectMapper;
4 import com.fasterxml.jackson.databind.node.ObjectNode; 4 import com.fasterxml.jackson.databind.node.ObjectNode;
5 import com.fedex.connect.common.dependencies.enums.sys.KafkaStatusEnum; 5 import com.fedex.connect.common.dependencies.enums.sys.KafkaStatusEnum;
6 +import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
6 import com.fedex.connect.common.model.sys.KafkaStorageHistory; 7 import com.fedex.connect.common.model.sys.KafkaStorageHistory;
7 import com.fedex.connect.common.model.sys.KafkaTemporaryStorage; 8 import com.fedex.connect.common.model.sys.KafkaTemporaryStorage;
8 import com.fedex.connect.kafka.data.dto.DmProcessResults; 9 import com.fedex.connect.kafka.data.dto.DmProcessResults;
9 import com.fedex.connect.kafka.listener.DmListenerInterface; 10 import com.fedex.connect.kafka.listener.DmListenerInterface;
10 import com.fedex.connect.kafka.service.IKafkaDmService; 11 import com.fedex.connect.kafka.service.IKafkaDmService;
11 import com.fedex.connect.kafka.service.base.BaseService; 12 import com.fedex.connect.kafka.service.base.BaseService;
13 +import lombok.extern.slf4j.Slf4j;
12 import org.slf4j.Logger; 14 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory; 15 import org.slf4j.LoggerFactory;
14 import org.springframework.beans.BeansException; 16 import org.springframework.beans.BeansException;
...@@ -27,6 +29,7 @@ import java.util.Map; ...@@ -27,6 +29,7 @@ import java.util.Map;
27 * mt 29 * mt
28 * 2022年11月3日16:09:48 30 * 2022年11月3日16:09:48
29 */ 31 */
32 +@Slf4j
30 @Service 33 @Service
31 public class KafkaDmServiceImpl extends BaseService implements ApplicationContextAware, IKafkaDmService { 34 public class KafkaDmServiceImpl extends BaseService implements ApplicationContextAware, IKafkaDmService {
32 private Logger logger = LoggerFactory.getLogger(KafkaDmServiceImpl.class); 35 private Logger logger = LoggerFactory.getLogger(KafkaDmServiceImpl.class);
...@@ -39,6 +42,16 @@ public class KafkaDmServiceImpl extends BaseService implements ApplicationContex ...@@ -39,6 +42,16 @@ public class KafkaDmServiceImpl extends BaseService implements ApplicationContex
39 */ 42 */
40 @Override 43 @Override
41 public List<KafkaTemporaryStorage> saveKafkaTemporaryStorageAll(List<KafkaTemporaryStorage> kafkaTemporaryStorageList){ 44 public List<KafkaTemporaryStorage> saveKafkaTemporaryStorageAll(List<KafkaTemporaryStorage> kafkaTemporaryStorageList){
45 + kafkaTemporaryStorageList.stream().forEach(p -> {
46 + try {
47 + /**
48 + * 初始化表基础字段
49 + */
50 + AssignmentFieldUtils.assignmentTableBaseField(p);
51 + }catch(Exception ex){
52 + log.error("记录kafka历史表保存基础信息失败:",ex);
53 + }
54 + });
42 return kafkaTemporaryStorageRepository.saveAll(kafkaTemporaryStorageList); 55 return kafkaTemporaryStorageRepository.saveAll(kafkaTemporaryStorageList);
43 } 56 }
44 57
...@@ -48,6 +61,14 @@ public class KafkaDmServiceImpl extends BaseService implements ApplicationContex ...@@ -48,6 +61,14 @@ public class KafkaDmServiceImpl extends BaseService implements ApplicationContex
48 */ 61 */
49 @Override 62 @Override
50 public KafkaStorageHistory saveKafkaStorageHistory(KafkaStorageHistory kafkaStorageHistory){ 63 public KafkaStorageHistory saveKafkaStorageHistory(KafkaStorageHistory kafkaStorageHistory){
64 + try {
65 + /**
66 + * 初始化表基础字段
67 + */
68 + AssignmentFieldUtils.assignmentTableBaseField(kafkaStorageHistory);
69 + }catch(Exception ex){
70 + log.error("记录kafka历史表保存基础信息失败:",ex);
71 + }
51 return kafkaStorageHistoryRepository.save(kafkaStorageHistory); 72 return kafkaStorageHistoryRepository.save(kafkaStorageHistory);
52 } 73 }
53 74
...@@ -123,6 +144,8 @@ public class KafkaDmServiceImpl extends BaseService implements ApplicationContex ...@@ -123,6 +144,8 @@ public class KafkaDmServiceImpl extends BaseService implements ApplicationContex
123 kafkaStorageHistory.setStatusName(KafkaStatusEnum.PROCESSED.getName()); 144 kafkaStorageHistory.setStatusName(KafkaStatusEnum.PROCESSED.getName());
124 //设置运单号 145 //设置运单号
125 kafkaStorageHistory.setConsignmentCode(processResults.getConsignmentCode()); 146 kafkaStorageHistory.setConsignmentCode(processResults.getConsignmentCode());
147 + //记录报文处理备注
148 + kafkaStorageHistory.setRemark(processResults.getResult());
126 //保存至kafka历史表 149 //保存至kafka历史表
127 this.saveKafkaStorageHistory(kafkaStorageHistory); 150 this.saveKafkaStorageHistory(kafkaStorageHistory);
128 }else{ 151 }else{
......
1 package com.fedex.connect.kafka.util; 1 package com.fedex.connect.kafka.util;
2 2
3 import com.fedex.connect.common.dependencies.cache.CacheSystem; 3 import com.fedex.connect.common.dependencies.cache.CacheSystem;
4 -import com.fedex.connect.common.dependencies.enums.biz.ConsignmentStatusEnum; 4 +import com.fedex.connect.common.dependencies.enums.biz.EmailStatusEnum;
5 +import com.fedex.connect.common.dependencies.enums.biz.EmailTypeEnum;
5 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; 6 import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
6 import com.fedex.connect.common.dependencies.util.DateUtil; 7 import com.fedex.connect.common.dependencies.util.DateUtil;
7 import com.fedex.connect.common.model.bi.DictionaryEntries; 8 import com.fedex.connect.common.model.bi.DictionaryEntries;
8 import com.fedex.connect.common.model.biz.CeInfo; 9 import com.fedex.connect.common.model.biz.CeInfo;
9 import com.fedex.connect.common.model.biz.Consignment; 10 import com.fedex.connect.common.model.biz.Consignment;
11 +import com.fedex.connect.common.model.biz.Email;
12 +import com.fedex.connect.common.model.sys.User;
10 import com.fedex.connect.kafka.constants.Constant; 13 import com.fedex.connect.kafka.constants.Constant;
14 +import com.fedex.connect.kafka.data.dto.DmProcessResults;
11 import com.fedex.connect.kafka.data.dto.dm.dm501.Dm501ConAddresses; 15 import com.fedex.connect.kafka.data.dto.dm.dm501.Dm501ConAddresses;
12 import com.fedex.connect.kafka.data.dto.dm.dm501.Dm501Consignments; 16 import com.fedex.connect.kafka.data.dto.dm.dm501.Dm501Consignments;
13 -import com.fedex.connect.kafka.repository.repo.IConsignmentRepository; 17 +import com.fedex.connect.kafka.repository.repo.*;
14 import org.apache.commons.lang3.StringUtils; 18 import org.apache.commons.lang3.StringUtils;
15 import org.springframework.beans.BeanUtils; 19 import org.springframework.beans.BeanUtils;
16 import org.springframework.beans.factory.annotation.Autowired; 20 import org.springframework.beans.factory.annotation.Autowired;
17 import org.springframework.stereotype.Component; 21 import org.springframework.stereotype.Component;
22 +import org.springframework.transaction.annotation.Transactional;
18 23
19 import java.math.BigDecimal; 24 import java.math.BigDecimal;
20 import java.util.Date; 25 import java.util.Date;
21 import java.util.List; 26 import java.util.List;
22 import java.util.Objects; 27 import java.util.Objects;
28 +import java.util.Optional;
23 29
24 @Component 30 @Component
25 public class Dm501Util { 31 public class Dm501Util {
...@@ -28,6 +34,14 @@ public class Dm501Util { ...@@ -28,6 +34,14 @@ public class Dm501Util {
28 CacheSystem cacheSystem; 34 CacheSystem cacheSystem;
29 @Autowired 35 @Autowired
30 IConsignmentRepository consignmentRepository; 36 IConsignmentRepository consignmentRepository;
37 + @Autowired
38 + ICeInfoRepository ceInfoRepository;
39 + @Autowired
40 + IUserRepository userRepository;
41 + @Autowired
42 + IEmailRepository emailRepository;
43 + @Autowired
44 + IUserConsignmentMappingRepository userConsignmentMappingRepository;
31 45
32 /** 46 /**
33 * @Author mt 47 * @Author mt
...@@ -36,12 +50,13 @@ public class Dm501Util { ...@@ -36,12 +50,13 @@ public class Dm501Util {
36 * @param dm501Consignment 50 * @param dm501Consignment
37 * @return com.fedex.connect.common.model.biz.CeInfo 51 * @return com.fedex.connect.common.model.biz.CeInfo
38 */ 52 */
39 - public CeInfo generateCeInfo(Dm501Consignments dm501Consignment,Date sendTime) throws Exception{ 53 + public CeInfo generateCeInfo(Dm501Consignments dm501Consignment, Date sendTime, DmProcessResults processResults) throws Exception{
40 CeInfo ceInfo = new CeInfo(); 54 CeInfo ceInfo = new CeInfo();
41 //地址信息 55 //地址信息
42 List<Dm501ConAddresses> addressList = dm501Consignment.getAddresses(); 56 List<Dm501ConAddresses> addressList = dm501Consignment.getAddresses();
43 //没有地址信息,不需要处理,不进CE业务表 57 //没有地址信息,不需要处理,不进CE业务表
44 if(addressList == null){ 58 if(addressList == null){
59 + processResults.setResult("缺失address信息");
45 return null; 60 return null;
46 } 61 }
47 //发件人 62 //发件人
...@@ -50,6 +65,7 @@ public class Dm501Util { ...@@ -50,6 +65,7 @@ public class Dm501Util {
50 Dm501ConAddresses recipientAddress = this.queryDM501Addresses(addressList, Constant.CE_INFO_ADDRESS_KEYS.RECIPIENT); 65 Dm501ConAddresses recipientAddress = this.queryDM501Addresses(addressList, Constant.CE_INFO_ADDRESS_KEYS.RECIPIENT);
51 //没有收发件人地址信息,不需要处理,不进CE业务表 66 //没有收发件人地址信息,不需要处理,不进CE业务表
52 if(shipperAddress == null || recipientAddress == null){ 67 if(shipperAddress == null || recipientAddress == null){
68 + processResults.setResult("缺失收发件人address信息");
53 return null; 69 return null;
54 } 70 }
55 71
...@@ -57,6 +73,12 @@ public class Dm501Util { ...@@ -57,6 +73,12 @@ public class Dm501Util {
57 String recipientCountry = recipientAddress.getCountry(); 73 String recipientCountry = recipientAddress.getCountry();
58 //收件人国家不为CN,不需要处理,不进CE业务表 74 //收件人国家不为CN,不需要处理,不进CE业务表
59 if(StringUtils.isEmpty(recipientCountry) || !recipientCountry.trim().equals(Constant.CE_INFO_KEYS.CN)){ 75 if(StringUtils.isEmpty(recipientCountry) || !recipientCountry.trim().equals(Constant.CE_INFO_KEYS.CN)){
76 + processResults.setResult("收件人国家不为CN");
77 + return null;
78 + }
79 + //uuid与shipperAccount都为空,则不进行才做
80 + if(StringUtils.isEmpty(dm501Consignment.getUserId()) && StringUtils.isEmpty(shipperAddress.getAccount())){
81 + processResults.setResult("uuid与shipperAccount都为空");
60 return null; 82 return null;
61 } 83 }
62 /** 84 /**
...@@ -107,8 +129,15 @@ public class Dm501Util { ...@@ -107,8 +129,15 @@ public class Dm501Util {
107 } 129 }
108 //重量单位 130 //重量单位
109 ceInfo.setWeightunit(dm501Consignment.getWeightUnit()); 131 ceInfo.setWeightunit(dm501Consignment.getWeightUnit());
110 - //用户uuid 132 + /**
111 - ceInfo.setUserUuid(dm501Consignment.getUuid()); 133 + * 用户uuid
134 + * 如果后端判断下来确实有DM501存在,需要显示所有运单数据,但是UUID又为空。是不是可以给这种运单赋值一个特殊的UUID比如1000。保存的时候,如果是1000这种特殊UUID,那么就置空保存。
135 + */
136 + if(StringUtils.isBlank(dm501Consignment.getUserId())){
137 + ceInfo.setUserUuid(Constant.CE_INFO_KEYS.UUID_DEFAULT);
138 + }else{
139 + ceInfo.setUserUuid(dm501Consignment.getUserId());
140 + }
112 //发件人邮箱 141 //发件人邮箱
113 ceInfo.setShipperEmail(dm501Consignment.getShipperEmail()); 142 ceInfo.setShipperEmail(dm501Consignment.getShipperEmail());
114 //参考信息 143 //参考信息
...@@ -190,29 +219,39 @@ public class Dm501Util { ...@@ -190,29 +219,39 @@ public class Dm501Util {
190 * @param ceInfo 219 * @param ceInfo
191 * @return com.fedex.connect.common.model.biz.Consignment 220 * @return com.fedex.connect.common.model.biz.Consignment
192 */ 221 */
193 - public Consignment generateConsignment(CeInfo ceInfo) throws Exception{ 222 + public Consignment generateConsignment(CeInfo ceInfo,Email email) throws Exception{
194 Consignment rsConsignment; 223 Consignment rsConsignment;
195 /** 224 /**
196 * 根据运单号查找30天之内运单 225 * 根据运单号查找30天之内运单
197 */ 226 */
198 Consignment consignment = consignmentRepository.findThirtyDaysAgoConByCode(ceInfo.getConsignmentCode()); 227 Consignment consignment = consignmentRepository.findThirtyDaysAgoConByCode(ceInfo.getConsignmentCode());
199 if(Objects.isNull(consignment)){ 228 if(Objects.isNull(consignment)){
229 + //如果运单第一次获取,则不需要发送邮件
230 + email = null;
200 Consignment resultConsignment = new Consignment(); 231 Consignment resultConsignment = new Consignment();
201 BeanUtils.copyProperties(ceInfo,resultConsignment); 232 BeanUtils.copyProperties(ceInfo,resultConsignment);
202 - //运单状态赋值为"待上传"
203 -// DictionaryEntries consignmentDicEntries = cacheSystem.getDicConsignmentStatus(ConsignmentStatusEnum.CONSIGNMENT_STATUS_01.getCode());
204 -// resultConsignment.setStatusCode(consignmentDicEntries.getCode());
205 -// resultConsignment.setStatusName(consignmentDicEntries.getEnglishName());
206 /** 233 /**
207 * 初始化运单表原产国、目的国 234 * 初始化运单表原产国、目的国
208 */ 235 */
209 this.initOriginCountryDestinationCountry(ceInfo,resultConsignment); 236 this.initOriginCountryDestinationCountry(ceInfo,resultConsignment);
210 /** 237 /**
238 + * 根据uuid查找运单信息
239 + */
240 + User user = userRepository.findUserByUUid(resultConsignment.getUserUuid());
241 + if(Objects.nonNull(user)){
242 + resultConsignment.setCreateUserId(user.getId());
243 + resultConsignment.setCreateUserName(user.getUserName());
244 + }
245 + /**
211 * 初始化表基础字段 246 * 初始化表基础字段
212 */ 247 */
213 AssignmentFieldUtils.assignmentTableBaseField(resultConsignment); 248 AssignmentFieldUtils.assignmentTableBaseField(resultConsignment);
214 rsConsignment = resultConsignment; 249 rsConsignment = resultConsignment;
215 }else{ 250 }else{
251 + /**
252 + * 初始化提醒邮件
253 + */
254 + this.initNotificationEmail(email,consignment,ceInfo);
216 //ceInfo转换为consignment忽略字段 255 //ceInfo转换为consignment忽略字段
217 String[] ignoreProperties = Constant.CE_CONSIGNMENT_COPY_IGNORE_PROP_KEYS.IGNORE_PROPERTIES; 256 String[] ignoreProperties = Constant.CE_CONSIGNMENT_COPY_IGNORE_PROP_KEYS.IGNORE_PROPERTIES;
218 //字段拷贝 257 //字段拷贝
...@@ -226,6 +265,31 @@ public class Dm501Util { ...@@ -226,6 +265,31 @@ public class Dm501Util {
226 return rsConsignment; 265 return rsConsignment;
227 } 266 }
228 267
268 + private void initNotificationEmail(Email email,Consignment consignment,CeInfo ceInfo) throws Exception{
269 + /**
270 + * 初始化提醒发件人邮件
271 + */
272 + User userOld = userRepository.selectUserById(consignment.getSubmitterId());
273 + if (StringUtils.isEmpty(consignment.getUserUuid()) && !userOld.getUserUuid().equals(ceInfo.getUserUuid())){
274 + /**
275 + * 初始化Email对象
276 + */
277 + email.setBizId(consignment.getId());
278 + email.setBizCode(consignment.getConsignmentCode());
279 + String emailAddress = Optional.ofNullable(ceInfo.getUserUuid())
280 + .map(userRepository::findUserByUUid)
281 + .map(user -> StringUtils.defaultIfEmpty(user.getEmail(), ceInfo.getShipperEmail()))
282 + .orElse(consignment.getShipperEmail());
283 + email.setToAddress(emailAddress);
284 + email.setSubject("");
285 + email.setTypeName(EmailTypeEnum.NOTIFICATION_SENDER.getMsg());
286 + email.setTypeCode(EmailTypeEnum.NOTIFICATION_SENDER.getCode());
287 + email.setStatusName(EmailStatusEnum.PENDING.getMsg());
288 + email.setStatusCode(EmailStatusEnum.PENDING.getCode());
289 + AssignmentFieldUtils.assignmentTableBaseField(email);
290 + }
291 + }
292 +
229 /** 293 /**
230 * @Author mt 294 * @Author mt
231 * @Description 初始化运单表原产国、目的国 295 * @Description 初始化运单表原产国、目的国
...@@ -272,4 +336,28 @@ public class Dm501Util { ...@@ -272,4 +336,28 @@ public class Dm501Util {
272 } 336 }
273 return address; 337 return address;
274 } 338 }
275 -} 339 +
340 + /**
341 + * @Author mt
342 + * @Description 保存ce信息、以及运单表信息
343 + * @Date 2024/11/1
344 + * @param ceInfo
345 + * @param consignment
346 + * @return void
347 + */
348 + @Transactional(rollbackFor = Exception.class)
349 + public void saveCeInfoAndConsignment(CeInfo ceInfo, Consignment consignment,Email email){
350 + ceInfoRepository.save(ceInfo);
351 + //绑定ceInfo表Id
352 + consignment.setCeInfoId(ceInfo.getId());
353 + consignmentRepository.save(consignment);
354 + //根据shipperAccount、uuid更新用户运单映射表ce标志
355 + userConsignmentMappingRepository.updateUserChmMappingByAnUuId(consignment.getShipperAccount(),consignment.getUserUuid());
356 + /**
357 + * 保存入库
358 + */
359 + if (email != null){
360 + emailRepository.save(email);
361 + }
362 + }
363 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -12,8 +12,8 @@ spring: ...@@ -12,8 +12,8 @@ spring:
12 # 指定kafka server的地址,集群配多个,中间,逗号隔开 12 # 指定kafka server的地址,集群配多个,中间,逗号隔开
13 bootstrap-servers: 47.103.140.98:9092 13 bootstrap-servers: 47.103.140.98:9092
14 #验证文件地址 14 #验证文件地址
15 - iclear-kerberos-jaasPath: /opt/fedex/iclearConnect/conf/app_3537251_iclear_jaas.conf 15 + iclear-kerberos-jaasPath: /opt/fedex/iclconnect/conf/app_3537251_iclear_jaas.conf
16 - iclear-kerberos-krb5: /opt/fedex/iclearConnect/conf/krb5.conf 16 + iclear-kerberos-krb5: /opt/fedex/iclconnect/conf/krb5.conf
17 #=============== provider ======================= 17 #=============== provider =======================
18 producer: 18 producer:
19 #可以设置的值为:all, -1, 0, 1 19 #可以设置的值为:all, -1, 0, 1
...@@ -37,7 +37,7 @@ spring: ...@@ -37,7 +37,7 @@ spring:
37 #topic-name 37 #topic-name
38 topic-name: fdx.apac.cn.shipment.import.cdm.iclear 38 topic-name: fdx.apac.cn.shipment.import.cdm.iclear
39 # 指定默认消费者group id --> 由于在kafka中,同一组中的consumer不会读取到同一个消息,依靠groud.id设置组名 39 # 指定默认消费者group id --> 由于在kafka中,同一组中的consumer不会读取到同一个消息,依靠groud.id设置组名
40 - group-id: imp-exp-tw-dev 40 + group-id: imp-exp-iclconnect-dev
41 # smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest 41 # smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest
42 auto-offset-reset: earliest 42 auto-offset-reset: earliest
43 # enable.auto.commit:true --> 设置自动提交offset 43 # enable.auto.commit:true --> 设置自动提交offset
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: prod 6 env: prod
...@@ -9,8 +9,8 @@ spring: ...@@ -9,8 +9,8 @@ spring:
9 # 指定kafka server的地址,集群配多个,中间,逗号隔开 9 # 指定kafka server的地址,集群配多个,中间,逗号隔开
10 bootstrap-servers: papc0014.cndczmd.apac.fedex.com:52094,papc0015.cndczmd.apac.fedex.com:52094,papc0016.cndczmd.apac.fedex.com:52094,papc0017.cndczmd.apac.fedex.com:52094,papc0018.cndczmd.apac.fedex.com:52094,papc0019.cndczmd.apac.fedex.com:52094 10 bootstrap-servers: papc0014.cndczmd.apac.fedex.com:52094,papc0015.cndczmd.apac.fedex.com:52094,papc0016.cndczmd.apac.fedex.com:52094,papc0017.cndczmd.apac.fedex.com:52094,papc0018.cndczmd.apac.fedex.com:52094,papc0019.cndczmd.apac.fedex.com:52094
11 #验证文件地址 11 #验证文件地址
12 - iclear-kerberos-jaasPath: /opt/fedex/iclearConnect/conf/app_3537251_iclear_jaas.conf 12 + iclear-kerberos-jaasPath: /opt/fedex/iclconnect/conf/app_3537251_iclear_jaas.conf
13 - iclear-kerberos-krb5: /opt/fedex/iclearConnect/conf/krb5.conf 13 + iclear-kerberos-krb5: /opt/fedex/iclconnect/conf/krb5.conf
14 #=============== provider ======================= 14 #=============== provider =======================
15 producer: 15 producer:
16 #可以设置的值为:all, -1, 0, 1 16 #可以设置的值为:all, -1, 0, 1
...@@ -34,7 +34,7 @@ spring: ...@@ -34,7 +34,7 @@ spring:
34 #topic-name 34 #topic-name
35 topic-name: fdx.apac.cn.shipment.import.cdm.iclear 35 topic-name: fdx.apac.cn.shipment.import.cdm.iclear
36 # 指定默认消费者group id --> 由于在kafka中,同一组中的consumer不会读取到同一个消息,依靠groud.id设置组名 36 # 指定默认消费者group id --> 由于在kafka中,同一组中的consumer不会读取到同一个消息,依靠groud.id设置组名
37 - group-id: imp-exp-tw-prod 37 + group-id: imp-exp-iclconnect-prod
38 # smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest 38 # smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest
39 auto-offset-reset: earliest 39 auto-offset-reset: earliest
40 # enable.auto.commit:true --> 设置自动提交offset 40 # enable.auto.commit:true --> 设置自动提交offset
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: test 6 env: test
...@@ -9,8 +9,8 @@ spring: ...@@ -9,8 +9,8 @@ spring:
9 # 指定kafka server的地址,集群配多个,中间,逗号隔开 9 # 指定kafka server的地址,集群配多个,中间,逗号隔开
10 bootstrap-servers: 47.103.140.98:9092 10 bootstrap-servers: 47.103.140.98:9092
11 #验证文件地址 11 #验证文件地址
12 - iclear-kerberos-jaasPath: /opt/fedex/iclearConnect/conf/app_3537251_iclear_jaas.conf 12 + iclear-kerberos-jaasPath: /opt/fedex/iclconnect/conf/app_3537251_iclear_jaas.conf
13 - iclear-kerberos-krb5: /opt/fedex/iclearConnect/conf/krb5.conf 13 + iclear-kerberos-krb5: /opt/fedex/iclconnect/conf/krb5.conf
14 #=============== provider ======================= 14 #=============== provider =======================
15 producer: 15 producer:
16 #可以设置的值为:all, -1, 0, 1 16 #可以设置的值为:all, -1, 0, 1
...@@ -34,7 +34,7 @@ spring: ...@@ -34,7 +34,7 @@ spring:
34 #topic-name 34 #topic-name
35 topic-name: fdx.apac.cn.shipment.import.cdm.iclear 35 topic-name: fdx.apac.cn.shipment.import.cdm.iclear
36 # 指定默认消费者group id --> 由于在kafka中,同一组中的consumer不会读取到同一个消息,依靠groud.id设置组名 36 # 指定默认消费者group id --> 由于在kafka中,同一组中的consumer不会读取到同一个消息,依靠groud.id设置组名
37 - group-id: imp-exp-tw-test 37 + group-id: imp-exp-iclconnect-test
38 # smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest 38 # smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest
39 auto-offset-reset: earliest 39 auto-offset-reset: earliest
40 # enable.auto.commit:true --> 设置自动提交offset 40 # enable.auto.commit:true --> 设置自动提交offset
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: uat 6 env: uat
...@@ -9,8 +9,8 @@ spring: ...@@ -9,8 +9,8 @@ spring:
9 # 指定kafka server的地址,集群配多个,中间,逗号隔开 9 # 指定kafka server的地址,集群配多个,中间,逗号隔开
10 bootstrap-servers: uapc0004.cndczmd.apac.fedex.com:52094,uapc0005.cndczmd.apac.fedex.com:52094,uapc0006.cndczmd.apac.fedex.com:52094,uapc0007.cndczmd.apac.fedex.com:52094,uapc0008.cndczmd.apac.fedex.com:52094,uapc0009.cndczmd.apac.fedex.com:52094 10 bootstrap-servers: uapc0004.cndczmd.apac.fedex.com:52094,uapc0005.cndczmd.apac.fedex.com:52094,uapc0006.cndczmd.apac.fedex.com:52094,uapc0007.cndczmd.apac.fedex.com:52094,uapc0008.cndczmd.apac.fedex.com:52094,uapc0009.cndczmd.apac.fedex.com:52094
11 #验证文件地址 11 #验证文件地址
12 - iclear-kerberos-jaasPath: /opt/fedex/iclearConnect/conf/app_3537251_iclear_jaas.conf 12 + iclear-kerberos-jaasPath: /opt/fedex/iclconnect/conf/app_3537251_iclear_jaas.conf
13 - iclear-kerberos-krb5: /opt/fedex/iclearConnect/conf/krb5.conf 13 + iclear-kerberos-krb5: /opt/fedex/iclconnect/conf/krb5.conf
14 #=============== provider ======================= 14 #=============== provider =======================
15 producer: 15 producer:
16 #可以设置的值为:all, -1, 0, 1 16 #可以设置的值为:all, -1, 0, 1
...@@ -34,7 +34,7 @@ spring: ...@@ -34,7 +34,7 @@ spring:
34 #topic-name 34 #topic-name
35 topic-name: fdx.apac.cn.shipment.import.cdm.iclear 35 topic-name: fdx.apac.cn.shipment.import.cdm.iclear
36 # 指定默认消费者group id --> 由于在kafka中,同一组中的consumer不会读取到同一个消息,依靠groud.id设置组名 36 # 指定默认消费者group id --> 由于在kafka中,同一组中的consumer不会读取到同一个消息,依靠groud.id设置组名
37 - group-id: imp-exp-tw-uat 37 + group-id: imp-exp-iclconnect-uat
38 # smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest 38 # smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest
39 auto-offset-reset: earliest 39 auto-offset-reset: earliest
40 # enable.auto.commit:true --> 设置自动提交offset 40 # enable.auto.commit:true --> 设置自动提交offset
......
...@@ -36,4 +36,8 @@ mybatis: ...@@ -36,4 +36,8 @@ mybatis:
36 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 36 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
37 #开启驼峰与下划线转换 37 #开启驼峰与下划线转换
38 map-underscore-to-camel-case: true 38 map-underscore-to-camel-case: true
39 - call-setters-on-nulls: true
...\ No newline at end of file ...\ No newline at end of file
39 + call-setters-on-nulls: true
40 +#全局异常拦截是否生效
41 +common:
42 + exception-advice-webconfig:
43 + enable: true
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <configuration> 2 <configuration>
3 <springProfile name="dev,uat,prod"> 3 <springProfile name="dev,uat,prod">
4 <!-- 日志存放路径 --> 4 <!-- 日志存放路径 -->
5 - <property name="log.path" value="/var/fedex/iclearConnect/weblogic/iclearConnect/kafka-cndc-server"></property> 5 + <property name="log.path" value="/var/fedex/iclconnect/weblogic/kafka-cndc-server"></property>
6 </springProfile> 6 </springProfile>
7 <springProfile name="test"> 7 <springProfile name="test">
8 <!-- 日志存放路径 --> 8 <!-- 日志存放路径 -->
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
61 <rollingPolicy 61 <rollingPolicy
62 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> 62 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
63 <!-- 日志文件名格式 --> 63 <!-- 日志文件名格式 -->
64 - <fileNamePattern>${log.path}/tw-kafka-log-info.%d{yyyy-MM-dd}.%i.log 64 + <fileNamePattern>${log.path}/kafka-log-info.%d{yyyy-MM-dd}.%i.log
65 </fileNamePattern> 65 </fileNamePattern>
66 <!-- 日志最大的历史 30天 --> 66 <!-- 日志最大的历史 30天 -->
67 <maxHistory>${log.maxHistory}</maxHistory> 67 <maxHistory>${log.maxHistory}</maxHistory>
...@@ -82,12 +82,12 @@ ...@@ -82,12 +82,12 @@
82 82
83 <appender name="file_error" 83 <appender name="file_error"
84 class="ch.qos.logback.core.rolling.RollingFileAppender"> 84 class="ch.qos.logback.core.rolling.RollingFileAppender">
85 - <file>${log.path}/tw-kafka-log-error.log</file> 85 + <file>${log.path}/kafka-log-error.log</file>
86 <!-- 循环政策:基于时间创建日志文件 --> 86 <!-- 循环政策:基于时间创建日志文件 -->
87 <rollingPolicy 87 <rollingPolicy
88 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> 88 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
89 <!-- 日志文件名格式 --> 89 <!-- 日志文件名格式 -->
90 - <fileNamePattern>${log.path}/tw-kafka-log-error.%d{yyyy-MM-dd}.%i.log 90 + <fileNamePattern>${log.path}/kafka-log-error.%d{yyyy-MM-dd}.%i.log
91 </fileNamePattern> 91 </fileNamePattern>
92 <!-- 日志最大的历史 30天 --> 92 <!-- 日志最大的历史 30天 -->
93 <maxHistory>${log.maxHistory}</maxHistory> 93 <maxHistory>${log.maxHistory}</maxHistory>
......
1 +#******************鉴权相关提示,需要做国际化******************
2 +#authentication包
3 +#没有访问权限
4 +system_exception_10001=No access rights.
5 +#没有通过权限认证
6 +system_exception_10002=Failed to pass the authentication.
7 +#登录身份异常
8 +system_exception_10003=Login identity is abnormal.
9 +#登录超过8小时,请重新登录
10 +system_exception_10004=Login has exceeded 8 hours, please log in again.
11 +#登录已过期,请重新登录
12 +system_exception_10005=Login has expired, please log in again.
...\ No newline at end of file ...\ No newline at end of file
......
1 #******************鉴权相关提示,需要做国际化****************** 1 #******************鉴权相关提示,需要做国际化******************
2 #authentication包 2 #authentication包
3 -system_exception_10001=没有访问权限
4 -system_exception_10002=没有通过权限认证
5 -system_exception_10003=登录身份异常
6 -system_exception_10004=登录超过8小时,请重新登录
7 -system_exception_10005=登录已过期
8 -system_exception_10006=登录身份异常
9 -system_exception_10007=登录已过期,请重新登录
...\ No newline at end of file ...\ No newline at end of file
3 +#没有访问权限
4 +system_exception_10001=No access rights.
5 +#没有通过权限认证
6 +system_exception_10002=Failed to pass the authentication.
7 +#登录身份异常
8 +system_exception_10003=Login identity is abnormal.
9 +#登录超过8小时,请重新登录
10 +system_exception_10004=Login has exceeded 8 hours, please log in again.
11 +#登录已过期,请重新登录
12 +system_exception_10005=Login has expired, please log in again.
...\ No newline at end of file ...\ No newline at end of file
......
1 -#******************鉴权相关提示,需要做国际化******************
2 -#authentication包
3 -system_exception_10001=没有访问权限
4 -system_exception_10002=没有通过权限认证
5 -system_exception_10003=登录身份异常
6 -system_exception_10004=登录超过8小时,请重新登录
7 -system_exception_10005=登录已过期
8 -system_exception_10006=登录身份异常
9 -system_exception_10007=登录已过期,请重新登录
...\ No newline at end of file ...\ No newline at end of file
1 +##******************鉴权相关提示,需要做国际化******************
2 +##authentication包
3 +#system_exception_10001=没有访问权限
4 +#system_exception_10002=没有通过权限认证
5 +#system_exception_10003=登录身份异常
6 +#system_exception_10004=登录超过8小时,请重新登录
7 +#system_exception_10005=登录已过期,请重新登录
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -10,6 +10,7 @@ public enum FCLSessionInfoEnum { ...@@ -10,6 +10,7 @@ public enum FCLSessionInfoEnum {
10 10
11 FDX_LOGIN("fdx_login","FCL登录SESSION信息"), 11 FDX_LOGIN("fdx_login","FCL登录SESSION信息"),
12 FCL_UUID("fcl_uuid","FCL-UUID信息"), 12 FCL_UUID("fcl_uuid","FCL-UUID信息"),
13 + FCL_OAUTH("ab45335bc623e59","FCL-oauth信息"),
13 FCL_CONTACTNAME("fcl_contactname","FCL联系人信息"); 14 FCL_CONTACTNAME("fcl_contactname","FCL联系人信息");
14 15
15 FCLSessionInfoEnum(String code, String name){ 16 FCLSessionInfoEnum(String code, String name){
......
...@@ -7,15 +7,43 @@ import org.springframework.context.annotation.Configuration; ...@@ -7,15 +7,43 @@ import org.springframework.context.annotation.Configuration;
7 @Data 7 @Data
8 @Configuration 8 @Configuration
9 public class PropertiesConfig { 9 public class PropertiesConfig {
10 +
11 + @Value("${fcl.interface.fedex_api_address}")
12 + private String fedexApiAddress;
13 +
10 @Value("${fcl.login.url}") 14 @Value("${fcl.login.url}")
11 private String fclLoginUrl; 15 private String fclLoginUrl;
12 16
13 - @Value("${fcl.twidx.url}") 17 + @Value("${fcl.preClearIndex.url}")
14 - private String twIdxUrl; 18 + private String preClearIndexUrl;
19 +
20 + @Value("${fcl.interface.userinfo.url}")
21 + private String userInfoUrl;
22 +
23 + @Value("${fcl.interface.account.url}")
24 + private String userAccountUrl;
25 +
26 + @Value("${fcl.interface.shippingaccounts.url}")
27 + private String userShippingaccountsUrl;
15 28
16 @Value("${fcl.login.redjrectLogin}") 29 @Value("${fcl.login.redjrectLogin}")
17 private String redjrectLogin; 30 private String redjrectLogin;
18 31
19 @Value("${spring.profiles.env}") 32 @Value("${spring.profiles.env}")
20 private String env; 33 private String env;
34 +
35 + @Value("${fcl.interface.token.url}")
36 + private String fclTokenUrl;
37 +
38 + @Value("${fcl.interface.token.grant_type}")
39 + private String fclGrantType;
40 +
41 + @Value("${fcl.interface.token.client_id}")
42 + private String fclClientId;
43 +
44 + @Value("${fcl.interface.token.client_secret}")
45 + private String fclClientSecret;
46 +
47 + @Value("${fcl.interface.token.scope}")
48 + private String fclScope;
21 } 49 }
......
...@@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.contants.ParamConfigConstants; ...@@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.contants.ParamConfigConstants;
7 import com.fedex.connect.common.dependencies.contants.RedisConstants; 7 import com.fedex.connect.common.dependencies.contants.RedisConstants;
8 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 8 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
9 import com.fedex.connect.common.dependencies.enums.sys.UserLoginTypeEnum; 9 import com.fedex.connect.common.dependencies.enums.sys.UserLoginTypeEnum;
10 +import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
10 import com.fedex.connect.common.dependencies.util.GsonUtils; 11 import com.fedex.connect.common.dependencies.util.GsonUtils;
11 import com.fedex.connect.common.dependencies.util.JwtTokenUtils; 12 import com.fedex.connect.common.dependencies.util.JwtTokenUtils;
12 import com.fedex.connect.common.dependencies.util.StringExtUtil; 13 import com.fedex.connect.common.dependencies.util.StringExtUtil;
...@@ -15,9 +16,12 @@ import com.fedex.connect.common.model.sys.User; ...@@ -15,9 +16,12 @@ import com.fedex.connect.common.model.sys.User;
15 import com.fedex.connect.manager.common.enums.FCLSessionInfoEnum; 16 import com.fedex.connect.manager.common.enums.FCLSessionInfoEnum;
16 import com.fedex.connect.manager.controller.base.BaseController; 17 import com.fedex.connect.manager.controller.base.BaseController;
17 import com.fedex.connect.manager.controller.sys.ISysAuthController; 18 import com.fedex.connect.manager.controller.sys.ISysAuthController;
19 +import com.fedex.connect.manager.data.dto.FclInfoDto;
18 import com.fedex.connect.manager.data.dto.LogLoginDto; 20 import com.fedex.connect.manager.data.dto.LogLoginDto;
19 import com.fedex.connect.manager.data.dto.LoginRequest; 21 import com.fedex.connect.manager.data.dto.LoginRequest;
20 import com.fedex.connect.manager.data.dto.SysUserDto; 22 import com.fedex.connect.manager.data.dto.SysUserDto;
23 +import com.fedex.connect.manager.enums.ResponseCode;
24 +import com.fedex.connect.manager.util.LoginControllerUtils;
21 import com.fedex.connect.manager.util.ParamConfigUtil; 25 import com.fedex.connect.manager.util.ParamConfigUtil;
22 import com.google.gson.JsonObject; 26 import com.google.gson.JsonObject;
23 import io.jsonwebtoken.Claims; 27 import io.jsonwebtoken.Claims;
...@@ -56,6 +60,9 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -56,6 +60,9 @@ public class SysAuthController extends BaseController implements ISysAuthControl
56 @Autowired 60 @Autowired
57 private ParamConfigUtil paramConfigUtil; 61 private ParamConfigUtil paramConfigUtil;
58 62
63 + @Autowired
64 + private LoginControllerUtils loginControllerUtils;
65 +
59 @Value("${fcl.interface.logurl}") 66 @Value("${fcl.interface.logurl}")
60 private String fclIndexLoginUrl; 67 private String fclIndexLoginUrl;
61 68
...@@ -86,17 +93,18 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -86,17 +93,18 @@ public class SysAuthController extends BaseController implements ISysAuthControl
86 List<String> cookiesList = new ArrayList(); 93 List<String> cookiesList = new ArrayList();
87 List<String> saveKeyList = FCLSessionInfoEnum.getCodeList(); 94 List<String> saveKeyList = FCLSessionInfoEnum.getCodeList();
88 sysUserService.getFclData(request,cookiesList,saveKeyList); 95 sysUserService.getFclData(request,cookiesList,saveKeyList);
96 + log.info("cookiesList.size():{},saveKeyList:{}",cookiesList.size(),saveKeyList.size());
89 if (cookiesList.size() > 0 && cookiesList.size() == saveKeyList.size()){ 97 if (cookiesList.size() > 0 && cookiesList.size() == saveKeyList.size()){
90 JsonObject jsonObject = GsonUtils.stringToBean("{"+String.join(",",cookiesList)+"}",JsonObject.class); 98 JsonObject jsonObject = GsonUtils.stringToBean("{"+String.join(",",cookiesList)+"}",JsonObject.class);
91 ResponseVo tokenResult = sysAuthService.createFclToken(jsonObject); 99 ResponseVo tokenResult = sysAuthService.createFclToken(jsonObject);
92 if (tokenResult.isSuccess()){ 100 if (tokenResult.isSuccess()){
93 String fcl_token_key = String.valueOf(tokenResult.getData()); 101 String fcl_token_key = String.valueOf(tokenResult.getData());
94 String redirectUrl = String.format("%s?token=%s", paramConfigUtil.getParamValue(ParamConfigConstants.FCL_PARAM_KEYS.FCL_LOGIN_URL), fcl_token_key); 102 String redirectUrl = String.format("%s?token=%s", paramConfigUtil.getParamValue(ParamConfigConstants.FCL_PARAM_KEYS.FCL_LOGIN_URL), fcl_token_key);
95 - System.out.println(redirectUrl); 103 + log.info("redirectUrl :{}",redirectUrl);
96 res.sendRedirect(redirectUrl); 104 res.sendRedirect(redirectUrl);
97 } 105 }
98 }else { 106 }else {
99 - res.sendRedirect(propertiesConfig.getTwIdxUrl()); 107 + res.sendRedirect(propertiesConfig.getPreClearIndexUrl());
100 } 108 }
101 109
102 } catch (IOException e) { 110 } catch (IOException e) {
...@@ -121,14 +129,27 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -121,14 +129,27 @@ public class SysAuthController extends BaseController implements ISysAuthControl
121 if (StringUtils.isBlank(fcl_token_key)){ 129 if (StringUtils.isBlank(fcl_token_key)){
122 return; 130 return;
123 } 131 }
124 - JsonObject jsonObject = sysAuthService.getFclToken(fcl_token_key); 132 + JsonObject tokenInfo = sysAuthService.getFclToken(fcl_token_key);
125 - String fcl_uuid = jsonObject.get(FCLSessionInfoEnum.FCL_UUID.getCode()).getAsString(); 133 + /**
126 - String fcl_contactname = jsonObject.get(FCLSessionInfoEnum.FCL_CONTACTNAME.getCode()).getAsString().replaceAll("\"",""); 134 + * 获取fcl相关信息
135 + */
136 + FclInfoDto fclInfoDto = loginControllerUtils.getFclInfo(tokenInfo);
137 + String fcl_uuid = fclInfoDto.getFclUuid();
138 + String fcl_contactname = fclInfoDto.getFclContactname();
127 139
128 User loginUser = sysUserService.findUserByFcl(fcl_uuid); 140 User loginUser = sysUserService.findUserByFcl(fcl_uuid);
129 if (loginUser == null){ 141 if (loginUser == null){
130 //如果用户不存在,则创建FCL用户信息 142 //如果用户不存在,则创建FCL用户信息
131 SysUserDto dto = new SysUserDto(fcl_uuid, fcl_contactname); 143 SysUserDto dto = new SysUserDto(fcl_uuid, fcl_contactname);
144 + sysUserService.initUserInfo(fclInfoDto,dto);
145 + try {
146 + /**
147 + * 初始化表基础字段
148 + */
149 + AssignmentFieldUtils.assignmentTableBaseField(dto);
150 + }catch(Exception ex){
151 + log.error("用户登录初始化账号基础信息失败:",ex);
152 + }
132 loginUser = sysUserService.save(dto); 153 loginUser = sysUserService.save(dto);
133 } else { 154 } else {
134 //首先对用户中的姓名进行解密 155 //首先对用户中的姓名进行解密
...@@ -139,7 +160,6 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -139,7 +160,6 @@ public class SysAuthController extends BaseController implements ISysAuthControl
139 } 160 }
140 } 161 }
141 //如果名称和原来不一样,则更新 162 //如果名称和原来不一样,则更新
142 -
143 if(StringUtils.isNotBlank(fcl_contactname) && !fcl_contactname.equals(loginUser.getUserName())){ 163 if(StringUtils.isNotBlank(fcl_contactname) && !fcl_contactname.equals(loginUser.getUserName())){
144 String encode_fcl_contactname = StringUtils.trimToEmpty(fcl_contactname); 164 String encode_fcl_contactname = StringUtils.trimToEmpty(fcl_contactname);
145 if (StringUtils.isNotBlank(encode_fcl_contactname)){ 165 if (StringUtils.isNotBlank(encode_fcl_contactname)){
...@@ -147,7 +167,15 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -147,7 +167,15 @@ public class SysAuthController extends BaseController implements ISysAuthControl
147 } else { 167 } else {
148 loginUser.setUserName(StringUtils.trimToEmpty(fcl_contactname)); 168 loginUser.setUserName(StringUtils.trimToEmpty(fcl_contactname));
149 } 169 }
150 - loginUser.setModifyTime(new Date()); 170 + try {
171 + /**
172 + * 初始化表基础字段
173 + */
174 + AssignmentFieldUtils.assignmentTableBaseField(loginUser);
175 + }catch(Exception ex){
176 + log.error("用户登录初始化账号基础信息失败:",ex);
177 + }
178 + sysUserService.initUserInfo(fclInfoDto,loginUser);
151 sysUserService.update(loginUser); 179 sysUserService.update(loginUser);
152 } 180 }
153 } 181 }
...@@ -157,20 +185,18 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -157,20 +185,18 @@ public class SysAuthController extends BaseController implements ISysAuthControl
157 loginRequest.setRememberMe(true); 185 loginRequest.setRememberMe(true);
158 ResponseVo tokenResult = sysAuthService.createAccessToken(loginRequest, loginUser); 186 ResponseVo tokenResult = sysAuthService.createAccessToken(loginRequest, loginUser);
159 187
160 -
161 DictionaryEntries dicUserLoginType = cacheSystem.getDicUserLoginType(UserLoginTypeEnum.FCLLOGINREGISTRATION.getCode()); 188 DictionaryEntries dicUserLoginType = cacheSystem.getDicUserLoginType(UserLoginTypeEnum.FCLLOGINREGISTRATION.getCode());
162 //记录日志 189 //记录日志
163 - LogLoginDto dto = new LogLoginDto(loginUser.getId(), dicUserLoginType.getId(), 190 + LogLoginDto dto = new LogLoginDto(loginUser.getId(), dicUserLoginType.getCode(),
164 UserLoginTypeEnum.LOGIN.getMsg()); 191 UserLoginTypeEnum.LOGIN.getMsg());
165 logLoginService.saveLoginLog(dto); 192 logLoginService.saveLoginLog(dto);
166 -
167 try{ 193 try{
168 if (tokenResult.isSuccess()){ 194 if (tokenResult.isSuccess()){
169 String redirectUrl = String.format("%s?token=%s&uid=%s", propertiesConfig.getRedjrectLogin(), tokenResult.getData(), loginUser.getId()); 195 String redirectUrl = String.format("%s?token=%s&uid=%s", propertiesConfig.getRedjrectLogin(), tokenResult.getData(), loginUser.getId());
170 res.sendRedirect(redirectUrl); 196 res.sendRedirect(redirectUrl);
171 log.info("wlgnLogin____________________finish:"+redirectUrl); 197 log.info("wlgnLogin____________________finish:"+redirectUrl);
172 }else { 198 }else {
173 - res.sendRedirect(propertiesConfig.getTwIdxUrl()); 199 + res.sendRedirect(propertiesConfig.getPreClearIndexUrl());
174 } 200 }
175 } catch (IOException e) { 201 } catch (IOException e) {
176 log.error("FCL客户登录初始化 | 发生异常 | 异常如下:",e); 202 log.error("FCL客户登录初始化 | 发生异常 | 异常如下:",e);
...@@ -243,7 +269,7 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -243,7 +269,7 @@ public class SysAuthController extends BaseController implements ISysAuthControl
243 new SecurityContextLogoutHandler().logout(request, response, auth); 269 new SecurityContextLogoutHandler().logout(request, response, auth);
244 } 270 }
245 resultRS.setCode(HttpServletResponse.SC_OK); 271 resultRS.setCode(HttpServletResponse.SC_OK);
246 - resultRS.setMsg(localeMessageUtil.getMessage("system_exception_40007")); 272 + resultRS.setMsg(localeMessageUtil.getMessage(ResponseCode.MESSAGE_CODE_40005.getMsg()));
247 //清理redis中token 273 //清理redis中token
248 String token = request.getHeader(SecurityConstants.TOKEN_HEADER); 274 String token = request.getHeader(SecurityConstants.TOKEN_HEADER);
249 275
...@@ -264,7 +290,7 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -264,7 +290,7 @@ public class SysAuthController extends BaseController implements ISysAuthControl
264 return resultRS; 290 return resultRS;
265 } catch (Exception e) { 291 } catch (Exception e) {
266 log.error("登出3失败",e); 292 log.error("登出3失败",e);
267 - resultRS.setMsg(localeMessageUtil.getMessage("system_exception_40008")); 293 + resultRS.setMsg(localeMessageUtil.getMessage(ResponseCode.MESSAGE_CODE_40006.getMsg()));
268 resultRS.setCode(HttpServletResponse.SC_BAD_REQUEST); 294 resultRS.setCode(HttpServletResponse.SC_BAD_REQUEST);
269 } finally { 295 } finally {
270 if (!org.springframework.util.StringUtils.isEmpty(id)){ 296 if (!org.springframework.util.StringUtils.isEmpty(id)){
...@@ -272,11 +298,11 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -272,11 +298,11 @@ public class SysAuthController extends BaseController implements ISysAuthControl
272 //插入日志 298 //插入日志
273 User sysUser = sysUserService.findById(Long.parseLong(id)); 299 User sysUser = sysUserService.findById(Long.parseLong(id));
274 DictionaryEntries dicUserLoginType = cacheSystem.getDicUserLoginType(UserLoginTypeEnum.EXIT.getCode()); 300 DictionaryEntries dicUserLoginType = cacheSystem.getDicUserLoginType(UserLoginTypeEnum.EXIT.getCode());
275 - LogLoginDto dto = new LogLoginDto(sysUser.getId(), dicUserLoginType.getId(), 301 + LogLoginDto dto = new LogLoginDto(sysUser.getId(), dicUserLoginType.getCode(),
276 UserLoginTypeEnum.EXIT.getMsg()); 302 UserLoginTypeEnum.EXIT.getMsg());
277 logLoginService.saveLoginLog(dto); 303 logLoginService.saveLoginLog(dto);
278 } 304 }
279 } 305 }
280 return resultRS; 306 return resultRS;
281 } 307 }
282 -} 308 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -30,13 +30,13 @@ public class SysUserController extends BaseController implements ISysUserControl ...@@ -30,13 +30,13 @@ public class SysUserController extends BaseController implements ISysUserControl
30 } 30 }
31 31
32 if (sysUser.getId() == null || sysUser.getId() == 0){ 32 if (sysUser.getId() == null || sysUser.getId() == 0){
33 - responseUtils.fail(ResponseCode.MESSAGE_CODE_40005); 33 + responseUtils.fail(ResponseCode.MESSAGE_CODE_40001);
34 } 34 }
35 //返回用户信息 35 //返回用户信息
36 return responseUtils.success(sysUser); 36 return responseUtils.success(sysUser);
37 } catch (Exception e){ 37 } catch (Exception e){
38 log.error("获取用户信息失败",e); 38 log.error("获取用户信息失败",e);
39 - responseUtils.fail(ResponseCode.MESSAGE_CODE_40006); 39 + responseUtils.fail(ResponseCode.MESSAGE_CODE_40001);
40 } 40 }
41 return success; 41 return success;
42 } 42 }
...@@ -56,7 +56,7 @@ public class SysUserController extends BaseController implements ISysUserControl ...@@ -56,7 +56,7 @@ public class SysUserController extends BaseController implements ISysUserControl
56 return responseUtils.success(sysUser); 56 return responseUtils.success(sysUser);
57 } catch (Exception e){ 57 } catch (Exception e){
58 log.error("获取用户信息失败",e); 58 log.error("获取用户信息失败",e);
59 - responseUtils.fail(ResponseCode.MESSAGE_CODE_40006); 59 + responseUtils.fail(ResponseCode.MESSAGE_CODE_40001);
60 } 60 }
61 return success; 61 return success;
62 } 62 }
......
1 +package com.fedex.connect.manager.data.dto;
2 +
3 +import lombok.Data;
4 +
5 +/**
6 + * @Author mt
7 + * @Description fcl登录信息
8 + * @Date 2025/5/26
9 + */
10 +@Data
11 +public class FclInfoDto {
12 + //fcl身份认证oauth
13 + String oAuthSecret;
14 + //fdxLogin信息
15 + String fdxLogin;
16 + //用户uuid
17 + String fclUuid;
18 + //用户名称
19 + String fclContactname;
20 + //用户登录账号
21 + String userId;
22 + //用户邮箱
23 + String emailAddress;
24 + //用户计费账号
25 + String shipperAccounts;
26 +}
1 package com.fedex.connect.manager.data.dto; 1 package com.fedex.connect.manager.data.dto;
2 2
3 +import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
3 import com.fedex.connect.common.model.log.UserLoginInfo; 4 import com.fedex.connect.common.model.log.UserLoginInfo;
5 +import lombok.Data;
4 6
5 import java.net.InetAddress; 7 import java.net.InetAddress;
6 import java.net.UnknownHostException; 8 import java.net.UnknownHostException;
...@@ -12,12 +14,13 @@ import java.util.Date; ...@@ -12,12 +14,13 @@ import java.util.Date;
12 * 不建议反射:数据量上来反射copy很慢。set最快 14 * 不建议反射:数据量上来反射copy很慢。set最快
13 * dao 转dto 看业务是否需要了。 15 * dao 转dto 看业务是否需要了。
14 */ 16 */
17 +@Data
15 public class LogLoginDto { 18 public class LogLoginDto {
16 19
17 /** 20 /**
18 * 重载构造函数 21 * 重载构造函数
19 */ 22 */
20 - public LogLoginDto(Long userId, Long operType, String operDesc){ 23 + public LogLoginDto(Long userId, String operType, String operDesc){
21 this.userId = userId; 24 this.userId = userId;
22 this.operTime = new Date(); 25 this.operTime = new Date();
23 this.operType = operType; 26 this.operType = operType;
...@@ -42,9 +45,19 @@ public class LogLoginDto { ...@@ -42,9 +45,19 @@ public class LogLoginDto {
42 if (dto.getId() != null && dto.getId() != 0){ 45 if (dto.getId() != null && dto.getId() != 0){
43 log.setId(dto.getId()); 46 log.setId(dto.getId());
44 } 47 }
48 + log.setOperTypeCode(dto.getOperType());
49 + log.setOperTypeName(dto.getOperDesc());
45 log.setUserId(dto.getUserId()); 50 log.setUserId(dto.getUserId());
46 log.setOperDesc(dto.getOperDesc()); 51 log.setOperDesc(dto.getOperDesc());
47 log.setIp(dto.getIp()); 52 log.setIp(dto.getIp());
53 + try {
54 + /**
55 + * 初始化表基础字段
56 + */
57 + AssignmentFieldUtils.assignmentTableBaseField(log);
58 + }catch(Exception ex){
59 + ex.printStackTrace();
60 + }
48 return log; 61 return log;
49 } 62 }
50 63
...@@ -66,9 +79,14 @@ public class LogLoginDto { ...@@ -66,9 +79,14 @@ public class LogLoginDto {
66 79
67 /** 80 /**
68 * 操作类型 81 * 操作类型
69 - 1:登录 2:退出 3:修改密码4:FCL登录注册 82 + userLoginType_01 登录
83 + userLoginType_02 退出
84 + userLoginType_03 修改密码
85 + userLoginType_04 FCL登录注册
86 + userLoginType_05 停用
87 + userLoginType_06 启用
70 */ 88 */
71 - private Long operType; 89 + private String operType;
72 90
73 /** 91 /**
74 * 操作描述 92 * 操作描述
...@@ -79,64 +97,4 @@ public class LogLoginDto { ...@@ -79,64 +97,4 @@ public class LogLoginDto {
79 * IP 97 * IP
80 */ 98 */
81 private String ip; 99 private String ip;
82 -
83 - public Long getId() {
84 - return id;
85 - }
86 -
87 - public void setId(Long id) {
88 - this.id = id;
89 - }
90 -
91 - public Long getUserId() {
92 - return userId;
93 - }
94 -
95 - public void setUserId(Long userId) {
96 - this.userId = userId;
97 - }
98 -
99 - public Date getOperTime() {
100 - return operTime;
101 - }
102 -
103 - public void setOperTime(Date operTime) {
104 - this.operTime = operTime;
105 - }
106 -
107 - public Long getOperType() {
108 - return operType;
109 - }
110 -
111 - public void setOperType(Long operType) {
112 - this.operType = operType;
113 - }
114 -
115 - public String getOperDesc() {
116 - return operDesc;
117 - }
118 -
119 - public void setOperDesc(String operDesc) {
120 - this.operDesc = operDesc;
121 - }
122 -
123 - public String getIp() {
124 - return ip;
125 - }
126 -
127 - public void setIp(String ip) {
128 - this.ip = ip;
129 - }
130 -
131 - public LogLoginDto() {
132 - }
133 -
134 - public LogLoginDto(Long id, Long userId, Date operTime, Long operType, String operDesc, String ip) {
135 - this.id = id;
136 - this.userId = userId;
137 - this.operTime = operTime;
138 - this.operType = operType;
139 - this.operDesc = operDesc;
140 - this.ip = ip;
141 - }
142 } 100 }
......
...@@ -46,6 +46,8 @@ public class SysUserDto { ...@@ -46,6 +46,8 @@ public class SysUserDto {
46 user.setTypeCode(dto.getTypeCode()); 46 user.setTypeCode(dto.getTypeCode());
47 user.setUserUuid(dto.getUserUuid()); 47 user.setUserUuid(dto.getUserUuid());
48 user.setTypeName(dto.getTypeName()); 48 user.setTypeName(dto.getTypeName());
49 + user.setAddflag1(dto.getAddflag1());
50 + user.setAddflag2(dto.getAddflag2());
49 return user; 51 return user;
50 } 52 }
51 53
...@@ -60,7 +62,7 @@ public class SysUserDto { ...@@ -60,7 +62,7 @@ public class SysUserDto {
60 this.userName = fcl_acc_no; 62 this.userName = fcl_acc_no;
61 } 63 }
62 this.typeCode = UserTypeEnum.FCL.getCode(); 64 this.typeCode = UserTypeEnum.FCL.getCode();
63 - this.typeName = UserTypeEnum.FCL.getMsg(); 65 + this.typeName = UserTypeEnum.FCL.getEnMsg();
64 this.password = fcl_pwd; 66 this.password = fcl_pwd;
65 this.loginName = uuid; 67 this.loginName = uuid;
66 this.email = null; 68 this.email = null;
...@@ -69,6 +71,8 @@ public class SysUserDto { ...@@ -69,6 +71,8 @@ public class SysUserDto {
69 this.unifiedBusinessNum = null; 71 this.unifiedBusinessNum = null;
70 this.customsSerialNum = null; 72 this.customsSerialNum = null;
71 this.userUuid = uuid; 73 this.userUuid = uuid;
74 + this.addflag1 = 1;
75 + this.addflag2 = 1;
72 } 76 }
73 77
74 /** 78 /**
...@@ -167,5 +171,15 @@ public class SysUserDto { ...@@ -167,5 +171,15 @@ public class SysUserDto {
167 @JsonIgnore 171 @JsonIgnore
168 private String remark; 172 private String remark;
169 173
174 + /**
175 + * ADD时弹出提示1
176 + */
177 + private Integer addflag1;
178 +
179 + /**
180 + * ADD时弹出提示2
181 + */
182 + private Integer addflag2;
183 +
170 184
171 } 185 }
......
1 +package com.fedex.connect.manager.data.vo;
2 +
3 +import lombok.Data;
4 +
5 +@Data
6 +public class EanTwoVo {
7 + private String defaultEanInfo;
8 + private String accountNumberInfo;
9 +}
1 +package com.fedex.connect.manager.data.vo;
2 +
3 +
4 +import lombok.Data;
5 +
6 +import java.io.Serializable;
7 +import java.util.List;
8 +
9 +/**
10 + * @Author mt
11 + * @Description FCL接口获取用户信息-响应数据对象
12 + * @Date 2025/5/27
13 + */
14 +@Data
15 +public class FCLAccountsResponseVo implements Serializable {
16 +
17 + private String transactionId;
18 + private OutPut output;
19 +
20 + @Data
21 + public static class OutPut implements Serializable{
22 + List<FCLCustomerAccount> customerAccountList;
23 + }
24 +
25 + @Data
26 + public static class FCLCustomerAccount implements Serializable{
27 + private Account account;
28 + private List<ActiveAppRoleInfo> activeAppRoleInfos;
29 + }
30 +
31 + /**
32 + * 账号信息
33 + */
34 + @Data
35 + public static class Account implements Serializable{
36 + private AccountIdentifier accountIdentifier;
37 + }
38 + @Data
39 + public static class ActiveAppRoleInfo implements Serializable{
40 + private String appName;
41 + private String roleCode;
42 + private Integer roleLevelCode;
43 + }
44 + @Data
45 + public static class AccountIdentifier implements Serializable{
46 + /**
47 + * 账号对应EAN信息
48 + */
49 + private AccountNumber accountNumber;
50 + private String accountNickname;
51 + private String displayName;
52 + private Boolean meterNumberAvailable;
53 + }
54 + @Data
55 + public static class AccountNumber implements Serializable{
56 + private String value;
57 + private String key;
58 + }
59 +}
60 +
1 +package com.fedex.connect.manager.data.vo;
2 +
3 +import lombok.Data;
4 +
5 +/**
6 + * @Author mt
7 + * @Description FCL接口获取token响应对象
8 + * @Date 2025/5/27
9 + */
10 +@Data
11 +public class FCLTokenResponseVo {
12 +
13 + private String access_token;
14 + private String token_type;
15 + private Long expires_in;
16 + private String scope;
17 +
18 + public String getAuthorization(){
19 + return this.toString(this.token_type) + " " + this.toString(this.access_token);
20 + }
21 +
22 + private String toString(String str) {
23 + return str == null ? "" : str;
24 + }
25 +}
1 +package com.fedex.connect.manager.data.vo;
2 +
3 +
4 +import com.alibaba.fastjson.JSONObject;
5 +import lombok.Data;
6 +
7 +import java.io.Serializable;
8 +import java.util.List;
9 +
10 +/**
11 + * @Author mt
12 + * @Description FCL接口获取用户信息-响应数据对象
13 + * @Date 2025/5/26
14 + */
15 +@Data
16 +public class FCLUserInfoResponseVo implements Serializable {
17 +
18 + private String transactionId;
19 + private OutPut output;
20 +
21 + @Data
22 + public static class OutPut implements Serializable{
23 + UserProfile userProfile;
24 + }
25 +
26 + @Data
27 + public static class UserProfile implements Serializable{
28 + private Boolean profileLocked;
29 + private LoginInformation loginInformation;
30 + private UserProfileAddress userProfileAddress;
31 + private String lastProfileModifiedDate;
32 + private String uuid;
33 + }
34 +
35 + @Data
36 + public static class LoginInformation implements Serializable{
37 + /**
38 + * 用户账号信息
39 + */
40 + private String userId;
41 + private Boolean emailAsUserId;
42 + private SecretQuestion secretQuestion;
43 + }
44 +
45 + @Data
46 + public static class SecretQuestion implements Serializable{
47 + private String code;
48 + private String text;
49 + }
50 +
51 + @Data
52 + public static class UserProfileAddress implements Serializable{
53 + private Contact contact;
54 + private ContactAncillaryDetail contactAncillaryDetail;
55 + private Address address;
56 + }
57 +
58 + @Data
59 + public static class Contact implements Serializable{
60 + private PersonName personName;
61 + private String companyName;
62 + private String phoneNumber;
63 + private String faxNumber;
64 + private String emailAddress;
65 + }
66 +
67 + @Data
68 + public static class PersonName implements Serializable{
69 + private String firstName;
70 + private String middleName;
71 + private String lastName;
72 + }
73 + @Data
74 + public static class ContactAncillaryDetail implements Serializable{
75 + private List<PhoneNumberDetails> phoneNumberDetails;
76 +
77 + }
78 +
79 + @Data
80 + public static class PhoneNumberDetails implements Serializable{
81 + private String type;
82 + private Number number;
83 + private JSONObject permissions;
84 + }
85 +
86 + @Data
87 + public static class Number implements Serializable{
88 + private String countryCode;
89 + private String localNumber;
90 + }
91 + @Data
92 + public static class Address implements Serializable{
93 + private List<String> streetLines;
94 + private String city;
95 + private String stateOrProvinceCode;
96 + private String postalCode;
97 + private String countryCode;
98 + private Boolean residential;
99 + }
100 +
101 +}
102 +
1 +package com.fedex.connect.manager.data.vo;
2 +
3 +import lombok.Data;
4 +
5 +import java.io.Serializable;
6 +import java.util.List;
7 +
8 +@Data
9 +public class FclEanTwoResponseVo implements Serializable{
10 +
11 + private String transactionId;
12 + private Output output;
13 +
14 + @Data
15 + public static class Output implements Serializable {
16 +
17 + private Boolean success;
18 + private List<AccountInfoVO> accountInfoVOs;
19 + }
20 +
21 + @Data
22 + public static class AccountInfoVO implements Serializable {
23 +
24 + private DefaultAccount defaultAccount;
25 + private List<AssociatedAccount> associatedAccountList;
26 + }
27 +
28 + @Data
29 + public static class DefaultAccount implements Serializable {
30 +
31 + private String value;
32 + private String key;
33 + }
34 +
35 + @Data
36 + public static class AssociatedAccount implements Serializable {
37 +
38 + private AccountNumber accountNumber;
39 + private String accountNickname;
40 + private String accountDisplayName;
41 + }
42 +
43 + @Data
44 + public static class AccountNumber implements Serializable {
45 +
46 + private String value;
47 + private String key;
48 + }
49 +}
1 +package com.fedex.connect.manager.data.vo;
2 +
3 +import lombok.AllArgsConstructor;
4 +import lombok.Data;
5 +import lombok.NoArgsConstructor;
6 +
7 +/**
8 + * @Author mt
9 + * @Description 调取用户信息返回VO
10 + * @Date 2025/5/26
11 + */
12 +@Data
13 +@NoArgsConstructor
14 +@AllArgsConstructor
15 +public class UserDataApiVo {
16 + private String userId;
17 + private String emailAddress;
18 + private String uuid;
19 + private String userName;
20 +}
...@@ -13,7 +13,6 @@ public enum ResponseCode { ...@@ -13,7 +13,6 @@ public enum ResponseCode {
13 MESSAGE_CODE_40004(40004,"system_exception_40004"), 13 MESSAGE_CODE_40004(40004,"system_exception_40004"),
14 MESSAGE_CODE_40005(40005,"system_exception_40005"), 14 MESSAGE_CODE_40005(40005,"system_exception_40005"),
15 MESSAGE_CODE_40006(40006,"system_exception_40006"), 15 MESSAGE_CODE_40006(40006,"system_exception_40006"),
16 - MESSAGE_CODE_40007(40007,"system_exception_40007"),
17 ; 16 ;
18 private Integer code; 17 private Integer code;
19 private String msg; 18 private String msg;
......
...@@ -11,8 +11,8 @@ import java.util.List; ...@@ -11,8 +11,8 @@ import java.util.List;
11 public interface PrivilegeExtMapper { 11 public interface PrivilegeExtMapper {
12 @Select({ 12 @Select({
13 "<script>", 13 "<script>",
14 - "SELECT * FROM T_SYS_PRIVILEGE", 14 + "SELECT * FROM T_SYS_PRIVILEGE ",
15 - "WHERE ID IN", 15 + "WHERE ID IN ",
16 "<foreach collection='ids' item='id' open='(' separator=',' close=')'>", 16 "<foreach collection='ids' item='id' open='(' separator=',' close=')'>",
17 "#{id}", 17 "#{id}",
18 "</foreach>", 18 "</foreach>",
......
...@@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; ...@@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository;
9 import java.util.List; 9 import java.util.List;
10 10
11 @Repository 11 @Repository
12 -public class RedisSlabExtImpl extends AbstractDaoRepository implements IRedisSlabRepository { 12 +public class RedisSlabRepositoryImpl extends AbstractDaoRepository implements IRedisSlabRepository {
13 13
14 @Override 14 @Override
15 public int insert(RedisSlab record) { 15 public int insert(RedisSlab record) {
......
...@@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; ...@@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository;
9 import java.util.List; 9 import java.util.List;
10 10
11 @Repository 11 @Repository
12 -public class UserExtRepositoryImpl extends AbstractDaoRepository implements IUserRepository { 12 +public class UserRepositoryImpl extends AbstractDaoRepository implements IUserRepository {
13 13
14 @Override 14 @Override
15 public List<User> selectByExample(UserExample example) { 15 public List<User> selectByExample(UserExample example) {
......
1 package com.fedex.connect.manager.service.log.impl; 1 package com.fedex.connect.manager.service.log.impl;
2 2
3 +import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
3 import com.fedex.connect.manager.data.dto.LogLoginDto; 4 import com.fedex.connect.manager.data.dto.LogLoginDto;
4 import com.fedex.connect.manager.data.model.LogShowModel; 5 import com.fedex.connect.manager.data.model.LogShowModel;
5 import com.fedex.connect.manager.service.base.BaseService; 6 import com.fedex.connect.manager.service.base.BaseService;
......
...@@ -2,6 +2,7 @@ package com.fedex.connect.manager.service.sys; ...@@ -2,6 +2,7 @@ package com.fedex.connect.manager.service.sys;
2 2
3 import com.fedex.connect.common.model.sys.User; 3 import com.fedex.connect.common.model.sys.User;
4 import com.fedex.connect.manager.data.bo.AddFlagBo; 4 import com.fedex.connect.manager.data.bo.AddFlagBo;
5 +import com.fedex.connect.manager.data.dto.FclInfoDto;
5 import com.fedex.connect.manager.data.dto.SysUserDto; 6 import com.fedex.connect.manager.data.dto.SysUserDto;
6 7
7 import javax.servlet.http.HttpServletRequest; 8 import javax.servlet.http.HttpServletRequest;
...@@ -19,4 +20,24 @@ public interface ISysUserService { ...@@ -19,4 +20,24 @@ public interface ISysUserService {
19 User findById(Long id); 20 User findById(Long id);
20 21
21 void updateAddFlag(User user, AddFlagBo bo); 22 void updateAddFlag(User user, AddFlagBo bo);
23 +
24 + /**
25 + * @Author mt
26 + * @Description 构造用户信息
27 + * @Date 2025/5/27
28 + * @param fclInfoDto
29 + * @param loginUser
30 + * @return void
31 + */
32 + void initUserInfo(FclInfoDto fclInfoDto,SysUserDto loginUser);
33 +
34 + /**
35 + * @Author mt
36 + * @Description 构造用户信息
37 + * @Date 2025/5/27
38 + * @param fclInfoDto
39 + * @param loginUser
40 + * @return void
41 + */
42 + void initUserInfo(FclInfoDto fclInfoDto, User loginUser);
22 } 43 }
......
1 package com.fedex.connect.manager.service.sys.impl; 1 package com.fedex.connect.manager.service.sys.impl;
2 2
3 import com.fedex.connect.common.dependencies.contants.DatabaseConstants; 3 import com.fedex.connect.common.dependencies.contants.DatabaseConstants;
4 +import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
4 import com.fedex.connect.common.model.sys.UserRole; 5 import com.fedex.connect.common.model.sys.UserRole;
5 import com.fedex.connect.manager.data.model.LogShowModel; 6 import com.fedex.connect.manager.data.model.LogShowModel;
6 import com.fedex.connect.manager.service.base.BaseService; 7 import com.fedex.connect.manager.service.base.BaseService;
...@@ -34,8 +35,14 @@ public class SysUserRoleServiceImpl extends BaseService implements ISysUserRoleS ...@@ -34,8 +35,14 @@ public class SysUserRoleServiceImpl extends BaseService implements ISysUserRoleS
34 userRole.setUserId(userId); 35 userRole.setUserId(userId);
35 userRole.setRoleId(roleId); 36 userRole.setRoleId(roleId);
36 userRole.setStatus(DatabaseConstants.GLOBAL_STATUS_VALID); 37 userRole.setStatus(DatabaseConstants.GLOBAL_STATUS_VALID);
37 - userRole.setCreateTime(new Date()); 38 + try {
38 - userRole.setModifyTime(new Date()); 39 + /**
40 + * 初始化表基础字段
41 + */
42 + AssignmentFieldUtils.assignmentTableBaseField(userRole);
43 + }catch(Exception ex){
44 + ex.printStackTrace();
45 + }
39 return userRoleRepository.insert(userRole); 46 return userRoleRepository.insert(userRole);
40 } catch (Exception e){ 47 } catch (Exception e){
41 log.error(LogShowModel.showException("Exception",e)); 48 log.error(LogShowModel.showException("Exception",e));
......
...@@ -5,6 +5,7 @@ import com.fedex.connect.common.dependencies.authentication.EncryptProvider; ...@@ -5,6 +5,7 @@ import com.fedex.connect.common.dependencies.authentication.EncryptProvider;
5 import com.fedex.connect.common.dependencies.cache.CacheSystem; 5 import com.fedex.connect.common.dependencies.cache.CacheSystem;
6 import com.fedex.connect.common.dependencies.contants.DatabaseConstants; 6 import com.fedex.connect.common.dependencies.contants.DatabaseConstants;
7 import com.fedex.connect.common.dependencies.enums.sys.RoleEnum; 7 import com.fedex.connect.common.dependencies.enums.sys.RoleEnum;
8 +import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
8 import com.fedex.connect.common.dependencies.util.Utils; 9 import com.fedex.connect.common.dependencies.util.Utils;
9 import com.fedex.connect.common.model.bi.DictionaryEntries; 10 import com.fedex.connect.common.model.bi.DictionaryEntries;
10 import com.fedex.connect.common.model.sys.Role; 11 import com.fedex.connect.common.model.sys.Role;
...@@ -12,6 +13,7 @@ import com.fedex.connect.common.model.sys.User; ...@@ -12,6 +13,7 @@ import com.fedex.connect.common.model.sys.User;
12 import com.fedex.connect.common.model.sys.UserExample; 13 import com.fedex.connect.common.model.sys.UserExample;
13 import com.fedex.connect.manager.config.PropertiesConfig; 14 import com.fedex.connect.manager.config.PropertiesConfig;
14 import com.fedex.connect.manager.data.bo.AddFlagBo; 15 import com.fedex.connect.manager.data.bo.AddFlagBo;
16 +import com.fedex.connect.manager.data.dto.FclInfoDto;
15 import com.fedex.connect.manager.data.dto.SysUserDto; 17 import com.fedex.connect.manager.data.dto.SysUserDto;
16 import com.fedex.connect.manager.data.model.LogShowModel; 18 import com.fedex.connect.manager.data.model.LogShowModel;
17 import com.fedex.connect.manager.service.base.BaseService; 19 import com.fedex.connect.manager.service.base.BaseService;
...@@ -70,7 +72,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { ...@@ -70,7 +72,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService {
70 UserExample example = new UserExample(); 72 UserExample example = new UserExample();
71 UserExample.Criteria criteria = example.createCriteria(); 73 UserExample.Criteria criteria = example.createCriteria();
72 criteria.andStatusEqualTo(DatabaseConstants.GLOBAL_STATUS_VALID); 74 criteria.andStatusEqualTo(DatabaseConstants.GLOBAL_STATUS_VALID);
73 - criteria.andLoginNameEqualTo(fclUuid); 75 + criteria.andUserUuidEqualTo(fclUuid);
74 //criteria.andFedexAccNoEqualTo(fclUuid); 76 //criteria.andFedexAccNoEqualTo(fclUuid);
75 example.setOrderByClause("ID DESC"); 77 example.setOrderByClause("ID DESC");
76 78
...@@ -83,7 +85,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { ...@@ -83,7 +85,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService {
83 //返回匹配出来第一个账户信息 85 //返回匹配出来第一个账户信息
84 return Utils.first(resultUserList); 86 return Utils.first(resultUserList);
85 } catch (Exception e){ 87 } catch (Exception e){
86 - log.error(LogShowModel.showException("Exception",e)); 88 + log.error("findUserByFcl error : ",e);
87 return null; 89 return null;
88 } 90 }
89 } 91 }
...@@ -131,6 +133,14 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { ...@@ -131,6 +133,14 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService {
131 @Transactional(rollbackFor = Exception.class) 133 @Transactional(rollbackFor = Exception.class)
132 public int saveSysUser(User user){ 134 public int saveSysUser(User user){
133 try{ 135 try{
136 + try {
137 + /**
138 + * 初始化表基础字段
139 + */
140 + AssignmentFieldUtils.assignmentTableBaseField(user);
141 + }catch(Exception ex){
142 + log.error("记录用户信息基础信息失败:",ex);
143 + }
134 return userRepository.insert(user); 144 return userRepository.insert(user);
135 } catch (Exception e){ 145 } catch (Exception e){
136 log.error(LogShowModel.showException("Exception",e)); 146 log.error(LogShowModel.showException("Exception",e));
...@@ -165,8 +175,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { ...@@ -165,8 +175,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService {
165 @Override 175 @Override
166 public void getFclData(HttpServletRequest request,List<String> cookiesList,List<String> saveKeyList) { 176 public void getFclData(HttpServletRequest request,List<String> cookiesList,List<String> saveKeyList) {
167 if (!propertiesConfig.getEnv().equalsIgnoreCase("dev") 177 if (!propertiesConfig.getEnv().equalsIgnoreCase("dev")
168 - && !propertiesConfig.getEnv().equalsIgnoreCase("test") 178 + && !propertiesConfig.getEnv().equalsIgnoreCase("test")) {
169 - && !propertiesConfig.getEnv().equalsIgnoreCase("uat")) {
170 Cookie[] cookies = request.getCookies(); 179 Cookie[] cookies = request.getCookies();
171 if (Utils.isEmpty(cookies)){ 180 if (Utils.isEmpty(cookies)){
172 return; 181 return;
...@@ -217,5 +226,43 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { ...@@ -217,5 +226,43 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService {
217 userRepository.updateByPrimaryKeySelective(user); 226 userRepository.updateByPrimaryKeySelective(user);
218 } 227 }
219 228
229 + /**
230 + * @Author mt
231 + * @Description 构造用户信息
232 + * @Date 2025/5/27
233 + * @param fclInfoDto
234 + * @param loginUser
235 + * @return void
236 + */
237 + public void initUserInfo(FclInfoDto fclInfoDto,SysUserDto loginUser){
238 + if (StringUtils.isNotEmpty(fclInfoDto.getUserId())){
239 + loginUser.setLoginName(fclInfoDto.getUserId());
240 + }
241 + if(StringUtils.isNotEmpty(fclInfoDto.getEmailAddress())){
242 + loginUser.setEmail(fclInfoDto.getEmailAddress());
243 + }
244 + if(StringUtils.isNotEmpty(fclInfoDto.getShipperAccounts())){
245 + loginUser.setAccountNo(fclInfoDto.getShipperAccounts());
246 + }
247 + }
220 248
249 + /**
250 + * @Author mt
251 + * @Description 构造用户信息
252 + * @Date 2025/5/27
253 + * @param fclInfoDto
254 + * @param loginUser
255 + * @return void
256 + */
257 + public void initUserInfo(FclInfoDto fclInfoDto,User loginUser){
258 + if (StringUtils.isNotEmpty(fclInfoDto.getUserId())){
259 + loginUser.setLoginName(fclInfoDto.getUserId());
260 + }
261 + if(StringUtils.isNotEmpty(fclInfoDto.getEmailAddress())){
262 + loginUser.setEmail(fclInfoDto.getEmailAddress());
263 + }
264 + if(StringUtils.isNotEmpty(fclInfoDto.getShipperAccounts())){
265 + loginUser.setAccountNo(fclInfoDto.getShipperAccounts());
266 + }
267 + }
221 } 268 }
......
1 +package com.fedex.connect.manager.util;
2 +
3 +import com.alibaba.fastjson.JSON;
4 +import com.fedex.connect.manager.common.enums.FCLSessionInfoEnum;
5 +import com.fedex.connect.manager.config.PropertiesConfig;
6 +import com.fedex.connect.manager.data.dto.FclInfoDto;
7 +import com.fedex.connect.manager.data.vo.*;
8 +import com.google.gson.JsonObject;
9 +import lombok.extern.slf4j.Slf4j;
10 +import org.apache.commons.lang3.StringUtils;
11 +import org.springframework.beans.factory.annotation.Autowired;
12 +import org.springframework.http.*;
13 +import org.springframework.stereotype.Component;
14 +import org.springframework.util.LinkedMultiValueMap;
15 +import org.springframework.util.MultiValueMap;
16 +import org.springframework.web.client.RestTemplate;
17 +
18 +import java.net.URLDecoder;
19 +import java.util.*;
20 +import java.util.regex.Pattern;
21 +import java.util.stream.Collectors;
22 +
23 +/**
24 + * @Author mt
25 + * @Description 登录相关util
26 + * @Date 2025/5/26
27 + */
28 +@Slf4j
29 +@Component
30 +public class LoginControllerUtils {
31 + /**
32 + * 普通访问
33 + */
34 + @Autowired
35 + private RestTemplate restTemplate;
36 + @Autowired
37 + private PropertiesConfig propertiesConfig;
38 +
39 + private HttpEntity<String> initHeader(String secretValue,String fdxLogin){
40 + FCLTokenResponseVo fclInterfaceToken = this.getFclInterfaceToken();
41 + HttpHeaders headers = new HttpHeaders();
42 + headers.set("Authorization", fclInterfaceToken.getAuthorization());
43 + List<String> cookieList = new ArrayList<>();
44 + if (StringUtils.isNotBlank(fdxLogin)) {
45 + cookieList.add("fdx_login=" + fdxLogin);
46 + }
47 + if (StringUtils.isNotBlank(secretValue)){
48 + cookieList.add(secretValue);
49 + }
50 + headers.set("Cookie", StringUtils.join(cookieList, ";"));
51 + HttpEntity<String> entity = new HttpEntity("", headers);
52 + log.info("apiExchange | entity: {}", JSON.toJSONString(entity));
53 + return entity;
54 + }
55 +
56 + public FclInfoDto getFclInfo(JsonObject tokenInfo){
57 + FclInfoDto fclInfoDto = new FclInfoDto();
58 + String secretValue;
59 + String fdxLogin;
60 + HttpEntity<String> entity = null;
61 + try {
62 + /**
63 + * 获取认证oauth
64 + */
65 + secretValue = this.getOauthSecret(tokenInfo);
66 + /**
67 + * 获取fdxInfo信息
68 + */
69 + fdxLogin = this.getFdxLogin(tokenInfo);
70 + /**
71 + * 构造请求头
72 + */
73 + entity = this.initHeader(secretValue,fdxLogin);
74 + ResponseEntity<String> resp = restTemplate.exchange(propertiesConfig.getUserInfoUrl(), HttpMethod.GET, entity, String.class);
75 + log.info("apiExchange | resp: {}", JSON.toJSONString(resp));
76 + String body = resp.getBody();
77 + FCLUserInfoResponseVo fclUserInfoResponse = JSON.parseObject(body, FCLUserInfoResponseVo.class);
78 + //获取email和userId
79 + UserDataApiVo userDataApiVo = this.createUserDataApiVo(fclUserInfoResponse);
80 + fclInfoDto.setFclContactname(userDataApiVo.getUserName());
81 + String fcl_uuid = this.getUuid(tokenInfo,userDataApiVo.getUuid());
82 + //去除多余双引号
83 + Pattern pattern = Pattern.compile("\"");
84 + fcl_uuid = pattern.matcher(fcl_uuid).replaceAll("");
85 + /**
86 + * 对用户名进行解码处理
87 + */
88 + String fcl_contactname = this.decodeMultiLevelUrl(this.getFclContactName(tokenInfo,userDataApiVo.getUserName()));
89 + fclInfoDto.setFclUuid(fcl_uuid);
90 + fclInfoDto.setFclContactname(fcl_contactname);
91 + fclInfoDto.setOAuthSecret(secretValue);
92 + fclInfoDto.setFdxLogin(fdxLogin);
93 + fclInfoDto.setUserId(userDataApiVo.getUserId());
94 + fclInfoDto.setEmailAddress(userDataApiVo.getEmailAddress());
95 + }catch(Exception ex){
96 + String errorInfo = String.format("getFclInfo | fdxLogin: %s, secretValue: %s url: %s, userId: %s ",
97 + fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId());
98 + log.error(errorInfo, ex);
99 + }finally{
100 + /**
101 + * 获取用户计费账号
102 + */
103 + String shipperAccount = this.getShipperAccount(entity,fclInfoDto);
104 + fclInfoDto.setShipperAccounts(shipperAccount);
105 + }
106 + return fclInfoDto;
107 + }
108 +
109 + /**
110 + * @Author mt
111 + * @Description 调用接口获取用户计费账号
112 + * @Date 2025/5/27
113 + * @param entity
114 + * @param fclInfoDto
115 + * @return java.lang.String
116 + */
117 + private String getShipperAccount(HttpEntity<String> entity,FclInfoDto fclInfoDto){
118 + if(Objects.isNull(entity)){
119 + return "";
120 + }
121 + /**
122 + * 将连个接口的EAN拆分后去重再合并
123 + */
124 + String shipperAccountApi1 = null;
125 + String shipperAccountApi2 = null;
126 + /**
127 + * 获取shipperAccount接口1: /administration/v1/users/shippingaccounts
128 + */
129 + try{
130 + ResponseEntity<String> resp = restTemplate.exchange(propertiesConfig.getUserShippingaccountsUrl(), HttpMethod.GET, entity, String.class);
131 + log.info("apiExchange | resp: {}", JSON.toJSONString(resp));
132 + FclEanTwoResponseVo fclAccountsResponse = JSON.parseObject(resp.getBody(), FclEanTwoResponseVo.class);
133 + EanTwoVo eanInfo = this.getEanByEanTwoApi(fclAccountsResponse);
134 + String ext1 = eanInfo.getDefaultEanInfo();
135 + String ext2 = eanInfo.getAccountNumberInfo();
136 + shipperAccountApi1 = (StringUtils.isNotEmpty(ext1) && StringUtils.isNotEmpty(ext2)) ? ext1 + "," + ext2 :
137 + (StringUtils.isNotEmpty(ext1) ? ext1 : (StringUtils.isNotEmpty(ext2) ? ext2 : ""));
138 + log.info("shipperAccountApi1 - getShipperAccount : {}",shipperAccountApi1);
139 + }catch(Exception ex){
140 + String errorInfo = String.format("getShipperAccount api1 | fdxLogin: %s, secretValue: %s url: %s, userId: %s",
141 + fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId());
142 + log.error(errorInfo, ex);
143 + }
144 + /**
145 + * 补偿shipperAccount
146 + * 获取shipperAccount接口2:/user/v2/accounts
147 + */
148 + try{
149 + ResponseEntity<String> resp = restTemplate.exchange(propertiesConfig.getUserAccountUrl(), HttpMethod.GET, entity, String.class);
150 + log.info("apiExchange | resp: {}", JSON.toJSONString(resp));
151 + FCLAccountsResponseVo fclAccountsResponseVo = JSON.parseObject(resp.getBody(), FCLAccountsResponseVo.class);
152 + shipperAccountApi2 = this.getEANInfo(fclAccountsResponseVo);
153 + log.info("shipperAccountApi2 - getShipperAccount : {}",shipperAccountApi2);
154 + }catch(Exception ex){
155 + String errorInfo = String.format("getShipperAccount api2 | fdxLogin: %s, secretValue: %s url: %s, userId: %s",
156 + fclInfoDto.getFdxLogin(), fclInfoDto.getOAuthSecret(), propertiesConfig.getUserInfoUrl(),fclInfoDto.getUserId());
157 + log.error(errorInfo, ex);
158 + }
159 +
160 + /**
161 + * 将连个接口的EAN拆分后去重再合并
162 + */
163 + String userEANNumber = this.getUniqueStr(shipperAccountApi1,shipperAccountApi2);
164 + return userEANNumber;
165 + }
166 +
167 + /**
168 + * @Author mt
169 + * @Description 将拼接好的两个EAN结果分割后去重再拼接
170 + * @Date 2025/5/27
171 + * @param eanOneExt1
172 + * @param eanTwoExt1
173 + * @return java.lang.String
174 + */
175 + public String getUniqueStr(String eanOneExt1,String eanTwoExt1){
176 + String userEANNumber = null;
177 + try {
178 + // 创建一个Set用于去重
179 + Set<String> uniqueElements = new HashSet<>();
180 + // 将eanOneExt1按逗号分割并添加到Set中
181 + if (StringUtils.isNotEmpty(eanOneExt1)) {
182 + String[] eanOneElements = eanOneExt1.split(",");
183 + for (String element : eanOneElements) {
184 + uniqueElements.add(element.trim());
185 + }
186 + }
187 + // 将eanTwoExt1按逗号分割并添加到Set中
188 + if (StringUtils.isNotEmpty(eanTwoExt1)) {
189 + String[] eanTwoElements = eanTwoExt1.split(",");
190 + for (String element : eanTwoElements) {
191 + uniqueElements.add(element.trim());
192 + }
193 + }
194 + // 将List中的元素用逗号分隔符拼接成一个字符串
195 + userEANNumber = String.join(",", uniqueElements);
196 + }catch (Exception e){
197 + String errorInfo = String.format("getUniqueStr | eanOneExt1 : %s | eanTwoExt1 : %s",eanOneExt1, eanTwoExt1);
198 + log.error(errorInfo, e);
199 + }
200 + return userEANNumber;
201 + }
202 +
203 + /**
204 + * @Author mt
205 + * @Description 获取用户EAN信息-合并返回
206 + * @Date 2025/5/27
207 + * @param fclAccountsResponseVo
208 + * @return java.lang.String
209 + */
210 + private String getEANInfo(FCLAccountsResponseVo fclAccountsResponseVo){
211 + List<String> eanNumberList = new ArrayList();
212 + FCLAccountsResponseVo.OutPut output = fclAccountsResponseVo.getOutput();
213 + List<FCLAccountsResponseVo.FCLCustomerAccount> customerAccountList = output.getCustomerAccountList();
214 + for (int i = 0, maxi = customerAccountList.size(); i < maxi; i++) {
215 + FCLAccountsResponseVo.FCLCustomerAccount fclCustomerAccount = customerAccountList.get(i);
216 + String eanNumber = fclCustomerAccount.getAccount().getAccountIdentifier().getAccountNumber().getValue();
217 + if(StringUtils.isNotEmpty(eanNumber)){
218 + eanNumberList.add(eanNumber);
219 + }
220 + }
221 + return StringUtils.join(eanNumberList, ",");
222 + }
223 +
224 + /**
225 + * @Author mt
226 + * @Description 根据EAN2号接口返回值获取EAN number
227 + * @Date 2025/5/27
228 + * @param body
229 + * @return EanTwoVo
230 + */
231 + public EanTwoVo getEanByEanTwoApi(FclEanTwoResponseVo body) {
232 + EanTwoVo eanTwoVo = new EanTwoVo();
233 + String defaultEanInfo = null;
234 + String accountNumberInfo = null;
235 +
236 + FclEanTwoResponseVo.Output output = body != null ? body.getOutput() : null;
237 + if (output != null) {
238 + List<FclEanTwoResponseVo.AccountInfoVO> accountInfoVOs = output.getAccountInfoVOs();
239 + if (accountInfoVOs != null && !accountInfoVOs.isEmpty()) {
240 + FclEanTwoResponseVo.AccountInfoVO accountInfoVO = accountInfoVOs.get(0);
241 + //defaultEanInfo
242 + FclEanTwoResponseVo.DefaultAccount defaultAccount = accountInfoVO.getDefaultAccount();
243 + if (defaultAccount != null) {
244 + defaultEanInfo = defaultAccount.getValue();
245 + }
246 + //accountNumberInfo
247 + List<FclEanTwoResponseVo.AssociatedAccount> associatedAccountList = accountInfoVO.getAssociatedAccountList();
248 + if (associatedAccountList != null && !associatedAccountList.isEmpty()) {
249 + accountNumberInfo = associatedAccountList.stream()
250 + .map(FclEanTwoResponseVo.AssociatedAccount::getAccountNumber)
251 + .filter(Objects::nonNull)
252 + .map(FclEanTwoResponseVo.AccountNumber::getValue)
253 + .filter(value -> StringUtils.isNotEmpty(value))
254 + .collect(Collectors.joining(","));
255 + }
256 + }
257 + }
258 + eanTwoVo.setDefaultEanInfo(defaultEanInfo);
259 + eanTwoVo.setAccountNumberInfo(accountNumberInfo);
260 + return eanTwoVo;
261 + }
262 +
263 + /**
264 + * @Author mt
265 + * @Description 构建获取用户信息Vo
266 + * @Date 2025/5/26
267 + * @param fclUserInfoResponse
268 + * @return com.fedex.connect.manager.data.vo.UserDataApiVo
269 + */
270 + public UserDataApiVo createUserDataApiVo(FCLUserInfoResponseVo fclUserInfoResponse) {
271 + FCLUserInfoResponseVo.UserProfile userProfile = fclUserInfoResponse.getOutput().getUserProfile();
272 + Optional<String> userId = Optional.ofNullable(userProfile)
273 + .map(FCLUserInfoResponseVo.UserProfile::getLoginInformation)
274 + .map(FCLUserInfoResponseVo.LoginInformation::getUserId);
275 +
276 + Optional<String> emailAddress = Optional.ofNullable(userProfile)
277 + .map(FCLUserInfoResponseVo.UserProfile::getUserProfileAddress)
278 + .map(FCLUserInfoResponseVo.UserProfileAddress::getContact)
279 + .map(FCLUserInfoResponseVo.Contact::getEmailAddress)
280 + .filter(email -> !email.isEmpty());
281 +
282 + Optional<String> uuid = Optional.ofNullable(userProfile)
283 + .map(FCLUserInfoResponseVo.UserProfile :: getUuid);
284 +
285 + Optional<String> firstNameOpt = Optional.ofNullable(userProfile)
286 + .map(FCLUserInfoResponseVo.UserProfile::getUserProfileAddress)
287 + .map(FCLUserInfoResponseVo.UserProfileAddress::getContact)
288 + .map(FCLUserInfoResponseVo.Contact::getPersonName)
289 + .map(personName -> personName.getFirstName());
290 +
291 + Optional<String> lastNameOpt = Optional.ofNullable(userProfile)
292 + .map(FCLUserInfoResponseVo.UserProfile::getUserProfileAddress)
293 + .map(FCLUserInfoResponseVo.UserProfileAddress::getContact)
294 + .map(FCLUserInfoResponseVo.Contact::getPersonName)
295 + .map(personName -> personName.getLastName());
296 + String userName = null;
297 + if (firstNameOpt.isPresent() && lastNameOpt.isPresent()){
298 + userName = firstNameOpt.get() + "+" + lastNameOpt.get();
299 + }else if (firstNameOpt.isPresent()){
300 + userName = firstNameOpt.get();
301 + }if (lastNameOpt.isPresent()){
302 + userName = lastNameOpt.get();
303 + }
304 + return new UserDataApiVo(userId.orElse(null), emailAddress.orElse(null),uuid.orElse(null),userName);
305 + }
306 +
307 +
308 + public FCLTokenResponseVo getFclInterfaceToken(){
309 + HttpHeaders headers = new HttpHeaders();
310 + headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
311 + MultiValueMap<String,String> postParameters = new LinkedMultiValueMap<>();
312 + postParameters.put("client_id", Collections.singletonList(propertiesConfig.getFclClientId()));
313 + postParameters.put("client_secret", Collections.singletonList(propertiesConfig.getFclClientSecret()));
314 + postParameters.put("scope", Collections.singletonList(propertiesConfig.getFclScope()));
315 + postParameters.put("grant_type", Collections.singletonList(propertiesConfig.getFclGrantType()));
316 + HttpEntity<String> entity = new HttpEntity(postParameters,headers);
317 + String fclTokenUrl = propertiesConfig.getFclTokenUrl();
318 + ResponseEntity<FCLTokenResponseVo> resp = restTemplate.exchange(fclTokenUrl, HttpMethod.POST, entity, FCLTokenResponseVo.class);
319 + return resp.getBody();
320 + }
321 +
322 + /**
323 + * @Author mt
324 + * @Description 获取fdxLogin
325 + * @Date 2025/5/26
326 + * @param tokenInfo
327 + * @return java.lang.String
328 + */
329 + private String getFdxLogin(JsonObject tokenInfo) {
330 + if (tokenInfo == null) {
331 + return "";
332 + }
333 + /**
334 + * 先获取fdx_login
335 + */
336 + return Optional.ofNullable(tokenInfo.get(FCLSessionInfoEnum.FDX_LOGIN.getCode()))
337 + .map(Object::toString)
338 + .orElse("");
339 +
340 + }
341 +
342 + /**
343 + * @Author mt
344 + * @Description 获取oauthSecret
345 + * @Date 2025/5/26
346 + * @param tokenInfo
347 + * @return java.lang.String
348 + */
349 + private String getOauthSecret(JsonObject tokenInfo){
350 + Object secretValue = tokenInfo.get(FCLSessionInfoEnum.FCL_OAUTH.getCode());
351 + if (secretValue != null) {
352 + return FCLSessionInfoEnum.FCL_OAUTH.getCode() + "=" + secretValue.toString();
353 + }
354 + return "";
355 + }
356 +
357 + /**
358 + * @Author mt
359 + * @Description 安全获取用户名
360 + * @Date 2025/5/26
361 + * @param tokenInfo
362 + * @param userName
363 + * @return java.lang.String
364 + */
365 + private String getFclContactName(JsonObject tokenInfo,String userName){
366 + String fcl_contactname = "";
367 +
368 + if (tokenInfo != null) {
369 + Object contactObj = tokenInfo.get(FCLSessionInfoEnum.FCL_CONTACTNAME.getCode());
370 + if (contactObj != null) {
371 + fcl_contactname = contactObj.toString().replace("\"", "");
372 + }
373 + }
374 + if (StringUtils.isBlank(fcl_contactname) && StringUtils.isNotBlank(userName)){
375 + fcl_contactname = userName;
376 + }
377 + return fcl_contactname;
378 + }
379 +
380 + /**
381 + * @Author mt
382 + * @Description 获取uuid
383 + * @Date 2025/5/26
384 + * @param tokenInfo
385 + * @param uuidApi
386 + * @return java.lang.String
387 + */
388 + private String getUuid(JsonObject tokenInfo, String uuidApi) {
389 + return Optional.ofNullable(tokenInfo)
390 + .map(info -> info.get(FCLSessionInfoEnum.FCL_UUID.getCode()))
391 + .map(Objects::toString)
392 + .orElseGet(() -> Optional.ofNullable(uuidApi)
393 + .orElse(""));
394 + }
395 +
396 + /**
397 + * @Author mt
398 + * @Description 对用户名进行解码处理
399 + * @Date 2025/5/26
400 + * @param encodedStr
401 + * @return java.lang.String
402 + */
403 + private String decodeMultiLevelUrl(String encodedStr) {
404 + if (StringUtils.isBlank(encodedStr)){
405 + return "";
406 + }
407 + String current = encodedStr;
408 + String previous;
409 + do {
410 + previous = current;
411 + try {
412 + current = URLDecoder.decode(current, "UTF-8");
413 + } catch (Exception e) {
414 + return current;
415 + }
416 + } while (!current.equals(previous));
417 + return current;
418 + }
419 +}
...@@ -8,23 +8,7 @@ spring: ...@@ -8,23 +8,7 @@ spring:
8 #系统环境 8 #系统环境
9 env: dev 9 env: dev
10 10
11 -
12 export: 11 export:
13 - jwt:
14 - securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
15 - urlWhiteList:
16 - - /icleartw/auth
17 - - /icleartw/monitor/ok
18 - - /icleartw/sysUser/logout
19 - - /icleartw/swagger-resources
20 - - /icleartw/webjars
21 - uriWhiteList:
22 - - /icleartw/swagger-ui.html
23 - - /icleartw/swagger-ui/*
24 - - /icleartw/v2/api-docs
25 - - /icleartw/login.html
26 - expire_1H: 7200
27 - expire_1D: 604800
28 mail: 12 mail:
29 smtp: 13 smtp:
30 host: smtp.qiye.aliyun.com 14 host: smtp.qiye.aliyun.com
...@@ -43,34 +27,27 @@ export: ...@@ -43,34 +27,27 @@ export:
43 language: zh_TW 27 language: zh_TW
44 emailActiveTime: 60 28 emailActiveTime: 60
45 29
46 -upload:
47 - path:
48 - declare: E:/var/fedex/exportTw/upload/declareFile
49 - image: E:/var/fedex/exportTw/upload/brandImage
50 -
51 -url:
52 - loginIndex: http://47.103.140.98:8086/icleartw
53 - twIdx: http://47.103.140.98/IcTw/
54 - twIdxImg: https://declarationuat.fedex.com.cn/Exp/manager-server/
55 -
56 #fcl 30 #fcl
57 fcl: 31 fcl:
58 login: 32 login:
59 - url: http://exportdeclarationuat-tw.dmz.apac.fedex.com/icleartw/auth/wlgnLogin 33 + url:
60 - redjrectLogin: https://exportdeclarationuat-tw.dmz.apac.fedex.com/IcTw/#/redjrectLogin 34 + http://127.0.0.1:8083/manager-server/auth/wlgnLogin
61 - twidx: 35 + redjrectLogin: http://127.0.0.1/ipc/#/redjrectLogin
62 - url: http://exportdeclarationuat-tw.apac.fedex.com 36 + preClearIndex:
37 + url: http://127.0.0.1:8083/ipc
63 interface: 38 interface:
64 - logurl: https://www.fedex.com/secure-login/zh-tw/#/login-credentials?redirectUrl=http://exportdeclarationuat-tw.dmz.apac.fedex.com/icleartw/auth/wlgnForward 39 + logurl: https://www.fedex.com/secure-login/en-us/#/login-credentials?redirectUrl=http://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnForward
65 - fedex_api_address: https://api.fedex.com 40 + fedex_api_address: https://api.fedex.com.cn
66 proxy_url: cn2-proxy.apac.fedex.com:3128 41 proxy_url: cn2-proxy.apac.fedex.com:3128
67 token: 42 token:
68 - url: /auth/oauth/v2/token 43 + url: ${fcl.interface.fedex_api_address}/auth/oauth/v2/token
69 grant_type : client_credentials 44 grant_type : client_credentials
70 client_id: l7c13f958213e04d1280f807789bd783a3 45 client_id: l7c13f958213e04d1280f807789bd783a3
71 client_secret: 3d43932198b6467a8e20d024bfa82e1c 46 client_secret: 3d43932198b6467a8e20d024bfa82e1c
72 scope: oob 47 scope: oob
73 account: 48 account:
74 - url: /user/v2/accounts 49 + url: ${fcl.interface.fedex_api_address}/user/v2/accounts
50 + shippingaccounts:
51 + url: ${fcl.interface.fedex_api_address}/administration/v1/users/shippingaccounts
75 userinfo: 52 userinfo:
76 - url: /user/v2/users/userinfo
...\ No newline at end of file ...\ No newline at end of file
53 + url: ${fcl.interface.fedex_api_address}/user/v2/users/userinfo
...\ No newline at end of file ...\ No newline at end of file
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: prod 6 env: prod
7 7
8 export: 8 export:
9 - jwt:
10 - securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
11 - urlWhiteList:
12 - - /icleartw/auth
13 - - /icleartw/monitor/ok
14 - - /icleartw/sysUser/logout
15 - - /icleartw/swagger-resources
16 - - /icleartw/webjars
17 - uriWhiteList:
18 - - /icleartw/swagger-ui.html
19 - - /icleartw/swagger-ui/*
20 - - /icleartw/v2/api-docs
21 - - /icleartw/login.html
22 - expire_1H: 7200
23 - expire_1D: 604800
24 mail: 9 mail:
25 smtp: 10 smtp:
26 host: mapper.gslb.fedex.com 11 host: mapper.gslb.fedex.com
...@@ -36,34 +21,26 @@ export: ...@@ -36,34 +21,26 @@ export:
36 language: zh_TW 21 language: zh_TW
37 emailActiveTime: 60 22 emailActiveTime: 60
38 23
39 -upload:
40 - path:
41 - declare: /var/share/icleartw/upload/declareFile
42 - image: /var/share/icleartw/upload/brandImage
43 -
44 -url:
45 - loginIndex: https://exportdeclaration-tw.apac.fedex.com/IcTw/
46 - twIdx: https://exportdeclaration-tw.apac.fedex.com/IcTw/
47 - twIdxImg: https://declaration.fedex.com.cn/Exp/manager-server/
48 -
49 #fcl 24 #fcl
50 fcl: 25 fcl:
51 login: 26 login:
52 url: https://exportdeclaration-tw.apac.fedex.com/icleartw/auth/wlgnLogin 27 url: https://exportdeclaration-tw.apac.fedex.com/icleartw/auth/wlgnLogin
53 redjrectLogin: https://exportdeclaration-tw.apac.fedex.com/IcTw/#/redjrectLogin 28 redjrectLogin: https://exportdeclaration-tw.apac.fedex.com/IcTw/#/redjrectLogin
54 - twidx: 29 + preClearIndex:
55 url: https://exportdeclaration-tw.apac.fedex.com 30 url: https://exportdeclaration-tw.apac.fedex.com
56 interface: 31 interface:
57 logurl: https://www.fedex.com/secure-login/zh-tw/#/login-credentials?redirectUrl=https://exportdeclaration-tw.apac.fedex.com/icleartw/auth/wlgnForward 32 logurl: https://www.fedex.com/secure-login/zh-tw/#/login-credentials?redirectUrl=https://exportdeclaration-tw.apac.fedex.com/icleartw/auth/wlgnForward
58 - fedex_api_address: https://api.fedex.com 33 + fedex_api_address: https://api.fedex.com.cn
59 proxy_url: cn2-proxy.apac.fedex.com:3128 34 proxy_url: cn2-proxy.apac.fedex.com:3128
60 token: 35 token:
61 - url: /auth/oauth/v2/token 36 + url: ${fcl.interface.fedex_api_address}/auth/oauth/v2/token
62 grant_type : client_credentials 37 grant_type : client_credentials
63 client_id: l7c13f958213e04d1280f807789bd783a3 38 client_id: l7c13f958213e04d1280f807789bd783a3
64 client_secret: 3d43932198b6467a8e20d024bfa82e1c 39 client_secret: 3d43932198b6467a8e20d024bfa82e1c
65 scope: oob 40 scope: oob
66 account: 41 account:
67 - url: /user/v2/accounts 42 + url: ${fcl.interface.fedex_api_address}/user/v2/accounts
43 + shippingaccounts:
44 + url: ${fcl.interface.fedex_api_address}/administration/v1/users/shippingaccounts
68 userinfo: 45 userinfo:
69 - url: /user/v2/users/userinfo
...\ No newline at end of file ...\ No newline at end of file
46 + url: ${fcl.interface.fedex_api_address}/user/v2/users/userinfo
...\ No newline at end of file ...\ No newline at end of file
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: test 6 env: test
7 7
8 export: 8 export:
9 - jwt:
10 - securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
11 - urlWhiteList:
12 - - /icleartw/auth
13 - - /icleartw/monitor/ok
14 - - /icleartw/sysUser/logout
15 - - /icleartw/swagger-resources
16 - - /icleartw/webjars
17 - uriWhiteList:
18 - - /icleartw/swagger-ui.html
19 - - /icleartw/swagger-ui/*
20 - - /icleartw/v2/api-docs
21 - - /icleartw/login.html
22 - expire_1H: 7200
23 - expire_1D: 604800
24 mail: 9 mail:
25 smtp: 10 smtp:
26 host: smtp.qiye.aliyun.com 11 host: smtp.qiye.aliyun.com
...@@ -36,34 +21,27 @@ export: ...@@ -36,34 +21,27 @@ export:
36 language: zh_TW 21 language: zh_TW
37 emailActiveTime: 60 22 emailActiveTime: 60
38 23
39 -upload:
40 - path:
41 - declare: /app/Oracle/Middleware/user_projects/domains/base_domain/exportTw/upload/declareFile
42 - image: /app/Oracle/Middleware/user_projects/domains/base_domain/exportTw/upload/brandImage
43 -
44 -url:
45 - loginIndex: http://47.103.140.98:8086/icleartw
46 - twIdx: http://47.103.140.98/IcTw/
47 - twIdxImg: https://declarationuat.fedex.com.cn/Exp/manager-server/
48 -
49 #fcl 24 #fcl
50 fcl: 25 fcl:
51 login: 26 login:
52 - url: http://exportdeclarationuat-tw.dmz.apac.fedex.com/icleartw/auth/wlgnLogin 27 + url:
53 - redjrectLogin: http://192.168.1.251/time.html 28 + http://47.103.140.98:7010/manager-server/auth/wlgnLogin
54 - twidx: 29 + redjrectLogin: http://192.168.1.251/ipc/#/redjrectLogin
55 - url: http://exportdeclarationuat-tw.apac.fedex.com 30 + preClearIndex:
31 + url: http://192.168.1.251/ipc
56 interface: 32 interface:
57 - logurl: https://www.fedex.com/secure-login/zh-tw/#/login-credentials?redirectUrl=http://exportdeclarationuat-tw.dmz.apac.fedex.com/icleartw/auth/wlgnForward 33 + logurl: https://www.fedex.com/secure-login/en-us/#/login-credentials?redirectUrl=http://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnForward
58 - fedex_api_address: https://api.fedex.com 34 + fedex_api_address: https://api.fedex.com.cn
59 proxy_url: cn2-proxy.apac.fedex.com:3128 35 proxy_url: cn2-proxy.apac.fedex.com:3128
60 token: 36 token:
61 - url: /auth/oauth/v2/token 37 + url: ${fcl.interface.fedex_api_address}/auth/oauth/v2/token
62 grant_type : client_credentials 38 grant_type : client_credentials
63 client_id: l7c13f958213e04d1280f807789bd783a3 39 client_id: l7c13f958213e04d1280f807789bd783a3
64 client_secret: 3d43932198b6467a8e20d024bfa82e1c 40 client_secret: 3d43932198b6467a8e20d024bfa82e1c
65 scope: oob 41 scope: oob
66 account: 42 account:
67 - url: /user/v2/accounts 43 + url: ${fcl.interface.fedex_api_address}/user/v2/accounts
44 + shippingaccounts:
45 + url: ${fcl.interface.fedex_api_address}/administration/v1/users/shippingaccounts
68 userinfo: 46 userinfo:
69 - url: /user/v2/users/userinfo
...\ No newline at end of file ...\ No newline at end of file
47 + url: ${fcl.interface.fedex_api_address}/user/v2/users/userinfo
...\ No newline at end of file ...\ No newline at end of file
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: uat 6 env: uat
7 7
8 export: 8 export:
9 - jwt:
10 - securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
11 - urlWhiteList:
12 - - /icleartw/auth
13 - - /icleartw/monitor/ok
14 - - /icleartw/sysUser/logout
15 - - /icleartw/swagger-resources
16 - - /icleartw/webjars
17 - uriWhiteList:
18 - - /icleartw/swagger-ui.html
19 - - /icleartw/swagger-ui/*
20 - - /icleartw/v2/api-docs
21 - - /icleartw/login.html
22 - expire_1H: 7200
23 - expire_1D: 604800
24 mail: 9 mail:
25 smtp: 10 smtp:
26 host: mapper.gslb.fedex.com 11 host: mapper.gslb.fedex.com
...@@ -36,33 +21,26 @@ export: ...@@ -36,33 +21,26 @@ export:
36 language: zh_TW 21 language: zh_TW
37 emailActiveTime: 60 22 emailActiveTime: 60
38 23
39 -upload:
40 - path:
41 - declare: /var/share/icleartw/upload/declareFile
42 - image: /var/share/icleartw/upload/brandImage
43 -
44 -url:
45 - loginIndex: http://exportdeclarationuat-tw.dmz.apac.fedex.com/icleartw
46 - twIdx: http://exportdeclarationuat-tw.apac.fedex.com/IcTw/
47 - twIdxImg: https://declarationuat.fedex.com.cn/Exp/manager-server/
48 -
49 fcl: 24 fcl:
50 login: 25 login:
51 - url: http://exportdeclarationuat-tw.apac.fedex.com/icleartw/auth/wlgnLogin 26 + url:
52 - redjrectLogin: https://exportdeclarationuat-tw.dmz.apac.fedex.com/IcTw/#/redjrectLogin 27 + https://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnLogin
53 - twidx: 28 + redjrectLogin: https://iclear-connectuat.apac.fedex.com/ipc/#/redjrectLogin
54 - url: http://exportdeclarationuat-tw.apac.fedex.com 29 + preClearIndex:
30 + url: https://iclear-connectuat.apac.fedex.com/ipc
55 interface: 31 interface:
56 - logurl: https://www.fedex.com/secure-login/zh-tw/#/login-credentials?redirectUrl=http://exportdeclarationuat-tw.dmz.apac.fedex.com/icleartw/auth/wlgnForward 32 + logurl: https://www.fedex.com/secure-login/en-us/#/login-credentials?redirectUrl=http://iclear-connectuat.apac.fedex.com/manager-server/auth/wlgnForward
57 - fedex_api_address: https://api.fedex.com 33 + fedex_api_address: https://api.fedex.com.cn
58 proxy_url: cn2-proxy.apac.fedex.com:3128 34 proxy_url: cn2-proxy.apac.fedex.com:3128
59 token: 35 token:
60 - url: /auth/oauth/v2/token 36 + url: ${fcl.interface.fedex_api_address}/auth/oauth/v2/token
61 grant_type : client_credentials 37 grant_type : client_credentials
62 client_id: l7c13f958213e04d1280f807789bd783a3 38 client_id: l7c13f958213e04d1280f807789bd783a3
63 client_secret: 3d43932198b6467a8e20d024bfa82e1c 39 client_secret: 3d43932198b6467a8e20d024bfa82e1c
64 scope: oob 40 scope: oob
65 account: 41 account:
66 - url: /user/v2/accounts 42 + url: ${fcl.interface.fedex_api_address}/user/v2/accounts
43 + shippingaccounts:
44 + url: ${fcl.interface.fedex_api_address}/administration/v1/users/shippingaccounts
67 userinfo: 45 userinfo:
68 - url: /user/v2/users/userinfo
...\ No newline at end of file ...\ No newline at end of file
46 + url: ${fcl.interface.fedex_api_address}/user/v2/users/userinfo
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -29,6 +29,7 @@ import: ...@@ -29,6 +29,7 @@ import:
29 - /manager-server/user/logout 29 - /manager-server/user/logout
30 - /manager-server/swagger-resources 30 - /manager-server/swagger-resources
31 - /manager-server/webjars 31 - /manager-server/webjars
32 + - /manager-server/csrf
32 uriWhiteList: 33 uriWhiteList:
33 - /manager-server/swagger-ui.html 34 - /manager-server/swagger-ui.html
34 - /manager-server/swagger-ui/* 35 - /manager-server/swagger-ui/*
...@@ -43,4 +44,8 @@ mybatis: ...@@ -43,4 +44,8 @@ mybatis:
43 configuration: 44 configuration:
44 #开启驼峰与下划线转换 45 #开启驼峰与下划线转换
45 map-underscore-to-camel-case: true 46 map-underscore-to-camel-case: true
46 - call-setters-on-nulls: true
...\ No newline at end of file ...\ No newline at end of file
47 + call-setters-on-nulls: true
48 +#全局异常拦截是否生效
49 +common:
50 + exception-advice-webconfig:
51 + enable: true
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <configuration> 2 <configuration>
3 <springProfile name="dev,uat,prod"> 3 <springProfile name="dev,uat,prod">
4 <!-- 日志存放路径 --> 4 <!-- 日志存放路径 -->
5 - <property name="log.path" value="/var/fedex/iclearConnect/weblogic/iclearConnect/manager-server" /> 5 + <property name="log.path" value="/var/fedex/iclconnect/weblogic/manager-server" />
6 </springProfile> 6 </springProfile>
7 <springProfile name="test"> 7 <springProfile name="test">
8 <!-- 日志存放路径 --> 8 <!-- 日志存放路径 -->
......
1 +#******************鉴权相关提示,需要做国际化******************
2 +#authentication包
3 +#没有访问权限
4 +system_exception_10001=No access rights.
5 +#没有通过权限认证
6 +system_exception_10002=Failed to pass the authentication.
7 +#登录身份异常
8 +system_exception_10003=Login identity is abnormal.
9 +#登录超过8小时,请重新登录
10 +system_exception_10004=Login has exceeded 8 hours, please log in again.
11 +#登录已过期,请重新登录
12 +system_exception_10005=Login has expired, please log in again.
13 +
14 +#******************业务相关、需要做国际化******************
15 +#系统异常:登录失败,请稍后重试!
16 +business_exception_40001=System abnormality: Login failed, please try again later!
17 +#暂时没用,预留
18 +business_log_40002=用户登录
19 +#系统异常,请稍后重试!
20 +system_exception_40003=System abnormal, please try again later!
21 +#单次登录已过有效期,请重新登录!
22 +system_exception_40004=Please log in again!
23 +#退出成功
24 +system_exception_40005=Logout successful
25 +#退出失败
26 +system_exception_40006=Logout failed
...\ No newline at end of file ...\ No newline at end of file
......
1 #******************鉴权相关提示,需要做国际化****************** 1 #******************鉴权相关提示,需要做国际化******************
2 #authentication包 2 #authentication包
3 -system_exception_10001=没有访问权限 3 +#没有访问权限
4 -system_exception_10002=没有通过权限认证 4 +system_exception_10001=No access rights.
5 -system_exception_10003=登录身份异常 5 +#没有通过权限认证
6 -system_exception_10004=登录超过8小时,请重新登录 6 +system_exception_10002=Failed to pass the authentication.
7 -system_exception_10005=登录已过期 7 +#登录身份异常
8 -system_exception_10006=登录身份异常 8 +system_exception_10003=Login identity is abnormal.
9 -system_exception_10007=登录已过期,请重新登录 9 +#登录超过8小时,请重新登录
10 +system_exception_10004=Login has exceeded 8 hours, please log in again.
11 +#登录已过期,请重新登录
12 +system_exception_10005=Login has expired, please log in again.
10 13
11 #******************业务相关、需要做国际化****************** 14 #******************业务相关、需要做国际化******************
12 -business_exception_40001=存入token失败 15 +#系统异常:登录失败,请稍后重试!
16 +business_exception_40001=System abnormality: Login failed, please try again later!
17 +#暂时没用,预留
13 business_log_40002=用户登录 18 business_log_40002=用户登录
14 -system_exception_40003=系统异常,请联系清关部门
15 -system_exception_40004=登录已过期,请重新登录
16 -system_exception_40005=用戶不存在
17 -system_exception_40006=登录已过期
18 -system_exception_40007=退出成功
19 -system_exception_40008=退出失败
...\ No newline at end of file ...\ No newline at end of file
19 +#系统异常,请稍后重试!
20 +system_exception_40003=System abnormal, please try again later!
21 +#单次登录已过有效期,请重新登录!
22 +system_exception_40004=Please log in again!
23 +#退出成功
24 +system_exception_40005=Logout successful
25 +#退出失败
26 +system_exception_40006=Logout failed
...\ No newline at end of file ...\ No newline at end of file
......
1 -#******************鉴权相关提示,需要做国际化******************
2 -#authentication包
3 -system_exception_10001=没有访问权限
4 -system_exception_10002=没有通过权限认证
5 -system_exception_10003=登录身份异常
6 -system_exception_10004=登录超过8小时,请重新登录
7 -system_exception_10005=登录已过期
8 -system_exception_10006=登录身份异常
9 -system_exception_10007=登录已过期,请重新登录
10 -
11 -#******************业务相关、需要做国际化******************
12 -business_exception_40001=存入token失败
13 -business_log_40002=用户登录
14 -system_exception_40003=系统异常,请联系清关部门
15 -system_exception_40004=登录已过期,请重新登录
16 -system_exception_40005=用戶不存在
17 -system_exception_40006=登录已过期
18 -system_exception_40007=退出成功
19 -system_exception_40008=退出失败
...\ No newline at end of file ...\ No newline at end of file
1 +##******************鉴权相关提示,需要做国际化******************
2 +##authentication包
3 +#system_exception_10001=没有访问权限
4 +#system_exception_10002=没有通过权限认证
5 +#system_exception_10003=登录身份异常
6 +#system_exception_10004=登录超过8小时,请重新登录
7 +#system_exception_10005=登录已过期,请重新登录
8 +#
9 +##******************业务相关、需要做国际化******************
10 +#business_exception_40001=系统异常:登录失败,请稍后重试!
11 +#business_log_40002=用户登录
12 +#system_exception_40003=系统异常,请稍后重试!
13 +#system_exception_40004=单次登录已过有效期,请重新登录!
14 +#system_exception_40005=退出成功
15 +#system_exception_40006=退出失败
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -9,4 +9,8 @@ ...@@ -9,4 +9,8 @@
9 <library-name>lib4iClearConnect</library-name> 9 <library-name>lib4iClearConnect</library-name>
10 <specification-version>1.0</specification-version> 10 <specification-version>1.0</specification-version>
11 </wls:library-ref> 11 </wls:library-ref>
12 + <wls:virtual-directory-mapping>
13 + <wls:local-path>/app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect</wls:local-path>
14 + <wls:url-pattern>/*</wls:url-pattern>
15 + </wls:virtual-directory-mapping>
12 </wls:weblogic-web-app> 16 </wls:weblogic-web-app>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -61,18 +61,31 @@ public class PropertiesConfig { ...@@ -61,18 +61,31 @@ public class PropertiesConfig {
61 @Value("${export.mail.mailAccountFlag}") 61 @Value("${export.mail.mailAccountFlag}")
62 private String mailAccountFlag; 62 private String mailAccountFlag;
63 63
64 - @Value("${url.baseUrl}")
65 - String baseUrl;
66 -
67 - @Value("${url.fedex}")
68 - String fedex;
69 -
70 - @Value("${url.line}")
71 - String line;
72 -
73 @Value("${export.mail.sendEmail.account}") 64 @Value("${export.mail.sendEmail.account}")
74 String emailAccount; 65 String emailAccount;
75 66
76 @Value("${export.mail.sendEmail.password}") 67 @Value("${export.mail.sendEmail.password}")
77 String emailPassword; 68 String emailPassword;
69 +
70 + //基础路径
71 + @Value("${imp001.path.work}")
72 + String imp001PathWork;
73 + //zip输出目录
74 + @Value("${imp001.path.final}")
75 + String imp001PathFinal;
76 + //文件备份目录
77 + @Value("${imp001.path.bak}")
78 + String imp001PathBak;
79 + //文件异常文件存放目录
80 + @Value("${imp001.path.error}")
81 + String imp001PathError;
82 +
83 + @Value("${upload.path.zip}")
84 + private String zipPath;
85 +
86 + @Value("${upload.path.zipFinal}")
87 + private String zipFinalPath;
88 +
89 + @Value("${upload.path.zipTemp}")
90 + private String zipTempPath;
78 } 91 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,7 +6,11 @@ package com.fedex.connect.task.constants; ...@@ -6,7 +6,11 @@ package com.fedex.connect.task.constants;
6 * @Date 2024/4/18 6 * @Date 2024/4/18
7 */ 7 */
8 public interface Constant { 8 public interface Constant {
9 - //TW001表头信息 9 + /**
10 + * @Author mt
11 + * @Description IMP001表头信息
12 + * @Date 2024/12/18
13 + */
10 interface IMP001_HEAD_KEYS{ 14 interface IMP001_HEAD_KEYS{
11 /** 15 /**
12 * 消息代码:IMP001报文标志 16 * 消息代码:IMP001报文标志
...@@ -15,14 +19,18 @@ public interface Constant { ...@@ -15,14 +19,18 @@ public interface Constant {
15 /** 19 /**
16 * 发送程序ID:TWEXP 20 * 发送程序ID:TWEXP
17 */ 21 */
18 - String SENDER_ID = "TWEXP"; 22 + String SENDER_ID = "PreCLR";
19 /** 23 /**
20 * 接受程序ID:IMP 24 * 接受程序ID:IMP
21 */ 25 */
22 String RECEIVER_ID = "IMP"; 26 String RECEIVER_ID = "IMP";
23 } 27 }
24 28
25 - //文件后缀字符串keys 29 + /**
30 + * @Author mt
31 + * @Description 文件后缀字符串keys
32 + * @Date 2024/12/18
33 + */
26 interface FILE_SUFFIX_KEYS{ 34 interface FILE_SUFFIX_KEYS{
27 /** 35 /**
28 * json字符串 36 * json字符串
......
1 -package com.fedex.connect.task.data.bo;
2 -
3 -import lombok.Data;
4 -
5 -import java.util.Date;
6 -
7 -/**
8 - * @Author mt
9 - * @Description 类说明 文件信息bo
10 - * @Date 2024/5/30
11 - */
12 -@Data
13 -public class Imp001FileInfoBo {
14 - //文件类型id
15 - Long fileTypeId;
16 - //文件类型名称
17 - String fileTypeName;
18 - //文件名称
19 - String fileName;
20 - //生成时间
21 - Date pushTime;
22 -}
1 package com.fedex.connect.task.data.bo; 1 package com.fedex.connect.task.data.bo;
2 2
3 -import com.fedex.connect.common.model.bi.DictionaryEntries; 3 +import com.fedex.connect.task.data.dto.imp001.Imp001Files;
4 import com.fedex.connect.task.data.dto.imp001.Imp001RootJsonDto; 4 import com.fedex.connect.task.data.dto.imp001.Imp001RootJsonDto;
5 import lombok.Data; 5 import lombok.Data;
6 6
7 -import java.util.Dictionary;
8 -import java.util.List;
9 -
10 /** 7 /**
11 * @Author mt 8 * @Author mt
12 - * @Description 类说明 tw001生成bo 9 + * @Description 类说明 imp001生成bo
13 * @Date 2024/5/24 10 * @Date 2024/5/24
14 */ 11 */
15 @Data 12 @Data
16 public class Imp001GenerateBo { 13 public class Imp001GenerateBo {
17 - //tw001报文对象 14 + //运单号
15 + String consignmentCode;
16 + //运单ID
17 + Long consignmentId;
18 + //imp001报文对象
18 Imp001RootJsonDto imp001RootJsonDto; 19 Imp001RootJsonDto imp001RootJsonDto;
19 - //tw001临时文件夹目录 20 + //imp001临时文件夹目录
20 String workFilePath; 21 String workFilePath;
21 //需要打包压缩包文件信息名称 22 //需要打包压缩包文件信息名称
22 - List<Imp001FileInfoBo> fileInfoList; 23 + Imp001Files[] fileInfos;
23 - //json Dir对象
24 - DictionaryEntries jsonDictionary;
25 //zip文件名称 24 //zip文件名称
26 String zipFileName; 25 String zipFileName;
27 //zip推送目标目录 26 //zip推送目标目录
......
...@@ -9,4 +9,7 @@ public class PortFileDto { ...@@ -9,4 +9,7 @@ public class PortFileDto {
9 private String shipperContactName; 9 private String shipperContactName;
10 private String shipperEmail; 10 private String shipperEmail;
11 private String shipperPhone; 11 private String shipperPhone;
12 + private String shipperAccount;
13 + private String originCountry;
14 + private String fileName;
12 } 15 }
......
1 package com.fedex.connect.task.data.dto; 1 package com.fedex.connect.task.data.dto;
2 2
3 +import com.fedex.connect.common.annotation.SensitiveEntity;
4 +import com.fedex.connect.common.annotation.SensitiveField;
3 import lombok.Data; 5 import lombok.Data;
4 @Data 6 @Data
7 +@SensitiveEntity
5 public class PushZipEmailDto { 8 public class PushZipEmailDto {
6 private String destIataCode; 9 private String destIataCode;
7 private String filePath; 10 private String filePath;
11 + @SensitiveField
8 private String shipperContactName; 12 private String shipperContactName;
9 private String shipperEmail; 13 private String shipperEmail;
10 private String shipperPhone; 14 private String shipperPhone;
15 + private String shipperAccount;
16 + private String originCountry;
17 + private String fileName;
18 + private String userInputShipperAccount;
19 + private String userInputOriginCountry;
20 + private Long ceFlag;
11 } 21 }
......
...@@ -13,15 +13,14 @@ import java.io.Serializable; ...@@ -13,15 +13,14 @@ import java.io.Serializable;
13 public class Imp001Consignment implements Serializable { 13 public class Imp001Consignment implements Serializable {
14 /** 14 /**
15 * @Author mt 15 * @Author mt
16 - * @Description 提单号码 16 + * @Description 每个报文只有一个12位运单号
17 - * 12位数字,提单号码,可以重复 17 + * @Date 2024年12月18日
18 - * @Date 2024/5/23
19 */ 18 */
20 private String deliveryNo; 19 private String deliveryNo;
21 /** 20 /**
22 * @Author mt 21 * @Author mt
23 - * @Description 联络人 22 + * @Description 运单附带文件数量
24 - * @Date 2024/5/23 23 + * @Date 2024年12月18日
25 */ 24 */
26 private Integer attachedFilesCount; 25 private Integer attachedFilesCount;
27 } 26 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -25,11 +25,11 @@ public class EmailJob { ...@@ -25,11 +25,11 @@ public class EmailJob {
25 * @param 25 * @param
26 * @return void 26 * @return void
27 */ 27 */
28 - //@ProcessingInterval(paramCode = ParamConfigConstants.TASK_PARAM_KEYS.NOTIFICATION_SENDER_EMAIL_INTERVAL) 28 + @ProcessingInterval(paramCode = ParamConfigConstants.TASK_PARAM_KEYS.NOTIFICATION_SENDER_EMAIL_INTERVAL)
29 - //@Scheduled(cron = "${export.task.allocation.sendOb}") 29 + @Scheduled(cron = "${export.task.allocation.sendOb}")
30 - //public void notificationSenderTask() { 30 + public void notificationSenderTask() {
31 - // duplicateConsignmentEmailService.duplicateConsignmentEmail(); 31 + duplicateConsignmentEmailService.duplicateConsignmentEmail();
32 - //} 32 + }
33 33
34 /** 34 /**
35 * @Author Szl 35 * @Author Szl
...@@ -47,11 +47,11 @@ public class EmailJob { ...@@ -47,11 +47,11 @@ public class EmailJob {
47 /** 47 /**
48 * 发送失败邮件提醒 48 * 发送失败邮件提醒
49 */ 49 */
50 - //@ProcessingInterval(paramCode = ParamConfigConstants.TASK_PARAM_KEYS.SEND_FAIL_ALERT_INTERVAL) 50 + @ProcessingInterval(paramCode = ParamConfigConstants.TASK_PARAM_KEYS.SEND_FAIL_ALERT_INTERVAL)
51 - //@Scheduled(cron = "${export.task.allocation.sendOb}") 51 + @Scheduled(cron = "${export.task.allocation.sendOb}")
52 - //public void sendingFailedEmailAlert() { 52 + public void sendingFailedEmailAlert() {
53 - // sendWarningEmail.sendFailedEmail(); 53 + sendWarningEmail.sendFailedEmail();
54 - //} 54 + }
55 55
56 56
57 } 57 }
......
...@@ -24,7 +24,7 @@ public class Imp001Job { ...@@ -24,7 +24,7 @@ public class Imp001Job {
24 @ProcessingInterval(paramCode = ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_INTERVAL) 24 @ProcessingInterval(paramCode = ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_INTERVAL)
25 @Scheduled(cron = "${export.task.allocation.sendOb}") 25 @Scheduled(cron = "${export.task.allocation.sendOb}")
26 public void sendObTask() { 26 public void sendObTask() {
27 - //sendObService.sendOb(); 27 + sendObService.sendOb();
28 } 28 }
29 29
30 /** 30 /**
...@@ -33,6 +33,6 @@ public class Imp001Job { ...@@ -33,6 +33,6 @@ public class Imp001Job {
33 @ProcessingInterval 33 @ProcessingInterval
34 @Scheduled(cron = "${export.task.allocation.sendObRetry}") 34 @Scheduled(cron = "${export.task.allocation.sendObRetry}")
35 public void sendObRetryTask() { 35 public void sendObRetryTask() {
36 - //sendObService.sendObRetry(); 36 + sendObService.sendObRetry();
37 } 37 }
38 } 38 }
......
1 package com.fedex.connect.task.repository.base; 1 package com.fedex.connect.task.repository.base;
2 2
3 -import com.fedex.connect.common.dao.biz.AttachmentMapper; 3 +import com.fedex.connect.common.dao.biz.*;
4 -import com.fedex.connect.common.dao.biz.ConsignmentMapper;
5 -import com.fedex.connect.common.dao.biz.EmailMapper;
6 -import com.fedex.connect.common.dao.biz.PushObMapper;
7 import com.fedex.connect.common.dao.log.EmailHistoryMapper; 4 import com.fedex.connect.common.dao.log.EmailHistoryMapper;
8 import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper; 5 import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper;
9 import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper; 6 import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper;
...@@ -23,6 +20,8 @@ public class AbstractDaoRepository { ...@@ -23,6 +20,8 @@ public class AbstractDaoRepository {
23 @Autowired 20 @Autowired
24 protected PushObMapper pushObMapper; 21 protected PushObMapper pushObMapper;
25 @Autowired 22 @Autowired
23 + protected PushObDetailMapper pushObDetailMapper;
24 + @Autowired
26 protected KafkaTemporaryStorageMapperExt kafkaTemporaryStorageMapperExt; 25 protected KafkaTemporaryStorageMapperExt kafkaTemporaryStorageMapperExt;
27 @Autowired 26 @Autowired
28 protected RedisSlabMapperExt redisSlabMapperExt; 27 protected RedisSlabMapperExt redisSlabMapperExt;
......
...@@ -9,16 +9,28 @@ import java.util.List; ...@@ -9,16 +9,28 @@ import java.util.List;
9 @Mapper 9 @Mapper
10 public interface AttachmentExtMapper { 10 public interface AttachmentExtMapper {
11 11
12 - @Select("SELECT a.FILE_PATH, c.DEST_IATA_CODE, c.CONSIGNMENT_CODE, c.SHIPPER_CONTACT_NAME, c.SHIPPER_EMAIL, c.SHIPPER_PHONE " + 12 + @Select("SELECT a.FILE_PATH, " +
13 + " c.DEST_IATA_CODE, " +
14 + " c.CONSIGNMENT_CODE, " +
15 + " c.SHIPPER_CONTACT_NAME, " +
16 + " c.SHIPPER_EMAIL, " +
17 + " c.SHIPPER_PHONE, " +
18 + " c.SHIPPER_ACCOUNT, " +
19 + " c.ORIGIN_COUNTRY, " +
20 + " a.FILE_NAME, " +
21 + " c.USER_INPUT_SHIPPER_ACCOUNT, " +
22 + " c.USER_INPUT_ORIGIN_COUNTRY, " +
23 + " ucm.CE_FLAG " +
13 "FROM T_BIZ_ATTACHMENT a " + 24 "FROM T_BIZ_ATTACHMENT a " +
14 - "JOIN T_BIZ_CONSIGNMENT c ON a.BIZ_ID = c.ID " + 25 + "JOIN T_BIZ_UPLOAD_RECORD ur ON a.UPLOAD_RECORD_ID = ur.ID " +
15 - "WHERE a.BIZ_ID = #{bizId}") 26 + "JOIN T_BIZ_CONSIGNMENT c ON ur.CONSIGNMENT_ID = c.ID " +
27 + "JOIN T_BIZ_USER_CONSIGNMENT_MAPPING ucm ON ucm.CONSIGNMENT_ID = c.ID " +
28 + "WHERE a.UPLOAD_RECORD_ID = #{bizId,jdbcType=NUMERIC} " +
29 + " AND ucm.USER_ID = ur.CREATE_USER_ID")
16 List<PushZipEmailDto> findAttachmentDetailsByBizId(@Param("bizId") Long bizId); 30 List<PushZipEmailDto> findAttachmentDetailsByBizId(@Param("bizId") Long bizId);
17 31
18 - @Select("SELECT * FROM T_BIZ_ATTACHMENT WHERE UPLOAD_RECORD_ID = " + 32 + @Select("SELECT * FROM T_BIZ_ATTACHMENT WHERE UPLOAD_RECORD_ID = #{uploadRecordId,jdbcType=NUMERIC} AND BIZ_ID = #{consignmentId,jdbcType=NUMERIC} AND STATUS = 1")
19 - "(SELECT MAX(ID) FROM T_BIZ_UPLOAD_RECORD WHERE " + 33 + List<Attachment> queryAttachmentInfo(@Param("uploadRecordId") Long uploadRecordId,@Param("consignmentId") Long consignmentId);
20 - " CONSIGNMENT_ID = #{consignmentId}) AND STATUS = 1")
21 - List<Attachment> queryAttachmentInfo(@Param("consignmentId") Long consignmentId);
22 34
23 /** 35 /**
24 * 根据修改日期查询数据 36 * 根据修改日期查询数据
......
...@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Select; ...@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Select;
7 @Mapper 7 @Mapper
8 public interface PortclearEmailMappingExtMapper { 8 public interface PortclearEmailMappingExtMapper {
9 9
10 - @Select("SELECT EMAIL FROM T_BI_PORTCLEAR_EMAIL_MAPPING WHERE PORT_CODE = #{portCode}") 10 + @Select("SELECT EMAIL FROM T_BI_PORTCLEAR_EMAIL_MAPPING WHERE PORT_CODE = #{portCode} AND STATUS = 1")
11 String findEmailByPortCode(@Param("portCode") String portCode); 11 String findEmailByPortCode(@Param("portCode") String portCode);
12 12
13 } 13 }
......
...@@ -10,7 +10,7 @@ public interface IAttachmentRepository { ...@@ -10,7 +10,7 @@ public interface IAttachmentRepository {
10 10
11 List<PushZipEmailDto> findAttachmentDetailsByBizId(@Param("bizId") Long bizId); 11 List<PushZipEmailDto> findAttachmentDetailsByBizId(@Param("bizId") Long bizId);
12 12
13 - List<Attachment> queryAttachmentInfo(Long consignmentId); 13 + List<Attachment> queryAttachmentInfo(Long uploadRecordId,Long consignmentId);
14 14
15 List<Attachment> findAttachmentsOlderThan(String date); 15 List<Attachment> findAttachmentsOlderThan(String date);
16 16
......
1 +package com.fedex.connect.task.repository.repo.biz;
2 +
3 +import com.fedex.connect.common.model.biz.PushObDetail;
4 +
5 +import java.util.List;
6 +
7 +public interface IPushObDetailRepository {
8 + /**
9 + * @Author mt
10 + * @Description 功能说明 批量插入
11 + * @Date 2024/5/30
12 + * @param record
13 + * @return void
14 + */
15 + void batchInsert(List<PushObDetail> record);
16 +}
...@@ -17,8 +17,8 @@ public class AttachmentRepositoryImpl extends AbstractDaoRepository implements I ...@@ -17,8 +17,8 @@ public class AttachmentRepositoryImpl extends AbstractDaoRepository implements I
17 } 17 }
18 18
19 @Override 19 @Override
20 - public List<Attachment> queryAttachmentInfo(Long consignmentId){ 20 + public List<Attachment> queryAttachmentInfo(Long uploadRecordId,Long consignmentId){
21 - return attachmentExtMapper.queryAttachmentInfo(consignmentId); 21 + return attachmentExtMapper.queryAttachmentInfo(uploadRecordId,consignmentId);
22 } 22 }
23 23
24 @Override 24 @Override
......
1 +package com.fedex.connect.task.repository.repo.biz.impl;
2 +
3 +import com.fedex.connect.common.dependencies.util.Utils;
4 +import com.fedex.connect.common.model.biz.PushObDetail;
5 +import com.fedex.connect.task.repository.base.AbstractDaoRepository;
6 +import com.fedex.connect.task.repository.repo.biz.IPushObDetailRepository;
7 +import org.springframework.stereotype.Repository;
8 +
9 +import java.util.List;
10 +import java.util.Objects;
11 +
12 +/**
13 + * @Author mt
14 + * @Description 推送明细日志repository
15 + * @Date 2024/5/30
16 + */
17 +@Repository
18 +public class PushObDetailRepository extends AbstractDaoRepository implements IPushObDetailRepository {
19 + /**
20 + * @Author mt
21 + * @Description 功能说明 批量插入
22 + * @Date 2024/5/30
23 + * @param record
24 + * @return void
25 + */
26 + public void batchInsert(List<PushObDetail> record){
27 + Utils.listOf(record).stream().filter(Objects::nonNull).forEach(r->{
28 + pushObDetailMapper.insert(r);
29 + });
30 + }
31 +}
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.IRedisSlabBaseRepository;
4 import com.fedex.connect.task.repository.repo.biz.IAttachmentRepository; 4 import com.fedex.connect.task.repository.repo.biz.IAttachmentRepository;
5 import com.fedex.connect.task.repository.repo.biz.IEmailRepository; 5 import com.fedex.connect.task.repository.repo.biz.IEmailRepository;
6 +import com.fedex.connect.task.repository.repo.biz.IPushObDetailRepository;
6 import com.fedex.connect.task.repository.repo.biz.IPushObRepository; 7 import com.fedex.connect.task.repository.repo.biz.IPushObRepository;
7 import com.fedex.connect.task.repository.repo.sys.IKafkaStorageHistoryRepository; 8 import com.fedex.connect.task.repository.repo.sys.IKafkaStorageHistoryRepository;
8 import com.fedex.connect.task.repository.repo.sys.IKafkaTemporaryStorageRepository; 9 import com.fedex.connect.task.repository.repo.sys.IKafkaTemporaryStorageRepository;
...@@ -21,7 +22,7 @@ public class BaseService { ...@@ -21,7 +22,7 @@ public class BaseService {
21 @Autowired 22 @Autowired
22 protected IKafkaStorageHistoryRepository kafkaStorageHistoryRepository; 23 protected IKafkaStorageHistoryRepository kafkaStorageHistoryRepository;
23 @Autowired 24 @Autowired
24 - protected IRedisSlabRepository redisSlabRepository; 25 + protected IRedisSlabBaseRepository redisSlabRepository;
25 @Autowired 26 @Autowired
26 protected IRedisSlabExtRepository redisRepository; 27 protected IRedisSlabExtRepository redisRepository;
27 @Autowired 28 @Autowired
...@@ -31,5 +32,7 @@ public class BaseService { ...@@ -31,5 +32,7 @@ public class BaseService {
31 @Autowired 32 @Autowired
32 protected IPushObRepository pushObRepository; 33 protected IPushObRepository pushObRepository;
33 @Autowired 34 @Autowired
35 + protected IPushObDetailRepository pushObDetailRepository;
36 + @Autowired
34 protected IParamConfigRepository paramConfigRepository; 37 protected IParamConfigRepository paramConfigRepository;
35 } 38 }
...\ No newline at end of file ...\ No newline at end of file
......
1 +package com.fedex.connect.task.service.biz;
2 +
3 +import com.fedex.connect.common.model.biz.PushObDetail;
4 +
5 +import java.util.List;
6 +
7 +public interface IPushObDetailService {
8 + /**
9 + * @Author mt
10 + * @Description 功能说明 批量插入
11 + * @Date 2024/5/30
12 + * @param record
13 + * @return void
14 + */
15 + void batchInsert(List<PushObDetail> record);
16 +}
1 package com.fedex.connect.task.service.biz; 1 package com.fedex.connect.task.service.biz;
2 2
3 public interface IPushObService { 3 public interface IPushObService {
4 - ///** 4 + /**
5 - // * @Author mt 5 + * @Author mt
6 - // * @Description 推送Imp001报文数据zip包文件 6 + * @Description 推送Imp001报文数据zip包文件
7 - // * @Date 2024/8/2 7 + * @Date 2024/8/2
8 - // * @param 8 + * @param
9 - // * @return void 9 + * @return void
10 - // */ 10 + */
11 - //void sendOb(); 11 + void sendOb();
12 - ///** 12 + /**
13 - // * @Author mt 13 + * @Author mt
14 - // * @Description 推送Imp001文件错误重试 14 + * @Description 推送Imp001文件错误重试
15 - // * @Date 2024/8/2 15 + * @Date 2024/8/2
16 - // * @param 16 + * @param
17 - // * @return void 17 + * @return void
18 - // */ 18 + */
19 - //void sendObRetry(); 19 + void sendObRetry();
20 } 20 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -10,6 +10,7 @@ import com.fedex.connect.task.service.base.BaseService; ...@@ -10,6 +10,7 @@ import com.fedex.connect.task.service.base.BaseService;
10 import com.fedex.connect.task.service.biz.IDuplicateConsignmentEmailService; 10 import com.fedex.connect.task.service.biz.IDuplicateConsignmentEmailService;
11 import com.fedex.connect.task.utils.sys.DuplicateEmailUtil; 11 import com.fedex.connect.task.utils.sys.DuplicateEmailUtil;
12 import com.fedex.connect.task.utils.sys.EmailUtil; 12 import com.fedex.connect.task.utils.sys.EmailUtil;
13 +import org.apache.commons.lang3.StringUtils;
13 import org.springframework.beans.factory.annotation.Autowired; 14 import org.springframework.beans.factory.annotation.Autowired;
14 import org.springframework.stereotype.Service; 15 import org.springframework.stereotype.Service;
15 16
...@@ -51,11 +52,14 @@ public class DuplicateConsignmentEmailServiceImpl extends BaseService implements ...@@ -51,11 +52,14 @@ public class DuplicateConsignmentEmailServiceImpl extends BaseService implements
51 /** 52 /**
52 * 发送邮件 53 * 发送邮件
53 */ 54 */
54 - boolean result = emailUtil.sendMail(mailConfigDto); 55 + boolean result = false;
56 + if (StringUtils.isNotEmpty(mailConfigDto.getTo())){
57 + result = emailUtil.sendMail(mailConfigDto);
58 + }
55 /** 59 /**
56 * 更新邮件实体 60 * 更新邮件实体
57 */ 61 */
58 - duplicateEmailUtil.updateEmail(result,email,cacheSystem); 62 + duplicateEmailUtil.updateEmail(result,email,cacheSystem,mailConfigDto);
59 /** 63 /**
60 * 更新数据库 64 * 更新数据库
61 */ 65 */
......
...@@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.enums.biz.EmailTypeEnum; ...@@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.enums.biz.EmailTypeEnum;
7 import com.fedex.connect.common.dependencies.util.NIOFileUtils; 7 import com.fedex.connect.common.dependencies.util.NIOFileUtils;
8 import com.fedex.connect.common.dependencies.util.ZipUtils; 8 import com.fedex.connect.common.dependencies.util.ZipUtils;
9 import com.fedex.connect.common.model.biz.Email; 9 import com.fedex.connect.common.model.biz.Email;
10 +import com.fedex.connect.task.config.PropertiesConfig;
10 import com.fedex.connect.task.data.dto.MailConfigDto; 11 import com.fedex.connect.task.data.dto.MailConfigDto;
11 import com.fedex.connect.task.data.dto.PortFileDto; 12 import com.fedex.connect.task.data.dto.PortFileDto;
12 import com.fedex.connect.task.data.dto.PushZipEmailDto; 13 import com.fedex.connect.task.data.dto.PushZipEmailDto;
...@@ -18,6 +19,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,6 +19,7 @@ import lombok.extern.slf4j.Slf4j;
18 import org.springframework.beans.factory.annotation.Autowired; 19 import org.springframework.beans.factory.annotation.Autowired;
19 import org.springframework.stereotype.Service; 20 import org.springframework.stereotype.Service;
20 21
22 +import java.io.File;
21 import java.util.List; 23 import java.util.List;
22 24
23 /** 25 /**
...@@ -44,6 +46,9 @@ public class PushConsignmentFileServiceImpl extends BaseService implements IPush ...@@ -44,6 +46,9 @@ public class PushConsignmentFileServiceImpl extends BaseService implements IPush
44 @Autowired 46 @Autowired
45 private NIOFileUtils nioFileUtils; 47 private NIOFileUtils nioFileUtils;
46 48
49 + @Autowired
50 + private PropertiesConfig propertiesConfig;
51 +
47 /** 52 /**
48 * @Author Szl 53 * @Author Szl
49 * @Description 功能说明 推送清关文件 54 * @Description 功能说明 推送清关文件
...@@ -53,30 +58,41 @@ public class PushConsignmentFileServiceImpl extends BaseService implements IPush ...@@ -53,30 +58,41 @@ public class PushConsignmentFileServiceImpl extends BaseService implements IPush
53 */ 58 */
54 @Override 59 @Override
55 public void pushConsignmentFileTask(){ 60 public void pushConsignmentFileTask(){
56 - String tempPath = ""; 61 + String tempPath = propertiesConfig.getZipTempPath();
57 - String finalPath = ""; 62 + String finalPath = propertiesConfig.getZipFinalPath();
63 + // 检查并创建临时目录
64 + File tempDir = new File(tempPath);
65 + if (!tempDir.exists()) {
66 + tempDir.mkdirs();
67 + }
68 + // 检查并创建最终目录
69 + File finalDir = new File(finalPath);
70 + if (!finalDir.exists()) {
71 + finalDir.mkdirs();
72 + }
58 //查询需要发送的数据 73 //查询需要发送的数据
59 List<Email> conPushEmails = iEmailExtRepository.findEmailsByDic(cacheSystem.getDicEmailType(EmailTypeEnum.PUSH_CON_FILE.getCode()).getCode(), 74 List<Email> conPushEmails = iEmailExtRepository.findEmailsByDic(cacheSystem.getDicEmailType(EmailTypeEnum.PUSH_CON_FILE.getCode()).getCode(),
60 cacheSystem.getDicEmailStatus(EmailStatusEnum.PENDING.getCode()).getCode(),ParamConfigConstants.TASK_PARAM_KEYS.PUSH_CON_NUMBER); 75 cacheSystem.getDicEmailStatus(EmailStatusEnum.PENDING.getCode()).getCode(),ParamConfigConstants.TASK_PARAM_KEYS.PUSH_CON_NUMBER);
61 76
62 for (Email conPushEmail : conPushEmails) { 77 for (Email conPushEmail : conPushEmails) {
63 boolean result = true; 78 boolean result = true;
79 + String filePath = null;
80 + MailConfigDto mailMessageReqDto = new MailConfigDto();
64 try { 81 try {
65 //获取待发送的文件并打zip包 82 //获取待发送的文件并打zip包
66 PortFileDto portFileDto = new PortFileDto(); 83 PortFileDto portFileDto = new PortFileDto();
67 List<PushZipEmailDto> attachmentDetailsByBizId = attachmentExtRepository.findAttachmentDetailsByBizId(conPushEmail.getBizId()); 84 List<PushZipEmailDto> attachmentDetailsByBizId = attachmentExtRepository.findAttachmentDetailsByBizId(conPushEmail.getBizId());
68 - portFileDto = conFileEmailUtil.getPortZipMap(portFileDto, attachmentDetailsByBizId, tempPath, finalPath, zipUtils); 85 + portFileDto = conFileEmailUtil.getPortZipMap(portFileDto, attachmentDetailsByBizId, tempPath, finalPath, zipUtils,conPushEmail.getBizCode());
69 //发送邮件 86 //发送邮件
70 - MailConfigDto mailMessageReqDto = new MailConfigDto();
71 result = conFileEmailUtil.sendEmail(portFileDto, emailUtil,mailMessageReqDto,conPushEmail); 87 result = conFileEmailUtil.sendEmail(portFileDto, emailUtil,mailMessageReqDto,conPushEmail);
72 //根据是否成功发送邮件对文件进行备份 88 //根据是否成功发送邮件对文件进行备份
73 - String filePath = conFileEmailUtil.backFile(portFileDto.getZipPath(), nioFileUtils,result); 89 + filePath = conFileEmailUtil.backFile(portFileDto.getZipPath(), nioFileUtils, conPushEmail);
74 - //更新邮件记录表
75 - conFileEmailUtil.createEmail(cacheSystem,conPushEmail,mailMessageReqDto,result,filePath);
76 }catch (Exception e){ 90 }catch (Exception e){
77 log.error("推送清关文件邮件异常",e); 91 log.error("推送清关文件邮件异常",e);
78 result = false; 92 result = false;
79 } 93 }
94 + //更新邮件记录表
95 + conFileEmailUtil.createEmail(cacheSystem,conPushEmail,mailMessageReqDto,result,filePath);
80 //保存入库 96 //保存入库
81 conFileEmailUtil.saveEmail(conPushEmail,result); 97 conFileEmailUtil.saveEmail(conPushEmail,result);
82 } 98 }
......
1 +package com.fedex.connect.task.service.biz.impl;
2 +
3 +import com.fedex.connect.common.model.biz.PushObDetail;
4 +import com.fedex.connect.task.service.base.BaseService;
5 +import com.fedex.connect.task.service.biz.IPushObDetailService;
6 +import org.springframework.stereotype.Service;
7 +
8 +import java.util.List;
9 +
10 +/**
11 + * @Author mt
12 + * @Description 类说明 推送明细日志
13 + * @Date 2024/5/30
14 + */
15 +@Service
16 +public class PushObDetailServiceImpl extends BaseService implements IPushObDetailService {
17 + /**
18 + * @Author mt
19 + * @Description 功能说明 批量插入
20 + * @Date 2024/5/30
21 + * @param record
22 + * @return void
23 + */
24 + public void batchInsert(List<PushObDetail> record){
25 + pushObDetailRepository.batchInsert(record);
26 + }
27 +}
1 package com.fedex.connect.task.service.biz.impl; 1 package com.fedex.connect.task.service.biz.impl;
2 2
3 +import com.fedex.connect.common.dependencies.cache.CacheSystem;
3 import com.fedex.connect.common.dependencies.contants.ParamConfigConstants; 4 import com.fedex.connect.common.dependencies.contants.ParamConfigConstants;
4 import com.fedex.connect.common.dependencies.enums.biz.PushObStatusEnum; 5 import com.fedex.connect.common.dependencies.enums.biz.PushObStatusEnum;
5 import com.fedex.connect.common.dependencies.util.Utils; 6 import com.fedex.connect.common.dependencies.util.Utils;
7 +import com.fedex.connect.common.model.bi.DictionaryEntries;
6 import com.fedex.connect.common.model.biz.PushOb; 8 import com.fedex.connect.common.model.biz.PushOb;
7 import com.fedex.connect.common.model.sys.ParamConfig; 9 import com.fedex.connect.common.model.sys.ParamConfig;
8 import com.fedex.connect.task.data.bo.Imp001GenerateBo; 10 import com.fedex.connect.task.data.bo.Imp001GenerateBo;
9 import com.fedex.connect.task.service.base.BaseService; 11 import com.fedex.connect.task.service.base.BaseService;
10 import com.fedex.connect.task.service.biz.IPushObService; 12 import com.fedex.connect.task.service.biz.IPushObService;
11 13
14 +import com.fedex.connect.task.utils.biz.imp001.Imp001GenerateUtil;
15 +import com.fedex.connect.task.utils.biz.imp001.Imp001PushUtil;
16 +import com.fedex.connect.task.utils.biz.imp001.Imp001RecordLogUtil;
12 import lombok.extern.slf4j.Slf4j; 17 import lombok.extern.slf4j.Slf4j;
13 import org.springframework.beans.factory.annotation.Autowired; 18 import org.springframework.beans.factory.annotation.Autowired;
14 import org.springframework.stereotype.Service; 19 import org.springframework.stereotype.Service;
...@@ -20,92 +25,102 @@ import java.util.Objects; ...@@ -20,92 +25,102 @@ import java.util.Objects;
20 /** 25 /**
21 * @Author mt 26 * @Author mt
22 * @Description 发送Imp001到进口组 27 * @Description 发送Imp001到进口组
23 - * @Date 2024/5/24 28 + * @Date 2024年12月18日
24 */ 29 */
25 @Slf4j 30 @Slf4j
26 @Service 31 @Service
27 public class PushObServiceImpl extends BaseService implements IPushObService { 32 public class PushObServiceImpl extends BaseService implements IPushObService {
28 - //@Autowired 33 + @Autowired
29 - //Imp001GenerateUtil imp001GenerateUtil; 34 + Imp001GenerateUtil imp001GenerateUtil;
30 - //@Autowired 35 + @Autowired
31 - //Imp001PushUtil imp001PushUtil; 36 + Imp001PushUtil imp001PushUtil;
32 - //@Autowired 37 + @Autowired
33 - //Imp001RecordLogUtil imp001RecordLogUtil; 38 + Imp001RecordLogUtil imp001RecordLogUtil;
34 - // 39 + @Autowired
35 - ///** 40 + CacheSystem cacheSystem;
36 - // * 推送OB报文数据zip包文件 41 +
37 - // */ 42 + /**
38 - //@Override 43 + * 推送OB报文数据zip包文件
39 - //public void sendOb() { 44 + */
40 - // //获取每次处理数据量量参数 45 + @Override
41 - // ParamConfig paramConfig = paramConfigRepository.findValueByCode(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER); 46 + public void sendOb() {
42 - // Long rownum = Long.parseLong(paramConfig.getValue()); 47 + //获取每次处理数据量量参数
43 - // //获取需要处理的记录 48 + ParamConfig paramConfig = paramConfigRepository.findValueByCode(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER);
44 - // List<PushOb> pushObList = pushObRepository.findPushOb(PushObStatusEnum.TO_BE_SENT.getCode(),rownum); 49 + Long rownum = Long.parseLong(paramConfig.getValue());
45 - // //推送imp001数据 50 + //获取需要处理的记录
46 - // this.pushOb(pushObList); 51 + List<PushOb> pushObList = pushObRepository.findPushOb(PushObStatusEnum.TO_BE_SENT.getCode(),rownum);
47 - //} 52 + //推送imp001数据
48 - // 53 + this.pushOb(pushObList);
49 - ///** 54 + }
50 - // * 推送OB文件错误重试 55 +
51 - // */ 56 + /**
52 - //@Override 57 + * 推送OB文件错误重试
53 - //public void sendObRetry() { 58 + */
54 - // //获取每次处理数据量量参数 59 + @Override
55 - // Map<String,ParamConfig> paramConfig = paramConfigRepository.findValueByCodes(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER, 60 + public void sendObRetry() {
56 - // ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_RETRY_NUMBER); 61 + //获取每次处理数据量量参数
57 - // //推送IMP001重试处理数量 62 + Map<String,ParamConfig> paramConfig = paramConfigRepository.findValueByCodes(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER,
58 - // ParamConfig retryNumConfig = paramConfig.get(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_RETRY_NUMBER); 63 + ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_RETRY_NUMBER);
59 - // Long retryNum = Long.parseLong(retryNumConfig.getCode()); 64 + //推送IMP001重试处理数量
60 - // //推送IMP001定时任务处理数量 65 + ParamConfig retryNumConfig = paramConfig.get(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_RETRY_NUMBER);
61 - // ParamConfig rownumConfig = paramConfig.get(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER); 66 + Long retryNum = Long.parseLong(retryNumConfig.getValue());
62 - // Long rownum = Long.parseLong(rownumConfig.getCode()); 67 + //推送IMP001定时任务处理数量
63 - // //获取需要重新处理的记录:处理4次以下,并且推送失败的 68 + ParamConfig rownumConfig = paramConfig.get(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER);
64 - // List<PushOb> errPushObLog = pushObRepository.findErrPushOb(retryNum, PushObStatusEnum.PUSH_FAILED.getCode(),rownum); 69 + Long rownum = Long.parseLong(rownumConfig.getValue());
65 - // if (errPushObLog!=null && !errPushObLog.isEmpty()){ 70 + //获取需要重新处理的记录:处理4次以下,并且推送失败的
66 - // log.info("sendObRetryTask : sendObRetry size: "+errPushObLog.size()); 71 + List<PushOb> errPushObLog = pushObRepository.findErrPushOb(retryNum, PushObStatusEnum.PUSH_FAILED.getCode(),rownum);
67 - // //重新推送tw001数据 72 + if (errPushObLog!=null && !errPushObLog.isEmpty()){
68 - // this.pushOb(errPushObLog); 73 + log.info("sendObRetryTask : sendObRetry size: "+errPushObLog.size());
69 - // }else{ 74 + //重新推送tw001数据
70 - // log.info("sendObRetryTask : No data found for sendObRetry!"); 75 + this.pushOb(errPushObLog);
71 - // } 76 + }else{
72 - //} 77 + log.info("sendObRetryTask : No data found for sendObRetry!");
73 - // 78 + }
74 - ///** 79 + }
75 - // * @Author mt 80 +
76 - // * @Description 推送tw001数据 81 + /**
77 - // * @Date 2024/5/29 82 + * @Author mt
78 - // * @param pushObList 83 + * @Description 推送imp001数据
79 - // * @return void 84 + * @Date 2024/5/29
80 - // */ 85 + * @param pushObList
81 - //private void pushOb(List<PushOb> pushObList){ 86 + * @return void
82 - // Utils.listOf(pushObList).stream().filter(Objects::nonNull).forEach(ob ->{ 87 + */
83 - // boolean flag = false; 88 + private void pushOb(List<PushOb> pushObList){
84 - // String errorMsg = ""; 89 + /**
85 - // Imp001GenerateBo imp001GenerateBo = null; 90 + * 推送成功状态字典
86 - // try { 91 + */
87 - // //生成tw001 json对象dto 92 + DictionaryEntries pushSuccessEntries = cacheSystem.getDicPushObStatus(PushObStatusEnum.PUSH_SUCCESSFUL.getCode());
88 - // imp001GenerateBo = imp001GenerateUtil.generateImp001Json(ob); 93 + /**
89 - // //根据tw001 json对象生成并且推送zip包 94 + * 推送失败状态字典
90 - // imp001PushUtil.pushImp001(imp001GenerateBo); 95 + */
91 - // flag = true; 96 + DictionaryEntries pushFailedEntries = cacheSystem.getDicPushObStatus(PushObStatusEnum.PUSH_FAILED.getCode());
92 - // }catch(Exception ex){ 97 + Utils.listOf(pushObList).stream().filter(Objects::nonNull).forEach(ob ->{
93 - // log.error("pushOb error : ",ex); 98 + boolean flag = false;
94 - // errorMsg = ex.getMessage(); 99 + String errorMsg = "";
95 - // flag = false; 100 + Imp001GenerateBo imp001GenerateBo = null;
96 - // }finally{ 101 + try {
97 - // /** 102 + //生成imp001 json对象dto
98 - // * 如果生成失败,推送失败,则不会记录推送日志明细,更新推送日志表。 103 + imp001GenerateBo = imp001GenerateUtil.generateImp001Json(ob);
99 - // * 记录日志,并且备份 104 + //根据imp001 json对象生成并且推送zip包
100 - // */ 105 + imp001PushUtil.pushImp001(imp001GenerateBo);
101 - // if(flag){ 106 + flag = true;
102 - // //推送成功 107 + }catch(Exception ex){
103 - // imp001RecordLogUtil.pushSuccessRecordLog(imp001GenerateBo, ob); 108 + log.error("pushOb error : ",ex);
104 - // }else{ 109 + errorMsg = ex.getMessage();
105 - // //推送失败 110 + flag = false;
106 - // imp001RecordLogUtil.pushFailRecordLog(imp001GenerateBo, ob, errorMsg); 111 + }finally{
107 - // } 112 + /**
108 - // } 113 + * 如果生成失败,推送失败,则不会记录推送日志明细,更新推送日志表。
109 - // }); 114 + * 记录日志,并且备份
110 - //} 115 + */
116 + if(flag){
117 + //推送成功
118 + imp001RecordLogUtil.pushSuccessRecordLog(imp001GenerateBo, ob, pushSuccessEntries);
119 + }else{
120 + //推送失败
121 + imp001RecordLogUtil.pushFailRecordLog(imp001GenerateBo, ob, pushFailedEntries, errorMsg);
122 + }
123 + }
124 + });
125 + }
111 } 126 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -59,6 +59,14 @@ public class SendFailedEmailAlertServiceImpl extends BaseService implements ISen ...@@ -59,6 +59,14 @@ public class SendFailedEmailAlertServiceImpl extends BaseService implements ISen
59 */ 59 */
60 List<SendFailedEmailDto> sendFailedEmailDto = sendFailedEmailUtil.createSendFailedEmailDto(emails,obs,paramConfigMap); 60 List<SendFailedEmailDto> sendFailedEmailDto = sendFailedEmailUtil.createSendFailedEmailDto(emails,obs,paramConfigMap);
61 /** 61 /**
62 + * 无错误邮件不发送邮件
63 + */
64 + boolean dataFlag = sendFailedEmailDto.stream()
65 + .anyMatch(failedEmailDto -> failedEmailDto.getStatusCodeCount() > 5);
66 + if (!dataFlag) {
67 + return;
68 + }
69 + /**
62 * 构建邮件内容 70 * 构建邮件内容
63 */ 71 */
64 String emailBody = sendFailedEmailUtil.createEmailBody(sendFailedEmailDto,paramConfigMap); 72 String emailBody = sendFailedEmailUtil.createEmailBody(sendFailedEmailDto,paramConfigMap);
......
1 -//package com.fedex.connect.task.utils.biz.imp001;
2 -//
3 -//import com.fedex.connect.common.dependencies.cache.CacheSystem;
4 -//import com.fedex.connect.common.dependencies.util.NIOFileUtils;
5 -//import com.fedex.connect.common.model.bi.DictionaryEntries;
6 -//import com.fedex.connect.common.model.biz.Attachment;
7 -//import com.fedex.connect.common.model.biz.Consignment;
8 -//import com.fedex.connect.common.model.biz.PushOb;
9 -//import com.fedex.connect.task.config.PropertiesConfig;
10 -//import com.fedex.connect.task.data.bo.Imp001FileInfoBo;
11 -//import com.fedex.connect.task.data.bo.Imp001GenerateBo;
12 -//import com.fedex.connect.task.data.dto.imp001.*;
13 -//import com.fedex.connect.task.repository.repo.biz.IAttachmentRepository;
14 -//import com.fedex.connect.task.repository.repo.biz.IConsignmentRepository;
15 -//import com.fedex.export.common.util.DateUtil;
16 -//import com.fedex.export.common.util.NioFileUtils;
17 -//import com.fedex.export.common.util.StringExtUtil;
18 -//import com.fedex.export.common.util.Utils;
19 -//import com.fedex.export.config.PropertiesConfig;
20 -//import com.fedex.export.constants.Constant;
21 -//import com.fedex.export.data.bo.Imp001FileInfoBo;
22 -//import com.fedex.export.data.bo.Imp001GenerateBo;
23 -//import com.fedex.export.data.dto.tw001.*;
24 -//import com.fedex.export.repository.entity.*;
25 -//import com.fedex.export.repository.entity.log.PushObLog;
26 -//import com.fedex.export.service.business.IDeclareCheckInfoService;
27 -//import com.fedex.export.service.business.IDeclareCustomsFileService;
28 -//import com.fedex.export.service.business.IDeclareInfoService;
29 -//import com.fedex.export.service.business.IUploadFileService;
30 -//import com.fedex.export.service.system.ISysDictionaryService;
31 -//import lombok.extern.slf4j.Slf4j;
32 -//import org.apache.commons.lang3.StringUtils;
33 -//import org.springframework.beans.factory.annotation.Autowired;
34 -//import org.springframework.stereotype.Component;
35 -//
36 -//import java.io.IOException;
37 -//import java.util.*;
38 -//
39 -///**
40 -// * @Author mt
41 -// * @Description imp001报文生成json,util
42 -// * @Date 2024/5/24
43 -// */
44 -//@Slf4j
45 -//@Component
46 -//public class Imp001GenerateUtil {
47 -// @Autowired
48 -// CacheSystem cacheSystem;
49 -// @Autowired
50 -// private IAttachmentRepository attachmentRepository;
51 -// @Autowired
52 -// private NIOFileUtils nioFileUtils;
53 -// @Autowired
54 -// private PropertiesConfig propertiesConfig;
55 -//
56 -// /**
57 -// * @Author mt
58 -// * @Description 生成imp001报文json对象
59 -// * @Date 2024/11/21
60 -// * @param pushOb
61 -// * @return Imp001GenerateBo
62 -// */
63 -// public Imp001GenerateBo generateImp001Json(PushOb pushOb) throws IOException{
64 -// Imp001RootJsonDto tw001RootJsonDto = new Imp001RootJsonDto();
65 -// List<Attachment> attachmentList = attachmentRepository.queryAttachmentInfo(pushOb.getConsignmentId());
66 -// //生成IMP001报文数据
67 -// Imp001Data imp001Data = new Imp001Data();
68 -// Imp001Consignments[] consignments = new Imp001Consignments[1];
69 -// Imp001Consignments imp001Consignments = new Imp001Consignments();
70 -// //生成运单数据
71 -// Imp001Consignment imp001Consignment = new Imp001Consignment();
72 -// //运单号
73 -// imp001Consignment.setDeliveryNo(pushOb.getConsignmentCode());
74 -// //附件个数
75 -// imp001Consignment.setAttachedFilesCount(attachmentList.size());
76 -// //生成文件列表数据
77 -// Imp001Files[] files = this.generateFiles(attachmentList);
78 -// /***************设置对象赋值***************/
79 -// imp001Consignments.setConsignment(imp001Consignment);
80 -// imp001Consignments.setFiles(files);
81 -// consignments[0] = imp001Consignments;
82 -// imp001Data.setConsignments(consignments);
83 -// //初始化TW001表头信息
84 -// this.initImp001Head(tw001RootJsonDto);
85 -// tw001RootJsonDto.setData(imp001Data);
86 -// //返回对象
87 -// Imp001GenerateBo tw001GenerateBo = new Imp001GenerateBo();
88 -// tw001GenerateBo.setDeclareInfo(declareInfo);
89 -// tw001GenerateBo.setImp001RootJsonDto(tw001RootJsonDto);
90 -// //获取生成tw001临时文件夹目录
91 -// String workFilePath = this.generateWorkPath(declareInfo.getDeliveryNo(),declareInfo.getDeclareId());
92 -// tw001GenerateBo.setWorkFilePath(workFilePath);
93 -// List<Imp001FileInfoBo> fileInfoLists = new ArrayList<Imp001FileInfoBo>();
94 -// //存在图案商标则添加
95 -// if(checkInfo != null && checkInfo.getBrandImage() != null){
96 -// //初始化图案商标文件对象
97 -// Imp001FileInfoBo fileInfoBo = this.initFileInfo(pushFileTypeMap,Constant.SEND_TW001_KEYS.PUSH_FILE_TYPE_KEYS.PUSH_STATUS_OB_5,checkInfo.getBrandImage());
98 -// fileInfoLists.add(fileInfoBo);
99 -// }
100 -// if(files != null){
101 -// for (Imp001Files file : files) {
102 -// //获取文件类型 1:系统生成的的“聯絡方式與特殊交待事項”。2:系统生成的“出口報關檢核表”。3:用户上传的文件
103 -// String fileTypeCode = this.getfileType(file.getSource());
104 -// //初始化文件对象:1:系统生成的的“聯絡方式與特殊交待事項”。2:系统生成的“出口報關檢核表”。3:用户上传的文件
105 -// Imp001FileInfoBo fileInfoBo = this.initFileInfo(pushFileTypeMap,fileTypeCode,file.getName());
106 -// fileInfoLists.add(fileInfoBo);
107 -// }
108 -// }
109 -// //设置文件信息
110 -// tw001GenerateBo.setFileInfoList(fileInfoLists);
111 -// //设置jsonDic
112 -// tw001GenerateBo.setJsonDictionary(pushFileTypeMap.get(Constant.SEND_TW001_KEYS.PUSH_FILE_TYPE_KEYS.PUSH_STATUS_OB_4));
113 -// return tw001GenerateBo;
114 -// }
115 -//
116 -// /**
117 -// * @Author mt
118 -// * @Description 初始化TW001表头信息
119 -// * @Date 2024/11/21
120 -// * @param imp001RootJsonDto
121 -// * @return void
122 -// */
123 -// private void initImp001Head(Imp001RootJsonDto imp001RootJsonDto){
124 -// String UUIDStr=String.valueOf(UUID.randomUUID());
125 -// //消息代码/类型
126 -// imp001RootJsonDto.setMessageId(UUIDStr);
127 -// //消息代码/类型
128 -// imp001RootJsonDto.setMessageCode(Constant.SEND_TW001_KEYS.TW001_HEAD_KEYS.MESSAGE_CODE);
129 -// //发送程序ID
130 -// imp001RootJsonDto.setSenderId(Constant.SEND_TW001_KEYS.TW001_HEAD_KEYS.SENDER_ID);
131 -// //接受程序ID
132 -// imp001RootJsonDto.setReceiverId(Constant.SEND_TW001_KEYS.TW001_HEAD_KEYS.RECEIVER_ID);
133 -// String sendTime = String.valueOf(System.currentTimeMillis());
134 -// //发送时间,时间戳
135 -// imp001RootJsonDto.setSendTime(sendTime);
136 -// }
137 -//
138 -// /**
139 -// * @Author mt
140 -// * @Description 功能说明
141 -// * @Date 2024/5/30
142 -// * @param source 1:系统生成的的“聯絡方式與特殊交待事項”。2:系统生成的“出口報關檢核表”。3:用户上传的文件
143 -// * @return java.lang.String
144 -// */
145 -// private String getfileType(Integer source){
146 -// if(source.equals(Constant.SEND_TW001_KEYS.TW001_FILE_SOURCE_1)){
147 -// return Constant.SEND_TW001_KEYS.PUSH_FILE_TYPE_KEYS.PUSH_STATUS_OB_1;
148 -// }else if(source.equals(Constant.SEND_TW001_KEYS.TW001_FILE_SOURCE_2)){
149 -// return Constant.SEND_TW001_KEYS.PUSH_FILE_TYPE_KEYS.PUSH_STATUS_OB_2;
150 -// }else if(source.equals(Constant.SEND_TW001_KEYS.TW001_FILE_SOURCE_3)){
151 -// return Constant.SEND_TW001_KEYS.PUSH_FILE_TYPE_KEYS.PUSH_STATUS_OB_3;
152 -// }
153 -// return null;
154 -// }
155 -//
156 -// /**
157 -// * @Author mt
158 -// * @Description 功能说明 初始化fileInfo
159 -// * @Date 2024/5/30
160 -// * @param pushFileTypeMap
161 -// * @param fileTypeCode
162 -// * @param fileName
163 -// * @return com.fedex.export.data.bo.Imp001FileInfoBo
164 -// */
165 -// private Imp001FileInfoBo initFileInfo(Map<String,SysDictionary> pushFileTypeMap, String fileTypeCode, String fileName){
166 -// Imp001FileInfoBo fileInfoBo = new Imp001FileInfoBo();
167 -// //类型编码不为空则初始化文件id,文件类型
168 -// if(StringUtils.isNotEmpty(fileTypeCode)) {
169 -// SysDictionary fileTypeDic = pushFileTypeMap.get(fileTypeCode);
170 -// if (fileTypeDic != null) {
171 -// fileInfoBo.setFileTypeId(fileTypeDic.getId());
172 -// fileInfoBo.setFileTypeName(fileTypeDic.getChineseName());
173 -// }
174 -// }
175 -// fileInfoBo.setPushTime(new Date());
176 -// fileInfoBo.setFileName(fileName);
177 -// return fileInfoBo;
178 -// }
179 -//
180 -// /**
181 -// * @Author mt
182 -// * @Description 生成文件对象集合vo,并且将文件复制到指定目录
183 -// * @Date 2024/11/21
184 -// * @param attachmentList
185 -// * @return com.fedex.connect.task.data.dto.imp001.Imp001Files[]
186 -// */
187 -// private Imp001Files[] generateFiles(List<Attachment> attachmentList) throws IOException{
188 -// if(attachmentList == null || attachmentList.size() == 0){
189 -// return null;
190 -// }
191 -// Imp001Files[] tw001Files = new Imp001Files[attachmentList.size()];
192 -// for(int i = 0 ; i < attachmentList.size() ; i ++){
193 -// Attachment attachment = attachmentList.get(i);
194 -// Imp001Files file = new Imp001Files();
195 -// //获取附件业务类型
196 -// DictionaryEntries attBizType = cacheSystem.getDicAttachmentBizType(attachment.getBizTypeCode());
197 -// //运单、发票、箱单、其他
198 -// String bizTypeCode = attBizType.getExt1();
199 -// if(StringUtils.isEmpty(bizTypeCode)){
200 -// continue;
201 -// }
202 -// //重置文件名称,并且复制源文件到指定目录
203 -// String fileName = this.generateFileName(uploadFile, deliveryNo, declareId);
204 -// if(fileName == null){
205 -// continue;
206 -// }
207 -// //文件名称
208 -// file.setName(fileName);
209 -// //文件来源
210 -// file.setSource(source);
211 -// //文件后缀转换为小写
212 -// String suffix = uploadFile.getType();
213 -// if(suffix != null){
214 -// suffix = suffix.toLowerCase();
215 -// }
216 -// //文件名后缀
217 -// file.setSuffix(suffix);
218 -// //文件大小
219 -// file.setFileSizeByte(uploadFile.getFileSizeByte() == null ? null : uploadFile.getFileSizeByte().intValue());
220 -// tw001Files[i] = file;
221 -// }
222 -// return tw001Files;
223 -// }
224 -//
225 -// /**
226 -// * @Author mt
227 -// * @Description 重置文件名称,并且复制源文件到指定目录
228 -// * @Date 2024/5/29
229 -// * @param uploadFile
230 -// * @param deliveryNo
231 -// * @param declareId
232 -// * @return java.lang.String
233 -// */
234 -// private String generateFileName(UploadFile uploadFile,String deliveryNo,Long declareId) throws IOException{
235 -// String generateFileName = null;
236 -// if(!Utils.isEmpty(uploadFile.getName())){
237 -// generateFileName = deliveryNo
238 -// + Constant.COMMON_KEYS.UNDER_LINE + StringExtUtil.idLeftPadStr(uploadFile.getId())
239 -// + Constant.COMMON_KEYS.UNDER_LINE + uploadFile.getName()
240 -// + Constant.COMMON_KEYS.UNDER_LINE + DateUtil.yyyyMMddHH24mmssSSS(new Date()) + uploadFile.getType();
241 -// }
242 -// //获取源文件目录 实际文件路径:/var/share/icleartw/upload/declareFile/202401/476/出口報關申請表_20240116_132402_827.pdf
243 -// String sourceFilePath = uploadFile.getServerPath() + Constant.COMMON_KEYS.BACK_SLASH + uploadFile.getServerName();
244 -// //获取复制目标目录
245 -// String targetFilePath = this.generateWorkPath(deliveryNo,declareId) + generateFileName;
246 -// //原始文件存在则复制文件
247 -// if(nioFileUtils.fileExists(sourceFilePath)){
248 -// //复制文件到指定目录
249 -// nioFileUtils.copyFile(sourceFilePath,targetFilePath);
250 -// return generateFileName;
251 -// }else{
252 -// return null;
253 -// }
254 -// }
255 -//
256 -// /**
257 -// * @Author mt
258 -// * @Description 生成文件夹目录 /var/share/icleartw/TWIMPORT/work/yyyy-MM-dd/运单号_运单ID/
259 -// * @Date 2024/5/29
260 -// * @param deliveryNo
261 -// * @param declareId
262 -// * @return java.lang.String
263 -// */
264 -// private String generateWorkPath(String deliveryNo,Long declareId){
265 -// String yyyyMMdd = DateUtil.format(new Date());
266 -// String fileDir = propertiesConfig.getTw001PathWork() + Constant.COMMON_KEYS.BACK_SLASH +
267 -// yyyyMMdd + Constant.COMMON_KEYS.BACK_SLASH +
268 -// deliveryNo + Constant.COMMON_KEYS.UNDER_LINE + declareId + Constant.COMMON_KEYS.BACK_SLASH;
269 -// //如果目录不存在则创建完整目录
270 -// nioFileUtils.mkdirs(fileDir);
271 -// return fileDir;
272 -// }
273 -//}
...\ No newline at end of file ...\ No newline at end of file
1 +package com.fedex.connect.task.utils.biz.imp001;
2 +
3 +import com.fedex.connect.common.dependencies.cache.CacheSystem;
4 +import com.fedex.connect.common.dependencies.contants.BaseSeparatorConstants;
5 +import com.fedex.connect.common.dependencies.contants.DigitConstants;
6 +import com.fedex.connect.common.dependencies.util.DateUtil;
7 +import com.fedex.connect.common.dependencies.util.NIOFileUtils;
8 +import com.fedex.connect.common.dependencies.util.StringExtUtil;
9 +import com.fedex.connect.common.dependencies.util.Utils;
10 +import com.fedex.connect.common.model.bi.DictionaryEntries;
11 +import com.fedex.connect.common.model.biz.Attachment;
12 +import com.fedex.connect.common.model.biz.PushOb;
13 +import com.fedex.connect.task.config.PropertiesConfig;
14 +import com.fedex.connect.task.constants.Constant;
15 +import com.fedex.connect.task.data.bo.Imp001GenerateBo;
16 +import com.fedex.connect.task.data.dto.imp001.*;
17 +import com.fedex.connect.task.repository.repo.biz.IAttachmentRepository;
18 +import lombok.extern.slf4j.Slf4j;
19 +import org.apache.commons.lang3.StringUtils;
20 +import org.springframework.beans.factory.annotation.Autowired;
21 +import org.springframework.stereotype.Component;
22 +
23 +import java.io.IOException;
24 +import java.util.Date;
25 +import java.util.List;
26 +import java.util.UUID;
27 +
28 +/**
29 + * @Author mt
30 + * @Description imp001报文生成json,util
31 + * @Date 2024/5/24
32 + */
33 +@Slf4j
34 +@Component
35 +public class Imp001GenerateUtil {
36 + @Autowired
37 + CacheSystem cacheSystem;
38 + @Autowired
39 + private IAttachmentRepository attachmentRepository;
40 + @Autowired
41 + private NIOFileUtils nioFileUtils;
42 + @Autowired
43 + private PropertiesConfig propertiesConfig;
44 +
45 + /**
46 + * @Author mt
47 + * @Description 生成imp001报文json对象
48 + * @Date 2024/11/21
49 + * @param pushOb
50 + * @return Imp001GenerateBo
51 + */
52 + public Imp001GenerateBo generateImp001Json(PushOb pushOb) throws IOException{
53 + Imp001RootJsonDto imp001RootJsonDto = new Imp001RootJsonDto();
54 + List<Attachment> attachmentList = attachmentRepository.queryAttachmentInfo(pushOb.getUploadRecordId(),pushOb.getConsignmentId());
55 + //生成IMP001报文数据
56 + Imp001Data imp001Data = new Imp001Data();
57 + Imp001Consignments[] consignments = new Imp001Consignments[1];
58 + Imp001Consignments imp001Consignments = new Imp001Consignments();
59 + //生成运单数据
60 + Imp001Consignment imp001Consignment = new Imp001Consignment();
61 + //运单号
62 + imp001Consignment.setDeliveryNo(pushOb.getConsignmentCode());
63 + //附件个数
64 + imp001Consignment.setAttachedFilesCount(attachmentList.size());
65 + //生成文件列表数据
66 + Imp001Files[] files = this.generateFiles(attachmentList,pushOb.getConsignmentCode(),pushOb.getConsignmentId());
67 + /***************设置对象赋值***************/
68 + imp001Consignments.setConsignment(imp001Consignment);
69 + imp001Consignments.setFiles(files);
70 + consignments[0] = imp001Consignments;
71 + imp001Data.setConsignments(consignments);
72 + //初始化IMP001表头信息
73 + this.initImp001Head(imp001RootJsonDto);
74 + imp001RootJsonDto.setData(imp001Data);
75 + //返回对象
76 + Imp001GenerateBo imp001GenerateBo = new Imp001GenerateBo();
77 + imp001GenerateBo.setImp001RootJsonDto(imp001RootJsonDto);
78 + //获取生成imp001临时文件夹目录
79 + String workFilePath = this.generateWorkPath(pushOb.getConsignmentCode(),pushOb.getConsignmentId());
80 + imp001GenerateBo.setWorkFilePath(workFilePath);
81 + //设置文件信息
82 + imp001GenerateBo.setFileInfos(files);
83 + //设置运单号
84 + imp001GenerateBo.setConsignmentCode(pushOb.getConsignmentCode());
85 + //设置运单ID
86 + imp001GenerateBo.setConsignmentId(pushOb.getConsignmentId());
87 + return imp001GenerateBo;
88 + }
89 +
90 + /**
91 + * @Author mt
92 + * @Description 初始化imp001表头信息
93 + * @Date 2024/11/21
94 + * @param imp001RootJsonDto
95 + * @return void
96 + */
97 + private void initImp001Head(Imp001RootJsonDto imp001RootJsonDto){
98 + String UUIDStr=String.valueOf(UUID.randomUUID());
99 + //消息代码/类型
100 + imp001RootJsonDto.setMessageId(UUIDStr);
101 + //消息代码/类型
102 + imp001RootJsonDto.setMessageCode(Constant.IMP001_HEAD_KEYS.MESSAGE_CODE);
103 + //发送程序ID
104 + imp001RootJsonDto.setSenderId(Constant.IMP001_HEAD_KEYS.SENDER_ID);
105 + //接受程序ID
106 + imp001RootJsonDto.setReceiverId(Constant.IMP001_HEAD_KEYS.RECEIVER_ID);
107 + String sendTime = String.valueOf(System.currentTimeMillis());
108 + //发送时间,时间戳
109 + imp001RootJsonDto.setSendTime(sendTime);
110 + }
111 +
112 + /**
113 + * @Author mt
114 + * @Description 生成文件对象集合vo,并且将文件复制到指定目录
115 + * @Date 2024/11/21
116 + * @param attachmentList
117 + * @return com.fedex.connect.task.data.dto.imp001.Imp001Files[]
118 + */
119 + private Imp001Files[] generateFiles(List<Attachment> attachmentList,String consignmentCode,Long consignmentId) throws IOException{
120 + if(attachmentList == null || attachmentList.size() == 0){
121 + return null;
122 + }
123 + Imp001Files[] imp001Files = new Imp001Files[attachmentList.size()];
124 + for(int i = 0 ; i < attachmentList.size() ; i ++){
125 + Attachment attachment = attachmentList.get(i);
126 + Imp001Files file = new Imp001Files();
127 + //获取附件业务类型
128 + DictionaryEntries attBizType = cacheSystem.getDicAttachmentBizType(attachment.getBizTypeCode());
129 + //运单、发票、箱单、其他
130 + String bizTypeCode = attBizType.getExt1();
131 + if(StringUtils.isEmpty(bizTypeCode)){
132 + continue;
133 + }
134 + //重置文件名称,并且复制源文件到指定目录
135 + String fileName = this.generateFileName(attachment, (i+1),bizTypeCode, consignmentCode, consignmentId);
136 + if(fileName == null){
137 + continue;
138 + }
139 + //文件名称
140 + file.setName(fileName);
141 + //文件来源
142 + file.setContentType(bizTypeCode);
143 + //获取文件后缀,文件后缀转换为小写
144 + String suffix = fileName.substring(fileName.lastIndexOf(BaseSeparatorConstants.SEPARATOR_POINT));
145 + if(suffix != null){
146 + suffix = suffix.toLowerCase();
147 + }
148 + //文件名后缀
149 + file.setSuffix(suffix);
150 + //文件大小
151 + file.setFileSizeByte(attachment.getFileSize() == null ? null : attachment.getFileSize().intValue());
152 + imp001Files[i] = file;
153 + }
154 + return imp001Files;
155 + }
156 +
157 + /**
158 + * @Author mt
159 + * @Description 重置文件名称,并且复制源文件到指定目录
160 + * @Date 2024/12/18
161 + * @param attachment
162 + * @param consignmentCode
163 + * @param consignmentId
164 + * @return java.lang.String
165 + */
166 + private String generateFileName(Attachment attachment,
167 + Integer index,
168 + String bizTypeCode,
169 + String consignmentCode,
170 + Long consignmentId) throws IOException{
171 + String generateFileName = null;
172 + String fileName = attachment.getFileName();
173 + if(!Utils.isEmpty(fileName)){
174 + //获取文件后缀
175 + String fileSuffix = fileName.substring(fileName.lastIndexOf(BaseSeparatorConstants.SEPARATOR_POINT));
176 + /**
177 + * AWB_12位运单号_10位运单ID_三位文件顺序号_yyyyMMddHHmmssSSS
178 + */
179 + generateFileName = bizTypeCode + BaseSeparatorConstants.SEPARATOR_UNDERLINE + consignmentCode
180 + + BaseSeparatorConstants.SEPARATOR_UNDERLINE + StringExtUtil.idLeftPadStr(attachment.getId(), DigitConstants.DIGIT_TEN)
181 + + BaseSeparatorConstants.SEPARATOR_UNDERLINE + StringExtUtil.idLeftPadStr(index.longValue(), DigitConstants.DIGIT_THREE)
182 + + BaseSeparatorConstants.SEPARATOR_UNDERLINE + DateUtil.yyyyMMddHH24mmssSSS(new Date()) + fileSuffix;
183 + }
184 + //获取源文件目录 实际文件路径:/var/share/iclearConnect/upload/attachment/2024-12-18/313913426666/AWB_202412161_20241218131852_001.pdf
185 + String sourceFilePath = attachment.getFilePath() + BaseSeparatorConstants.SEPARATOR_SLASH + attachment.getFileName();
186 + //获取复制目标目录
187 + String targetFilePath = this.generateWorkPath(consignmentCode,consignmentId) + generateFileName;
188 + //原始文件存在则复制文件
189 + if(nioFileUtils.fileExists(sourceFilePath)){
190 + //复制文件到指定目录
191 + nioFileUtils.copyFile(sourceFilePath,targetFilePath);
192 + return generateFileName;
193 + }else{
194 + return null;
195 + }
196 + }
197 +
198 + /**
199 + * @Author mt
200 + * @Description 生成文件夹目录 /var/share/iClearPreCLR/ToIMPORT/work/yyyy-MM-dd/运单号_运单ID/
201 + * @Date 2024/12/18
202 + * @param consignmentCode
203 + * @param consignmentId
204 + * @return java.lang.String
205 + */
206 + private String generateWorkPath(String consignmentCode,Long consignmentId){
207 + String yyyyMMdd = DateUtil.format(new Date());
208 + String fileDir = propertiesConfig.getImp001PathWork() + yyyyMMdd + BaseSeparatorConstants.SEPARATOR_SLASH +
209 + consignmentCode + BaseSeparatorConstants.SEPARATOR_UNDERLINE + consignmentId + BaseSeparatorConstants.SEPARATOR_SLASH;
210 + //如果目录不存在则创建完整目录
211 + nioFileUtils.mkdirs(fileDir);
212 + return fileDir;
213 + }
214 +}
...\ No newline at end of file ...\ No newline at end of file
......
1 -//package com.fedex.connect.task.utils.biz.imp001;
2 -//
3 -//import com.fedex.connect.task.config.PropertiesConfig;
4 -//import com.fedex.connect.task.data.bo.Imp001GenerateBo;
5 -//import com.fedex.export.common.util.*;
6 -//import com.fedex.export.config.PropertiesConfig;
7 -//import com.fedex.export.constants.Constant;
8 -//import com.fedex.export.data.bo.Imp001FileInfoBo;
9 -//import com.fedex.export.data.bo.Imp001GenerateBo;
10 -//import com.fedex.export.repository.entity.DeclareInfo;
11 -//import com.fedex.export.repository.entity.SysDictionary;
12 -//import lombok.extern.slf4j.Slf4j;
13 -//import org.slf4j.Logger;
14 -//import org.slf4j.LoggerFactory;
15 -//import org.springframework.beans.factory.annotation.Autowired;
16 -//import org.springframework.stereotype.Component;
17 -//
18 -//import java.io.File;
19 -//import java.io.FileOutputStream;
20 -//import java.util.ArrayList;
21 -//import java.util.Date;
22 -//import java.util.List;
23 -//import java.util.Objects;
24 -//
25 -///**
26 -// * @Author mt
27 -// * @Description tw001报文推送,util
28 -// * @Date 2024/5/29
29 -// */
30 -//@Slf4j
31 -//@Component
32 -//public class Imp001PushUtil {
33 -// @Autowired
34 -// PropertiesConfig propertiesConfig;
35 -// @Autowired
36 -// ZipUtils zipUtils;
37 -// @Autowired
38 -// NioFileUtils nioFileUtils;
39 -//
40 -// /**
41 -// * @Author mt
42 -// * @Description 推送imp001
43 -// * @Date 2024/11/21
44 -// * @param imp001GenerateBo
45 -// * @return void
46 -// */
47 -// public void pushImp001(Imp001GenerateBo imp001GenerateBo) throws Exception{
48 -// long start = System.currentTimeMillis();
49 -// //生成zip临时文件到指定临时目录
50 -// String zipFileName = this.toZips(imp001GenerateBo);
51 -// //zip原始临时目录,zip为临时文件
52 -// String zipSourceTempFilePath = imp001GenerateBo.getWorkFilePath() + zipFileName + Constant.FILE_SUFFIX_KEYS.TEMP;
53 -// //推送zip文件最终目录
54 -// String zipTargetFilePath = propertiesConfig.getTw001PathFinal() + zipFileName;
55 -// //记录zip文件名称
56 -// tw001GenerateBo.setZipFileName(zipFileName);
57 -// //记录zip文件目标路径
58 -// tw001GenerateBo.setZipFileTargetPath(zipTargetFilePath);
59 -// //如果目录不存在则创建完整目录
60 -// nioFileUtils.mkdirs(propertiesConfig.getTw001PathFinal());
61 -// //推送zip临时文件到指定目标目录,复制文件到指定目录,采用
62 -// String zipTargetTempFilePath = zipTargetFilePath + Constant.FILE_SUFFIX_KEYS.TEMP;
63 -// //复制文件至目标目录,为临时文件
64 -// nioFileUtils.copyFile(zipSourceTempFilePath,zipTargetTempFilePath);
65 -// log.info("复制到目标目录完成 sourceTempFilePath : {} , targetTempFilePath : {} ",zipSourceTempFilePath,zipTargetTempFilePath);
66 -// //重命名为正式文件
67 -// nioFileUtils.moveFile(zipTargetTempFilePath,zipTargetFilePath);
68 -// log.info("重命名为正式文件成功 zipTargetTempFilePath : {} , zipTargetFilePath : {} ",zipTargetTempFilePath,zipTargetFilePath);
69 -// long end = System.currentTimeMillis();
70 -// log.info("运单号TW001:{} 推送完成,总计耗时:{} ms",tw001GenerateBo.getDeclareInfo().getDeliveryNo() ,(end - start));
71 -// }
72 -//
73 -// /**
74 -// * @Author mt
75 -// * @Description 功能说明 生成zip临时文件到指定临时目录
76 -// * @Date 2024/5/30
77 -// * @param tw001GenerateBo
78 -// * @return java.lang.String
79 -// */
80 -// private String toZips(Imp001GenerateBo tw001GenerateBo) throws Exception{
81 -// /******************初始化需要压缩文件列表****************/
82 -// List<File> filesList = new ArrayList<File>();
83 -// //生成json文件名称
84 -// String jsonFileName = this.generateJsonFileName(tw001GenerateBo,"", Constant.FILE_SUFFIX_KEYS.JSON);
85 -// //生成json文件
86 -// JsonToJava.createJsonFile(JsonToJava.toJson(tw001GenerateBo.getTw001RootJsonDto()),
87 -// tw001GenerateBo.getWorkFilePath(), jsonFileName);
88 -// //获取json完整路径
89 -// String jsonFilePath = tw001GenerateBo.getWorkFilePath() + jsonFileName;
90 -// filesList.add(new File(jsonFilePath));
91 -// //文件名称
92 -// Utils.listOf(tw001GenerateBo.getFileInfoList()).stream().filter(Objects::nonNull).forEach(fileInfo ->{
93 -// //文件如果存在则添加到文件集合中
94 -// File file = new File(tw001GenerateBo.getWorkFilePath() + fileInfo.getFileName());
95 -// if(file.exists()){
96 -// filesList.add(file);
97 -// }
98 -// });
99 -// //初始化json文件对象,并添加到文件集合中
100 -// this.initJsonFileInfo(tw001GenerateBo,jsonFileName);
101 -// //生成zip文件名称 .zip
102 -// String zipFileName = this.generateJsonFileName(tw001GenerateBo, Constant.SEND_TW001_KEYS.TW001_HEAD_KEYS.MESSAGE_CODE, Constant.FILE_SUFFIX_KEYS.ZIP);
103 -// //生成zip临时文件名称 .temp
104 -// String zipTempFileName = zipFileName + Constant.FILE_SUFFIX_KEYS.TEMP;
105 -// FileOutputStream fos = null;
106 -// try{
107 -// //完整zip临时文件名称
108 -// File zipTemp = new File(tw001GenerateBo.getWorkFilePath() + zipTempFileName);
109 -// fos = new FileOutputStream(zipTemp);
110 -// zipUtils.toZip(filesList, fos);
111 -// }catch(Exception ex){
112 -// log.error("生成压缩包错误:{}",ex.getMessage(),ex);
113 -// throw ex;
114 -// }finally{
115 -// try {
116 -// if (fos != null) {
117 -// fos.close();
118 -// fos = null;
119 -// }
120 -// } catch (Exception e) {
121 -// log.error(e.getMessage(),e);
122 -// throw e;
123 -// }
124 -// }
125 -// return zipFileName;
126 -// }
127 -//
128 -// /**
129 -// * @Author mt
130 -// * @Description 功能说明 初始化json文件对象
131 -// * @Date 2024/5/30
132 -// * @param tw001GenerateBo
133 -// * @param jsonFileName
134 -// * @return void
135 -// */
136 -// private void initJsonFileInfo(Imp001GenerateBo tw001GenerateBo,String jsonFileName){
137 -// SysDictionary jsonDic = tw001GenerateBo.getJsonDictionary();
138 -// Imp001FileInfoBo fileInfoBo = new Imp001FileInfoBo();
139 -// fileInfoBo.setFileName(jsonFileName);
140 -// fileInfoBo.setFileTypeId(jsonDic.getId());
141 -// fileInfoBo.setFileTypeName(jsonDic.getChineseName());
142 -// fileInfoBo.setPushTime(new Date());
143 -// tw001GenerateBo.getFileInfoList().add(fileInfoBo);
144 -// }
145 -//
146 -// /**
147 -// * @Author mt
148 -// * @Description 功能说明 生成文件名称
149 -// * @Date 2024/5/30
150 -// * @param tw001GenerateBo
151 -// * @param prefix 前缀
152 -// * @param suffix 后缀
153 -// * @return java.lang.String
154 -// */
155 -// private String generateJsonFileName(Imp001GenerateBo tw001GenerateBo,String prefix,String suffix){
156 -// DeclareInfo declareInfo = tw001GenerateBo.getDeclareInfo();
157 -// String fileName = prefix + declareInfo.getDeliveryNo() + Constant.COMMON_KEYS.UNDER_LINE
158 -// + StringExtUtil.idLeftPadStr(declareInfo.getDeclareId()) + Constant.COMMON_KEYS.UNDER_LINE +
159 -// DateUtil.yyyyMMddHH24mmssSSS(new Date()) + suffix;
160 -// return fileName;
161 -// }
162 -//}
...\ No newline at end of file ...\ No newline at end of file
1 +package com.fedex.connect.task.utils.biz.imp001;
2 +
3 +import com.fedex.connect.common.dependencies.contants.BaseSeparatorConstants;
4 +import com.fedex.connect.common.dependencies.contants.DigitConstants;
5 +import com.fedex.connect.common.dependencies.util.*;
6 +import com.fedex.connect.task.config.PropertiesConfig;
7 +import com.fedex.connect.task.constants.Constant;
8 +import com.fedex.connect.task.data.bo.Imp001GenerateBo;
9 +import com.fedex.connect.task.data.dto.imp001.Imp001Files;
10 +import lombok.extern.slf4j.Slf4j;
11 +import org.springframework.beans.factory.annotation.Autowired;
12 +import org.springframework.stereotype.Component;
13 +
14 +import java.io.File;
15 +import java.io.FileOutputStream;
16 +import java.util.ArrayList;
17 +import java.util.Date;
18 +import java.util.List;
19 +
20 +/**
21 + * @Author mt
22 + * @Description imp001报文推送,util
23 + * @Date 2024/5/29
24 + */
25 +@Slf4j
26 +@Component
27 +public class Imp001PushUtil {
28 + @Autowired
29 + PropertiesConfig propertiesConfig;
30 + @Autowired
31 + ZipUtils zipUtils;
32 + @Autowired
33 + NIOFileUtils nioFileUtils;
34 +
35 + /**
36 + * @Author mt
37 + * @Description 推送imp001
38 + * @Date 2024/11/21
39 + * @param imp001GenerateBo
40 + * @return void
41 + */
42 + public void pushImp001(Imp001GenerateBo imp001GenerateBo) throws Exception{
43 + long start = System.currentTimeMillis();
44 + //生成zip临时文件到指定临时目录
45 + String zipFileName = this.toZips(imp001GenerateBo);
46 + //zip原始临时目录,zip为临时文件
47 + String zipSourceTempFilePath = imp001GenerateBo.getWorkFilePath() + zipFileName + Constant.FILE_SUFFIX_KEYS.TEMP;
48 + //推送zip文件最终目录
49 + String zipTargetFilePath = propertiesConfig.getImp001PathFinal() + zipFileName;
50 + //记录zip文件名称
51 + imp001GenerateBo.setZipFileName(zipFileName);
52 + //记录zip文件目标路径
53 + imp001GenerateBo.setZipFileTargetPath(zipTargetFilePath);
54 + //如果目录不存在则创建完整目录
55 + nioFileUtils.mkdirs(propertiesConfig.getImp001PathFinal());
56 + //推送zip临时文件到指定目标目录,复制文件到指定目录,采用
57 + String zipTargetTempFilePath = zipTargetFilePath + Constant.FILE_SUFFIX_KEYS.TEMP;
58 + //复制文件至目标目录,为临时文件
59 + nioFileUtils.copyFile(zipSourceTempFilePath,zipTargetTempFilePath);
60 + log.info("复制到目标目录完成 sourceTempFilePath : {} , targetTempFilePath : {} ",zipSourceTempFilePath,zipTargetTempFilePath);
61 + //重命名为正式文件
62 + nioFileUtils.moveFile(zipTargetTempFilePath,zipTargetFilePath);
63 + log.info("重命名为正式文件成功 zipTargetTempFilePath : {} , zipTargetFilePath : {} ",zipTargetTempFilePath,zipTargetFilePath);
64 + long end = System.currentTimeMillis();
65 + log.info("运单号IMP001:{} 推送完成,总计耗时:{} ms",imp001GenerateBo.getConsignmentCode() ,(end - start));
66 + }
67 +
68 + /**
69 + * @Author mt
70 + * @Description 功能说明 生成zip临时文件到指定临时目录,将用户上传,以及生成的json文件打包进zip文件中
71 + * @Date 2024/5/30
72 + * @param imp001GenerateBo
73 + * @return java.lang.String
74 + */
75 + private String toZips(Imp001GenerateBo imp001GenerateBo) throws Exception{
76 + /******************初始化需要压缩文件列表****************/
77 + List<File> filesList = new ArrayList<File>();
78 + //生成json文件名称
79 + String jsonFileName = this.generateJsonFileName(imp001GenerateBo,"", Constant.FILE_SUFFIX_KEYS.JSON);
80 + //生成json文件
81 + JsonToJava.createJsonFile(JsonToJava.toJson(imp001GenerateBo.getImp001RootJsonDto()),
82 + imp001GenerateBo.getWorkFilePath(), jsonFileName);
83 + //获取json完整路径
84 + String jsonFilePath = imp001GenerateBo.getWorkFilePath() + jsonFileName;
85 + filesList.add(new File(jsonFilePath));
86 + //文件名称
87 + Imp001Files[] fileInfos = imp001GenerateBo.getFileInfos();
88 + if(fileInfos != null && fileInfos.length > 0){
89 + for (Imp001Files fileInfo : fileInfos) {
90 + //文件如果存在则添加到文件集合中
91 + File file = new File(imp001GenerateBo.getWorkFilePath() + fileInfo.getName());
92 + if(file.exists()){
93 + filesList.add(file);
94 + }
95 + }
96 + }
97 + //生成zip文件名称 .zip
98 + String zipFileName = this.generateJsonFileName(imp001GenerateBo, Constant.IMP001_HEAD_KEYS.MESSAGE_CODE, Constant.FILE_SUFFIX_KEYS.ZIP);
99 + //生成zip临时文件名称 .temp
100 + String zipTempFileName = zipFileName + Constant.FILE_SUFFIX_KEYS.TEMP;
101 + FileOutputStream fos = null;
102 + try{
103 + //完整zip临时文件名称
104 + File zipTemp = new File(imp001GenerateBo.getWorkFilePath() + zipTempFileName);
105 + fos = new FileOutputStream(zipTemp);
106 + zipUtils.toZip(filesList, fos);
107 + }catch(Exception ex){
108 + log.error("生成压缩包错误:{}",ex.getMessage(),ex);
109 + throw ex;
110 + }finally{
111 + try {
112 + if (fos != null) {
113 + fos.close();
114 + fos = null;
115 + }
116 + } catch (Exception e) {
117 + log.error(e.getMessage(),e);
118 + throw e;
119 + }
120 + }
121 + return zipFileName;
122 + }
123 +
124 + /**
125 + * @Author mt
126 + * @Description 功能说明 生成文件名称
127 + * @Date 2024年12月18日
128 + * @param imp001GenerateBo
129 + * @param prefix 前缀
130 + * @param suffix 后缀
131 + * @return java.lang.String
132 + */
133 + private String generateJsonFileName(Imp001GenerateBo imp001GenerateBo,String prefix,String suffix){
134 + String fileName = prefix + imp001GenerateBo.getConsignmentCode() + BaseSeparatorConstants.SEPARATOR_UNDERLINE
135 + + StringExtUtil.idLeftPadStr(imp001GenerateBo.getConsignmentId(), DigitConstants.DIGIT_TEN) + BaseSeparatorConstants.SEPARATOR_UNDERLINE +
136 + DateUtil.yyyyMMddHH24mmssSSS(new Date()) + suffix;
137 + return fileName;
138 + }
139 +}
...\ No newline at end of file ...\ No newline at end of file
......
1 -//package com.fedex.connect.task.utils.biz.imp001; 1 +package com.fedex.connect.task.utils.biz.imp001;
2 -// 2 +
3 -//import com.fedex.connect.common.model.biz.PushOb; 3 +import com.fedex.connect.common.dependencies.contants.BaseSeparatorConstants;
4 -//import com.fedex.connect.task.config.PropertiesConfig; 4 +import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
5 -//import com.fedex.connect.task.data.bo.Imp001GenerateBo; 5 +import com.fedex.connect.common.dependencies.util.DateUtil;
6 -//import com.fedex.export.common.enums.PushLogEnum; 6 +import com.fedex.connect.common.dependencies.util.NIOFileUtils;
7 -//import com.fedex.export.common.util.DateUtil; 7 +import com.fedex.connect.common.model.bi.DictionaryEntries;
8 -//import com.fedex.export.common.util.NioFileUtils; 8 +import com.fedex.connect.common.model.biz.PushOb;
9 -//import com.fedex.export.common.util.Utils; 9 +import com.fedex.connect.common.model.biz.PushObDetail;
10 -//import com.fedex.export.config.PropertiesConfig; 10 +import com.fedex.connect.task.config.PropertiesConfig;
11 -//import com.fedex.export.constants.Constant; 11 +import com.fedex.connect.task.constants.Constant;
12 -//import com.fedex.export.data.bo.Imp001GenerateBo; 12 +import com.fedex.connect.task.data.bo.Imp001GenerateBo;
13 -//import com.fedex.export.repository.entity.DeclareInfo; 13 +import com.fedex.connect.task.data.dto.imp001.Imp001Files;
14 -//import com.fedex.export.repository.entity.log.PushObDetail; 14 +import com.fedex.connect.task.repository.repo.biz.IPushObRepository;
15 -//import com.fedex.export.repository.entity.log.PushObLog; 15 +import com.fedex.connect.task.service.biz.IPushObDetailService;
16 -//import com.fedex.export.repository.repo.business.IPushObLogRepository; 16 +import lombok.extern.slf4j.Slf4j;
17 -//import com.fedex.export.service.business.IPushObDetailService; 17 +import org.springframework.beans.factory.annotation.Autowired;
18 -//import lombok.extern.slf4j.Slf4j; 18 +import org.springframework.stereotype.Component;
19 -//import org.slf4j.Logger; 19 +
20 -//import org.slf4j.LoggerFactory; 20 +import java.util.ArrayList;
21 -//import org.springframework.beans.factory.annotation.Autowired; 21 +import java.util.Date;
22 -//import org.springframework.stereotype.Component; 22 +import java.util.List;
23 -// 23 +import java.util.Objects;
24 -//import java.util.ArrayList; 24 +
25 -//import java.util.Date; 25 +/**
26 -//import java.util.List; 26 + * @Author mt
27 -//import java.util.Objects; 27 + * @Description 类说明 推送tw001完成,记录日志,并且备份数据
28 -// 28 + * @Date 2024/5/30
29 -///** 29 + */
30 -// * @Author mt 30 +@Slf4j
31 -// * @Description 类说明 推送tw001完成,记录日志,并且备份数据 31 +@Component
32 -// * @Date 2024/5/30 32 +public class Imp001RecordLogUtil {
33 -// */ 33 + @Autowired
34 -//@Slf4j 34 + PropertiesConfig propertiesConfig;
35 -//@Component 35 + @Autowired
36 -//public class Imp001RecordLogUtil { 36 + IPushObRepository pushObLogRepository;
37 -// @Autowired 37 + @Autowired
38 -// PropertiesConfig propertiesConfig; 38 + IPushObDetailService pushObDetailService;
39 -// @Autowired 39 + @Autowired
40 -// IPushObLogRepository pushObLogRepository; 40 + NIOFileUtils nioFileUtils;
41 -// @Autowired 41 +
42 -// IPushObDetailService pushObDetailService; 42 + /**
43 -// @Autowired 43 + * @Author mt
44 -// NioFileUtils nioFileUtils; 44 + * @Description 推送成功记录日志
45 -// 45 + * @Date 2024/12/18
46 -// /** 46 + * @param imp001GenerateBo
47 -// * @Author mt 47 + * @param obLog
48 -// * @Description 推送成功记录日志 48 + * @param pushSuccessEntries
49 -// * @Date 2024/11/21 49 + * @return void
50 -// * @param imp001GenerateBo 50 + */
51 -// * @param obLog 51 + public void pushSuccessRecordLog(Imp001GenerateBo imp001GenerateBo, PushOb obLog, DictionaryEntries pushSuccessEntries){
52 -// * @return void 52 + try {
53 -// */ 53 + if(Objects.nonNull(imp001GenerateBo)){
54 -// public void pushSuccessRecordLog(Imp001GenerateBo imp001GenerateBo, PushOb obLog){ 54 + //备份文件,并且记录日志
55 -// try { 55 + String targetPath = this.recordLog(imp001GenerateBo,obLog , propertiesConfig.getImp001PathBak(),pushSuccessEntries,null);
56 -// if(Objects.nonNull(imp001GenerateBo)){ 56 + obLog.setFileName(imp001GenerateBo.getZipFileName());
57 -// //备份文件,并且记录日志 57 + obLog.setFilePath(imp001GenerateBo.getZipFileTargetPath());
58 -// String targetPath = this.recordLog(imp001GenerateBo,obLog , propertiesConfig.getTw001PathBak(),PushLogEnum.PUSHED_SUCCESS,null); 58 + obLog.setFileBackPath(targetPath);
59 -// obLog.setFileName(imp001GenerateBo.getZipFileName()); 59 + }
60 -// obLog.setFilePath(imp001GenerateBo.getZipFileTargetPath()); 60 + obLog.setPushNum(obLog.getPushNum() + 1);
61 -// obLog.setFileBackPath(targetPath); 61 + obLog.setStatusCode(pushSuccessEntries.getCode());
62 -// } 62 + obLog.setStatusName(pushSuccessEntries.getDescription());
63 -// obLog.setPushNum(obLog.getPushNum() + 1); 63 + obLog.setPushTime(new Date());
64 -// obLog.setPushStatus(PushLogEnum.PUSHED_SUCCESS.getKey()); 64 + obLog.setRemark("");
65 -// obLog.setPushStatusDescribe(PushLogEnum.PUSHED_SUCCESS.getValue()); 65 + //更新推送日志主表
66 -// obLog.setPushTime(new Date()); 66 + pushObLogRepository.updateById(obLog);
67 -// obLog.setRemark(""); 67 + }catch(Exception ex){
68 -// //更新推送日志主表 68 + log.error("pushSuccessRecordLog : {} " ,ex.getMessage(),ex);
69 -// pushObLogRepository.updateById(obLog); 69 + }
70 -// }catch(Exception ex){ 70 + }
71 -// log.error("pushSuccessRecordLog : {} " ,ex.getMessage(),ex); 71 +
72 -// } 72 + /**
73 -// } 73 + * @Author mt
74 -// 74 + * @Description 推送失败记录日志
75 -// /** 75 + * @Date 2024/12/18
76 -// * @Author mt 76 + * @param tw001GenerateBo
77 -// * @Description 功能说明 推送失败记录日志 77 + * @param obLog
78 -// * @Date 2024/5/30 78 + * @param pushFailedEntries
79 -// * @param tw001GenerateBo 79 + * @param errorMsg
80 -// * @param errorMsg 80 + * @return void
81 -// * @return void 81 + */
82 -// */ 82 + public void pushFailRecordLog(Imp001GenerateBo tw001GenerateBo, PushOb obLog, DictionaryEntries pushFailedEntries, String errorMsg){
83 -// public void pushFailRecordLog(Imp001GenerateBo tw001GenerateBo, PushOb obLog, String errorMsg){ 83 + try {
84 -// try { 84 + if(Objects.nonNull(tw001GenerateBo)){
85 -// if(Objects.nonNull(tw001GenerateBo)){ 85 + //备份文件,并且记录失败日志
86 -// //备份文件,并且记录失败日志 86 + String targetPath = this.recordLog(tw001GenerateBo,obLog,propertiesConfig.getImp001PathError(),pushFailedEntries,errorMsg);
87 -// String targetPath = this.recordLog(tw001GenerateBo,obLog,propertiesConfig.getTw001PathError(),PushLogEnum.PUSH_FAILED,errorMsg); 87 + obLog.setFileName(tw001GenerateBo.getZipFileName());
88 -// obLog.setFileName(tw001GenerateBo.getZipFileName()); 88 + obLog.setFilePath(tw001GenerateBo.getZipFileTargetPath());
89 -// obLog.setFilePath(tw001GenerateBo.getZipFileTargetPath()); 89 + obLog.setFileBackPath(targetPath);
90 -// obLog.setFileBackPath(targetPath); 90 + }
91 -// } 91 + obLog.setPushNum(obLog.getPushNum() + 1);
92 -// obLog.setPushNum(obLog.getPushNum() + 1); 92 + obLog.setStatusCode(pushFailedEntries.getCode());
93 -// obLog.setPushStatus(PushLogEnum.PUSH_FAILED.getKey()); 93 + obLog.setStatusName(pushFailedEntries.getDescription());
94 -// obLog.setPushStatusDescribe(PushLogEnum.PUSH_FAILED.getValue()); 94 + obLog.setPushTime(new Date());
95 -// obLog.setPushTime(new Date()); 95 + obLog.setRemark(errorMsg);
96 -// obLog.setRemark(errorMsg); 96 + //更新推送日志主表
97 -// //更新推送日志主表 97 + pushObLogRepository.updateById(obLog);
98 -// pushObLogRepository.updateById(obLog); 98 + }catch(Exception ex){
99 -// }catch(Exception ex){ 99 + log.error("pushFailRecordLog : {} " ,ex.getMessage(),ex);
100 -// log.error("pushFailRecordLog : {} " ,ex.getMessage(),ex); 100 + }
101 -// } 101 + }
102 -// } 102 +
103 -// 103 + /**
104 -// /** 104 + * @Author mt
105 -// * @Author mt 105 + * @Description 功能说明 备份文件
106 -// * @Description 功能说明 备份文件 106 + * @Date 2024/5/30
107 -// * @Date 2024/5/30 107 + * @param tw001GenerateBo
108 -// * @param tw001GenerateBo 108 + * @param tarPath
109 -// * @param tarPath 109 + * @return 返回目标备份路径
110 -// * @return 返回目标备份路径 110 + */
111 -// */ 111 + private String recordLog(Imp001GenerateBo tw001GenerateBo,
112 -// private String recordLog(Imp001GenerateBo tw001GenerateBo, 112 + PushOb obLog,
113 -// PushOb obLog, 113 + String tarPath,
114 -// String tarPath, 114 + DictionaryEntries pushStatusEntries,
115 -// PushLogEnum pushLogEnum, 115 + String remark){
116 -// String remark){ 116 + String returnTargetPath = "";
117 -// String returnTargetPath = ""; 117 + try{
118 -// try{ 118 + //文件原始路径
119 -// DeclareInfo declareInfo = tw001GenerateBo.getDeclareInfo(); 119 + String sourcePath = tw001GenerateBo.getWorkFilePath();
120 -// //文件原始路径 120 + //生成文件目标路径
121 -// String sourcePath = tw001GenerateBo.getWorkFilePath(); 121 + String targetPath = this.generateFilePath(tw001GenerateBo.getConsignmentCode(),tw001GenerateBo.getConsignmentId(),tarPath);
122 -// //生成文件目标路径 122 + returnTargetPath = targetPath;
123 -// String targetPath = this.generateFilePath(declareInfo.getDeliveryNo(),declareInfo.getDeclareId(),tarPath); 123 + //推送文件明细
124 -// returnTargetPath = targetPath; 124 + List<PushObDetail> pushObDetailList = new ArrayList<>();
125 -// //推送文件明细 125 +
126 -// List<PushObDetail> pushObDetailList = new ArrayList<>(); 126 + Imp001Files[] fileInfos = tw001GenerateBo.getFileInfos();
127 -// Utils.listOf(tw001GenerateBo.getFileInfoList()).stream().filter(Objects::nonNull).forEach(o->{ 127 + for (Imp001Files fileInfo : fileInfos) {
128 -// try { 128 + try {
129 -// //源文件完整路径 129 + //源文件完整路径
130 -// String sPath = sourcePath + o.getFileName(); 130 + String sPath = sourcePath + fileInfo.getName();
131 -// //目标文件完整路径 131 + //目标文件完整路径
132 -// String tPath = targetPath + o.getFileName(); 132 + String tPath = targetPath + fileInfo.getName();
133 -// //备份文件 133 + //备份文件
134 -// nioFileUtils.moveFile(sPath, tPath); 134 + nioFileUtils.moveFile(sPath, tPath);
135 -// //记录日志明细表 135 + //记录日志明细表
136 -// PushObDetail pushObDetail = new PushObDetail(); 136 + PushObDetail pushObDetail = new PushObDetail();
137 -// pushObDetail.setCreateTime(new Date()); 137 + pushObDetail.setConsignmentId(tw001GenerateBo.getConsignmentId());
138 -// pushObDetail.setDeclareId(declareInfo.getDeclareId()); 138 + pushObDetail.setConsignmentCode(tw001GenerateBo.getConsignmentCode());
139 -// pushObDetail.setDeliveryNo(declareInfo.getDeliveryNo()); 139 + pushObDetail.setPushObId(obLog.getId());
140 -// pushObDetail.setPushLogId(obLog.getId()); 140 +
141 -// pushObDetail.setPushStatus(pushLogEnum.getKey()); 141 + pushObDetail.setStatusCode(pushStatusEntries.getCode());
142 -// pushObDetail.setPushStatusDescribe(pushLogEnum.getValue()); 142 + pushObDetail.setStatusName(pushStatusEntries.getDescription());
143 -// pushObDetail.setFileTypeId(o.getFileTypeId()); 143 + pushObDetail.setFileType(fileInfo.getContentType());
144 -// pushObDetail.setFileType(o.getFileTypeName()); 144 + pushObDetail.setFileName(fileInfo.getName());
145 -// pushObDetail.setFileName(o.getFileName()); 145 + pushObDetail.setPushTime(new Date());
146 -// pushObDetail.setPushTime(new Date()); 146 + pushObDetail.setRemark(remark);
147 -// pushObDetail.setRemark(remark); 147 + try {
148 -// pushObDetailList.add(pushObDetail); 148 + /**
149 -// }catch(Exception ex){ 149 + * 初始化表基础字段
150 -// log.error("move file error : {} ",ex.getMessage(),ex); 150 + */
151 -// } 151 + AssignmentFieldUtils.assignmentTableBaseField(pushObDetail);
152 -// }); 152 + }catch(Exception ex){
153 -// //批量插入推送日志明细 153 + ex.printStackTrace();
154 -// pushObDetailService.batchInsert(pushObDetailList); 154 + }
155 -// log.info("batchInsert size : {} ",pushObDetailList.size()); 155 + pushObDetailList.add(pushObDetail);
156 -// //zip包源文件完整路径 156 + }catch(Exception ex){
157 -// String sPath = sourcePath + tw001GenerateBo.getZipFileName() + Constant.FILE_SUFFIX_KEYS.TEMP; 157 + log.error("move file error : {} ",ex.getMessage(),ex);
158 -// //zip包目标文件完整路径 158 + }
159 -// String tPath = targetPath + tw001GenerateBo.getZipFileName(); 159 + }
160 -// //备份zip包文件 160 + //批量插入推送日志明细
161 -// nioFileUtils.moveFile(sPath, tPath); 161 + pushObDetailService.batchInsert(pushObDetailList);
162 -// //删除临时目录文件夹 162 + log.info("batchInsert size : {} ",pushObDetailList.size());
163 -// nioFileUtils.deleteDir(log,sourcePath,true); 163 + //zip包源文件完整路径
164 -// log.info("删除临时目录文件夹 sourcePath : {} ",sourcePath); 164 + String sPath = sourcePath + tw001GenerateBo.getZipFileName() + Constant.FILE_SUFFIX_KEYS.TEMP;
165 -// }catch(Exception ex){ 165 + //zip包目标文件完整路径
166 -// log.error("recordLog error : {} ",ex.getMessage(),ex); 166 + String tPath = targetPath + tw001GenerateBo.getZipFileName();
167 -// } 167 + //备份zip包文件
168 -// return returnTargetPath; 168 + nioFileUtils.moveFile(sPath, tPath);
169 -// } 169 + //删除临时目录文件夹
170 -// 170 + nioFileUtils.deleteDir(log,sourcePath,true);
171 -// /** 171 + log.info("删除临时目录文件夹 sourcePath : {} ",sourcePath);
172 -// * @Author mt 172 + }catch(Exception ex){
173 -// * @Description 功能说明 生成目标文件夹路径 173 + log.error("recordLog error : {} ",ex.getMessage(),ex);
174 -// * @Date 2024/5/30 174 + }
175 -// * @param filePath 175 + return returnTargetPath;
176 -// * @return java.lang.String 176 + }
177 -// */ 177 +
178 -// private String generateFilePath(String deliveryNo,Long declareId,String filePath){ 178 + /**
179 -// String yyyyMMdd = DateUtil.format(new Date()); 179 + * @Author mt
180 -// String fileDir = filePath + yyyyMMdd + Constant.COMMON_KEYS.BACK_SLASH + 180 + * @Description 功能说明 生成目标文件夹路径
181 -// deliveryNo + Constant.COMMON_KEYS.UNDER_LINE + declareId + Constant.COMMON_KEYS.BACK_SLASH; 181 + * @Date 2024/5/30
182 -// //如果目录不存在则创建完整目录 182 + * @param filePath
183 -// nioFileUtils.mkdirs(fileDir); 183 + * @return java.lang.String
184 -// return fileDir; 184 + */
185 -// } 185 + private String generateFilePath(String consignmentCode,Long consignmentId,String filePath){
186 -//} 186 + String yyyyMMdd = DateUtil.format(new Date());
187 + String fileDir = filePath + yyyyMMdd + BaseSeparatorConstants.SEPARATOR_SLASH +
188 + consignmentCode + BaseSeparatorConstants.SEPARATOR_UNDERLINE + consignmentId + BaseSeparatorConstants.SEPARATOR_SLASH;
189 + //如果目录不存在则创建完整目录
190 + nioFileUtils.mkdirs(fileDir);
191 + return fileDir;
192 + }
193 +}
......
...@@ -3,6 +3,7 @@ package com.fedex.connect.task.utils.sys; ...@@ -3,6 +3,7 @@ package com.fedex.connect.task.utils.sys;
3 import com.fedex.connect.common.dependencies.cache.CacheSystem; 3 import com.fedex.connect.common.dependencies.cache.CacheSystem;
4 import com.fedex.connect.common.dependencies.contants.BaseConstants; 4 import com.fedex.connect.common.dependencies.contants.BaseConstants;
5 import com.fedex.connect.common.dependencies.contants.BaseSeparatorConstants; 5 import com.fedex.connect.common.dependencies.contants.BaseSeparatorConstants;
6 +import com.fedex.connect.common.dependencies.contants.DigitConstants;
6 import com.fedex.connect.common.dependencies.enums.biz.EmailStatusEnum; 7 import com.fedex.connect.common.dependencies.enums.biz.EmailStatusEnum;
7 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; 8 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
8 import com.fedex.connect.common.dependencies.template.clearanceEmail.ClearanceEmailTemplate; 9 import com.fedex.connect.common.dependencies.template.clearanceEmail.ClearanceEmailTemplate;
...@@ -73,7 +74,7 @@ public class ConFileEmailUtil { ...@@ -73,7 +74,7 @@ public class ConFileEmailUtil {
73 * @param zipUtils 74 * @param zipUtils
74 * @return void 75 * @return void
75 */ 76 */
76 - public PortFileDto getPortZipMap(PortFileDto portFileDto, List<PushZipEmailDto> attachmentDetailsByBizId, String tempPath, String finalPath, ZipUtils zipUtils){ 77 + public PortFileDto getPortZipMap(PortFileDto portFileDto, List<PushZipEmailDto> attachmentDetailsByBizId, String tempPath, String finalPath, ZipUtils zipUtils,String consignmentCode) throws Exception{
77 List<File> filesList = new ArrayList<>(); 78 List<File> filesList = new ArrayList<>();
78 String portCode = null; 79 String portCode = null;
79 for (PushZipEmailDto pushZipEmailDto : attachmentDetailsByBizId) { 80 for (PushZipEmailDto pushZipEmailDto : attachmentDetailsByBizId) {
...@@ -81,17 +82,25 @@ public class ConFileEmailUtil { ...@@ -81,17 +82,25 @@ public class ConFileEmailUtil {
81 if (pushZipEmailDto.getDestIataCode() == null || pushZipEmailDto.getDestIataCode().isEmpty()) { 82 if (pushZipEmailDto.getDestIataCode() == null || pushZipEmailDto.getDestIataCode().isEmpty()) {
82 portCode = BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.DEST_IATA_CODE; // 使用 "destTataCode" 代替空口岸 83 portCode = BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.DEST_IATA_CODE; // 使用 "destTataCode" 代替空口岸
83 } 84 }
84 - File file = new File(pushZipEmailDto.getFilePath()); 85 + File file = new File(pushZipEmailDto.getFilePath()+File.separator+pushZipEmailDto.getFileName());
85 if (file.exists()) { 86 if (file.exists()) {
86 filesList.add(file); 87 filesList.add(file);
87 } 88 }
88 - portFileDto.setShipperContactName(pushZipEmailDto.getShipperContactName()); 89 + if (pushZipEmailDto.getCeFlag().equals(DigitConstants.DIGIT_ONE_LONG)){
89 - portFileDto.setShipperEmail(pushZipEmailDto.getShipperEmail()); 90 + portFileDto.setShipperContactName(pushZipEmailDto.getShipperContactName());
90 - portFileDto.setShipperPhone(pushZipEmailDto.getShipperPhone()); 91 + portFileDto.setShipperEmail(pushZipEmailDto.getShipperEmail());
92 + portFileDto.setShipperPhone(pushZipEmailDto.getShipperPhone());
93 + portFileDto.setShipperAccount(pushZipEmailDto.getShipperAccount());
94 + portFileDto.setOriginCountry(pushZipEmailDto.getOriginCountry());
95 + }else {
96 + portFileDto.setShipperAccount(pushZipEmailDto.getUserInputShipperAccount());
97 + portFileDto.setOriginCountry(pushZipEmailDto.getUserInputOriginCountry());
98 + portFileDto.setShipperEmail(pushZipEmailDto.getShipperEmail());
99 + }
91 } 100 }
92 String date = DateUtil.yyyyMMddHHmmss(new Date()); 101 String date = DateUtil.yyyyMMddHHmmss(new Date());
93 - String fileName = date + BaseSeparatorConstants.SEPARATOR_UNDERLINE + portCode + BaseConstants.FILE_SUFFIX_KEYS.ZIP; 102 + String fileName = date + BaseSeparatorConstants.SEPARATOR_UNDERLINE + consignmentCode + BaseConstants.FILE_SUFFIX_KEYS.ZIP;
94 - String fileNameTemp = date + BaseSeparatorConstants.SEPARATOR_UNDERLINE + portCode + BaseConstants.FILE_SUFFIX_KEYS.ZIP + BaseConstants.FILE_SUFFIX_KEYS.TEMP; 103 + String fileNameTemp = date + BaseSeparatorConstants.SEPARATOR_UNDERLINE + consignmentCode + BaseConstants.FILE_SUFFIX_KEYS.ZIP + BaseConstants.FILE_SUFFIX_KEYS.TEMP;
95 FileOutputStream fos = null; 104 FileOutputStream fos = null;
96 if (CollectionUtils.isEmpty(filesList)){ 105 if (CollectionUtils.isEmpty(filesList)){
97 return portFileDto; 106 return portFileDto;
...@@ -110,9 +119,11 @@ public class ConFileEmailUtil { ...@@ -110,9 +119,11 @@ public class ConFileEmailUtil {
110 119
111 portFileDto.setDestIataCode(portCode); 120 portFileDto.setDestIataCode(portCode);
112 portFileDto.setZipPath(finalPath + fileName); 121 portFileDto.setZipPath(finalPath + fileName);
122 + portFileDto.setFileName(fileName);
113 123
114 } catch (Exception e) { 124 } catch (Exception e) {
115 log.error("生成压缩包错误:{}", e.getMessage(), e); 125 log.error("生成压缩包错误:{}", e.getMessage(), e);
126 + throw e;
116 } finally { 127 } finally {
117 try { 128 try {
118 if (fos != null) { 129 if (fos != null) {
...@@ -145,7 +156,10 @@ public class ConFileEmailUtil { ...@@ -145,7 +156,10 @@ public class ConFileEmailUtil {
145 /** 156 /**
146 * 发送邮件 157 * 发送邮件
147 */ 158 */
148 - boolean result = emailUtil.sendMail(mailMessageReqDto); 159 + boolean result = false;
160 + if (StringUtils.isNotEmpty(emailAddress)){
161 + result = emailUtil.sendMail(mailMessageReqDto);
162 + }
149 163
150 return result; 164 return result;
151 } 165 }
...@@ -167,29 +181,26 @@ public class ConFileEmailUtil { ...@@ -167,29 +181,26 @@ public class ConFileEmailUtil {
167 mailConfigDto.setProxyStartFlag(propertiesConfig.getProxyStartFlag()); 181 mailConfigDto.setProxyStartFlag(propertiesConfig.getProxyStartFlag());
168 mailConfigDto.setProxyHost(propertiesConfig.getProxyHost()); 182 mailConfigDto.setProxyHost(propertiesConfig.getProxyHost());
169 mailConfigDto.setProxyPort(propertiesConfig.getProxyPort()); 183 mailConfigDto.setProxyPort(propertiesConfig.getProxyPort());
170 - 184 + mailConfigDto.setReceiveAccount(emailAddress);
171 //ce接收人 185 //ce接收人
172 mailConfigDto.setTo(emailAddress); 186 mailConfigDto.setTo(emailAddress);
173 //设置邮件标题 187 //设置邮件标题
174 - mailConfigDto.setSubject(clearanceEmailTemplate.getTitle()); 188 + mailConfigDto.setSubject("推送预清关文件");
175 //设置邮件内容 189 //设置邮件内容
190 + portFileDto.setShipperEmail(emailAddress);
176 String body = this.generateContent("zelong.shao@erry.com", propertiesConfig.getEmailAccount(), portFileDto, conPushEmail.getBizCode()); 191 String body = this.generateContent("zelong.shao@erry.com", propertiesConfig.getEmailAccount(), portFileDto, conPushEmail.getBizCode());
177 mailConfigDto.setContent(body); 192 mailConfigDto.setContent(body);
178 //放入文件列表 193 //放入文件列表
179 if (!StringUtils.isEmpty(portFileDto.getZipPath())){ 194 if (!StringUtils.isEmpty(portFileDto.getZipPath())){
180 List<MailAttachmentBo> srcFiles = new ArrayList<>(); 195 List<MailAttachmentBo> srcFiles = new ArrayList<>();
181 File file = new File(portFileDto.getZipPath()); 196 File file = new File(portFileDto.getZipPath());
182 - srcFiles.add(new MailAttachmentBo(file, "")); 197 + srcFiles.add(new MailAttachmentBo(file, portFileDto.getFileName()));
183 mailConfigDto.setFileList(srcFiles); 198 mailConfigDto.setFileList(srcFiles);
184 } 199 }
185 200
186 if (propertiesConfig.getEnv().equalsIgnoreCase("dev") 201 if (propertiesConfig.getEnv().equalsIgnoreCase("dev")
187 || propertiesConfig.getEnv().equalsIgnoreCase("test") 202 || propertiesConfig.getEnv().equalsIgnoreCase("test")
188 ) { 203 ) {
189 - //ce接收人
190 - mailConfigDto.setTo("zelong.shao@erry.com");
191 - mailConfigDto.setCcAccount("");
192 - mailConfigDto.setReceiveAccount("zelong.shao@erry.com");
193 //发件人 204 //发件人
194 mailConfigDto.setFrom(propertiesConfig.getEmailAccount()); 205 mailConfigDto.setFrom(propertiesConfig.getEmailAccount());
195 //发件人密码 206 //发件人密码
...@@ -209,21 +220,24 @@ public class ConFileEmailUtil { ...@@ -209,21 +220,24 @@ public class ConFileEmailUtil {
209 220
210 StringBuilder content = new StringBuilder(); 221 StringBuilder content = new StringBuilder();
211 content.append("<font size=\"4\"><br/> " ); 222 content.append("<font size=\"4\"><br/> " );
212 - content.append("Consignment Code" + ":" + Optional.ofNullable(consignmentCode).orElse("")); 223 + content.append("运单号" + ":" + Optional.ofNullable(consignmentCode).orElse(""));
213 content.append("<br/> " ); 224 content.append("<br/> " );
214 - content.append("Contact Person" + ":" + Optional.ofNullable(portFileDto.getShipperContactName()).orElse("")); 225 + content.append("Shipper Account" + ":" + Optional.ofNullable(portFileDto.getShipperAccount()).orElse(""));
215 content.append("<br/> " ); 226 content.append("<br/> " );
216 - content.append("Contact Person's Email" + ":" + Optional.ofNullable(portFileDto.getShipperEmail()).orElse("")); 227 + content.append("原产国" + ":" + Optional.ofNullable(portFileDto.getOriginCountry()).orElse(""));
228 + content.append("<br/> " );
229 + content.append("发件人" + ":" + Optional.ofNullable(portFileDto.getShipperContactName()).orElse(""));
230 + content.append("<br/> " );
231 + content.append("发件人邮箱" + ":" + Optional.ofNullable(portFileDto.getShipperEmail()).orElse(""));
217 content.append("<br/> " ); 232 content.append("<br/> " );
218 - content.append("Contact Phone" + ":" + Optional.ofNullable(portFileDto.getShipperPhone()).orElse(""));
219 233
220 content.append("</font><br/><br/> " ); 234 content.append("</font><br/><br/> " );
221 content.append("<div style=\"color:#808080;font-style:Arial;font-size:14px;\">" + 235 content.append("<div style=\"color:#808080;font-style:Arial;font-size:14px;\">" +
222 - "This email was to send declaration files uploaded by customer on the FedEx online declaration platform to " + 236 + "这封电子邮件是将客户在 FedEx iClear Connect System 平台上上传的报关文件通过" +
223 - Optional.ofNullable(to).orElse("edd@fedex.com") + 237 + Optional.ofNullable(to).orElse("zelong.shao@erry.com") +
224 - " through " + 238 + " 发送给 " +
225 - Optional.ofNullable(from).orElse("donotreply@fedex.com") + 239 + Optional.ofNullable(from).orElse("tao.mo@erry.com") +
226 - ", please do not reply</div>"); 240 + ",请勿回复</div>");
227 return content.toString(); 241 return content.toString();
228 } 242 }
229 243
...@@ -267,16 +281,19 @@ public class ConFileEmailUtil { ...@@ -267,16 +281,19 @@ public class ConFileEmailUtil {
267 conPushEmail.setFilePath(filePath); 281 conPushEmail.setFilePath(filePath);
268 //如果失败次数小于三则更新为待处理,继续处理 282 //如果失败次数小于三则更新为待处理,继续处理
269 if (result){ 283 if (result){
270 - conPushEmail.setTypeCode(success.getCode()); 284 + conPushEmail.setStatusCode(success.getCode());
271 - conPushEmail.setTypeName(success.getEnglishName()); 285 + conPushEmail.setStatusName(success.getDescription());
272 }else { 286 }else {
273 - if (conPushEmail.getSendNum()<3){ 287 + if (conPushEmail.getSendNum()<2 && StringUtils.isNotEmpty(mailMessageReqDto.getTo())){
274 - conPushEmail.setTypeCode(pending.getCode()); 288 + conPushEmail.setStatusCode(pending.getCode());
275 - conPushEmail.setTypeName(pending.getEnglishName()); 289 + conPushEmail.setStatusName(pending.getDescription());
276 conPushEmail.setSendNum(conPushEmail.getSendNum()+1); 290 conPushEmail.setSendNum(conPushEmail.getSendNum()+1);
277 }else { 291 }else {
278 - conPushEmail.setTypeCode(failed.getCode()); 292 + conPushEmail.setStatusCode(failed.getCode());
279 - conPushEmail.setTypeName(failed.getEnglishName()); 293 + conPushEmail.setStatusName(failed.getDescription());
294 + if (StringUtils.isNotEmpty(mailMessageReqDto.getTo())){
295 + conPushEmail.setSendNum(conPushEmail.getSendNum()+1);
296 + }
280 } 297 }
281 } 298 }
282 } 299 }
...@@ -287,37 +304,38 @@ public class ConFileEmailUtil { ...@@ -287,37 +304,38 @@ public class ConFileEmailUtil {
287 * @Date 2024/11/18 304 * @Date 2024/11/18
288 * @param filePath 305 * @param filePath
289 * @param nioFileUtils 306 * @param nioFileUtils
290 - * @param result
291 * @return java.lang.String 307 * @return java.lang.String
292 */ 308 */
293 - public String backFile(String filePath, NIOFileUtils nioFileUtils,boolean result){ 309 + public String backFile(String filePath, NIOFileUtils nioFileUtils,Email conPushEmail){
294 File file = new File(filePath); 310 File file = new File(filePath);
295 String targetDirPath = null; 311 String targetDirPath = null;
296 - try {
297 - // 获取文件的扩展名
298 - String extension = filePath.substring(filePath.lastIndexOf("."));
299 312
300 - // 生成新的文件名 313 + try {
301 - String fileName = String.format("%s%s%s%s",
302 - "",
303 - "",
304 - DateUtil.yyyyMMddHHmmss(new Date()),
305 - extension
306 - );
307 - String basePath = "";
308 // 构建目标文件路径 314 // 构建目标文件路径
309 targetDirPath = String.join(File.separator, 315 targetDirPath = String.join(File.separator,
310 - basePath, 316 + propertiesConfig.getZipPath(),
311 - fileName 317 + DateUtil.format(new Date()), // 使用提前生成的时间戳,避免重复计算
318 + conPushEmail.getBizCode(),
319 + file.getName()
312 ); 320 );
321 +
322 + // 获取目标目录,并创建目录(如果不存在)
323 + File targetDir = new File(targetDirPath).getParentFile();
324 + if (!targetDir.exists()){
325 + targetDir.mkdirs();
326 + }
313 // 复制文件 327 // 复制文件
314 nioFileUtils.copyFile(file, targetDirPath); 328 nioFileUtils.copyFile(file, targetDirPath);
329 +
330 + // 删除临时文件
315 nioFileUtils.deleteTempFile(Paths.get(filePath)); 331 nioFileUtils.deleteTempFile(Paths.get(filePath));
332 +
316 } catch (Exception e) { 333 } catch (Exception e) {
317 - String errorMsg = String.format("文件复制失败:%s,portId:%s,fileName:%s", e.getMessage()); 334 + // 记录错误信息
318 - // 错误处理 335 + String errorMsg = String.format("文件复制失败: %s, filePath: %s", e.getMessage(), filePath);
319 log.error(errorMsg, e); 336 log.error(errorMsg, e);
320 } 337 }
338 + // 返回目标路径
321 return targetDirPath; 339 return targetDirPath;
322 } 340 }
323 341
...@@ -336,17 +354,18 @@ public class ConFileEmailUtil { ...@@ -336,17 +354,18 @@ public class ConFileEmailUtil {
336 if (result){ 354 if (result){
337 //成功后需要将业务表数据删除,保存至历史表 355 //成功后需要将业务表数据删除,保存至历史表
338 emailRepository.deleteById(conPushEmail.getId()); 356 emailRepository.deleteById(conPushEmail.getId());
357 + emailHistory.setId(null);
339 emailHistoryRepository.saveOrUpdate(emailHistory); 358 emailHistoryRepository.saveOrUpdate(emailHistory);
340 }else { 359 }else {
341 //失败则根据是否第三次,如果是第三次失败则删除,保存到历史表 360 //失败则根据是否第三次,如果是第三次失败则删除,保存到历史表
342 - if (conPushEmail.getSendNum() == 3){ 361 + if (conPushEmail.getSendNum() == 3 || StringUtils.isEmpty(conPushEmail.getToAddress())){
343 emailRepository.deleteById(conPushEmail.getId()); 362 emailRepository.deleteById(conPushEmail.getId());
363 + emailHistory.setId(null);
344 emailHistoryRepository.saveOrUpdate(emailHistory); 364 emailHistoryRepository.saveOrUpdate(emailHistory);
345 }else { 365 }else {
346 emailRepository.saveOrUpdate(conPushEmail); 366 emailRepository.saveOrUpdate(conPushEmail);
347 } 367 }
348 } 368 }
349 -
350 } 369 }
351 370
352 } 371 }
......
1 package com.fedex.connect.task.utils.sys; 1 package com.fedex.connect.task.utils.sys;
2 2
3 import com.fedex.connect.common.dependencies.cache.CacheSystem; 3 import com.fedex.connect.common.dependencies.cache.CacheSystem;
4 -import com.fedex.connect.common.dependencies.contants.ParamConfigConstants;
5 import com.fedex.connect.common.dependencies.enums.biz.EmailStatusEnum; 4 import com.fedex.connect.common.dependencies.enums.biz.EmailStatusEnum;
6 import com.fedex.connect.common.dependencies.template.clearanceEmail.DuplicateEmailTemplate; 5 import com.fedex.connect.common.dependencies.template.clearanceEmail.DuplicateEmailTemplate;
7 import com.fedex.connect.common.model.bi.DictionaryEntries; 6 import com.fedex.connect.common.model.bi.DictionaryEntries;
8 import com.fedex.connect.common.model.biz.Email; 7 import com.fedex.connect.common.model.biz.Email;
9 import com.fedex.connect.common.model.log.EmailHistory; 8 import com.fedex.connect.common.model.log.EmailHistory;
10 -import com.fedex.connect.common.model.sys.ParamConfig;
11 import com.fedex.connect.task.config.PropertiesConfig; 9 import com.fedex.connect.task.config.PropertiesConfig;
12 import com.fedex.connect.task.data.dto.MailConfigDto; 10 import com.fedex.connect.task.data.dto.MailConfigDto;
13 import com.fedex.connect.task.repository.repo.biz.IEmailRepository; 11 import com.fedex.connect.task.repository.repo.biz.IEmailRepository;
14 import com.fedex.connect.task.repository.repo.log.IEmailHistoryRepository; 12 import com.fedex.connect.task.repository.repo.log.IEmailHistoryRepository;
15 -import com.fedex.connect.task.repository.repo.sys.IParamConfigRepository; 13 +import org.apache.commons.lang3.StringUtils;
16 import org.springframework.beans.BeanUtils; 14 import org.springframework.beans.BeanUtils;
17 import org.springframework.beans.factory.annotation.Autowired; 15 import org.springframework.beans.factory.annotation.Autowired;
18 import org.springframework.stereotype.Component; 16 import org.springframework.stereotype.Component;
...@@ -35,8 +33,6 @@ public class DuplicateEmailUtil { ...@@ -35,8 +33,6 @@ public class DuplicateEmailUtil {
35 @Autowired 33 @Autowired
36 private DuplicateEmailTemplate duplicateEmailTemplate; 34 private DuplicateEmailTemplate duplicateEmailTemplate;
37 35
38 - @Autowired
39 - private IParamConfigRepository paramConfigRepository;
40 36
41 /** 37 /**
42 * @Author Szl 38 * @Author Szl
...@@ -59,7 +55,7 @@ public class DuplicateEmailUtil { ...@@ -59,7 +55,7 @@ public class DuplicateEmailUtil {
59 mailConfigDto.setReceiveAccount(email.getToAddress()); 55 mailConfigDto.setReceiveAccount(email.getToAddress());
60 56
61 //设置邮件标题 57 //设置邮件标题
62 - mailConfigDto.setSubject(duplicateEmailTemplate.getTitle()); 58 + mailConfigDto.setSubject(duplicateEmailTemplate.getTitle(email.getBizCode()));
63 String emailBody = this.createEmailBody(email.getBizCode()); 59 String emailBody = this.createEmailBody(email.getBizCode());
64 mailConfigDto.setContent(emailBody); 60 mailConfigDto.setContent(emailBody);
65 61
...@@ -89,14 +85,11 @@ public class DuplicateEmailUtil { ...@@ -89,14 +85,11 @@ public class DuplicateEmailUtil {
89 * 邮件备注 85 * 邮件备注
90 */ 86 */
91 StringBuffer remarks = new StringBuffer(); 87 StringBuffer remarks = new StringBuffer();
92 - ParamConfig paramConfig = paramConfigRepository.findValueByCode(ParamConfigConstants.TASK_PARAM_KEYS.NOTIFICATION_SENDER_EMAIL_INTERVAL); 88 + this.buildBottom(remarks);
93 - this.buildBottom(remarks,paramConfig.getValue());
94 /** 89 /**
95 * 添加模板 90 * 添加模板
96 */ 91 */
97 - return duplicateEmailTemplate.getBody(propertiesConfig.getBaseUrl()+propertiesConfig.getLine(), 92 + return duplicateEmailTemplate.getBody(bizCode, remarks);
98 - propertiesConfig.getBaseUrl()+propertiesConfig.getFedex(),
99 - bizCode, remarks);
100 } 93 }
101 94
102 95
...@@ -107,8 +100,8 @@ public class DuplicateEmailUtil { ...@@ -107,8 +100,8 @@ public class DuplicateEmailUtil {
107 * @param remarks 100 * @param remarks
108 * @return void 101 * @return void
109 */ 102 */
110 - private void buildBottom(StringBuffer remarks, String paramConfig){ 103 + private void buildBottom(StringBuffer remarks){
111 - remarks.append(duplicateEmailTemplate.getDescription(paramConfig)); 104 + remarks.append(duplicateEmailTemplate.getDescription());
112 } 105 }
113 106
114 /** 107 /**
...@@ -120,22 +113,23 @@ public class DuplicateEmailUtil { ...@@ -120,22 +113,23 @@ public class DuplicateEmailUtil {
120 * @param cacheSystem 113 * @param cacheSystem
121 * @return com.fedex.connect.common.model.biz.Email 114 * @return com.fedex.connect.common.model.biz.Email
122 */ 115 */
123 - public void updateEmail(boolean result, Email email, CacheSystem cacheSystem){ 116 + public void updateEmail(boolean result, Email email, CacheSystem cacheSystem,MailConfigDto mailConfigDto){
124 DictionaryEntries pending = cacheSystem.getDicEmailStatus(EmailStatusEnum.PENDING.getCode()); 117 DictionaryEntries pending = cacheSystem.getDicEmailStatus(EmailStatusEnum.PENDING.getCode());
125 DictionaryEntries success = cacheSystem.getDicEmailStatus(EmailStatusEnum.SUCCESS.getCode()); 118 DictionaryEntries success = cacheSystem.getDicEmailStatus(EmailStatusEnum.SUCCESS.getCode());
126 DictionaryEntries failed = cacheSystem.getDicEmailStatus(EmailStatusEnum.FAILED.getCode()); 119 DictionaryEntries failed = cacheSystem.getDicEmailStatus(EmailStatusEnum.FAILED.getCode());
127 email.setSendTime(new Date()); 120 email.setSendTime(new Date());
121 + email.setBody(mailConfigDto.getContent());
128 if (result){ 122 if (result){
129 email.setStatusCode(success.getCode()); 123 email.setStatusCode(success.getCode());
130 - email.setStatusName(success.getEnglishName()); 124 + email.setStatusName(success.getDescription());
131 }else { 125 }else {
132 - if (email.getSendNum()<3){ 126 + if (email.getSendNum()<3 && StringUtils.isNotEmpty(mailConfigDto.getTo())){
133 email.setStatusCode(pending.getCode()); 127 email.setStatusCode(pending.getCode());
134 - email.setStatusName(pending.getEnglishName()); 128 + email.setStatusName(pending.getDescription());
135 email.setSendNum(email.getSendNum()+1); 129 email.setSendNum(email.getSendNum()+1);
136 }else { 130 }else {
137 email.setStatusCode(failed.getCode()); 131 email.setStatusCode(failed.getCode());
138 - email.setStatusName(failed.getEnglishName()); 132 + email.setStatusName(failed.getDescription());
139 } 133 }
140 } 134 }
141 } 135 }
...@@ -149,11 +143,12 @@ public class DuplicateEmailUtil { ...@@ -149,11 +143,12 @@ public class DuplicateEmailUtil {
149 */ 143 */
150 @Transactional 144 @Transactional
151 public void saveEmail(Email email){ 145 public void saveEmail(Email email){
152 - if (EmailStatusEnum.PENDING.getCode().equals(email.getTypeCode())){ 146 + if (EmailStatusEnum.PENDING.getCode().equals(email.getStatusCode())){
153 emailRepository.saveOrUpdate(email); 147 emailRepository.saveOrUpdate(email);
154 }else { 148 }else {
155 EmailHistory emailHistory = new EmailHistory(); 149 EmailHistory emailHistory = new EmailHistory();
156 BeanUtils.copyProperties(email, emailHistory); 150 BeanUtils.copyProperties(email, emailHistory);
151 + emailHistory.setId(null);
157 emailRepository.deleteById(email.getId()); 152 emailRepository.deleteById(email.getId());
158 emailHistoryRepository.saveOrUpdate(emailHistory); 153 emailHistoryRepository.saveOrUpdate(emailHistory);
159 } 154 }
......
...@@ -82,11 +82,12 @@ public class SendFailedEmailUtil { ...@@ -82,11 +82,12 @@ public class SendFailedEmailUtil {
82 .filter(pushOb -> PushObStatusEnum.PUSH_FAILED.getCode().equals(pushOb.getStatusCode())) 82 .filter(pushOb -> PushObStatusEnum.PUSH_FAILED.getCode().equals(pushOb.getStatusCode()))
83 .count(); 83 .count();
84 84
85 - // 获取前 10 条 CONSIGNMENT_CODE 85 + // 2. 获取 STATUS_CODE 为 PUSH_FAILED 且 MODIFY_TIME 最晚的指定数量的 CONSIGNMENT_CODE
86 List<String> latestConsignmentCodes = obs.stream() 86 List<String> latestConsignmentCodes = obs.stream()
87 - .sorted(Comparator.comparing(PushOb::getModifyTime).reversed()) // 按 MODIFY_TIME 降序排序 87 + .filter(pushOb -> PushObStatusEnum.PUSH_FAILED.getCode().equals(pushOb.getStatusCode())) // 筛选 STATUS_CODE 为 PUSH_FAILED
88 - .limit(Long.parseLong(size)) // 取前 10 条 88 + .sorted(Comparator.comparing(PushOb::getModifyTime).reversed()) // 按 MODIFY_TIME 降序排序
89 - .map(PushOb::getConsignmentCode) // 获取 CONSIGNMENT_CODE 89 + .limit(Long.parseLong(size)) // 获取指定数量
90 + .map(PushOb::getConsignmentCode) // 提取 CONSIGNMENT_CODE
90 .collect(Collectors.toList()); 91 .collect(Collectors.toList());
91 return new SendFailedEmailDto("ob",statusCodeCount,latestConsignmentCodes,totalCount); 92 return new SendFailedEmailDto("ob",statusCodeCount,latestConsignmentCodes,totalCount);
92 } 93 }
...@@ -111,22 +112,26 @@ public class SendFailedEmailUtil { ...@@ -111,22 +112,26 @@ public class SendFailedEmailUtil {
111 .map(typeCode -> { 112 .map(typeCode -> {
112 List<EmailHistory> emailList = groupedEmails.getOrDefault(typeCode, Collections.emptyList()); 113 List<EmailHistory> emailList = groupedEmails.getOrDefault(typeCode, Collections.emptyList());
113 114
114 - // 1. 统计 STATUS_CODE 为 FAILED 的数量 115 + // 1. 统计 STATUS_CODE 为 FAILED 且 sendNum 等于 3 的数量
115 long statusCodeCount = emailList.stream() 116 long statusCodeCount = emailList.stream()
116 - .filter(email -> EmailStatusEnum.FAILED.getCode().equals(email.getStatusCode())) 117 + .filter(email -> EmailStatusEnum.FAILED.getCode().equals(email.getStatusCode())) // 筛选 STATUS_CODE 为 FAILED
118 + .filter(email -> email.getSendNum() >1) // 筛选 sendNum 等于 3
117 .count(); 119 .count();
118 120
119 - // 2. 获取 MODIFY_TIME 最晚的 10 个 BIZ_CODE 121 + // 2. 获取 STATUS_CODE 为 FAILED 且 sendNum 等于 3 且 MODIFY_TIME 最晚的指定数量的 BIZ_CODE
120 - List<String> latestBizCodes = emailList.stream() 122 + List<String> latestFailedBizCodes = emailList.stream()
121 - .sorted(Comparator.comparing(EmailHistory::getModifyTime).reversed()) 123 + .filter(email -> EmailStatusEnum.FAILED.getCode().equals(email.getStatusCode())) // 筛选 STATUS_CODE 为 FAILED
122 - .limit(Long.parseLong(size)) 124 + .filter(email -> email.getSendNum() >1) // 筛选 sendNum 等于 3
123 - .map(EmailHistory::getBizCode) 125 + .sorted(Comparator.comparing(EmailHistory::getModifyTime).reversed()) // 按 MODIFY_TIME 降序排序
126 + .limit(Long.parseLong(size)) // 获取最晚的指定数量
127 + .map(EmailHistory::getBizCode) // 提取 BIZ_CODE
124 .collect(Collectors.toList()); 128 .collect(Collectors.toList());
125 129
130 +
126 // 3. 统计 TYPE_CODE 的总数量 131 // 3. 统计 TYPE_CODE 的总数量
127 long totalCount = emailList.size(); 132 long totalCount = emailList.size();
128 133
129 - return new SendFailedEmailDto(typeCode, statusCodeCount, latestBizCodes, totalCount); 134 + return new SendFailedEmailDto(typeCode, statusCodeCount, latestFailedBizCodes, totalCount);
130 }) 135 })
131 .collect(Collectors.toList()); 136 .collect(Collectors.toList());
132 return results; 137 return results;
...@@ -173,7 +178,7 @@ public class SendFailedEmailUtil { ...@@ -173,7 +178,7 @@ public class SendFailedEmailUtil {
173 .map(String::trim) // 去除每个元素的前后空格 178 .map(String::trim) // 去除每个元素的前后空格
174 .collect(Collectors.joining(",")); 179 .collect(Collectors.joining(","));
175 tableRows.append("<tr>" + 180 tableRows.append("<tr>" +
176 - "<td style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;\">"+EmailTypeEnum.getEnMsgByCode(failedEmailDto.getTypeCode())+"</td>" + 181 + "<td style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;\">"+EmailTypeEnum.getMsgByCode(failedEmailDto.getTypeCode())+"</td>" +
177 "<td style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;\">"+ bizCodesStr +"</td>" + 182 "<td style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;\">"+ bizCodesStr +"</td>" +
178 "<td style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;\">"+ failedEmailDto.getTotalCount() +"</td>" + 183 "<td style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;\">"+ failedEmailDto.getTotalCount() +"</td>" +
179 "<td style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;\">"+ failedEmailDto.getStatusCodeCount() +"</td>" + 184 "<td style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;\">"+ failedEmailDto.getStatusCodeCount() +"</td>" +
...@@ -228,9 +233,9 @@ public class SendFailedEmailUtil { ...@@ -228,9 +233,9 @@ public class SendFailedEmailUtil {
228 || propertiesConfig.getEnv().equalsIgnoreCase("test") 233 || propertiesConfig.getEnv().equalsIgnoreCase("test")
229 ) { 234 ) {
230 //ce接收人 235 //ce接收人
231 - mailConfigDto.setTo("zelong.shao@erry.com"); 236 + mailConfigDto.setTo("zelong.shao@erry.com,jialiang.song@erry.com");
232 mailConfigDto.setCcAccount(""); 237 mailConfigDto.setCcAccount("");
233 - mailConfigDto.setReceiveAccount("zelong.shao@erry.com"); 238 + mailConfigDto.setReceiveAccount("zelong.shao@erry.com,jialiang.song@erry.com");
234 //发件人 239 //发件人
235 mailConfigDto.setFrom(propertiesConfig.getEmailAccount()); 240 mailConfigDto.setFrom(propertiesConfig.getEmailAccount());
236 //发件人密码 241 //发件人密码
...@@ -265,7 +270,7 @@ public class SendFailedEmailUtil { ...@@ -265,7 +270,7 @@ public class SendFailedEmailUtil {
265 email.setStatusCode(EmailStatusEnum.FAILED.getCode()); 270 email.setStatusCode(EmailStatusEnum.FAILED.getCode());
266 email.setStatusName(EmailStatusEnum.FAILED.getEnMsg()); 271 email.setStatusName(EmailStatusEnum.FAILED.getEnMsg());
267 } 272 }
268 - email.setSendNum(DigitConstants.DIGIT_ONE_LONG); 273 + email.setSendNum(DigitConstants.DIGIT_ONE);
269 email.setSendTime(new Date()); 274 email.setSendTime(new Date());
270 AssignmentFieldUtils.assignmentTableBaseField(email); 275 AssignmentFieldUtils.assignmentTableBaseField(email);
271 276
......
...@@ -41,20 +41,21 @@ rpc: ...@@ -41,20 +41,21 @@ rpc:
41 rpcKafkaReceive1: http://localhost:8082/kafka-cndc-server/rpcKafka/rpcKafkaReceive 41 rpcKafkaReceive1: http://localhost:8082/kafka-cndc-server/rpcKafka/rpcKafkaReceive
42 rpcKafkaReceive2: http://localhost:8082/kafka-cndc-server/rpcKafka/rpcKafkaReceive 42 rpcKafkaReceive2: http://localhost:8082/kafka-cndc-server/rpcKafka/rpcKafkaReceive
43 43
44 -tw001: 44 +imp001:
45 path: 45 path:
46 #基础路径 46 #基础路径
47 - basePath: /var/share/icleartw/TWIMPORT/ 47 + basePath: /var/share/iClearPreCLR/ToIMPORT/
48 #json生成路径 48 #json生成路径
49 - work: ${tw001.path.basePath}work/ 49 + work: ${imp001.path.basePath}work/
50 #zip输出目录 50 #zip输出目录
51 - final: ${tw001.path.basePath}sftp/Final/ 51 + final: ${imp001.path.basePath}sftp/Final/
52 #备份目录 52 #备份目录
53 - bak: ${tw001.path.basePath}BAK/ 53 + bak: ${imp001.path.basePath}BAK/
54 #异常目录 54 #异常目录
55 - error: ${tw001.path.basePath}ERROR/ 55 + error: ${imp001.path.basePath}ERROR/
56 56
57 -url:
58 - baseUrl: http://localhost:8084/ImpPer/
59 - fedex: fedex.png
60 - line: line.png
...\ No newline at end of file ...\ No newline at end of file
57 +upload:
58 + path:
59 + zip: /app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect/upload/zip
60 + zipTemp: /app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect/upload/zipTemp/
61 + zipFinal: /app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect/upload/zipFinal/
...\ No newline at end of file ...\ No newline at end of file
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: prod 6 env: prod
...@@ -16,20 +16,40 @@ export: ...@@ -16,20 +16,40 @@ export:
16 sendObRetry: 0 0/3 * * * ? 16 sendObRetry: 0 0/3 * * * ?
17 #发送邮件到预清关组 17 #发送邮件到预清关组
18 pushConFile: 0 0/5 * * * ? 18 pushConFile: 0 0/5 * * * ?
19 + #文件清理任务
20 + fileClean: 0 1 * * *
21 + mail:
22 + smtp:
23 + host: mapper.gslb.fedex.com
24 + port: 25
25 + needauth: true
26 + proxy:
27 + startFlag: true
28 + host: sg2-proxy.apac.fedex.com
29 + port: 3128
30 + mailAccountFlag: false
31 + sendEmail:
32 + account:
33 + password:
19 rpc: 34 rpc:
20 url: 35 url:
21 - rpcKafkaReceive1: https://pjea0179.prod.apac.fedex.com:9002/icleartwkafka/rpcKafka/rpcKafkaReceive 36 + rpcKafkaReceive1: https://pjea0179.prod.apac.fedex.com:9002/kafka-cndc-server/rpcKafka/rpcKafkaReceive
22 - rpcKafkaReceive2: https://pjea0180.prod.apac.fedex.com:9002/icleartwkafka/rpcKafka/rpcKafkaReceive 37 + rpcKafkaReceive2: https://pjea0180.prod.apac.fedex.com:9002/kafka-cndc-server/rpcKafka/rpcKafkaReceive
23 38
24 -tw001: 39 +imp001:
25 path: 40 path:
26 #基础路径 41 #基础路径
27 - basePath: /var/share/icleartw/TWIMPORT/ 42 + basePath: /var/share/iClearPreCLR/ToIMPORT/
28 #json生成路径 43 #json生成路径
29 - work: ${tw001.path.basePath}work/ 44 + work: ${imp001.path.basePath}work/
30 #zip输出目录 45 #zip输出目录
31 - final: ${tw001.path.basePath}sftp/Final/ 46 + final: ${imp001.path.basePath}sftp/Final/
32 #备份目录 47 #备份目录
33 - bak: ${tw001.path.basePath}BAK/ 48 + bak: ${imp001.path.basePath}BAK/
34 #异常目录 49 #异常目录
35 - error: ${tw001.path.basePath}ERROR/
...\ No newline at end of file ...\ No newline at end of file
50 + error: ${imp001.path.basePath}ERROR/
51 +upload:
52 + path:
53 + zip: /var/share/iClearPreCLR/upload/zip
54 + zipTemp: /var/share/iClearPreCLR/upload/zipTemp/
55 + zipFinal: /var/share/iClearPreCLR/upload/zipFinal/
...\ No newline at end of file ...\ No newline at end of file
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: test 6 env: test
...@@ -16,20 +16,42 @@ export: ...@@ -16,20 +16,42 @@ export:
16 sendObRetry: 0 0/1 * * * ? 16 sendObRetry: 0 0/1 * * * ?
17 #发送邮件到预清关组 17 #发送邮件到预清关组
18 pushConFile: 0 0/1 * * * ? 18 pushConFile: 0 0/1 * * * ?
19 + #文件清理任务
20 + fileClean: 0 1 * * *
21 + mail:
22 + smtp:
23 + host: smtp.qiye.aliyun.com
24 + port: 25
25 + needauth: true
26 + proxy:
27 + startFlag: false
28 + host: sin-proxy.apac.fedex.com
29 + port: 3128
30 + mailAccountFlag: true
31 + sendEmail:
32 + account: tao.mo@erry.com
33 + password: xiaozhen!1
34 +
19 rpc: 35 rpc:
20 url: 36 url:
21 - rpcKafkaReceive1: http://47.103.140.98:7010/icleartwkafka/rpcKafka/rpcKafkaReceive 37 + rpcKafkaReceive1: http://47.103.140.98:7010/kafka-cndc-server/rpcKafka/rpcKafkaReceive
22 - rpcKafkaReceive2: http://47.103.140.98:7010/icleartwkafka/rpcKafka/rpcKafkaReceive 38 + rpcKafkaReceive2: http://47.103.140.98:7010/kafka-cndc-server/rpcKafka/rpcKafkaReceive
23 39
24 -tw001: 40 +imp001:
25 path: 41 path:
26 #基础路径 42 #基础路径
27 - basePath: /app/Oracle/Middleware/user_projects/domains/base_domain/exportTw/TWIMPORT/ 43 + basePath: /app/Oracle/Middleware/user_projects/domains/base_domain/iClearPreCLR/ToIMPORT/
28 #json生成路径 44 #json生成路径
29 - work: ${tw001.path.basePath}work/ 45 + work: ${imp001.path.basePath}work/
30 #zip输出目录 46 #zip输出目录
31 - final: ${tw001.path.basePath}sftp/Final/ 47 + final: ${imp001.path.basePath}sftp/Final/
32 #备份目录 48 #备份目录
33 - bak: ${tw001.path.basePath}BAK/ 49 + bak: ${imp001.path.basePath}BAK/
34 #异常目录 50 #异常目录
35 - error: ${tw001.path.basePath}ERROR/
...\ No newline at end of file ...\ No newline at end of file
51 + error: ${imp001.path.basePath}ERROR/
52 +
53 +upload:
54 + path:
55 + zip: /app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect/upload/zip
56 + zipTemp: /app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect/upload/zipTemp/
57 + zipFinal: /app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect/upload/zipFinal/
...\ No newline at end of file ...\ No newline at end of file
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 - jndi-name: jdbc/iclearConnectDS 3 + jndi-name: jdbc/iclconnectDS
4 profiles: 4 profiles:
5 #系统环境 5 #系统环境
6 env: uat 6 env: uat
...@@ -16,20 +16,41 @@ export: ...@@ -16,20 +16,41 @@ export:
16 sendObRetry: 0 0/3 * * * ? 16 sendObRetry: 0 0/3 * * * ?
17 #发送邮件到预清关组 17 #发送邮件到预清关组
18 pushConFile: 0 0/5 * * * ? 18 pushConFile: 0 0/5 * * * ?
19 + #文件清理任务
20 + fileClean: 0 1 * * *
21 + mail:
22 + smtp:
23 + host: mapper.gslb.fedex.com
24 + port: 25
25 + needauth: true
26 + proxy:
27 + startFlag: true
28 + host: sg2-proxy.apac.fedex.com
29 + port: 3128
30 + mailAccountFlag: false
31 + sendEmail:
32 + account:
33 + password:
19 rpc: 34 rpc:
20 url: 35 url:
21 - rpcKafkaReceive1: http://ujea0145.nonprod.apac.fedex.com:9001/icleartwkafka/rpcKafka/rpcKafkaReceive 36 + rpcKafkaReceive1: http://ujea0145.nonprod.apac.fedex.com:9001/kafka-cndc-server/rpcKafka/rpcKafkaReceive
22 - rpcKafkaReceive2: http://ujea0146.nonprod.apac.fedex.com:9001/icleartwkafka/rpcKafka/rpcKafkaReceive 37 + rpcKafkaReceive2: http://ujea0146.nonprod.apac.fedex.com:9001/kafka-cndc-server/rpcKafka/rpcKafkaReceive
23 38
24 -tw001: 39 +imp001:
25 path: 40 path:
26 #基础路径 41 #基础路径
27 - basePath: /var/share/icleartw/TWIMPORT/ 42 + basePath: /var/share/iClearPreCLR/ToIMPORT/
28 #json生成路径 43 #json生成路径
29 - work: ${tw001.path.basePath}work/ 44 + work: ${imp001.path.basePath}work/
30 #zip输出目录 45 #zip输出目录
31 - final: ${tw001.path.basePath}sftp/Final/ 46 + final: ${imp001.path.basePath}sftp/Final/
32 #备份目录 47 #备份目录
33 - bak: ${tw001.path.basePath}BAK/ 48 + bak: ${imp001.path.basePath}BAK/
34 #异常目录 49 #异常目录
35 - error: ${tw001.path.basePath}ERROR/
...\ No newline at end of file ...\ No newline at end of file
50 + error: ${imp001.path.basePath}ERROR/
51 +
52 +upload:
53 + path:
54 + zip: /var/share/iClearPreCLR/upload/zip
55 + zipTemp: /var/share/iClearPreCLR/upload/zipTemp/
56 + zipFinal: /var/share/iClearPreCLR/upload/zipFinal/
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -18,4 +18,8 @@ mybatis: ...@@ -18,4 +18,8 @@ mybatis:
18 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 18 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
19 #开启驼峰与下划线转换 19 #开启驼峰与下划线转换
20 map-underscore-to-camel-case: true 20 map-underscore-to-camel-case: true
21 - call-setters-on-nulls: true
...\ No newline at end of file ...\ No newline at end of file
21 + call-setters-on-nulls: true
22 +#全局异常拦截是否生效
23 +common:
24 + exception-advice-webconfig:
25 + enable: true
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <configuration> 2 <configuration>
3 <springProfile name="dev,uat,prod"> 3 <springProfile name="dev,uat,prod">
4 <!-- 日志存放路径 --> 4 <!-- 日志存放路径 -->
5 - <property name="log.path" value="/var/fedex/iclearConnect/weblogic/iclearConnect/task-schedule" /> 5 + <property name="log.path" value="/var/fedex/iclconnect/weblogic/task-schedule" />
6 </springProfile> 6 </springProfile>
7 <springProfile name="test"> 7 <springProfile name="test">
8 <!-- 日志存放路径 --> 8 <!-- 日志存放路径 -->
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
30 <!-- 系统日志输出 --> 30 <!-- 系统日志输出 -->
31 <appender name="file_debug" 31 <appender name="file_debug"
32 class="ch.qos.logback.core.rolling.RollingFileAppender"> 32 class="ch.qos.logback.core.rolling.RollingFileAppender">
33 - <file>${log.path}/tw-task-log-debug.log</file> 33 + <file>${log.path}/task-log-debug.log</file>
34 <!-- 循环政策:基于时间创建日志文件 --> 34 <!-- 循环政策:基于时间创建日志文件 -->
35 <rollingPolicy 35 <rollingPolicy
36 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> 36 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
37 <!-- 日志文件名格式 --> 37 <!-- 日志文件名格式 -->
38 - <fileNamePattern>${log.path}/tw-task-log-debug.%d{yyyy-MM-dd}.%i.log 38 + <fileNamePattern>${log.path}/task-log-debug.%d{yyyy-MM-dd}.%i.log
39 </fileNamePattern> 39 </fileNamePattern>
40 <!-- 日志最大的历史 30天 --> 40 <!-- 日志最大的历史 30天 -->
41 <maxHistory>${log.maxHistory}</maxHistory> 41 <maxHistory>${log.maxHistory}</maxHistory>
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
56 56
57 <appender name="file_info" 57 <appender name="file_info"
58 class="ch.qos.logback.core.rolling.RollingFileAppender"> 58 class="ch.qos.logback.core.rolling.RollingFileAppender">
59 - <file>${log.path}/tw-task-log-info.log</file> 59 + <file>${log.path}/task-log-info.log</file>
60 <!-- 循环政策:基于时间创建日志文件 --> 60 <!-- 循环政策:基于时间创建日志文件 -->
61 <rollingPolicy 61 <rollingPolicy
62 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> 62 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
63 <!-- 日志文件名格式 --> 63 <!-- 日志文件名格式 -->
64 - <fileNamePattern>${log.path}/tw-task-log-info.%d{yyyy-MM-dd}.%i.log 64 + <fileNamePattern>${log.path}/task-log-info.%d{yyyy-MM-dd}.%i.log
65 </fileNamePattern> 65 </fileNamePattern>
66 <!-- 日志最大的历史 30天 --> 66 <!-- 日志最大的历史 30天 -->
67 <maxHistory>${log.maxHistory}</maxHistory> 67 <maxHistory>${log.maxHistory}</maxHistory>
...@@ -82,12 +82,12 @@ ...@@ -82,12 +82,12 @@
82 82
83 <appender name="file_error" 83 <appender name="file_error"
84 class="ch.qos.logback.core.rolling.RollingFileAppender"> 84 class="ch.qos.logback.core.rolling.RollingFileAppender">
85 - <file>${log.path}/tw-task-log-error.log</file> 85 + <file>${log.path}/task-log-error.log</file>
86 <!-- 循环政策:基于时间创建日志文件 --> 86 <!-- 循环政策:基于时间创建日志文件 -->
87 <rollingPolicy 87 <rollingPolicy
88 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> 88 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
89 <!-- 日志文件名格式 --> 89 <!-- 日志文件名格式 -->
90 - <fileNamePattern>${log.path}/tw-task-log-error.%d{yyyy-MM-dd}.%i.log 90 + <fileNamePattern>${log.path}/task-log-error.%d{yyyy-MM-dd}.%i.log
91 </fileNamePattern> 91 </fileNamePattern>
92 <!-- 日志最大的历史 30天 --> 92 <!-- 日志最大的历史 30天 -->
93 <maxHistory>${log.maxHistory}</maxHistory> 93 <maxHistory>${log.maxHistory}</maxHistory>
......
1 +#******************鉴权相关提示,需要做国际化******************
2 +#authentication包
3 +#没有访问权限
4 +system_exception_10001=No access rights.
5 +#没有通过权限认证
6 +system_exception_10002=Failed to pass the authentication.
7 +#登录身份异常
8 +system_exception_10003=Login identity is abnormal.
9 +#登录超过8小时,请重新登录
10 +system_exception_10004=Login has exceeded 8 hours, please log in again.
11 +#登录已过期,请重新登录
12 +system_exception_10005=Login has expired, please log in again.
...\ No newline at end of file ...\ No newline at end of file
......
1 -#******************系统操作日志记录,中文展示******************
2 -business_log_20001=添加运单
3 -business_log_20002=提交运单
4 -business_log_20003=运单查询
5 -business_log_20004=运单详细信息查询
6 -business_log_20005=根据运单ID查询用户上传记录
7 -business_log_20006=运单历史上传记录查询
8 -system_exception_20003=提示信息过长,未保存成功
9 -
10 #******************鉴权相关提示,需要做国际化****************** 1 #******************鉴权相关提示,需要做国际化******************
11 #authentication包 2 #authentication包
12 -system_exception_10001=没有访问权限
13 -system_exception_10002=没有通过权限认证
14 -system_exception_10003=登录身份异常
15 -system_exception_10004=登录超过8小时,请重新登录
16 -system_exception_10005=登录已过期
17 -system_exception_10006=登录已过期,请重新登录
18 -
19 -#******************业务相关、需要做国际化******************
20 -#*********用于字段描述使用,不单独使用**********
21 -business_field_31001=发货人计费账号
22 -business_field_31002=运单ID
23 -business_field_31003=运单号
24 -business_field_31004=原产国编码
25 -business_field_31005=原产国名称
26 -business_field_31006=目的国编码
27 -business_field_31007=目的国全称
28 -business_field_31008=文件业务类型
29 -business_field_31009=Consignment Code
30 -business_field_31010=Contact Person
31 -business_field_31011=Contact Person's Email
32 -business_field_31012=Contact Phone
33 -
34 -#*********具体响应到前端**********
35 -business_exception_30001=#{0}必填字段未填写
36 -business_exception_30002=单次最多可查询1000个运单号码
37 -business_exception_30003=#{0}不正确,请重新输入
38 -business_exception_30004=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
39 -business_exception_30005=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
40 -business_exception_30006=附件上传不符合标准
41 -business_exception_30007=所有上传文件数量不超过#{0}个文件
42 -business_exception_30008=所有上传文件总大小不超过#{0}M
43 -business_exception_30009=运单或发票未上传
44 -business_exception_30010=文件类型不在:运单、发票、箱单、其他
45 -business_exception_30011=该运单已被其他人创建,不可以重复创建
46 -business_exception_30012=UUID不一致
47 -business_exception_30013=文件名为:#{0},上传失败,请检查后重试
48 -business_exception_30014=运单信息加载失败,请稍后重试
49 -business_success_30015=提交成功
50 -business_exception_30016=运单提交失败
...\ No newline at end of file ...\ No newline at end of file
3 +#没有访问权限
4 +system_exception_10001=No access rights.
5 +#没有通过权限认证
6 +system_exception_10002=Failed to pass the authentication.
7 +#登录身份异常
8 +system_exception_10003=Login identity is abnormal.
9 +#登录超过8小时,请重新登录
10 +system_exception_10004=Login has exceeded 8 hours, please log in again.
11 +#登录已过期,请重新登录
12 +system_exception_10005=Login has expired, please log in again.
...\ No newline at end of file ...\ No newline at end of file
......
1 -#******************系统操作日志记录,中文展示******************
2 -business_log_20001=添加运单
3 -business_log_20002=提交运单
4 -business_log_20003=运单查询
5 -business_log_20004=运单详细信息查询
6 -business_log_20005=根据运单ID查询用户上传记录
7 -business_log_20006=运单历史上传记录查询
8 -system_exception_20003=提示信息过长,未保存成功
9 -
10 -#******************鉴权相关提示,需要做国际化******************
11 -#authentication包
12 -system_exception_10001=没有访问权限
13 -system_exception_10002=没有通过权限认证
14 -system_exception_10003=登录身份异常
15 -system_exception_10004=登录超过8小时,请重新登录
16 -system_exception_10005=登录已过期
17 -system_exception_10006=登录已过期,请重新登录
18 -
19 -#******************业务相关、需要做国际化******************
20 -#*********用于字段描述使用,不单独使用**********
21 -business_field_31001=发货人计费账号
22 -business_field_31002=运单ID
23 -business_field_31003=运单号
24 -business_field_31004=原产国编码
25 -business_field_31005=原产国名称
26 -business_field_31006=目的国编码
27 -business_field_31007=目的国全称
28 -business_field_31008=文件业务类型
29 -business_field_31009=Consignment Code
30 -business_field_31010=Contact Person
31 -business_field_31011=Contact Person's Email
32 -business_field_31012=Contact Phone
33 -
34 -#*********具体响应到前端**********
35 -business_exception_30001=${0}必填字段未填写
36 -business_exception_30002=单次最多可查询1000个运单号码
37 -business_exception_30003=${0}不正确,请重新输入
38 -business_exception_30004=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
39 -business_exception_30005=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
40 -business_exception_30006=附件上传不符合标准
41 -business_exception_30007=所有上传文件数量不超过50个文件
42 -business_exception_30008=所有上传文件总大小不超过50M
43 -business_exception_30009=运单或发票未上传
44 -business_exception_30010=文件类型不在:运单、发票、箱单、其他
45 -business_exception_30011=该运单已被其他人创建,不可以重复创建
46 -business_exception_30012=UUID不一致
47 -business_exception_30013=文件名为:#{0},上传失败,请检查后重试
48 -business_exception_30014=运单信息加载失败,请稍后重试
49 -business_success_30015=提交成功
50 -business_exception_30016=运单提交失败
...\ No newline at end of file ...\ No newline at end of file
1 +##******************鉴权相关提示,需要做国际化******************
2 +##authentication包
3 +#system_exception_10001=没有访问权限
4 +#system_exception_10002=没有通过权限认证
5 +#system_exception_10003=登录身份异常
6 +#system_exception_10004=登录超过8小时,请重新登录
7 +#system_exception_10005=登录已过期,请重新登录
...\ No newline at end of file ...\ No newline at end of file
......