diff --git a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java index 4a566fc52..2c6b57b4e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java @@ -212,13 +212,12 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { @Transactional public void updateApplyInfo(ClientPreApplyBean companyBean, String username) { JSONObject apply = sysClientPreMapperMapper.findByUserName(username); - if (apply == null ){ - throw new BadRequestException(); + if (apply != null ){ + throw new BadRequestException("用户名已重复!"); } JSONObject applyInfo = companyBean.insertObject(); - applyInfo.put("client_pre_apply_id",apply.getIntValue("client_pre_apply_id")); - applyInfo.put("update_time",new Date()); - sysClientPreMapperMapper.update(applyInfo); + applyInfo.put("create_time",new Date()); + sysClientPreMapperMapper.save(applyInfo); if(applyInfo.getBoolean("agree")){ applyerToClient(username); }