Browse Source

미납금관리 수정 및 매장팝업 검색항목 추가

dwkim 2 years ago
parent
commit
0e2b2d7e30

+ 2 - 2
src/main/java/com/oqpo/api/mapper/stinfo/StoreBaseInfoMapper.java

@@ -10,8 +10,8 @@ import java.util.List;
10 10
 @Mapper
11 11
 public interface StoreBaseInfoMapper {
12 12
 
13
-    List<StoreBaseInfoEntity> selectPopStoreGridList(@Param("sBrandId") String brandId, @Param("sStoreNm") String storeNm, GridRequest gridRequest)throws Exception;
14
-    int selectPopStoreGridCnt(@Param("sBrandId") String brandId, @Param("sStoreNm") String storeNm)throws Exception;
13
+    List<StoreBaseInfoEntity> selectPopStoreGridList(@Param("sBrandId") String brandId, @Param("sStoreNm") String storeNm, @Param("sLoanDvsn") String sLoanDvsn,  GridRequest gridRequest)throws Exception;
14
+    int selectPopStoreGridCnt(@Param("sBrandId") String brandId, @Param("sStoreNm") String storeNm, @Param("sLoanDvsn") String sLoanDvsn)throws Exception;
15 15
 
16 16
     List<StoreBaseInfoEntity> selectStoreGridList( @Param("sBrandId") String sBrandId, @Param("searchDateType") String searchDateType, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sStoreDvsn") String sStoreDvsn, @Param("sStoreStCd") String sStoreStCd, @Param("sLoanDvsn") String sLoanDvsn, @Param("sStoreNm") String sStoreNm, GridRequest gridRequest)throws Exception;
17 17
     int selectStoreGridCnt(@Param("sBrandId") String sBrandId, @Param("searchDateType") String searchDateType, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sStoreDvsn") String sStoreDvsn, @Param("sStoreStCd") String sStoreStCd, @Param("sLoanDvsn") String sLoanDvsn, @Param("sStoreNm") String sStoreNm)throws Exception;

+ 3 - 3
src/main/java/com/oqpo/api/service/stinfo/StoreBaseInfoService.java

@@ -70,13 +70,13 @@ public class StoreBaseInfoService extends CommonService {
70 70
     /*
71 71
       팝업 매장 리스트 조회
72 72
      */
73
-    public GridResponse selectPopBrandGridList(String brandId, String storeNm, GridRequest gridRequest) throws Exception {
73
+    public GridResponse selectPopBrandGridList(String brandId, String storeNm, String sLoanDvsn, GridRequest gridRequest) throws Exception {
74 74
         int gridPage = gridRequest.getGridPage();
75 75
         int gridSize = gridRequest.getGridSize();
76 76
 
77
-        int gridRecords = storeBaseInfoMapper.selectPopStoreGridCnt(brandId, storeNm);
77
+        int gridRecords = storeBaseInfoMapper.selectPopStoreGridCnt(brandId, storeNm, sLoanDvsn);
78 78
         int gridTotal = fnCalculateGridTotal(gridSize, gridRecords);
79
-        List<StoreBaseInfoEntity> entities = storeBaseInfoMapper.selectPopStoreGridList(brandId, storeNm, gridRequest);
79
+        List<StoreBaseInfoEntity> entities = storeBaseInfoMapper.selectPopStoreGridList(brandId, storeNm,sLoanDvsn,  gridRequest);
80 80
         List<Object> gridRows = entities.stream()
81 81
                 .map(m -> StorePopSearchResponse.builder()
82 82
                         .viewCd("R")

+ 1 - 1
src/main/java/com/oqpo/api/web/controller/stinfo/StoreController.java

@@ -57,7 +57,7 @@ public class StoreController {
57 57
     @ApiOperation(value = " 팝업 매장 그리드 리스트")
58 58
     @PostMapping("/pop-grid-list")
59 59
     public ResponseEntity<GridResponse> brandPopGridList(@RequestBody @Valid StorePopGridRequest storePopGridRequest) throws Exception {
60
-        return ResponseEntity.ok(storeBaseInfoService.selectPopBrandGridList(storePopGridRequest.getBrandId(), storePopGridRequest.getStoreNm(), storePopGridRequest.toDTO(storePopGridRequest)));
60
+        return ResponseEntity.ok(storeBaseInfoService.selectPopBrandGridList(storePopGridRequest.getBrandId(), storePopGridRequest.getStoreNm(),storePopGridRequest.getSLoanDvsn() , storePopGridRequest.toDTO(storePopGridRequest)));
61 61
     }
62 62
 
63 63
 

+ 3 - 0
src/main/java/com/oqpo/api/web/dto/request/stinfo/store/StorePopGridRequest.java

@@ -19,6 +19,9 @@ public class StorePopGridRequest extends GridRequest {
19 19
     @ApiModelProperty(value = "매장명")
20 20
     private String storeNm;
21 21
 
22
+    @ApiModelProperty(value = "여신구분")
23
+    private String sLoanDvsn;
24
+
22 25
 
23 26
     protected StorePopGridRequest(Integer gridSize, Integer gridPage, String sidx, String sord, Boolean pagingYn, Integer gridFirst) {
24 27
         super(gridSize, gridPage, sidx, sord, pagingYn, gridFirst);

+ 6 - 0
src/main/resources/mybatis/sqlmaps/stinfo/Store.xml

@@ -14,6 +14,9 @@
14 14
         <if test="sStoreNm != null and sStoreNm != ''">
15 15
             and A.store_nm like concat('%',#{sStoreNm},'%')
16 16
         </if>
17
+        <if test="sLoanDvsn != null and sLoanDvsn != ''">
18
+            and A.loan_dvsn = #{sLoanDvsn}
19
+        </if>
17 20
         <choose>
18 21
             <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
19 22
                 <if test="gridRequest.sidx == 'VIEW_NUM'.toString()">
@@ -43,6 +46,9 @@
43 46
         <if test="sStoreNm != null and sStoreNm != ''">
44 47
             and store_nm like concat('%',#{sStoreNm},'%')
45 48
         </if>
49
+        <if test="sLoanDvsn != null and sLoanDvsn != ''">
50
+            and loan_dvsn = #{sLoanDvsn}
51
+        </if>
46 52
     </select>
47 53
 
48 54
     <select id="selectStoreGridList" resultType="com.oqpo.api.entity.stinfo.StoreBaseInfoEntity">