|
|
|
@ -66,22 +66,12 @@ public class HighMerStoreAmountController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (body.getLong("storeId") == null |
|
|
|
|
|| body.getBigDecimal("amount") == null |
|
|
|
|
|| StringUtils.isBlank(body.getString("twoPwd"))) { |
|
|
|
|
|| body.getBigDecimal("amount") == null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
|
} |
|
|
|
|
if (body.getBigDecimal("amount").compareTo(new BigDecimal("0")) == -1) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "充值金额不能小于0"); |
|
|
|
|
} |
|
|
|
|
// 查询二级密码
|
|
|
|
|
HighCompanyTwoPwd pwdByOrg = companyTwoPwdService.getTwoPwdByOrg(userInfoModel.getBsOrganization().getId()); |
|
|
|
|
if (pwdByOrg == null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_TOW_PWD, ""); |
|
|
|
|
} |
|
|
|
|
if (!AESEncodeUtil.aesEncrypt(body.getString("twoPwd")).equals(pwdByOrg.getPassword())) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付密码错误"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("sourceType", MerStoreAmountSourceTypeEnum.type1.getType()); |
|
|
|
|
map.put("sourceContent", "充值额度:" + body.getBigDecimal("amount") + " 元"); |
|
|
|
|