提交代码

yy_dev
胡锐 2 years ago
parent 9477333c41
commit b7b84c8fd4
  1. 25
      cweb/src/main/java/com/cweb/controller/TestController.java
  2. 59
      schedule/src/main/java/com/hfkj/schedule/Merchant.java
  3. 64
      service/src/main/java/com/hfkj/channel/saas/SaasActivityService.java
  4. 24
      service/src/main/resources/dev/commonConfig.properties

@ -172,7 +172,7 @@ public class TestController {
try {
// return ResponseMsgUtil.success(saasMerService.updateReview(reviewRelatedId));
return ResponseMsgUtil.success(saasMerService.updateFee(merId));
return ResponseMsgUtil.success(saasMerService.merchantInfo(""));
} catch (Exception e) {
log.error(e.getMessage(), e);
@ -313,8 +313,27 @@ public class TestController {
*/
// return ResponseMsgUtil.success(saasActivityService.agentRegisterActivity("73"));
// return ResponseMsgUtil.success(saasActivityService.queryAgentActivityList());
return ResponseMsgUtil.success(saasActivityService.queryCustomerActivityStatus("73", "8226900445800HB"));
return ResponseMsgUtil.success(saasActivityService.queryAgentActivityList());
// return ResponseMsgUtil.success(saasActivityService.queryCustomerActivityStatus("73", "8226900445800HB"));
/******* 配置活动费率 *******/
/* String activityId = "73";
String externalCustomerNo = "8226900445800HB";
JSONArray jsonArray = saasActivityService.queryCustomerRates(activityId, externalCustomerNo);
return ResponseMsgUtil.success(jsonArray);*/
/* Map<String, Object> rate;
List<Map<String,Object>> rates = new ArrayList<>();
for (Object obj : jsonArray) {
JSONObject jsonObject = (JSONObject) obj;
rate = new HashMap<>();
rate.put("welfareRatesId", jsonObject.getLong("welfareRatesId"));
rate.put("discountedRates", "0.0025");
rates.add(rate);
}
return ResponseMsgUtil.success(saasActivityService.customerRatesUpdate(activityId,externalCustomerNo, rates));*/
} catch (Exception e) {
log.error(e.getMessage(), e);

@ -281,7 +281,7 @@ public class Merchant {
public void lklSettleAcctApply() {
Map<String, Object> param = new HashMap<>();
param.put("applyNoIsNotNull", true);
param.put("status", MerSettleAcctApplyStatus.status2.getNumber());
param.put("status", MerSettleAcctApplyStatus.status5.getNumber());
List<BsMerSettleAcctApply> applyList = merSettleAcctApplyService.getApplyList(param);
for (BsMerSettleAcctApply merSettleAcctApply : applyList) {
try {
@ -294,36 +294,37 @@ public class Merchant {
settle.setStatus(0);
merSettleAcctService.editMerSettleAcct(settle);
settle = new BsMerSettleAcct();
settle.setMerId(settle.getMerId());
settle.setSettleType(merSettleAcctApply.getSettleType());
settle.setBankCardImg(merSettleAcctApply.getBankCardImg());
settle.setBankName(merSettleAcctApply.getBankName());
settle.setBankCardNo(merSettleAcctApply.getBankCardNo());
settle.setBankCardHolder(merSettleAcctApply.getBankCardHolder());
settle.setOpenningBankCityCode(merSettleAcctApply.getOpenningBankCityCode());
settle.setOpenningBankCityName(merSettleAcctApply.getOpenningBankCityName());
settle.setOpenningBankAreaCode(merSettleAcctApply.getOpenningBankAreaCode());
settle.setOpenningBankAreaName(merSettleAcctApply.getOpenningBankAreaName());
settle.setOpenningBankProvinceCode(merSettleAcctApply.getOpenningBankProvinceCode());
settle.setOpenningBankProvinceName(merSettleAcctApply.getOpenningBankProvinceName());
settle.setOpenningBankCode(merSettleAcctApply.getOpenningBankCode());
settle.setOpenningBankName(merSettleAcctApply.getOpenningBankName());
settle.setOpenningBankLicenseUrl(merSettleAcctApply.getOpenningBankLicenseUrl());
settle.setClearingBankCode(merSettleAcctApply.getClearingBankCode());
settle.setSettleIdCardName(merSettleAcctApply.getSettleIdCardName());
settle.setSettleIdCardNo(merSettleAcctApply.getSettleIdCardNo());
settle.setSettleIdCardAddress(merSettleAcctApply.getSettleIdCardAddress());
settle.setSettleIdCardPortraitImg(merSettleAcctApply.getSettleIdCardPortraitImg());
settle.setSettleIdCardNationalEmblemImg(merSettleAcctApply.getSettleIdCardNationalEmblemImg());
settle.setSettleIdPeriodType(merSettleAcctApply.getSettleIdPeriodType());
settle.setSettleIdCardPeriodStart(merSettleAcctApply.getSettleIdCardPeriodStart());
settle.setSettleIdCardPeriodEnd(merSettleAcctApply.getSettleIdCardPeriodEnd());
merSettleAcctService.editMerSettleAcct(settle);
}
BsMerSettleAcct newSettle = new BsMerSettleAcct();
newSettle.setMerId(merSettleAcctApply.getMerId());
newSettle.setSettleType(merSettleAcctApply.getSettleType());
newSettle.setBankCardImg(merSettleAcctApply.getBankCardImg());
newSettle.setBankName(merSettleAcctApply.getBankName());
newSettle.setBankCardNo(merSettleAcctApply.getBankCardNo());
newSettle.setBankCardHolder(merSettleAcctApply.getBankCardHolder());
newSettle.setOpenningBankCityCode(merSettleAcctApply.getOpenningBankCityCode());
newSettle.setOpenningBankCityName(merSettleAcctApply.getOpenningBankCityName());
newSettle.setOpenningBankAreaCode(merSettleAcctApply.getOpenningBankAreaCode());
newSettle.setOpenningBankAreaName(merSettleAcctApply.getOpenningBankAreaName());
newSettle.setOpenningBankProvinceCode(merSettleAcctApply.getOpenningBankProvinceCode());
newSettle.setOpenningBankProvinceName(merSettleAcctApply.getOpenningBankProvinceName());
newSettle.setOpenningBankCode(merSettleAcctApply.getOpenningBankCode());
newSettle.setOpenningBankName(merSettleAcctApply.getOpenningBankName());
newSettle.setOpenningBankLicenseUrl(merSettleAcctApply.getOpenningBankLicenseUrl());
newSettle.setClearingBankCode(merSettleAcctApply.getClearingBankCode());
newSettle.setSettleIdCardName(merSettleAcctApply.getSettleIdCardName());
newSettle.setSettleIdCardNo(merSettleAcctApply.getSettleIdCardNo());
newSettle.setSettleIdCardAddress(merSettleAcctApply.getSettleIdCardAddress());
newSettle.setSettleIdCardPortraitImg(merSettleAcctApply.getSettleIdCardPortraitImg());
newSettle.setSettleIdCardNationalEmblemImg(merSettleAcctApply.getSettleIdCardNationalEmblemImg());
newSettle.setSettleIdPeriodType(merSettleAcctApply.getSettleIdPeriodType());
newSettle.setSettleIdCardPeriodStart(merSettleAcctApply.getSettleIdCardPeriodStart());
newSettle.setSettleIdCardPeriodEnd(merSettleAcctApply.getSettleIdCardPeriodEnd());
merSettleAcctService.editMerSettleAcct(newSettle);
merSettleAcctApply.setStatus(MerSettleAcctApplyStatus.status3.getNumber());
merSettleAcctApplyService.editData(merSettleAcctApply);

@ -169,4 +169,68 @@ public class SaasActivityService {
return responseObj;
}
/**
* 商户费率修改
* @param activityId
* @param externalCustomerNo
* @param rates
* @return
* @throws Exception
*/
public JSONObject customerRatesUpdate(String activityId, String externalCustomerNo, List<Map<String,Object>> rates) throws Exception {
Map<String,Object> param = new HashMap<>();
param.put("activityId", activityId);
param.put("externalCustomerNo", externalCustomerNo);
param.put("rates", rates);
Map<String,Object> header = new HashMap<>();
header.put("Authorization", "Bearer " + saasCommon.getToken());
JSONObject obj = new JSONObject();
obj.put("data", Base64.encodeBase64String(RSAUtil.encryptByPrivateKey(JSONObject.toJSONString(param).getBytes(), Base64.decodeBase64(RSAUtil.PRIVATE_KEY))));
JSONObject responseObj = HttpsUtils.doPost(SaasConfig.requestUrl + "htkmarketing/open/welfare/customer/rates/update", obj, header);
System.out.println("参数:" + JSONObject.toJSONString(param));
System.out.println("加密:" + obj.getString("data"));
System.out.println("request:" + obj.toJSONString());
System.out.println("response:" + responseObj.toJSONString());
if (responseObj == null || !responseObj.getString("code").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseObj.getString("message"));
}
return responseObj;
}
/**
* 查询商户费率
* @param activityId
* @param externalCustomerNo
* @return
* @throws Exception
*/
public JSONArray queryCustomerRates(String activityId, String externalCustomerNo) throws Exception {
Map<String,Object> param = new HashMap<>();
param.put("activityId", activityId);
param.put("externalCustomerNo", externalCustomerNo);
Map<String,Object> header = new HashMap<>();
header.put("Authorization", "Bearer " + saasCommon.getToken());
JSONObject obj = new JSONObject();
obj.put("data", Base64.encodeBase64String(RSAUtil.encryptByPrivateKey(JSONObject.toJSONString(param).getBytes(), Base64.decodeBase64(RSAUtil.PRIVATE_KEY))));
JSONObject responseObj = HttpsUtils.doPost(SaasConfig.requestUrl + "htkmarketing/open/welfare/customer/rates/query", obj, header);
System.out.println("参数:" + JSONObject.toJSONString(param));
System.out.println("加密:" + obj.getString("data"));
System.out.println("request:" + obj.toJSONString());
System.out.println("response:" + responseObj.toJSONString());
if (responseObj == null || !responseObj.getString("code").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseObj.getString("message"));
}
JSONArray responseData = JSONArray.parseArray(new String(RSAUtil.decryptByPublicKey(Base64.decodeBase64(responseObj.getString("data")), Base64.decodeBase64(RSAUtil.PUBLIC_KEY))));
System.out.println("responseData:" + responseData);
return responseData;
}
}

@ -33,18 +33,18 @@ lkl_saas_request_mer_url=https://test.wsmsd.cn/sit/htkmerchants/
lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp5aV3ZiXG2R8Yd8Nxocv+cF7VAUHBc0TF4MNne7mI8wM2yEP2QgI+rK1qDf6G7ZFPhutpIHKQchpolbSuC0vgaHpSjO9OUs1fpnK/JjZq9o8DatUsA0n4Fccec9NBbV5dy5yrwro7xmDpsevp1/IeiIssi1+iD+nBWqqVFx7GVQIDAQAB
lkl_saas_private_key="MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKnlpXdmJcbZHxh3w3Ghy/5wXtUBQcFzRMXgw2d7uYjzAzbIQ/ZCAj6srWoN/obtkU+G62kgcpByGmiVtK4LS+BoelKM705SzV+mcr8mNmr2jwNq1SwDSfgVxx5z00FtXl3LnKvCujvGYOmx6+nX8h6IiyyLX6IP6cFaqpUXHsZVAgMBAAECgYA4NpeM7etJ48T6H4Y3LsWEJkH6UDQlgbIblsaQkstMmLtTgOebrzN28UNfd8njcu9FVOrHGclOKbK7L+1cOLiduWsZKc/c/gAy9wAR4EhoLvlerH9EEPiPWFxdEDbMxPqlkpqLOo+PxHrhTn4vU4CaPdJtL2ujKn7nmsUdUDWo8QJBANS1TlM6nhPt2XlzN5kGfsJ4kBYNjuLXNA2YdNuC2ttYvEXHJ9T70FN/GnRBBIZu47uHH3Ie5nfep+qMk6a8RP8CQQDMecIyI0z1kVt+tOfWKw2ZFLsi74708qTaeR4W1ABtkngj1+bxoWWXr3KqhjqJkWxnhioSfXqu7CScNzjdM1CrAkAQd+ESjI1EmbumrYb2cAxMXi05p98SLPs4uj8B58WuCda5yEuLL9vXOxX/PjFtfxRepn2GxmGtki2J+UxNMnJdAkAFoORjlO0tZU7rcfdfwdeh+xwbnhSFUZiQGv1lC3jnizybX/oPdK3jOwUhBIjf+IzPXLYTxDh4UC/BzRNXo235AkEAhgYBk6H7RU2iIuvwz1c6CtE1gJ8DvEp1F0KOMWMFB0KCpDXUToix0dlMz962FozYENi4X4zYQo6nFwlXeS3Pfw==
#lkl_saas_client_id=huifu
#lkl_saas_client_secret=f65VVjqJfLtc177F
#lkl_saas_activity_id=12
#lkl_saas_user_no=22206482
#lkl_saas_request_url=https://tkapi.lakala.com/
#lkl_saas_request_mer_registration_token_url=https://tkapi.lakala.com/auth/oauth/token
#lkl_saas_request_mer_registration_url=https://htkactvi.lakala.com/registration/merchant/
#lkl_saas_request_mer_update_url=https://htkapi.lakala.com/api/
#lkl_saas_request_mer_registration_common_url=https://htkactvi.lakala.com/registration/
#lkl_saas_request_mer_url=https://tkapi.lakala.com/htkmerchants/
#lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAUkzRA+4GOS5OzYqxD/UJwM6p9to1dPvetL/7RbMa93o46qToPlPtaW61EvblOldHcBEHo7AGXXKmIYr7t2Up1PZC0g7UMpno/b5WkT6ieJ601Xreuj8hhyf2/xoej5vpi4/+lAr9YF+5GcyaVf4gfzTNJrmKj9PfvX5B3rUH2QIDAQAB
#lkl_saas_private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMBSTNED7gY5Lk7NirEP9QnAzqn22jV0+960v/tFsxr3ejjqpOg+U+1pbrUS9uU6V0dwEQejsAZdcqYhivu3ZSnU9kLSDtQymej9vlaRPqJ4nrTVet66PyGHJ/b/Gh6Pm+mLj/6UCv1gX7kZzJpV/iB/NM0muYqP09+9fkHetQfZAgMBAAECgYB42D3kaC+8QVnTsluffoNeKYSyT6Y1SNiqy7CGVvl/zFlEQkx0khVybHlf1hbFWq9U+Bn7TuNgXH+Z3CHUoRwy4Ap/kMx637iRatoC8F/kcPaiB7JFQfdrxhgK858dSyHCQ2OXXQDJgJdth+oF9FylVsrDu5Sw3ha4OuzrmufuwQJBAPnPPSeFr1wu7kH6I+A5E49fMbAm7EU+3TYVzxNH1lr3X/LWuK9pi/LVPrSR4eNgAypyQWREIqdpBIiJ9bOnwa0CQQDFFl0zTQTVTWf5r/hwgCUMo4gHr2y/q7XMNe6n5fh4SQuQ+o4gW+BGHzDrT97G5hFGPL+w5niGuEBHWSo5/9xdAkEAnrxdM7vzDjSUGUCFg3lBQJ1QyYoyIF4t2qxJBQtk3jDKu1hNysjasNdoHP2F+CGOYW5wtvHEw3Qr+UcQ5bP3kQJABPAcga6KUnXQBxd7mAX956UpQVgJ13uL4IPxaM+APDNIUOeWLAVhRyB870hfAoi9Ig9fliUQG//9zEvVnQJmGQJBAOb8Z0mGMEbEeAyEKjqoNiQkkIcoBdmPKNFUoUJ6ohcBNOoMfklvNsf2+BPfuhs26tvhYDBRgCAfOVhqTQcGj6I=
# kl_saas_client_id=huifu
# kl_saas_client_secret=f65VVjqJfLtc177F
# kl_saas_activity_id=12
# kl_saas_user_no=22206482
# kl_saas_request_url=https://tkapi.lakala.com/
# kl_saas_request_mer_registration_token_url=https://tkapi.lakala.com/auth/oauth/token
# kl_saas_request_mer_registration_url=https://htkactvi.lakala.com/registration/merchant/
# kl_saas_request_mer_update_url=https://htkapi.lakala.com/api/
# kl_saas_request_mer_registration_common_url=https://htkactvi.lakala.com/registration/
# kl_saas_request_mer_url=https://tkapi.lakala.com/htkmerchants/
# kl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAUkzRA+4GOS5OzYqxD/UJwM6p9to1dPvetL/7RbMa93o46qToPlPtaW61EvblOldHcBEHo7AGXXKmIYr7t2Up1PZC0g7UMpno/b5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