|
|
|
@ -12,9 +12,8 @@ import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
|
|
import com.palnet.biz.api.acnt.crtfyhp.model.AcntCrtfyhpRsModel; |
|
|
|
|
import com.palnet.biz.api.acnt.crtfyhp.service.AcntCrtfyhpService; |
|
|
|
|
import com.palnet.biz.api.acnt.cstmr.controller.AcntCstmrController; |
|
|
|
|
import com.palnet.biz.api.acnt.cstmr.service.AcntCstmrService; |
|
|
|
|
import com.palnet.biz.api.comn.response.BasicResponse; |
|
|
|
|
import com.palnet.biz.api.comn.response.ErrorResponse; |
|
|
|
|
import com.palnet.biz.api.comn.response.SuccessResponse; |
|
|
|
@ -107,22 +106,48 @@ public class AcntCrtfyhpController {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//아이디 찾기 시 인증번호 발송 로직
|
|
|
|
|
@GetMapping(value = "/find/sendForId") |
|
|
|
|
public boolean certifNum(String memberName, String hpno) throws Exception{ |
|
|
|
|
boolean result = service.certifNum(memberName, hpno); |
|
|
|
|
public ResponseEntity<? extends BasicResponse> sendForId(String memberName, String hpno) { |
|
|
|
|
Map<String , Boolean> resultMap = new HashMap<String,Boolean>(); |
|
|
|
|
|
|
|
|
|
log.info("result>>>>>>>>>>>>>>>>>>>>>>>> {}",result); |
|
|
|
|
if(memberName == null || hpno == null) { |
|
|
|
|
return ResponseEntity.status(HttpStatus.OK) |
|
|
|
|
.body(new ErrorResponse(RSErrorCode.ER_PARAM)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
try { |
|
|
|
|
boolean result = service.certifNum(memberName, hpno); |
|
|
|
|
resultMap.put("result" , result); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("IGNORE : {}", e); |
|
|
|
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) |
|
|
|
|
.body(new ErrorResponse("Server Error", "-1")); |
|
|
|
|
} |
|
|
|
|
return ResponseEntity.ok().body(new SuccessResponse<Map>(resultMap)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//아이디 찾기
|
|
|
|
|
@GetMapping(value = "/find/findUserId") |
|
|
|
|
public String findUserId(String memberName, String hpno) throws Exception{ |
|
|
|
|
String result = service.findUserId(memberName,hpno); |
|
|
|
|
public ResponseEntity<? extends BasicResponse> findUserId(String memberName, String hpno) { |
|
|
|
|
AcntCrtfyhpRsModel model = new AcntCrtfyhpRsModel(); |
|
|
|
|
|
|
|
|
|
log.info("result>>>>>>>>>>>>>>>>>>>>>>>> {}",result); |
|
|
|
|
if(memberName == null || hpno == null) { |
|
|
|
|
return ResponseEntity.status(HttpStatus.OK) |
|
|
|
|
.body(new ErrorResponse(RSErrorCode.ER_PARAM)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
try { |
|
|
|
|
model.setUserId(service.findUserId(memberName, hpno)); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("IGNORE : {}", e); |
|
|
|
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) |
|
|
|
|
.body(new ErrorResponse("Server Error", "-1")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok().body( new SuccessResponse<>(model)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/find/sendForPw") |
|
|
|
|
public boolean certifNumPw(String userId, String hpno) throws Exception{ |
|
|
|
|
boolean result = service.certifPw(userId, hpno); |
|
|
|
|