提交代码

master
胡锐 5 months ago
parent 2a52f6da86
commit 83b0537dfa
  1. 12
      service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantServiceImpl.java

@ -67,6 +67,12 @@ public class BsMerchantServiceImpl implements BsMerchantService {
@Transactional(propagation= Propagation.REQUIRES_NEW,rollbackFor= {RuntimeException.class})
public void createMerchant(BsMerchant merchant) throws Exception {
editData(merchant);
merchant.setMerNo(""+(10000 + merchant.getId()));
editData(merchant);
if (secUserService.getDetailByLoginName(merchant.getContactsTel()) != null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "手机号已存在,请更换");
}
// 自建站
if (merchant.getSourceType().equals(MerchantSourceTypeEnum.type1.getNumber())) {
@ -78,12 +84,6 @@ public class BsMerchantServiceImpl implements BsMerchantService {
merchantAccountService.editData(account);
}
merchant.setMerNo(""+(10000 + merchant.getId()));
editData(merchant);
if (secUserService.getDetailByLoginName(merchant.getContactsTel()) != null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "手机号已存在,请更换");
}
SecUser secUser = new SecUser();
secUser.setUserName(merchant.getMerName());
secUser.setLoginName(merchant.getContactsTel());

Loading…
Cancel
Save