master
wangning 7 years ago
parent 914525f150
commit 6b83b79512

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.application.core.impls; 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.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.mappers.preapply.SysClientPreMapperMapper; import au.com.royalpay.payment.manage.mappers.preapply.SysClientPreMapperMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper; import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
@ -89,6 +90,8 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
@Resource @Resource
private ClientConfigMapper clientConfigMapper; private ClientConfigMapper clientConfigMapper;
@Resource
private PmtSubMerchantIdMapper pmtSubMerchantIdMapper;
@Resource @Resource
private StringRedisTemplate stringRedisTemplate; private StringRedisTemplate stringRedisTemplate;
@ -239,6 +242,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
private void applyerToClient(String username){ private void applyerToClient(String username){
JSONObject apply = sysClientPreMapperMapper.findByUserName(username); JSONObject apply = sysClientPreMapperMapper.findByUserName(username);
JSONObject subMerchantId = pmtSubMerchantIdMapper.randomOne();
String clientMoniker = generateClientMoniker(); String clientMoniker = generateClientMoniker();
JSONObject sysClient = new JSONObject(); JSONObject sysClient = new JSONObject();
sysClient.put("company_name",apply.getString("company_name")); sysClient.put("company_name",apply.getString("company_name"));
@ -256,7 +260,11 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
sysClient.put("client_moniker",clientMoniker); sysClient.put("client_moniker",clientMoniker);
sysClient.put("create_time",new Date()); sysClient.put("create_time",new Date());
sysClient.put("source",4); sysClient.put("source",4);
sysClient.put("approve_result",2);
sysClient.put("creator",0); 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); clientMapper.save(sysClient);
int clientId = sysClient.getIntValue("client_id"); int clientId = sysClient.getIntValue("client_id");
@ -294,6 +302,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
sysConfig.put("client_id",clientId); sysConfig.put("client_id",clientId);
sysConfig.put("client_moniker",clientMoniker); sysConfig.put("client_moniker",clientMoniker);
sysConfig.put("clean_days",apply.getIntValue("clean_days")); sysConfig.put("clean_days",apply.getIntValue("clean_days"));
sysConfig.put("common_sub_merchant_id",1);
clientConfigMapper.save(sysConfig); clientConfigMapper.save(sysConfig);
JSONObject sysRate = new JSONObject(); JSONObject sysRate = new JSONObject();

Loading…
Cancel
Save