Browse Source

임시 테스트용 KAC 권한 하드코딩, 로직 변경

pull/16/head
박재우 10 months ago
parent
commit
263afa106a
  1. 18
      pav-server/src/main/java/com/palnet/biz/api/main/dash/service/MainDashService.java

18
pav-server/src/main/java/com/palnet/biz/api/main/dash/service/MainDashService.java

@ -13,6 +13,8 @@ import com.palnet.biz.api.main.statistics.service.MainStatisticsService;
import com.palnet.biz.jpa.entity.FltPlanBas; import com.palnet.biz.jpa.entity.FltPlanBas;
import com.palnet.biz.jpa.repository.flt.FltPlanBasRepository; import com.palnet.biz.jpa.repository.flt.FltPlanBasRepository;
import com.palnet.biz.jpa.repository.pty.*; import com.palnet.biz.jpa.repository.pty.*;
import com.palnet.comn.code.ErrorCode;
import com.palnet.comn.exception.CustomException;
import com.querydsl.core.Tuple; import com.querydsl.core.Tuple;
import com.querydsl.core.BooleanBuilder; import com.querydsl.core.BooleanBuilder;
@ -139,20 +141,16 @@ public class MainDashService {
List<MainDashFlightListModel> resultList = new ArrayList<MainDashFlightListModel>(); List<MainDashFlightListModel> resultList = new ArrayList<MainDashFlightListModel>();
// cptAuth = "KAC"; cptAuth = "KAC"; // 임시 테스트용으로 KAC 권한 부여
if(cptAuth.length() != 0) { if(cptAuth != null) {
if(cptAuth.equals("KAC")) {
resultList = fltPlanQueryRepository.getFlightDronList(cptAuth, serviceType); resultList = fltPlanQueryRepository.getFlightDronList(cptAuth, serviceType);
}
}else { }else {
resultList = fltPlanQueryRepository.getFlightDronList(cptAuth, serviceType); throw new CustomException(ErrorCode.DATA_NO, "cptAuth가 부여되지 않은 계정입니다");
} }
return resultList; return resultList;
} }
@ -161,7 +159,9 @@ public class MainDashService {
String cptAuth = token.getCptAuthCodeByToken(); String cptAuth = token.getCptAuthCodeByToken();
cptAuth = "KAC"; cptAuth = "KAC"; // 임시 테스트용으로 KAC 권한 부여
if(cptAuth == null) throw new CustomException(ErrorCode.DATA_NO, "cptAuth가 부여되지 않은 계정입니다");
Map<String, String> resultList = new HashMap<>(); Map<String, String> resultList = new HashMap<>();

Loading…
Cancel
Save