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