|
|
|
@ -52,10 +52,10 @@ public class HighTySalesmanServiceImpl implements HighTySalesmanService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void addSalesman(HighTySalesman tySalesman) { |
|
|
|
|
try { |
|
|
|
|
if (secUserService.findByPhone(tySalesman.getSalesmanPhone()) != null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "手机号已存在,请更换"); |
|
|
|
|
@Transactional(propagation= Propagation.REQUIRES_NEW) |
|
|
|
|
public void addSalesman(HighTySalesman tySalesman) throws Exception { |
|
|
|
|
if (secUserService.findByLoginName(tySalesman.getSalesmanPhone()) != null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "在系统中此联系电话已存在,请更换"); |
|
|
|
|
} |
|
|
|
|
editTySalesman(tySalesman); |
|
|
|
|
|
|
|
|
@ -71,12 +71,10 @@ public class HighTySalesmanServiceImpl implements HighTySalesmanService { |
|
|
|
|
secUser.setCreateTime(new Date()); |
|
|
|
|
secUser.setUpdateTime(new Date()); |
|
|
|
|
secUserService.addUser(secUser); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Transactional(propagation= Propagation.REQUIRES_NEW) |
|
|
|
|
public void updateSalesman(HighTySalesman tySalesman) { |
|
|
|
|
// 查询账户
|
|
|
|
|
SecUser account = secUserService.getMainAccount(UserObjectTypeEnum.type7.getType(), tySalesman.getId()); |
|
|
|
|