tao.mo

ALL | 修改 | 基础配置调整

mt
2024年12月23日16:31:07
package com.fedex.connect.customer.validate.controller.biz;
import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
import com.fedex.connect.common.dependencies.util.ResponseUtils;
import com.fedex.connect.customer.enums.ResponseCode;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -15,8 +15,7 @@ system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录已过期,请重新登录
system_exception_10005=登录已过期,请重新登录
#******************业务相关、需要做国际化******************
#*********用于字段描述使用,不单独使用**********
......@@ -45,6 +44,6 @@ business_exception_30012=UUID不一致
business_exception_30013=文件名为:{0},上传失败,请检查后重试
business_exception_30014=运单信息加载失败,请稍后重试
business_success_30015=上传成功
business_exception_30016=运单提交失败
business_exception_30016=运单提交失败,请联系管理员!
business_exception_30017=运单号填写错误
business_exception_30018=运单提交失败,该运单正在被其他用户操作,请稍后重试
......
......@@ -15,8 +15,7 @@ system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录已过期,请重新登录
system_exception_10005=登录已过期,请重新登录
#******************业务相关、需要做国际化******************
#*********用于字段描述使用,不单独使用**********
......@@ -36,8 +35,8 @@ business_exception_30003={0}不正确,请重新输入
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.
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.
business_exception_30006=附件上传不符合标准
business_exception_30007=所有上传文件数量不超过{}个文件
business_exception_30008=所有上传文件总大小不超过{}M
business_exception_30007=所有上传文件数量不超过{0}个文件
business_exception_30008=所有上传文件总大小不超过{0}M
business_exception_30009=运单或发票未上传
business_exception_30010=文件类型不在:运单、发票、箱单、其他
business_exception_30011=该运单已被其他人创建,不可以重复创建
......@@ -45,6 +44,6 @@ business_exception_30012=UUID不一致
business_exception_30013=文件名为:{0},上传失败,请检查后重试
business_exception_30014=运单信息加载失败,请稍后重试
business_success_30015=上传成功
business_exception_30016=运单提交失败
business_exception_30016=运单提交失败,请联系管理员!
business_exception_30017=运单号填写错误
business_exception_30018=运单提交失败,该运单正在被其他用户操作,请稍后重试
\ No newline at end of file
......
......@@ -129,7 +129,7 @@ public class JwtAuthorizationFilter extends BasicAuthenticationFilter {
response.setHeader("Token", newToken);*/
} catch (ExpiredJwtException ee) {
//已经过期了,直接踢
logger.error("CODE : {} requestURL:{},reason:{}",BaseResponseCode.MESSAGE_CODE_10004.getCode() , request.getRequestURL(),"ExpiredJwtException ",ee);
logger.error("CODE : {} requestURL:{},reason:{}",BaseResponseCode.MESSAGE_CODE_10005.getCode() , request.getRequestURL(),"ExpiredJwtException ",ee);
Claims claims = ee.getClaims();
String id = claims.getId();
Map<String, Object> result = new HashMap<>();
......
......@@ -20,7 +20,7 @@ public class BasicController {
throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10003.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10003.getMsg()),e);
}
if (user == null) {
throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10006.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10006.getMsg()));
throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10005.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10005.getMsg()));
}
return user;
}
......
......@@ -12,7 +12,6 @@ public enum BaseResponseCode {
MESSAGE_CODE_10003(10003,"system_exception_10003"),
MESSAGE_CODE_10004(10004,"system_exception_10004"),
MESSAGE_CODE_10005(10005,"system_exception_10005"),
MESSAGE_CODE_10006(10006,"system_exception_10006"),
;
private Integer code;
private String msg;
......
package com.fedex.connect.common.dependencies.util;
import com.fedex.connect.common.dependencies.annotation.BaseNotBlank;
import com.fedex.connect.common.dependencies.exception.OpErrorException;
import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -54,8 +55,10 @@ public class BaseValidateUtils {
if(errorList.size() > 0){
responseUtils.fail(codeEnum,errorList);
}
}catch(OpErrorException ex){
throw ex;
}catch(Exception ex){
responseUtils.fail(codeEnum);
responseUtils.fail(codeEnum,ex);
}
}
}
\ No newline at end of file
......
......@@ -61,7 +61,7 @@
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/tw-kafka-log-info.%d{yyyy-MM-dd}.%i.log
<fileNamePattern>${log.path}/kafka-log-info.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<!-- 日志最大的历史 30天 -->
<maxHistory>${log.maxHistory}</maxHistory>
......@@ -82,12 +82,12 @@
<appender name="file_error"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/tw-kafka-log-error.log</file>
<file>${log.path}/kafka-log-error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/tw-kafka-log-error.%d{yyyy-MM-dd}.%i.log
<fileNamePattern>${log.path}/kafka-log-error.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<!-- 日志最大的历史 30天 -->
<maxHistory>${log.maxHistory}</maxHistory>
......
......@@ -4,6 +4,4 @@ system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录身份异常
system_exception_10007=登录已过期,请重新登录
\ No newline at end of file
system_exception_10005=登录已过期,请重新登录
\ No newline at end of file
......
......@@ -4,6 +4,4 @@ system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录身份异常
system_exception_10007=登录已过期,请重新登录
\ No newline at end of file
system_exception_10005=登录已过期,请重新登录
\ No newline at end of file
......
......@@ -4,9 +4,7 @@ system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录身份异常
system_exception_10007=登录已过期,请重新登录
system_exception_10005=登录已过期,请重新登录
#******************业务相关、需要做国际化******************
business_exception_40001=存入token失败
......
......@@ -4,9 +4,7 @@ system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录身份异常
system_exception_10007=登录已过期,请重新登录
system_exception_10005=登录已过期,请重新登录
#******************业务相关、需要做国际化******************
business_exception_40001=存入token失败
......
......@@ -30,12 +30,12 @@
<!-- 系统日志输出 -->
<appender name="file_debug"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/tw-task-log-debug.log</file>
<file>${log.path}/task-log-debug.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/tw-task-log-debug.%d{yyyy-MM-dd}.%i.log
<fileNamePattern>${log.path}/task-log-debug.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<!-- 日志最大的历史 30天 -->
<maxHistory>${log.maxHistory}</maxHistory>
......@@ -56,12 +56,12 @@
<appender name="file_info"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/tw-task-log-info.log</file>
<file>${log.path}/task-log-info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/tw-task-log-info.%d{yyyy-MM-dd}.%i.log
<fileNamePattern>${log.path}/task-log-info.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<!-- 日志最大的历史 30天 -->
<maxHistory>${log.maxHistory}</maxHistory>
......@@ -82,12 +82,12 @@
<appender name="file_error"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/tw-task-log-error.log</file>
<file>${log.path}/task-log-error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/tw-task-log-error.%d{yyyy-MM-dd}.%i.log
<fileNamePattern>${log.path}/task-log-error.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<!-- 日志最大的历史 30天 -->
<maxHistory>${log.maxHistory}</maxHistory>
......
#******************系统操作日志记录,中文展示******************
business_log_20001=添加运单
business_log_20002=提交运单
business_log_20003=运单查询
business_log_20004=运单详细信息查询
business_log_20005=根据运单ID查询用户上传记录
business_log_20006=运单历史上传记录查询
system_exception_20003=提示信息过长,未保存成功
#******************鉴权相关提示,需要做国际化******************
#authentication包
system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录已过期,请重新登录
#******************业务相关、需要做国际化******************
#*********用于字段描述使用,不单独使用**********
business_field_31001=发货人计费账号
business_field_31002=运单ID
business_field_31003=运单号
business_field_31004=原产国编码
business_field_31005=原产国名称
business_field_31006=目的国编码
business_field_31007=目的国全称
business_field_31008=文件业务类型
business_field_31009=Consignment Code
business_field_31010=Contact Person
business_field_31011=Contact Person's Email
business_field_31012=Contact Phone
#*********具体响应到前端**********
business_exception_30001=#{0}必填字段未填写
business_exception_30002=单次最多可查询1000个运单号码
business_exception_30003=#{0}不正确,请重新输入
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.
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.
business_exception_30006=附件上传不符合标准
business_exception_30007=所有上传文件数量不超过#{0}个文件
business_exception_30008=所有上传文件总大小不超过#{0}M
business_exception_30009=运单或发票未上传
business_exception_30010=文件类型不在:运单、发票、箱单、其他
business_exception_30011=该运单已被其他人创建,不可以重复创建
business_exception_30012=UUID不一致
business_exception_30013=文件名为:#{0},上传失败,请检查后重试
business_exception_30014=运单信息加载失败,请稍后重试
business_success_30015=提交成功
business_exception_30016=运单提交失败
\ No newline at end of file
system_exception_10005=登录已过期,请重新登录
\ No newline at end of file
......
#******************系统操作日志记录,中文展示******************
business_log_20001=添加运单
business_log_20002=提交运单
business_log_20003=运单查询
business_log_20004=运单详细信息查询
business_log_20005=根据运单ID查询用户上传记录
business_log_20006=运单历史上传记录查询
system_exception_20003=提示信息过长,未保存成功
#******************鉴权相关提示,需要做国际化******************
#authentication包
system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录已过期,请重新登录
#******************业务相关、需要做国际化******************
#*********用于字段描述使用,不单独使用**********
business_field_31001=发货人计费账号
business_field_31002=运单ID
business_field_31003=运单号
business_field_31004=原产国编码
business_field_31005=原产国名称
business_field_31006=目的国编码
business_field_31007=目的国全称
business_field_31008=文件业务类型
business_field_31009=Consignment Code
business_field_31010=Contact Person
business_field_31011=Contact Person's Email
business_field_31012=Contact Phone
#*********具体响应到前端**********
business_exception_30001=${0}必填字段未填写
business_exception_30002=单次最多可查询1000个运单号码
business_exception_30003=${0}不正确,请重新输入
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.
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.
business_exception_30006=附件上传不符合标准
business_exception_30007=所有上传文件数量不超过50个文件
business_exception_30008=所有上传文件总大小不超过50M
business_exception_30009=运单或发票未上传
business_exception_30010=文件类型不在:运单、发票、箱单、其他
business_exception_30011=该运单已被其他人创建,不可以重复创建
business_exception_30012=UUID不一致
business_exception_30013=文件名为:#{0},上传失败,请检查后重试
business_exception_30014=运单信息加载失败,请稍后重试
business_success_30015=提交成功
business_exception_30016=运单提交失败
\ No newline at end of file
system_exception_10005=登录已过期,请重新登录
\ No newline at end of file
......