986 - 시공사번호 추가, 시공사(userId) 데이터만 조회

This commit is contained in:
cha 2025-04-23 16:01:59 +09:00
parent fe2123ae38
commit ded370a348
4 changed files with 15 additions and 2 deletions

View File

@ -25,4 +25,6 @@ public class UserResponse {
private String storeLvl; // Store Level
private String groupId; // groupId
private String custCd; // custCd
//시공사 번호
private String builderNo;
}

View File

@ -21,9 +21,9 @@ public class MainPageController {
private final ObjectService objectService;
@Operation(description = "메인 물건정보 목록을 조회한다.")
@GetMapping("/object/{saleStoreId}/list")
@GetMapping("/object/{saleStoreId}/{userId}/{builderNo}/list")
@ResponseStatus(HttpStatus.OK)
public MainPageResponse selectObjectList(@PathVariable String saleStoreId) throws Exception {
public MainPageResponse selectObjectList(@PathVariable String saleStoreId, @PathVariable String userId, @PathVariable String builderNo) throws Exception {
MainPageResponse mainPageResponse = new MainPageResponse();
// 판매점명 조회
@ -39,6 +39,8 @@ public class MainPageController {
// 물건정보 목록 조회
ObjectRequest objectRequest = new ObjectRequest();
objectRequest.setSaleStoreId(saleStoreId);
objectRequest.setUserId(userId);
objectRequest.setBuilderNo(builderNo);
List<ObjectResponse> objectList = objectService.selectObjectMainList(objectRequest);
mainPageResponse.setObjectList(objectList);

View File

@ -170,4 +170,7 @@ public class ObjectRequest {
@Schema(description = "종료 Row")
private String endRow;
@Schema(description = "시공사 번호")
private String builderNo;
}

View File

@ -183,6 +183,9 @@
FROM T_OBJECT O WITH (NOLOCK)
INNER JOIN T_OBJECT_INFO OI WITH (NOLOCK)
ON O.OBJECT_NO = OI.OBJECT_NO
<if test='builderNo != null and builderNo != ""'>
AND OI.CREATE_USER = #{userId}
</if>
INNER JOIN M_SALES_STORE S WITH (NOLOCK)
ON O.SALE_STORE_ID = S.SALE_STORE_ID
<if test='saleStoreId != null and saleStoreId != "T01"'>
@ -274,6 +277,9 @@
FROM T_OBJECT O WITH (NOLOCK)
INNER JOIN T_OBJECT_INFO OI WITH (NOLOCK)
ON O.OBJECT_NO = OI.OBJECT_NO
<if test='builderNo != null and builderNo != ""'>
AND OI.CREATE_USER = #{userId}
</if>
INNER JOIN M_SALES_STORE S WITH (NOLOCK)
ON O.SALE_STORE_ID = S.SALE_STORE_ID
<if test='(saleStoreId != null and saleStoreId != "T01") or (schSelSaleStoreId != null and schSelSaleStoreId != "")'>