물건 판매점 목록 조회 t01 조건 수정 및 로그인 response custCd 추가
This commit is contained in:
parent
c056b7efdb
commit
90930a11f1
@ -24,5 +24,5 @@ public class UserResponse {
|
|||||||
private String pwdInitYn; // Password Init Yn
|
private String pwdInitYn; // Password Init Yn
|
||||||
private String storeLvl; // Store Level
|
private String storeLvl; // Store Level
|
||||||
private String groupId; // groupId
|
private String groupId; // groupId
|
||||||
|
private String custCd; // custCd
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,41 +84,43 @@ public class ObjectService {
|
|||||||
|
|
||||||
if ("T01".equals(saleStoreId)) {
|
if ("T01".equals(saleStoreId)) {
|
||||||
storeList = objectMapper.selectSaleStoreAllList();
|
storeList = objectMapper.selectSaleStoreAllList();
|
||||||
} else {
|
|
||||||
storeList = objectMapper.selectSaleStoreList(saleStoreId);
|
|
||||||
}
|
|
||||||
|
|
||||||
// [1]. 판매점 목록 조회 결과
|
// [1]. 판매점 목록 조회 결과
|
||||||
if (storeList.size() > 0) {
|
if (storeList.size() > 0) {
|
||||||
StoreFavoriteRequest storeFavoriteReq = new StoreFavoriteRequest();
|
StoreFavoriteRequest storeFavoriteReq = new StoreFavoriteRequest();
|
||||||
storeFavoriteReq.setUserId(userId);
|
storeFavoriteReq.setUserId(userId);
|
||||||
|
|
||||||
// [2]. 사용자 판매점 즐겨찾기 목록 조회 (QSP -> QCAST)
|
// [2]. 사용자 판매점 즐겨찾기 목록 조회 (QSP -> QCAST)
|
||||||
StoreFavoriteResponse storeFavoriteRes = new StoreFavoriteResponse();
|
StoreFavoriteResponse storeFavoriteRes = new StoreFavoriteResponse();
|
||||||
storeFavoriteRes = storeFavoriteService.getStoreFavoriteList(storeFavoriteReq);
|
storeFavoriteRes = storeFavoriteService.getStoreFavoriteList(storeFavoriteReq);
|
||||||
|
|
||||||
List<Map<String, Object>> data = (List<Map<String, Object>>) storeFavoriteRes.getData();
|
List<Map<String, Object>> data = (List<Map<String, Object>>) storeFavoriteRes.getData();
|
||||||
Map<String, Object> result = (Map<String, Object>) storeFavoriteRes.getResult();
|
Map<String, Object> result = (Map<String, Object>) storeFavoriteRes.getResult();
|
||||||
|
|
||||||
// [3]. 판매점 목록 중, 즐겨찾기 판매점에 해당하는 경우 정렬 기준 셋팅
|
// [3]. 판매점 목록 중, 즐겨찾기 판매점에 해당하는 경우 정렬 기준 셋팅
|
||||||
if ("S".equals(result.get("resultCode"))) {
|
if ("S".equals(result.get("resultCode"))) {
|
||||||
if (data.size() > 0) {
|
if (data.size() > 0) {
|
||||||
for (SaleStoreResponse saleStore : storeList) {
|
for (SaleStoreResponse saleStore : storeList) {
|
||||||
String storeId = saleStore.getSaleStoreId();
|
String storeId = saleStore.getSaleStoreId();
|
||||||
saleStore.setPriority("B");
|
saleStore.setPriority("B");
|
||||||
for (Map<String, Object> storeFavorite : data) {
|
for (Map<String, Object> storeFavorite : data) {
|
||||||
String favStoreId = (String) storeFavorite.get("storeId");
|
String favStoreId = (String) storeFavorite.get("storeId");
|
||||||
if (storeId.equals(favStoreId)) {
|
if (storeId.equals(favStoreId)) {
|
||||||
saleStore.setPriority("A" + (String) storeFavorite.get("priority"));
|
saleStore.setPriority("A" + (String) storeFavorite.get("priority"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// [4]. 정렬 기준 sort (오름차순)
|
||||||
|
storeList.sort(Comparator.comparing(SaleStoreResponse::getPriority));
|
||||||
}
|
}
|
||||||
// [4]. 정렬 기준 sort (오름차순)
|
} else {
|
||||||
storeList.sort(Comparator.comparing(SaleStoreResponse::getPriority));
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR,
|
||||||
|
(String) result.get("resultMsg"));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, (String) result.get("resultMsg"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
storeList = objectMapper.selectSaleStoreList(saleStoreId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return storeList;
|
return storeList;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user