配置增加微信的费率,优化入驻长期身份证的号码为9999-12-31
This commit is contained in:
parent
b7ee0055f7
commit
186e6a59e8
@ -21,8 +21,6 @@ public class GlobalExceptionHandler {
|
|||||||
|
|
||||||
@ExceptionHandler(value = Exception.class)
|
@ExceptionHandler(value = Exception.class)
|
||||||
public CommonResult exceptionHandler(HttpServletRequest req, Exception e) {
|
public CommonResult exceptionHandler(HttpServletRequest req, Exception e) {
|
||||||
|
|
||||||
|
|
||||||
// 获取异常的第一帧堆栈信息
|
// 获取异常的第一帧堆栈信息
|
||||||
StackTraceElement[] stackTrace = e.getStackTrace();
|
StackTraceElement[] stackTrace = e.getStackTrace();
|
||||||
String location = "未知位置";
|
String location = "未知位置";
|
||||||
@ -42,28 +40,17 @@ public class GlobalExceptionHandler {
|
|||||||
location,
|
location,
|
||||||
e);
|
e);
|
||||||
|
|
||||||
return CommonResult.failed("系统异常:" + location);
|
return CommonResult.failed("系统异常:" + e.getMessage());
|
||||||
|
|
||||||
// logger.error("Exception全局异常捕获-" + e.getMessage(), e);
|
|
||||||
// return CommonResult.failed();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler(value = ApiException.class)
|
@ExceptionHandler(value = ApiException.class)
|
||||||
public CommonResult exceptionHandler(HttpServletRequest req, ApiException e) {
|
public CommonResult exceptionHandler(HttpServletRequest req, ApiException e) {
|
||||||
// IErrorCode errorCode = e.getErrorCode();
|
|
||||||
// String message = e.getMessage();
|
|
||||||
// logger.error("ApiException全局异常捕获-" + e.getMessage(), e);
|
|
||||||
// if (errorCode != null) {
|
|
||||||
// return CommonResult.failed(errorCode);
|
|
||||||
// } else if (StrUtil.isNotBlank(message)) {
|
|
||||||
// return CommonResult.failed(message);
|
|
||||||
// } else {
|
|
||||||
// return CommonResult.failed(ResultCode.FAILED);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 获取异常位置信息
|
// 获取异常位置信息
|
||||||
StackTraceElement[] stackTrace = e.getStackTrace();
|
StackTraceElement[] stackTrace = e.getStackTrace();
|
||||||
String location = "未知位置";
|
String location = "未知错误位置";
|
||||||
|
|
||||||
|
IErrorCode errorCode = e.getErrorCode();
|
||||||
|
String message = e.getMessage();
|
||||||
|
|
||||||
if (stackTrace.length > 0) {
|
if (stackTrace.length > 0) {
|
||||||
StackTraceElement element = stackTrace[0]; // 第一个异常抛出点
|
StackTraceElement element = stackTrace[0]; // 第一个异常抛出点
|
||||||
@ -74,20 +61,18 @@ public class GlobalExceptionHandler {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
IErrorCode errorCode = e.getErrorCode();
|
|
||||||
String message = e.getMessage();
|
|
||||||
|
|
||||||
logger.error("Exception全局异常捕获 URI: {} - Method: {} - Error: {} at {}",
|
logger.error("Exception全局异常捕获 URI:{} - Method:{} - Error:{} at {}",
|
||||||
req.getRequestURI(),
|
req.getRequestURI(),
|
||||||
req.getMethod(),
|
req.getMethod(),
|
||||||
e.getMessage(),
|
message,
|
||||||
location,
|
location,
|
||||||
e);
|
e);
|
||||||
|
|
||||||
if (errorCode != null) {
|
if (errorCode != null) {
|
||||||
return CommonResult.failed(errorCode);
|
return CommonResult.failed(message);
|
||||||
} else if (StrUtil.isNotBlank(message)) {
|
} else if (StrUtil.isNotBlank(message)) {
|
||||||
return CommonResult.failed("业务异常:" + message + " [" + location + "]");
|
return CommonResult.failed("系统异常:" + message + " [" + location + "]");
|
||||||
} else {
|
} else {
|
||||||
return CommonResult.failed(ResultCode.FAILED);
|
return CommonResult.failed(ResultCode.FAILED);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,6 +89,8 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
private String orgCode;
|
private String orgCode;
|
||||||
@Value("${lakala.tk.split_lowest_ratio}")
|
@Value("${lakala.tk.split_lowest_ratio}")
|
||||||
private String splitLowestRatio;
|
private String splitLowestRatio;
|
||||||
|
@Value("${lakala.tk.wx_fee}")
|
||||||
|
private String wxFee;
|
||||||
@Value("${project.domain}")
|
@Value("${project.domain}")
|
||||||
private String projectDomain;
|
private String projectDomain;
|
||||||
@Value("${spring.profiles.active}")
|
@Value("${spring.profiles.active}")
|
||||||
@ -546,13 +548,9 @@ public class LakalaApiServiceImpl implements LakalaApiService {
|
|||||||
String signDate = today.getYear() + "-" + today.getMonthValue() + "-" + today.getDayOfMonth();
|
String signDate = today.getYear() + "-" + today.getMonthValue() + "-" + today.getDayOfMonth();
|
||||||
|
|
||||||
String platformName = "桂平发发网络有限公司";
|
String platformName = "桂平发发网络有限公司";
|
||||||
String ratioNum = "0.6";
|
|
||||||
if (isLklProd) {
|
|
||||||
ratioNum = "0.25";
|
|
||||||
}
|
|
||||||
JSONObject ecParams = new JSONObject();
|
JSONObject ecParams = new JSONObject();
|
||||||
ecParams.put("A1", isQy ? shopMchEntry.getBiz_license_company() : shopMchEntry.getAccount_holder_name());
|
ecParams.put("A1", isQy ? shopMchEntry.getBiz_license_company() : shopMchEntry.getAccount_holder_name());
|
||||||
ecParams.put("A30", ratioNum); // 测试环境微信费率0.6
|
ecParams.put("A30", wxFee); // 测试环境微信费率0.6
|
||||||
ecParams.put("A96", "1");
|
ecParams.put("A96", "1");
|
||||||
ecParams.put("A97", "是");
|
ecParams.put("A97", "是");
|
||||||
ecParams.put("A100", "是");
|
ecParams.put("A100", "是");
|
||||||
|
|||||||
@ -68,6 +68,9 @@ public class LklTkServiceImpl {
|
|||||||
@Value("${lakala.tk.notify_pub_key_path}")
|
@Value("${lakala.tk.notify_pub_key_path}")
|
||||||
private String notifyPubKeyPath;
|
private String notifyPubKeyPath;
|
||||||
|
|
||||||
|
@Value("${lakala.tk.wx_fee}")
|
||||||
|
private String wxFee;
|
||||||
|
|
||||||
@Value("${spring.profiles.active}")
|
@Value("${spring.profiles.active}")
|
||||||
private String profile;
|
private String profile;
|
||||||
|
|
||||||
@ -398,7 +401,7 @@ public class LklTkServiceImpl {
|
|||||||
formData.put("countyCode", areaCode.get("countyCode"));
|
formData.put("countyCode", areaCode.get("countyCode"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//结算信息省市信息
|
//银行结算信息省市信息
|
||||||
if (StrUtil.isBlank(shopMchEntry.getBank_district()) || StrUtil.isBlank(shopMchEntry.getBank_area())) {
|
if (StrUtil.isBlank(shopMchEntry.getBank_district()) || StrUtil.isBlank(shopMchEntry.getBank_area())) {
|
||||||
Map<String, Object> bankInfo = lklBanksService.GetLklBankByBranchBankNo(shopMchEntry.getOpenning_bank_code());
|
Map<String, Object> bankInfo = lklBanksService.GetLklBankByBranchBankNo(shopMchEntry.getOpenning_bank_code());
|
||||||
if (ObjectUtil.isNotEmpty(bankInfo)) {
|
if (ObjectUtil.isNotEmpty(bankInfo)) {
|
||||||
@ -439,7 +442,7 @@ public class LklTkServiceImpl {
|
|||||||
put(new JSONObject() {
|
put(new JSONObject() {
|
||||||
{
|
{
|
||||||
put("feeCode", "WECHAT");
|
put("feeCode", "WECHAT");
|
||||||
put("feeValue", 0.6);
|
put("feeValue", wxFee);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}});
|
}});
|
||||||
|
|||||||
@ -166,16 +166,26 @@ public class ShopMchEntryServiceImpl extends BaseServiceImpl<ShopMchEntryMapper,
|
|||||||
|
|
||||||
|
|
||||||
// 检查企业、法人或个人的营业执照或身份证
|
// 检查企业、法人或个人的营业执照或身份证
|
||||||
if (ObjectUtil.isNotEmpty(record.getEntity_type()) && record.getEntity_type().equals(2)) {
|
if (ObjectUtil.isNotEmpty(record.getEntity_type()) && record.getEntity_type().equals(CommonConstant.MCH_ENTITY_TYPE_GR)) {
|
||||||
// 个人
|
// 个人
|
||||||
if (StrUtil.isBlank(record.getIndividual_id_number()) || StrUtil.isBlank(record.getIndividual_id_images()) || StrUtil.isBlank(record.getIndividual_id_images2())) {
|
if (StrUtil.isBlank(record.getIndividual_id_number())
|
||||||
|
|| StrUtil.isBlank(record.getIndividual_id_name())
|
||||||
|
|| StrUtil.isBlank(record.getIndividual_id_addr())
|
||||||
|
|| StrUtil.isBlank(record.getIndividual_id_period_begin())
|
||||||
|
|| StrUtil.isBlank(record.getIndividual_id_period_end())
|
||||||
|
|| StrUtil.isBlank(record.getIndividual_id_images())
|
||||||
|
|| StrUtil.isBlank(record.getIndividual_id_images2())) {
|
||||||
return CommonResult.failed("缺少个人身份证信息!");
|
return CommonResult.failed("缺少个人身份证信息!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(record.getIndividual_id_number()) && !StringUtils.validateIDCard(record.getIndividual_id_number())) {
|
if (!StringUtils.validateIDCard(record.getIndividual_id_number())) {
|
||||||
return CommonResult.failed("个人身份证号码有误!");
|
return CommonResult.failed("个人身份证号码有误!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StrUtil.contains(record.getIndividual_id_period_end(), "长期")) {
|
||||||
|
record.setIndividual_id_period_end("9999-12-31");
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 企业
|
// 企业
|
||||||
if (StrUtil.isBlank(record.getBiz_license_number()) || StrUtil.isBlank(record.getBiz_license_image())) {
|
if (StrUtil.isBlank(record.getBiz_license_number()) || StrUtil.isBlank(record.getBiz_license_image())) {
|
||||||
@ -186,17 +196,27 @@ public class ShopMchEntryServiceImpl extends BaseServiceImpl<ShopMchEntryMapper,
|
|||||||
return CommonResult.failed("营业执照号码有误!");
|
return CommonResult.failed("营业执照号码有误!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isBlank(record.getLegal_person_id_images()) || StrUtil.isBlank(record.getLegal_person_id_images2())) {
|
if (StrUtil.isBlank(record.getLegal_person_id_number())
|
||||||
return CommonResult.failed("法人身份证信息!");
|
|| StrUtil.isBlank(record.getLegal_person_name())
|
||||||
|
|| StrUtil.isBlank(record.getLegal_person_id_addr())
|
||||||
|
|| StrUtil.isBlank(record.getLegal_person_id_period_begin())
|
||||||
|
|| StrUtil.isBlank(record.getLegal_person_id_period_end())
|
||||||
|
|| StrUtil.isBlank(record.getLegal_person_id_images())
|
||||||
|
|| StrUtil.isBlank(record.getLegal_person_id_images2())) {
|
||||||
|
return CommonResult.failed("缺少法人身份证信息!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(record.getLegal_person_id_number()) && !StringUtils.validateIDCard(record.getLegal_person_id_number())) {
|
if (!StringUtils.validateIDCard(record.getLegal_person_id_number())) {
|
||||||
return CommonResult.failed("法人身份证号码有误!");
|
return CommonResult.failed("法人身份证号码有误!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(record.getLegal_person_mobile()) && !PhoneNumberUtils.checkPhoneNumber(record.getLegal_person_mobile())) {
|
if (!PhoneNumberUtils.checkPhoneNumber(record.getLegal_person_mobile())) {
|
||||||
return CommonResult.failed("法人手机号码有误!");
|
return CommonResult.failed("法人手机号码有误!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StrUtil.contains(record.getLegal_person_id_period_end(), "长期")) {
|
||||||
|
record.setLegal_person_id_period_end("9999-12-31");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查银行账号
|
// 检查银行账号
|
||||||
|
|||||||
@ -169,6 +169,7 @@ lakala:
|
|||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
user_no: 29153396
|
user_no: 29153396
|
||||||
ratio: 70.00
|
ratio: 70.00
|
||||||
|
wx_fee: 0.6 # 微信手续费 6/1000
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
|||||||
@ -171,6 +171,7 @@ lakala:
|
|||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
user_no: 29153396
|
user_no: 29153396
|
||||||
split_lowest_ratio: 70.00
|
split_lowest_ratio: 70.00
|
||||||
|
wx_fee: 0.6 # 微信手续费 6/1000
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
|||||||
@ -198,6 +198,7 @@ lakala:
|
|||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
user_no: 29153396
|
user_no: 29153396
|
||||||
split_lowest_ratio: 70.00
|
split_lowest_ratio: 70.00
|
||||||
|
wx_fee: 0.6 # 微信手续费 6/1000
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
|||||||
@ -173,6 +173,7 @@ lakala:
|
|||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
user_no: 29153396
|
user_no: 29153396
|
||||||
ratio: 70.00
|
ratio: 70.00
|
||||||
|
wx_fee: 0.6 # 微信手续费 6/1000
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
|||||||
@ -173,6 +173,7 @@ lakala:
|
|||||||
client_secret: XPa1HB5d55Ig0qV8
|
client_secret: XPa1HB5d55Ig0qV8
|
||||||
user_no: 29153396
|
user_no: 29153396
|
||||||
ratio: 70.00
|
ratio: 70.00
|
||||||
|
wx_fee: 0.6 # 微信手续费 6/1000
|
||||||
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
api_pub_key_path: payKey/lakala/dev/tk_api_public_key.txt
|
||||||
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
api_pri_key_path: payKey/lakala/dev/tk_api_private_key.txt
|
||||||
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
notify_pub_key_path: payKey/lakala/dev/tk_notify_public_key.txt
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user