master
yuan 7 years ago
parent 54f7f8ee9c
commit 00655632b4

@ -212,13 +212,12 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
@Transactional @Transactional
public void updateApplyInfo(ClientPreApplyBean companyBean, String username) { public void updateApplyInfo(ClientPreApplyBean companyBean, String username) {
JSONObject apply = sysClientPreMapperMapper.findByUserName(username); JSONObject apply = sysClientPreMapperMapper.findByUserName(username);
if (apply == null ){ if (apply != null ){
throw new BadRequestException(); throw new BadRequestException("用户名已重复!");
} }
JSONObject applyInfo = companyBean.insertObject(); JSONObject applyInfo = companyBean.insertObject();
applyInfo.put("client_pre_apply_id",apply.getIntValue("client_pre_apply_id")); applyInfo.put("create_time",new Date());
applyInfo.put("update_time",new Date()); sysClientPreMapperMapper.save(applyInfo);
sysClientPreMapperMapper.update(applyInfo);
if(applyInfo.getBoolean("agree")){ if(applyInfo.getBoolean("agree")){
applyerToClient(username); applyerToClient(username);
} }

Loading…
Cancel
Save