ソースを参照

오더퀸 브랜드 검색

marseyes 2 年 前
コミット
597a79e2a7
共有1 個のファイルを変更した25 個の追加8 個の削除を含む
  1. 25 8
      src/main/java/com/oqpo/api/web/controller/stinfo/BrandController.java

+ 25 - 8
src/main/java/com/oqpo/api/web/controller/stinfo/BrandController.java

@@ -1,5 +1,9 @@
1 1
 package com.oqpo.api.web.controller.stinfo;
2 2
 
3
+import com.oqpo.api.client.oqlink.OqlinkClient;
4
+import com.oqpo.api.client.oqlink.dto.OqScmBrandInfoReqModel;
5
+import com.oqpo.api.client.oqlink.dto.OqScmBrandInfoResModel;
6
+import com.oqpo.api.client.oqlink.util.HmacUtil;
3 7
 import com.oqpo.api.enums.SystemMessageCode;
4 8
 import com.oqpo.api.service.stinfo.BrandService;
5 9
 import com.oqpo.api.web.dto.request.oper.affl.AfflShopBaseInfoGridRequest;
@@ -33,6 +37,9 @@ public class BrandController {
33 37
     @Autowired
34 38
     private BrandService brandService;
35 39
 
40
+    @Autowired
41
+    private OqlinkClient oqlinkClient;
42
+
36 43
     /**
37 44
      * 설명 : 팝업 브랜드 그리드 리스트
38 45
      *
@@ -46,10 +53,9 @@ public class BrandController {
46 53
     @ApiOperation(value = " 팝업 브랜드 그리드 리스트")
47 54
     @PostMapping("/pop-grid-list")
48 55
     public ResponseEntity<GridResponse> brandPopGridList(@ApiIgnore String userId, @ApiIgnore String authTpCd, @RequestBody @Valid BrandGridRequest brandGridRequest) throws Exception {
49
-        return ResponseEntity.ok(brandService.selectPopBrandGridList(userId, authTpCd,brandGridRequest.getAfflShopId(), brandGridRequest.getBrandNm(), brandGridRequest.toDTO(brandGridRequest)));
56
+        return ResponseEntity.ok(brandService.selectPopBrandGridList(userId, authTpCd, brandGridRequest.getAfflShopId(), brandGridRequest.getBrandNm(), brandGridRequest.toDTO(brandGridRequest)));
50 57
     }
51 58
 
52
-
53 59
     /**
54 60
      * 설명 : 브랜드그룹 브랜드 리스트
55 61
      *
@@ -67,7 +73,6 @@ public class BrandController {
67 73
         return ResponseEntity.ok(brandService.selectAfflBrandList(afflShopId));
68 74
     }
69 75
 
70
-
71 76
     /**
72 77
      * 설명 : 브랜드 그리드 리스트
73 78
      *
@@ -75,18 +80,15 @@ public class BrandController {
75 80
      * @return
76 81
      * @throws Exception
77 82
      */
78
-
79 83
     @ApiImplicitParams({
80 84
             @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
81 85
     })
82 86
     @ApiOperation(value = " 브랜드 그리드 리스트")
83 87
     @PostMapping("/detail-grid-list")
84 88
     public ResponseEntity<GridResponse> detailGridList(@RequestBody @Valid BrandSearchGridRequest brandSearchGridRequest) throws Exception {
85
-        return ResponseEntity.ok(brandService.selectBrandGridList(brandSearchGridRequest.getSAfflShopId(),brandSearchGridRequest.getSBrandId(), brandSearchGridRequest.getSBrandNm(), brandSearchGridRequest.getSBrandType(), brandSearchGridRequest.getSStCd(),  brandSearchGridRequest.toDTO(brandSearchGridRequest)));
89
+        return ResponseEntity.ok(brandService.selectBrandGridList(brandSearchGridRequest.getSAfflShopId(), brandSearchGridRequest.getSBrandId(), brandSearchGridRequest.getSBrandNm(), brandSearchGridRequest.getSBrandType(), brandSearchGridRequest.getSStCd(), brandSearchGridRequest.toDTO(brandSearchGridRequest)));
86 90
     }
87 91
 
88
-
89
-
90 92
     /**
91 93
      * 설명 : 브랜드 정보
92 94
      *
@@ -104,6 +106,22 @@ public class BrandController {
104 106
         return ResponseEntity.ok(brandService.selectSaleMgrMgn(brandId));
105 107
     }
106 108
 
109
+    /**
110
+     * 설명 : 오더퀸 브랜드 정보
111
+     *
112
+     * @param oqScmBrandInfoReqModel
113
+     * @return
114
+     * @throws Exception
115
+     */
116
+    @ApiImplicitParams({
117
+            @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
118
+    })
119
+    @ApiOperation(value = "오더퀸 브랜드 정보")
120
+    @PostMapping("/oq-info-brand")
121
+    public ResponseEntity<OqScmBrandInfoResModel> infoOqBrand(@ApiIgnore String userId, @RequestBody @Valid OqScmBrandInfoReqModel oqScmBrandInfoReqModel) throws Exception {
122
+        OqScmBrandInfoResModel res = oqlinkClient.getScmBrandInfo(HmacUtil.makeHmacValue4OqLink(oqScmBrandInfoReqModel), oqScmBrandInfoReqModel);
123
+        return ResponseEntity.ok(res);
124
+    }
107 125
 
108 126
     /**
109 127
      * 설명 : 브랜드 정보 저장
@@ -123,7 +141,6 @@ public class BrandController {
123 141
         return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
124 142
     }
125 143
 
126
-
127 144
     /**
128 145
      * 설명 : 브랜드 패스워드 초기화
129 146
      *