From 6b83b79512a94b3dee6d98e58d4539efaf9c20bb Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Fri, 25 May 2018 15:16:56 +0800 Subject: [PATCH] update --- .../core/impls/SimpleClientApplyServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java index ef723559b..47364677c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java @@ -1,5 +1,6 @@ package au.com.royalpay.payment.manage.application.core.impls; +import au.com.royalpay.payment.core.mappers.PmtSubMerchantIdMapper; import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService; import au.com.royalpay.payment.manage.mappers.preapply.SysClientPreMapperMapper; import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper; @@ -89,6 +90,8 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { @Resource private ClientConfigMapper clientConfigMapper; + @Resource + private PmtSubMerchantIdMapper pmtSubMerchantIdMapper; @Resource private StringRedisTemplate stringRedisTemplate; @@ -239,6 +242,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { private void applyerToClient(String username){ JSONObject apply = sysClientPreMapperMapper.findByUserName(username); + JSONObject subMerchantId = pmtSubMerchantIdMapper.randomOne(); String clientMoniker = generateClientMoniker(); JSONObject sysClient = new JSONObject(); sysClient.put("company_name",apply.getString("company_name")); @@ -256,7 +260,11 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { sysClient.put("client_moniker",clientMoniker); sysClient.put("create_time",new Date()); sysClient.put("source",4); + sysClient.put("approve_result",2); sysClient.put("creator",0); + sysClient.put("merchant_id",subMerchantId.getString("merchant_id")); + sysClient.put("sub_merchant_id",subMerchantId.getString("sub_merchant_id")); + sysClient.put("common_sub_merchant_id",1); clientMapper.save(sysClient); int clientId = sysClient.getIntValue("client_id"); @@ -294,6 +302,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { sysConfig.put("client_id",clientId); sysConfig.put("client_moniker",clientMoniker); sysConfig.put("clean_days",apply.getIntValue("clean_days")); + sysConfig.put("common_sub_merchant_id",1); clientConfigMapper.save(sysConfig); JSONObject sysRate = new JSONObject();