TC 기능 수정 / 디자인 수정 변경

This commit is contained in:
kimre
2022-07-15 14:21:03 +09:00
parent a4e5cde9f6
commit 34e7957081
91 changed files with 9087 additions and 8673 deletions

View File

@@ -2,17 +2,18 @@ package kr.co.uplus.ez.api.attractMgt;
import kr.co.uplus.ez.api.attractMgt.dto.*;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage;
import kr.co.uplus.ez.common.data.Const;
import kr.co.uplus.ez.common.data.Paging;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service;
import org.thymeleaf.util.StringUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class AttractMgtService {
@@ -30,12 +31,22 @@ public class AttractMgtService {
* auth : ckr
* desc : 유치채널 목록조회
* @param channelListReqDto
* @return
* @return
*/
@SuppressWarnings("rawtypes")
public ChannelListResDto channelList(ChannelListReqDto channelListReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
String nowPage = String.valueOf(channelListReqDto.getPage());
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal;
String attrctorId = userDetails.getUsername();
ArrayList auth = (ArrayList) userDetails.getAuthorities();
if(StringUtils.equals(Const.AUTH_CD_AGENCY, auth.get(0).toString())){
channelListReqDto.setAttrctorId(attrctorId);
}
int totalCnt = attractMgtMapper.selectAttractListTotalCnt(channelListReqDto);
if (totalCnt == 0) {
@@ -74,7 +85,7 @@ public class AttractMgtService {
* auth : ckr
* desc : 유치채널 목록 엑셀 다운로드
* @param channelListExcelReqDto
* @return
* @return
*/
public ChannelListExcelResDto channelListExcel(ChannelListExcelReqDto channelListExcelReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
@@ -90,7 +101,7 @@ public class AttractMgtService {
* auth : ckr
* desc : 유치 채널 상세 조회
* @param channelDetailReqDto
* @return
* @return
*/
public ChannelDetailResDto channelDetail(ChannelDetailReqDto channelDetailReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
@@ -107,7 +118,7 @@ public class AttractMgtService {
* auth : ckr
* desc : 발송건수 엑셀 다운로드
* @param channelListExcelReqDto
* @return
* @return
*/
public ChannelDetailResDto sendNumberListExcel(ChannelDetailReqDto channelDetailReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
@@ -115,8 +126,8 @@ public class AttractMgtService {
ChannelDetailRes channelDetailRes = new ChannelDetailRes();
List<ChannelDetail> channelDetails = attractMgtMapper.sendNumberListExcel(channelDetailReqDto);
channelDetailRes.setList(channelDetails);
return new ChannelDetailResDto(ApiResponseCode.SUCCESS, channelDetailRes);
}

View File

@@ -9,27 +9,27 @@ import java.io.Serializable;
@Data
public class ChannelDetail implements Serializable {
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
@ApiModelProperty(example = "20220101", name = "날짜", dataType = "String")
private String sumYm;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "전체발송건수", dataType = "String")
private String sndCnt;
@ApiModelProperty(example = "전체 성공건수", name = "전체 성공건수", dataType = "String")
@ApiModelProperty(example = "99", name = "전체 성공건수", dataType = "String")
private String succCnt;
@ApiModelProperty(example = "SMS발송건수", name = "SMS발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "SMS발송건수", dataType = "String")
private String sndCntS;
@ApiModelProperty(example = "SMS 성공건수", name = "SMS 성공건수", dataType = "String")
@ApiModelProperty(example = "10", name = "SMS 성공건수", dataType = "String")
private String succCntS;
@ApiModelProperty(example = "LMS발송건수", name = "LMS발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "LMS발송건수", dataType = "String")
private String sndCntL;
@ApiModelProperty(example = "LMS 성공건수", name = "LMS 성공건수", dataType = "String")
@ApiModelProperty(example = "10", name = "LMS 성공건수", dataType = "String")
private String succCntL;
@ApiModelProperty(example = "MMS발송건수", name = "MMS발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "MMS발송건수", dataType = "String")
private String sndCntM;
@ApiModelProperty(example = "MMS 성공건수", name = "MMS 성공건수", dataType = "String")
@ApiModelProperty(example = "10", name = "MMS 성공건수", dataType = "String")
private String succCntM;
@ApiModelProperty(example = "알림톡발송건수", name = "알림톡발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "알림톡발송건수", dataType = "String")
private String sndCntA;
@ApiModelProperty(example = "알림톡 성공건수", name = "알림톡 성공건수", dataType = "String")
@ApiModelProperty(example = "10", name = "알림톡 성공건수", dataType = "String")
private String succCntA;
}

View File

@@ -9,7 +9,7 @@ import java.io.Serializable;
@Data
public class ChannelDetailReqDto implements Serializable {
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String")
@ApiModelProperty(example = "1012001", name = "사용자일련번호", dataType = "String")
private String userSeq;
}

View File

@@ -14,48 +14,52 @@ public class ChannelDetailRes implements Serializable {
private Paging paging;
private List<ChannelDetail> list;
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "String")
@ApiModelProperty(example = "1", name = "리스트번호", dataType = "String")
private String no;
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String")
@ApiModelProperty(example = "20220101", name = "가입일", dataType = "String")
private String subsDt;
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
@ApiModelProperty(example = "대리점", name = "유치업체", dataType = "String")
private String norgNm;
@ApiModelProperty(example = "사업장주소1", name = "사업장주소1", dataType = "String")
@ApiModelProperty(example = "서울시", name = "사업장주소1", dataType = "String")
private String adr1;
@ApiModelProperty(example = "사업장주소2", name = "사업장주소2", dataType = "String")
@ApiModelProperty(example = "서초구", name = "사업장주소2", dataType = "String")
private String adr2;
@ApiModelProperty(example = "사업장주소3", name = "사업장주소3", dataType = "String")
@ApiModelProperty(example = "1동", name = "사업장주소3", dataType = "String")
private String adr3;
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String")
@ApiModelProperty(example = "10110201", name = "사용자일련번호", dataType = "String")
private String userSeq;
@ApiModelProperty(example = "마당ID(이름)", name = "마당ID(이름)", dataType = "String")
@ApiModelProperty(example = "test", name = "마당ID(이름)", dataType = "String")
private String loginId;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "TEST", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "대표자명", name = "대표자명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "대표자명", dataType = "String")
private String reprNm;
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
@ApiModelProperty(example = "1010120202", name = "사업자등록번호", dataType = "String")
private String bizrno;
@ApiModelProperty(example = "법인등록번호", name = "법인등록번호", dataType = "String")
@ApiModelProperty(example = "1234561234567", name = "법인등록번호", dataType = "String")
private String cprRegNo;
@ApiModelProperty(example = "이름", name = "이름" , dataType = "String")
@ApiModelProperty(example = "홍길동", name = "이름" , dataType = "String")
private String userNm;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
@ApiModelProperty(example = "청약", name = "상태", dataType = "String")
private String subsSttusCd;
@ApiModelProperty(example = "법인사업자", name = "구분", dataType = "String")
private String subsSttusNm;
@ApiModelProperty(example = "구분", name = "구분", dataType = "String")
private String custTyCd;
@ApiModelProperty(example = "LTE5만원", name = "청약요금제명", dataType = "String")
private String custTyNm;
@ApiModelProperty(example = "청약요금제명", name = "청약요금제명", dataType = "String")
private String plan;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "전체발송건수", dataType = "String")
private String sndCnt;
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
@ApiModelProperty(example = "adminTest", name = "관리자ID", dataType = "String")
private String adminId;
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String")
@ApiModelProperty(example = "어드민", name = "관리자명", dataType = "String")
private String adminNm;
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String")
@ApiModelProperty(example = "admin", name = "유치자ID", dataType = "String")
private String channelId;
@ApiModelProperty(example = "유치자명", name = "유치자명", dataType = "String")
@ApiModelProperty(example = "관리자", name = "유치자명", dataType = "String")
private String channelNm;
@ApiModelProperty(example = "USER ID", name = "USER ID", dataType = "String", hidden = true)
@ApiModelProperty(example = "test", name = "USER ID", dataType = "String", hidden = true)
private String userId;
}

View File

@@ -9,26 +9,30 @@ import java.io.Serializable;
@Data
public class ChannelInfo implements Serializable {
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "Integer")
@ApiModelProperty(example = "1", name = "리스트번호", dataType = "Integer")
private Integer no;
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String")
@ApiModelProperty(example = "20220101", name = "가입일", dataType = "String")
private String subsDt;
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
@ApiModelProperty(example = "대리점", name = "유치업체", dataType = "String")
private String norgNm;
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String")
@ApiModelProperty(example = "10122112", name = "사용자일련번호", dataType = "String")
private String userSeq;
@ApiModelProperty(example = "마당ID(이름)", name = "마당ID(이름)", dataType = "String")
@ApiModelProperty(example = "madang01", name = "마당ID", dataType = "String")
private String loginId;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자등록번호", dataType = "String")
private String bizrno;
@ApiModelProperty(example = "이름", name = "이름" , dataType = "String")
@ApiModelProperty(example = "홍길동", name = "이름" , dataType = "String")
private String userNm;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
@ApiModelProperty(example = "01", name = "상태", dataType = "String")
private String subsSttusCd;
@ApiModelProperty(example = "구분", name = "구분", dataType = "String")
@ApiModelProperty(example = "청약", name = "상태명", dataType = "String")
private String subsSttusNm;
@ApiModelProperty(example = "01", name = "고객구분", dataType = "String")
private String custTyCd;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
@ApiModelProperty(example = "법인", name = "고객구분명", dataType = "String")
private String custTyNm;
@ApiModelProperty(example = "100", name = "전체발송건수", dataType = "String")
private String sndCnt;
}

View File

@@ -9,22 +9,22 @@ import java.io.Serializable;
@Data
public class ChannelListExcelReqDto implements Serializable {
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
@ApiModelProperty(example = "Y", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
private String searchType;
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
@ApiModelProperty(example = "custNm", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
private String searchType1;
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
@ApiModelProperty(example = "임시회사", name = "검색어(입력)", dataType = "String")
private String searchText;
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "20220101", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
private String subsStDt;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "20220131", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
private String subsEdDt;
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "01", name = "청약상태", dataType = "String")
private String subsSttusCd;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "test", name = "로그인아이디", dataType = "String")
private String loginId;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "유치", name = "유치채널", dataType = "String")
private String norgNm;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "01", name = "고객유형", dataType = "String")
private String custTyCd;
}

View File

@@ -9,26 +9,29 @@ import java.io.Serializable;
@Data
public class ChannelListReqDto implements Serializable {
@ApiModelProperty(example = "검색시작일", name = "검색시작일", dataType = "String")
@ApiModelProperty(example = "20220101", name = "검색시작일", dataType = "String")
private String subsStDt;
@ApiModelProperty(example = "검색종료일", name = "검색종료일", dataType = "String")
@ApiModelProperty(example = "20220131", name = "검색종료일", dataType = "String")
private String subsEdDt;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
@ApiModelProperty(example = "01", name = "상태", dataType = "String")
private String subsSttusCd;
@ApiModelProperty(example = "회원구분", name = "회원구분", dataType = "String")
@ApiModelProperty(example = "01", name = "회원구분", dataType = "String")
private String custTyCd;
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String")
@ApiModelProperty(example = "test", name = "유치자ID", dataType = "String")
private String loginId;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "전체발송건수", dataType = "String")
private String sndCnt;
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
@ApiModelProperty(example = "유치", name = "유치업체", dataType = "String")
private String norgNm;
@ApiModelProperty(example = "상세검색조건", name = "상세검색조건", dataType = "String")
@ApiModelProperty(example = "01", name = "상세검색조건", dataType = "String")
private String searchType;
@ApiModelProperty(example = "검색어", name = "검색어", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "검색어", dataType = "String")
private String searchText;
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
@ApiModelProperty(example = "50", name = "페이지당 조회할 목록 수", dataType = "String")
private int pagePerRows;
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String")
@ApiModelProperty(example = "1", name = "현재 페이지", dataType = "String")
private int page;
@ApiModelProperty(name = "유치자ID", dataType = "String", hidden = true)
private String attrctorId;
}

View File

@@ -1,45 +1,45 @@
package kr.co.uplus.ez.api.calculate.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class CalcList implements Serializable {
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
@ApiModelProperty(example = "202201", name = "날짜", dataType = "String")
private String useYm;
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bizrno;
@ApiModelProperty(example = "요금제", name = "요금제", dataType = "String")
@ApiModelProperty(example = "LTE5만원", name = "요금제", dataType = "String")
private String prodNm;
@ApiModelProperty(example = "요금액", name = "요금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "요금액", dataType = "String")
private String prodAmt;
@ApiModelProperty(example = "시작금액", name = "시작금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "시작금액", dataType = "String")
private String startAmt;
@ApiModelProperty(example = "사용금액", name = "사용금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "사용금액", dataType = "String")
private String useAmt;
@ApiModelProperty(example = "이월금액", name = "이월금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "이월금액", dataType = "String")
private String cfwdAmt;
@ApiModelProperty(example = "종량금액", name = "종량금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "종량금액", dataType = "String")
private String mrtUseAmt;
@ApiModelProperty(example = "소멸금액", name = "소멸금액", dataType = "String")
@ApiModelProperty(example = "1000", name = "소멸금액", dataType = "String")
private String extncAmt;
@ApiModelProperty(example = "청구금액", name = "청구금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "청구금액", dataType = "String")
private String billingAmt;
@ApiModelProperty(example = "전체 발송건수", name = "전체 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "전체 발송건수", dataType = "String")
private String totalSndCnt;
@ApiModelProperty(example = "SMS 발송건수", name = "SMS 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "SMS 발송건수", dataType = "String")
private String smsSndCnt;
@ApiModelProperty(example = "LMS 발송건수", name = "LMS 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "LMS 발송건수", dataType = "String")
private String lmsSndCnt;
@ApiModelProperty(example = "MMS 발송건수", name = "MMS 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "MMS 발송건수", dataType = "String")
private String mmsSndCnt;
@ApiModelProperty(example = "알림톡 발송건수", name = "알림톡 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "알림톡 발송건수", dataType = "String")
private String atlkSndCnt;
}

View File

@@ -11,17 +11,17 @@ import java.io.Serializable;
public class CalcListExcelReqDto implements Serializable {
@NotNull
@ApiModelProperty(example = "검색시작월", name = "검색시작월",dataType = "String")
@ApiModelProperty(example = "202201", name = "검색시작월",dataType = "String")
private String startMonth;
@NotNull
@ApiModelProperty(example = "검색종료월", name = "검색종료월",dataType = "String")
@ApiModelProperty(example = "202203", name = "검색종료월",dataType = "String")
private String endMonth;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bizrno;
}

View File

@@ -1,36 +1,35 @@
package kr.co.uplus.ez.api.calculate.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class CalcListReqDto implements Serializable {
@NotNull
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
@ApiModelProperty(example = "50", name = "페이지당 조회할 목록 수", dataType = "String")
private int pagePerRows;
@NotNull
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
@ApiModelProperty(example = "1", name = "현재 페이지", dataType = "int")
private int page;
@NotNull
@ApiModelProperty(example = "검색시작월", name = "검색시작월",dataType = "String")
@ApiModelProperty(example = "202201", name = "검색시작월",dataType = "String")
private String startMonth;
@NotNull
@ApiModelProperty(example = "검색종료월", name = "검색종료월",dataType = "String")
@ApiModelProperty(example = "202203", name = "검색종료월",dataType = "String")
private String endMonth;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bizrno;
}

View File

@@ -1,12 +1,11 @@
package kr.co.uplus.ez.api.channelMgt;
import java.util.List;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListExcelReqDto;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
import org.apache.ibatis.annotations.Mapper;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
import java.util.List;
@Mapper
public interface ChannelMgtMapper {
@@ -17,5 +16,7 @@ public interface ChannelMgtMapper {
List<TmpltInfo> selectTmpltListExcel(TmpltListExcelReqDto tmpltListExcelReqDto);
String selectChannelAuthMenuNo(String targetUserId);
default String selectChannelAuthMenuNo(String targetUserId) {
return null;
}
}

View File

@@ -9,24 +9,24 @@ import java.io.Serializable;
@Data
public class TmpltInfo implements Serializable {
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "Integer")
@ApiModelProperty(example = "1", name = "리스트번호", dataType = "Integer")
private Integer no;
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명(이름)", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호(생년월일)", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bRegNo;
@ApiModelProperty(example = "템플릿 코드", name = "템플릿 코드", dataType = "String")
@ApiModelProperty(example = "01", name = "템플릿 코드", dataType = "String")
private String tmpltCd;
@ApiModelProperty(example = "템플릿명", name = "템플릿명", dataType = "String")
@ApiModelProperty(example = "테스트", name = "템플릿명", dataType = "String")
private String tmpltNm;
@ApiModelProperty(example = "템플릿 유형", name = "템플릿 유형", notes = "항목 : (01: 기본형(Default), 02:부가정보형, 03:광고추가형, 04:복합형)", dataType = "String")
@ApiModelProperty(example = "01", name = "템플릿 유형", notes = "항목 : (01: 기본형(Default), 02:부가정보형, 03:광고추가형, 04:복합형)", dataType = "String")
private String tmpltType;
@ApiModelProperty(example = "상태", name = "상태" , notes = "항목 : (T:신청완료, R:검수요청완료, Q:카카오 검수중, A:템플릿승인, S:반려)" , dataType = "String")
@ApiModelProperty(example = "T", name = "상태" , notes = "항목 : (T:신청완료, R:검수요청완료, Q:카카오 검수중, A:템플릿승인, S:반려)" , dataType = "String")
private String stat;
@ApiModelProperty(example = "반려사유", name = "반려사유", dataType = "String")
@ApiModelProperty(example = "01", name = "반려사유", dataType = "String")
private String returnReason;
@ApiModelProperty(example = "발신프로필", name = "발신프로필", dataType = "String")
@ApiModelProperty(example = "1230123023", name = "발신프로필", dataType = "String")
private String sendProfile;
@ApiModelProperty(example = "최종수정일자", name = "최종수정일자", dataType = "String")
@ApiModelProperty(example = "20220320", name = "최종수정일자", dataType = "String")
private String lastChgDt;
}

View File

@@ -3,21 +3,21 @@ package kr.co.uplus.ez.api.channelMgt.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class TmpltListExcelReqDto implements Serializable {
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
@ApiModelProperty(example = "Y", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
private String searchType1;
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
@ApiModelProperty(example = "custNm", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
private String searchType2;
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "검색어(입력)", dataType = "String")
private String searchText1;
@ApiModelProperty(example = "1122", name = "채널메뉴번호", dataType = "String")
private String channelAuthMenuNo;
@ApiModelProperty(example = "test", name = "사용자아이디", dataType = "String")
private String userId;
}

View File

@@ -1,31 +1,31 @@
package kr.co.uplus.ez.api.channelMgt.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class TmpltListReqDto implements Serializable {
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
@ApiModelProperty(example = "Y", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
private String searchType1;
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
@ApiModelProperty(example = "custNm", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
private String searchType2;
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "검색어(입력)", dataType = "String")
private String searchText1;
@NotNull
@ApiModelProperty(example = "페이지당 조회할 목록 수",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
@ApiModelProperty(example = "50",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
private int pagePerRows;
@NotNull
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
@ApiModelProperty(example = "1", name = "현재 페이지", dataType = "int")
private int page;
@ApiModelProperty(example = "1", name = "채널메뉴번호", dataType = "int")
private String channelAuthMenuNo;
@ApiModelProperty(example = "test", name = "사용자아이디", dataType = "int")
private String userId;
}

View File

@@ -1,14 +1,18 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class Auth implements Serializable{
@ApiModelProperty(example = "1001", name = "권한코드", dataType = "int")
private String autCd;
@ApiModelProperty(example = "어드민", name = "권한명", dataType = "int")
private String autNm;
@ApiModelProperty(example = "N", name = "사용여부", dataType = "int")
private String useYn;
}

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial")
@Data
public class AuthRes implements Serializable {
@ApiModelProperty(name = "권한리스트", example = "권한리스트", dataType = "List<Auth>")
@ApiModelProperty(name = "권한리스트", dataType = "List<Auth>")
private List<Auth> list;
}

View File

@@ -1,23 +1,23 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class Code implements Serializable {
@ApiModelProperty(name = "그룹코드", example = "그룹코드", dataType = "String")
@ApiModelProperty(name = "그룹코드", example = "1001", dataType = "String")
private String grpCd;
@ApiModelProperty(name = "상세코드", example = "상세코드", dataType = "String")
@ApiModelProperty(name = "상세코드", example = "01", dataType = "String")
private String code;
@ApiModelProperty(name = "상세코드명", example = "상세코드명", dataType = "String")
@ApiModelProperty(name = "상세코드명", example = "TEST", dataType = "String")
private String codeNm;
@ApiModelProperty(name = "정렬순서", example = "정렬순서", dataType = "Integer")
@ApiModelProperty(name = "정렬순서", example = "1", dataType = "Integer")
private Integer sortOrder;
@ApiModelProperty(name = "사용여부", example = "사용여부", dataType = "String")
@ApiModelProperty(name = "사용여부", example = "Y", dataType = "String")
private String useYn;
}

View File

@@ -1,15 +1,15 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class CodeReqDto implements Serializable{
@ApiModelProperty(example = "그룹코드", name = "그룹코드", dataType = "String")
@ApiModelProperty(example = "1001", name = "그룹코드", dataType = "String")
private String grpCd;
}

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial")
@Data
public class CodeRes implements Serializable {
@ApiModelProperty(name = "코드리스트", example = "코드리스트", dataType = "List<Code>")
@ApiModelProperty(name = "코드리스트", dataType = "List<Code>")
private List<Code> list;
}

View File

@@ -1,41 +1,41 @@
package kr.co.uplus.ez.api.comm.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@SuppressWarnings("serial")
@Data
public class Menu implements Serializable{
@ApiModelProperty(name = "메뉴 번호", example = "메뉴 번호", dataType = "Integer")
@ApiModelProperty(name = "메뉴 번호", example = "1001", dataType = "Integer")
private Integer menuNo;
@ApiModelProperty(name = "부모 메뉴 번호", example = "부모 메뉴 번호", dataType = "Integer")
@ApiModelProperty(name = "부모 메뉴 번호", example = "1001", dataType = "Integer")
private Integer prntsMenuNo;
@ApiModelProperty(name = "메뉴 명", example = "메뉴 명")
@ApiModelProperty(name = "메뉴 명", example = "고객관리")
private String menuNm;
@ApiModelProperty(name = "메뉴 순서", example = "메뉴 순서", dataType = "Integer")
@ApiModelProperty(name = "메뉴 순서", example = "1", dataType = "Integer")
private Integer menuOdrg;
@ApiModelProperty(name = "사용 여부", example = "사용 여부")
@ApiModelProperty(name = "사용 여부", example = "Y")
private String useYn;
@ApiModelProperty(name = "권한체크 그룹번호", example = "권한체크 그룹번호", dataType = "Integer")
@ApiModelProperty(name = "권한체크 그룹번호", example = "1001", dataType = "Integer")
private Integer autchkGrpno;
@ApiModelProperty(name = "메뉴 레벨", example = "메뉴 레벨", dataType = "Integer")
@ApiModelProperty(name = "메뉴 레벨", example = "1", dataType = "Integer")
private Integer menuLvl;
@ApiModelProperty(name = "메뉴 URL", example = "메뉴 URL")
@ApiModelProperty(name = "메뉴 URL", example = "/login")
private String menuUrl;
@ApiModelProperty(name = "등록 ID", example = "등록 ID")
@ApiModelProperty(name = "등록 ID", example = "test")
private String regId;
@ApiModelProperty(name = "등록 일시", example = "등록 일시")
@ApiModelProperty(name = "등록 일시", example = "20110101")
private String regDt;
@ApiModelProperty(name = "변경 ID", example = "변경 ID")
@ApiModelProperty(name = "변경 ID", example = "test")
private String chgId;
@ApiModelProperty(name = "변경 일시", example = "변경 일시")
@ApiModelProperty(name = "변경 일시", example = "20110101")
private String chgDt;
@ApiModelProperty(name = "하위 메뉴 정보", example = "하위 메뉴 정보", dataType = "List<Menu>")
@ApiModelProperty(name = "하위 메뉴 정보", dataType = "List<Menu>")
private List<Menu> children = new ArrayList<>();
public void addChild(Menu menu) {

View File

@@ -1,17 +1,17 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class RefreshToken implements Serializable{
@ApiModelProperty(name = "인증토큰", example = "인증토큰", dataType = "String")
@ApiModelProperty(name = "인증토큰", example = "adwd121dd", dataType = "String")
private String accessToken;
@ApiModelProperty(name = "토큰 만료시간", example = "토큰 만료시간", dataType = "String")
@ApiModelProperty(name = "토큰 만료시간", example = "1800", dataType = "String")
private String expireTime;
}

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class RefreshTokenReqDto implements Serializable{
@ApiModelProperty(example = "사용자 ID", name = "사용자 ID", dataType = "String")
@ApiModelProperty(example = "test", name = "사용자 ID", dataType = "String")
private String userId;
@ApiModelProperty(example = "Refresh 토큰", name = "Refresh 토큰", dataType = "String")
@ApiModelProperty(example = "dadw242rdwad2", name = "Refresh 토큰", dataType = "String")
private String refreshToken;
}

View File

@@ -285,11 +285,17 @@ public class CustMgtController {
})
@RequestMapping(value = "/insertTestId" , method = {RequestMethod.POST})
@ResponseBody
public InsertTestIdResDto insertTestId(@RequestBody @Valid InsertTestIdReqDto insertTestIdReqDto, BindingResult bindingResult) {
public InsertTestIdResDto insertTestId(@RequestBody @Valid InsertTestIdReqDto insertTestIdReqDto, BindingResult bindingResult){
if(validComponents.validParameter(bindingResult)) {
return new InsertTestIdResDto(ApiResponseCode.CM_PARAMETER_ERROR);
}
return custService.insertTestId(insertTestIdReqDto);
try {
return custService.insertTestId(insertTestIdReqDto);
}catch(Exception e) {
logger.info(e.toString());
return new InsertTestIdResDto(ApiResponseCode.CM_DB_QUERY_ERR);
}
}
/**

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,21 @@
package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class AdminInfo implements Serializable {
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
@ApiModelProperty(example = "admin", name = "관리자ID", dataType = "String")
private String adminId;
@ApiModelProperty(example = "관리자코드", name = "관리자코드", dataType = "String")
@ApiModelProperty(example = "1001", name = "관리자코드", dataType = "String")
private String adminCd;
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String")
@ApiModelProperty(example = "ADMIN", name = "관리자명", dataType = "String")
private String adminNm;
@ApiModelProperty(example = "대리점명", name = "대리점명", dataType = "String")
@ApiModelProperty(example = "본사", name = "대리점명", dataType = "String")
private String agencyNm;
}

View File

@@ -1,15 +1,15 @@
package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class AdminInfoReqDto implements Serializable {
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
@ApiModelProperty(example = "admin", name = "관리자ID", dataType = "String")
private String adminId;
}

View File

@@ -1,23 +1,16 @@
package kr.co.uplus.ez.api.mntrng;
import java.util.ArrayList;
import java.util.List;
import kr.co.uplus.ez.api.mntrng.dto.*;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.Paging;
import org.apache.commons.lang3.StringUtils;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage;
import kr.co.uplus.ez.common.data.Paging;
import kr.co.uplus.ez.api.mntrng.dto.SendListResDto;
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttusRes;
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttusResDto;
import kr.co.uplus.ez.api.mntrng.dto.SendList;
import kr.co.uplus.ez.api.mntrng.dto.SendListReqDto;
import kr.co.uplus.ez.api.mntrng.dto.SendListRes;
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttus;
import java.util.ArrayList;
import java.util.List;
@Service
public class MntrngService {
@@ -44,16 +37,13 @@ public class MntrngService {
String nowPage = String.valueOf(sendListReqDto.getPage());
int totalCnt = mntrngMapper.selectSendListTotalCnt(sendListReqDto);
if (totalCnt == 0) {
if (totalCnt == 0 || StringUtils.isBlank(sendListReqDto.getSentDate())) {
SendListRes sendListRes = new SendListRes();
sendListRes.setList(new ArrayList<>());
Paging paging = new Paging();
paging.setPage(nowPage);
paging.setTotalCnt(String.valueOf(totalCnt));
sendListRes.setPaging(paging);
return new SendListResDto(ApiResponseCode.CM_NOT_FOUND, sendListRes);
}

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.mntrng.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class SendList implements Serializable {
@ApiModelProperty(example = "no", name = "no", dataType = "String")
private String no;
private int no;
@ApiModelProperty(example = "발송일자", name = "발송일자", dataType = "String")
private String sentDate;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")

View File

@@ -1,11 +1,11 @@
package kr.co.uplus.ez.api.mntrng.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class SendListReqDto implements Serializable {
@@ -18,7 +18,6 @@ public class SendListReqDto implements Serializable {
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
private int page;
@NotNull
@ApiModelProperty(example = "발송일", name = "발송일",dataType = "String")
private String sentDate;

View File

@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
@@ -285,6 +286,7 @@ public class RiskMgtService {
* @param paramMap
* @return
*/
@Transactional(value="db1TransactionManager")
public MsgInsertIntrcpResDto msgInsertIntrcp(MsgInsertIntrcpReqDto msgInsertIntrcpReqDto) {
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
@@ -292,7 +294,7 @@ public class RiskMgtService {
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal;
String regId = userDetails.getUsername();
try {
String seqNoStr = riskMgtMapper.selectMsgBlckWordSeq();
long seqNo = Long.parseLong(seqNoStr);
// seq select
@@ -300,21 +302,14 @@ public class RiskMgtService {
msgInsertIntrcpReqDto.setRegId(regId);
msgInsertIntrcpReqDto.setBlckYn(Const.COMM_YES);
riskMgtMapper.insertMsgBlckword(msgInsertIntrcpReqDto);
// TODO 차단문구 등록
// 리스트에 regId 넣기
List<MsgBlckwordList> list = msgInsertIntrcpReqDto.getList();
for (MsgBlckwordList msgBlckword : list) {
msgBlckword.setSeqNo(seqNo);
msgBlckword.setRegId(regId);
}
riskMgtMapper.insertBlckwordDtl(list);
} catch (Exception e) {
return new MsgInsertIntrcpResDto(ApiResponseCode.CM_DB_QUERY_ERR);
}
return new MsgInsertIntrcpResDto(ApiResponseCode.SUCCESS);
}
@@ -324,6 +319,7 @@ public class RiskMgtService {
* @param msgUpdateIntrcplReqDto
* @return
*/
@Transactional(value="db1TransactionManager")
public MsgUpdateIntrcpResDto msgUpdateIntrcp(MsgUpdateIntrcplReqDto msgUpdateIntrcplReqDto) {
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);

View File

@@ -15,6 +15,9 @@ public class Const {
public static final String AUTH_STTUS_CD_01 = "01"; // 인증대기
public static final String AUTH_STTUS_CD_02 = "02"; // 인증완료
public static final String AUTH_CD_ADMIN = "1001";
public static final String AUTH_CD_AGENCY = "1002";
// paging
public static final String TOTAL_CNT = "totalCnt";
public static final String CURRENT_PAGE = "currentPage";

View File

@@ -1,155 +0,0 @@
//package kr.co.uplus.ez.common.utils;
//
//import java.io.UnsupportedEncodingException;
//import java.lang.reflect.Method;
//import java.lang.reflect.Parameter;
//import java.util.Arrays;
//import java.util.Enumeration;
//
//import javax.servlet.http.HttpServletRequest;
//
//import org.joda.time.DateTime;
//import org.joda.time.format.DateTimeFormat;
//import org.joda.time.format.DateTimeFormatter;
//import org.springframework.util.LinkedMultiValueMap;
//import org.springframework.util.MultiValueMap;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.util.ContentCachingRequestWrapper;
//
//import kr.co.uplus.ez.common.auth.AuthUser;
//import kr.co.uplus.ez.common.consts.Const;
//
//
//public class LogUtils {
// public static final String HANG_LOG_KEY = "hangfile";
//
// private static final String HANG_LOG_ROOT = "/logs/uplus/hang/ui";
// private static final DateTimeFormatter FMT_TO_DAY = DateTimeFormat.forPattern("yyyyMMdd");
// private static final DateTimeFormatter FMT_TO_HOUR = DateTimeFormat.forPattern("yyyyMMddHH");
// private static final DateTimeFormatter FMT_TO_SECOND = DateTimeFormat.forPattern("yyyyMMddHHmmss");
// private static final DateTimeFormatter FMT_TO_MILSEC = DateTimeFormat.forPattern("yyyyMMddHHmmssSSS");
//
// public static String getTloLogfileName(String tloRoot) {
// DateTime now = DateTime.now();
// String dir = now.toString(FMT_TO_DAY);
// String suffix = now.toString(FMT_TO_HOUR);
// int min = 5 * (now.getMinuteOfHour() / 5);
// int NODE_NO = 1;
// return String.format("%s/%s/RCS.ADMIN.%03d.%s%02d.log", tloRoot, dir, NODE_NO, suffix, min);
// }
//
// public static String getLoginId() {
// AuthUser user = SpringUtils.getCurrentUser();
// if (user == null)
// return "anonymousUser";
//
// return user.getUsername();
// }
//
// public static String getCurrentTime() {
// return DateTime.now().toString(FMT_TO_MILSEC);
// }
//
//// public static void addTloOrdinaryInfo(TloLog tlo, HttpServletRequest request, HttpServletResponse response) {
//// DateTime now = DateTime.now();
//// tlo.setRspTime(now.toString(FMT_TO_MILSEC));
//// tlo.setClientIp(LogUtils.clientIp(request));
////
//// int status = response.getStatus();
//// if (status == 404) {
//// tlo.setResultCode(ResultCode.SS_NOT_FOUND.getValue());
//// }
//// }
////
//// public static void addTloCustomInfo(TloLog tlo, HttpServletRequest request) {
//// tlo.setReqUri(request.getRequestURI());
//// tlo.setReqParam(getReqMultiMap(request).toString());
//// }
////
//// public static void addTloFailInfo(Object rspObj, HttpServletRequest request) {
//// if (rspObj instanceof Result) {
//// Result<?> result = (Result<?>) rspObj;
//// if (!result.isSuccess()) {
//// TloLog tlo = (TloLog) request.getAttribute(Const.KEY_LOG_OBJ);
//// String code = result.getCode();
//// tlo.setResultCode(code != null ? code : ResultCode.SE_UNKNOWN.getValue());
//// }
//// }
//// else if (rspObj instanceof RestResult) {
//// RestResult<?> result = (RestResult<?>) rspObj;
//// if (!result.isSuccess()) {
//// TloLog tlo = (TloLog) request.getAttribute(Const.KEY_LOG_OBJ);
//// ResultCode code = result.getCode();
//// tlo.setResultCode(code != null ? code.getValue() : ResultCode.SE_UNKNOWN.getValue());
//// }
//// }
//// }
////
//// public static void addTloExceptionInfo(TloLog tlo, Exception ex) {
//// if (ex == null)
//// return;
////
//// if (ex instanceof ServletException) {
//// Throwable e = ((ServletException) ex).getRootCause();
//// if (e instanceof SQLException || e instanceof DataAccessException) {
//// tlo.setResultCode(ResultCode.SE_DB.getValue());
//// }
//// else {
//// tlo.setResultCode(ResultCode.SE_INTERNAL.getValue());
//// }
//// }
//// else {
//// tlo.setResultCode(ResultCode.SE_INTERNAL.getValue());
//// }
//// }
// public static String clientIp(HttpServletRequest request) {
// String ip = request.getHeader("X-Forwarded-For");
// if (ip == null)
// ip = request.getRemoteAddr();
// return ip;
// }
//
//
// public static MultiValueMap<String,String> getReqMultiMap(HttpServletRequest request) {
// MultiValueMap<String,String> params = new LinkedMultiValueMap<>();
// Enumeration<String> names = request.getParameterNames();
// while (names.hasMoreElements()) {
// String name = names.nextElement();
// if (Const.NOT_LOG_PARAMS.contains(name))
// continue;
// String[] value = request.getParameterValues(name);
// params.put(name, Arrays.asList(value));
// }
// return params;
// }
//
// public static boolean isResourceUri(String uri) {
// return uri.startsWith("/static/");
// }
//
// public static String getRequestBody(HttpServletRequest request, Method method) {
// Parameter[] parameters = method.getParameters();
//
// for (Parameter param : parameters) {
// if (param.getAnnotation(RequestBody.class) != null) {
// // CommonsRequestLoggingFilter.getMessagePayload()
// ContentCachingRequestWrapper wrapper =
// org.springframework.web.util.WebUtils.getNativeRequest(request, ContentCachingRequestWrapper.class);
// if (wrapper != null) {
// byte[] buf = wrapper.getContentAsByteArray();
// if (buf.length > 0) {
// int length = Math.min(buf.length, 10000);
// try {
// return new String(buf, 0, length, wrapper.getCharacterEncoding());
// }
// catch (UnsupportedEncodingException ex) {
// return "[unknown]";
// }
// }
// }
// }
// }
// return "";
// }
//
//}