@RequestMapping(method=RequestMethod.POST, value= {"/LMSServer/getNoOfDaysOfApplicationBycellNo"} )
@PreAuthorize("hasAuthority('CUSTOMER_MANAGEMENT_R') OR hasAuthority('CUSTOMER_MANAGEMENT_RW')")
public BasicResponce getNoOfDaysOfApplicationBycellNo(@RequestParam(value = "cellNo") long cellNo)
{
if(LOG.isInfoEnabled()){
LOG.info("WebClientRestContoller.getNoOfDaysOfApplicationBycellNo--Start");
LOG.info("Cell NO: "+cellNo);
}
BasicResponce authResp = null;
try {
Customer fromDB= (Customer) objLMSDAO.getDetailsByCellno(cellNo);
DaysOfApplicationResponseDTO toSend= new DaysOfApplicationResponseDTO();
toSend.setCreatedAt(fromDB.getCreatedAt()+"");
toSend.setUpdatedAt(fromDB.getUpdatedAt()+"");
toSend.setRequested_Action(true);
authResp=toSend;
} catch (Exception e) {
e.printStackTrace();
}
if(LOG.isInfoEnabled()){
LOG.info("Returned Response is:");
LOG.info("Response Requested_Action: {} ",new Object[]{authResp.getRequested_Action()});
LOG.info("WebClientRestContoller.getNoOfDaysOfApplicationBycellNo--End");
}
return authResp;
}
Выше мой основной код. Я хочу напечатать разницу дней (количество дней между createdAt
и updatedAt
). Где мне написать этот лог c? Я помню, что в java мы использовали System.out.println
для отображения вывода, но здесь я не знаю, чтобы отобразить код на Почтальоне.
Ниже мой DTO:
public class DaysOfApplicationResponseDTO extends BasicResponce{
private String createdAt;
private String updatedAt;
private String days;
public String getDays() {
return days;
}
public void setDays(String days) {
this.days = days;
}
private List<CustomerLoanSummaryResponseDTO> LoanApplicationDummyResponseList;
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt;
}
public List<CustomerLoanSummaryResponseDTO> getLoanApplicationDummyResponseList() {
return LoanApplicationDummyResponseList;
}
public void setLoanApplicationDummyResponseList(
List<CustomerLoanSummaryResponseDTO> loanApplicationDummyResponseList) {
LoanApplicationDummyResponseList = loanApplicationDummyResponseList;
}
public DaysOfApplicationResponseDTO() {
super();
}
public DaysOfApplicationResponseDTO(String createdAt, String UpdatedAt, String days,
List<CustomerLoanSummaryResponseDTO> loanApplicationDummyResponseList) {
super();
this.createdAt = createdAt;
this.updatedAt = updatedAt;
this.days = days;
this.LoanApplicationDummyResponseList = loanApplicationDummyResponseList;
}
}