tao.mo

biz-customer | 修改 | 校验信息调整

mt
2024年11月12日14:36:30
...@@ -7,6 +7,10 @@ package com.fedex.connect.customer.enums; ...@@ -7,6 +7,10 @@ package com.fedex.connect.customer.enums;
7 */ 7 */
8 public enum ResponseCode { 8 public enum ResponseCode {
9 //********************biz_customer模块 9 //********************biz_customer模块
10 + //#*********用于字段描述使用,不单独使用**********
11 + MESSAGE_CODE_31001(31001,"business_field_31001"),
12 +
13 + //#*********具体响应到前端**********
10 MESSAGE_CODE_30001(30001,"business_exception_30001"), 14 MESSAGE_CODE_30001(30001,"business_exception_30001"),
11 MESSAGE_CODE_30002(30002,"business_exception_30002"), 15 MESSAGE_CODE_30002(30002,"business_exception_30002"),
12 MESSAGE_CODE_30003(30003,"business_exception_30003"), 16 MESSAGE_CODE_30003(30003,"business_exception_30003"),
...@@ -17,7 +21,6 @@ public enum ResponseCode { ...@@ -17,7 +21,6 @@ public enum ResponseCode {
17 MESSAGE_CODE_30008(30008,"business_exception_30008"), 21 MESSAGE_CODE_30008(30008,"business_exception_30008"),
18 MESSAGE_CODE_30009(30009,"business_exception_30009"), 22 MESSAGE_CODE_30009(30009,"business_exception_30009"),
19 MESSAGE_CODE_30010(30010,"business_exception_30010"), 23 MESSAGE_CODE_30010(30010,"business_exception_30010"),
20 - MESSAGE_CODE_30011(30011,"business_exception_30011"),
21 24
22 /******打个样,编写样例*****/ 25 /******打个样,编写样例*****/
23 // MESSAGE_CODE_30001(30001,"business_exception_30001"), 26 // MESSAGE_CODE_30001(30001,"business_exception_30001"),
......
...@@ -41,7 +41,7 @@ public class ConsignmentUtil { ...@@ -41,7 +41,7 @@ public class ConsignmentUtil {
41 List<String> errList = new ArrayList<>(); 41 List<String> errList = new ArrayList<>();
42 42
43 // 校验字段是否匹配,并将错误信息添加到errList中 43 // 校验字段是否匹配,并将错误信息添加到errList中
44 - checkFieldMismatch(bo.getShipperAccount(), consignment.getShipperAccount(), ResponseCode.MESSAGE_CODE_30006.getMsg(), errList); 44 + checkFieldMismatch(bo.getShipperAccount(), consignment.getShipperAccount(), ResponseCode.MESSAGE_CODE_31001.getMsg(), errList);
45 //checkFieldMismatch(bo.getRecipientCountry(), consignment.getRecipientCountry(), "con_recipientCountry", errList); 45 //checkFieldMismatch(bo.getRecipientCountry(), consignment.getRecipientCountry(), "con_recipientCountry", errList);
46 //checkFieldMismatch(bo.getShipperCountry(), consignment.getShipperCountry(), "con_shipperCountry", errList); 46 //checkFieldMismatch(bo.getShipperCountry(), consignment.getShipperCountry(), "con_shipperCountry", errList);
47 if (!errList.isEmpty()) { 47 if (!errList.isEmpty()) {
......
...@@ -40,11 +40,11 @@ public class AttachmentValidate { ...@@ -40,11 +40,11 @@ public class AttachmentValidate {
40 || files.length == DigitConstants.DIGIT_MINUS_ONE 40 || files.length == DigitConstants.DIGIT_MINUS_ONE
41 || Objects.isNull(consignmentBo) 41 || Objects.isNull(consignmentBo)
42 || Objects.isNull(consignmentBo.getFileBizType())){ 42 || Objects.isNull(consignmentBo.getFileBizType())){
43 - responseUtils.fail(ResponseCode.MESSAGE_CODE_30007); 43 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30006);
44 } 44 }
45 //上传最大文件个数限制 45 //上传最大文件个数限制
46 if(files.length > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL){ 46 if(files.length > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL){
47 - responseUtils.fail(ResponseCode.MESSAGE_CODE_30008); 47 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30007);
48 } 48 }
49 //上传总文件大小限制 49 //上传总文件大小限制
50 List<Long> fileSizeList = new ArrayList<>(); 50 List<Long> fileSizeList = new ArrayList<>();
...@@ -56,18 +56,18 @@ public class AttachmentValidate { ...@@ -56,18 +56,18 @@ public class AttachmentValidate {
56 .mapToLong(f -> Optional.ofNullable(f).orElse(0L)).sum(); 56 .mapToLong(f -> Optional.ofNullable(f).orElse(0L)).sum();
57 //最大上传总文件大小超过50M 57 //最大上传总文件大小超过50M
58 if(totalSize > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_SIZE){ 58 if(totalSize > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_SIZE){
59 - responseUtils.fail(ResponseCode.MESSAGE_CODE_30009); 59 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30008);
60 } 60 }
61 List<String> fileBizTypeList = consignmentBo.getFileBizType(); 61 List<String> fileBizTypeList = consignmentBo.getFileBizType();
62 //运单或发票未上传 62 //运单或发票未上传
63 if(!fileBizTypeList.contains(FileBizTypeEnum.AWB.getName()) || 63 if(!fileBizTypeList.contains(FileBizTypeEnum.AWB.getName()) ||
64 !fileBizTypeList.contains(FileBizTypeEnum.INV.getName())){ 64 !fileBizTypeList.contains(FileBizTypeEnum.INV.getName())){
65 - responseUtils.fail(ResponseCode.MESSAGE_CODE_30010); 65 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30009);
66 } 66 }
67 //文件类型不在范围内 67 //文件类型不在范围内
68 fileBizTypeList.stream().forEach(p -> { 68 fileBizTypeList.stream().forEach(p -> {
69 if(Objects.isNull(FileBizTypeEnum.valueOf(p))){ 69 if(Objects.isNull(FileBizTypeEnum.valueOf(p))){
70 - responseUtils.fail(ResponseCode.MESSAGE_CODE_30011); 70 + responseUtils.fail(ResponseCode.MESSAGE_CODE_30010);
71 }; 71 };
72 }); 72 });
73 } 73 }
......
...@@ -17,14 +17,18 @@ system_exception_10005=登录已过期 ...@@ -17,14 +17,18 @@ system_exception_10005=登录已过期
17 system_exception_10006=登录已过期,请重新登录 17 system_exception_10006=登录已过期,请重新登录
18 18
19 #******************业务相关、需要做国际化****************** 19 #******************业务相关、需要做国际化******************
20 +#*********用于字段描述使用,不单独使用**********
21 +business_field_31001=发货人计费账号
22 +business_field_31002=运单ID
23 +business_field_31003=运单号
24 +#*********具体响应到前端**********
20 business_exception_30001=${0}必填字段未填写 25 business_exception_30001=${0}必填字段未填写
21 business_exception_30002=单次最多可查询1000个运单号码 26 business_exception_30002=单次最多可查询1000个运单号码
22 business_exception_30003=${0}不正确,请重新输入 27 business_exception_30003=${0}不正确,请重新输入
23 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. 28 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.
24 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. 29 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.
25 -business_exception_30006=发货人计费账号
26 -business_exception_30007=附件未上传
27 -business_exception_30008=所有上传文件数量不超过50个文件
28 -business_exception_30009=所有上传文件总大小不超过50M
29 -business_exception_30010=运单或发票未上传
30 -business_exception_30011=文件类型不在:运单、发票、箱单、其他
...\ No newline at end of file ...\ No newline at end of file
30 +business_exception_30006=附件未上传
31 +business_exception_30007=所有上传文件数量不超过50个文件
32 +business_exception_30008=所有上传文件总大小不超过50M
33 +business_exception_30009=运单或发票未上传
34 +business_exception_30010=文件类型不在:运单、发票、箱单、其他
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -17,13 +17,18 @@ system_exception_10005=登录已过期 ...@@ -17,13 +17,18 @@ system_exception_10005=登录已过期
17 system_exception_10006=登录已过期,请重新登录 17 system_exception_10006=登录已过期,请重新登录
18 18
19 #******************业务相关、需要做国际化****************** 19 #******************业务相关、需要做国际化******************
20 -business_exception_30001=必填字段未填写 20 +#*********用于字段描述使用,不单独使用**********
21 +business_field_31001=发货人计费账号
22 +business_field_31002=运单ID
23 +business_field_31003=运单号
24 +#*********具体响应到前端**********
25 +business_exception_30001=${0}必填字段未填写
21 business_exception_30002=单次最多可查询1000个运单号码 26 business_exception_30002=单次最多可查询1000个运单号码
22 -business_exception_30003=不正确,请重新输入 27 +business_exception_30003=${0}不正确,请重新输入
23 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. 28 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.
24 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. 29 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.
25 -business_exception_30006=发货人计费账号
26 -business_exception_30007=附件未上传
27 -business_exception_30008=所有上传文件数量不超过50个文件
28 -business_exception_30009=所有上传文件总大小不超过50M
29 -business_exception_30011=文件类型不在:运单、发票、箱单、其他
...\ No newline at end of file ...\ No newline at end of file
30 +business_exception_30006=附件未上传
31 +business_exception_30007=所有上传文件数量不超过50个文件
32 +business_exception_30008=所有上传文件总大小不超过50M
33 +business_exception_30009=运单或发票未上传
34 +business_exception_30010=文件类型不在:运单、发票、箱单、其他
...\ No newline at end of file ...\ No newline at end of file
......