|
|
|
@ -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()); |
|
|
|
|