master
yuan 6 years ago
parent f461b3bfc4
commit 6058479d25

@ -5,11 +5,7 @@ import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService; import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.management.sysconfig.core.PermissionPartnerManager; import au.com.royalpay.payment.manage.management.sysconfig.core.PermissionPartnerManager;
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.*;
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean; import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.notice.core.MailService; import au.com.royalpay.payment.manage.notice.core.MailService;
@ -89,6 +85,12 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
private ClientRateMapper clientRateMapper; private ClientRateMapper clientRateMapper;
@Resource @Resource
private ClientConfigMapper clientConfigMapper; private ClientConfigMapper clientConfigMapper;
@Resource
private ManagerMapper managerMapper;
@Resource
private ClientBDMapper clientBDMapper;
private ThreadPoolExecutor pool = new ThreadPoolExecutor(1, 10, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); private ThreadPoolExecutor pool = new ThreadPoolExecutor(1, 10, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
@Resource @Resource
@ -290,7 +292,13 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
throw new ForbiddenException("The user name has been registered"); throw new ForbiddenException("The user name has been registered");
} }
String clientMoniker = generateClientMoniker(); String clientMoniker = generateClientMoniker();
JSONObject sysClient = new JSONObject(); JSONObject sysClient = new JSONObject();
JSONObject followBd = managerMapper.findByLoginId("customerservice");
sysClient.put("bd_user", followBd.getString("manager_id"));
sysClient.put("bd_user_name", followBd.getString("display_name"));
sysClient.put("company_name", apply.getString("company_name")); sysClient.put("company_name", apply.getString("company_name"));
sysClient.put("abn", apply.getString("abn")); sysClient.put("abn", apply.getString("abn"));
sysClient.put("short_name", apply.getString("short_name")); sysClient.put("short_name", apply.getString("short_name"));
@ -322,6 +330,16 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
sysClient.put("ali_sub_merchant_id", clientMoniker); sysClient.put("ali_sub_merchant_id", clientMoniker);
clientMapper.save(sysClient); clientMapper.save(sysClient);
JSONObject client_bd = new JSONObject();
client_bd.put("client_id", sysClient.getIntValue("client_id"));
client_bd.put("bd_id", followBd.getString("manager_id"));
client_bd.put("bd_name", followBd.getString("display_name"));
client_bd.put("create_time", new Date());
client_bd.put("create_id","0");
client_bd.put("start_date", new Date());
client_bd.put("proportion", 1);
clientBDMapper.saveBD(client_bd);
int clientId = sysClient.getIntValue("client_id"); int clientId = sysClient.getIntValue("client_id");
JSONObject sysAccount = new JSONObject(); JSONObject sysAccount = new JSONObject();

Loading…
Cancel
Save