From 00655632b4efcaa364bc4210732a37d013ac00e9 Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Thu, 24 May 2018 18:15:10 +0800 Subject: [PATCH] fix~ --- .../core/impls/SimpleClientApplyServiceImpl.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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); }