master
yuan 7 years ago
parent 54f7f8ee9c
commit 00655632b4

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

Loading…
Cancel
Save