|
|
|
@ -252,4 +252,44 @@ public class AcntCstmrService {
|
|
|
|
|
|
|
|
|
|
return updateUserEntity; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public AcntCstmrRsModel update(AcntCstmrRqModel rq) { |
|
|
|
|
|
|
|
|
|
AcntCstmrRsModel rs = new AcntCstmrRsModel(); |
|
|
|
|
boolean isUserEmailFind = false; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
//사전 체크. 동일한 E-mail 존재 여부 확인
|
|
|
|
|
isUserEmailFind = query.findCstmrByUserEmail(rq.getEmail()); |
|
|
|
|
if(isUserEmailFind) { |
|
|
|
|
rs.setErrCode(-2); |
|
|
|
|
return rs; |
|
|
|
|
} |
|
|
|
|
rq.setHpno(rq.getHpno().replaceAll("-", "")); |
|
|
|
|
rq.setHpno(EncryptUtils.encrypt(rq.getHpno())); |
|
|
|
|
rq.setEmail(EncryptUtils.encrypt(rq.getEmail())); |
|
|
|
|
|
|
|
|
|
this.savePtyCstmrEmailhpno(rq); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("IGNORE : {}", e); |
|
|
|
|
rs.setErrCode(-2); //수정 필요..
|
|
|
|
|
return rs; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return rs; |
|
|
|
|
} |
|
|
|
|
private PtyCstmrDtl savePtyCstmrEmailhpno(AcntCstmrRqModel rq) throws Exception{ |
|
|
|
|
PtyCstmrDtl dtlEntity = new PtyCstmrDtl(); |
|
|
|
|
|
|
|
|
|
dtlEntity.setEmail(rq.getEmail()); |
|
|
|
|
dtlEntity.setHpno(rq.getHpno()); |
|
|
|
|
dtlEntity.setClncd(rq.getClncd()); |
|
|
|
|
dtlEntity.setUpdateDt(DateUtils.nowDate()); |
|
|
|
|
|
|
|
|
|
return ptyCstmrDtlRepository.save(dtlEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|