Selaa lähdekoodia

상품목록의 업체 멀티 선택 처리

eskim 5 vuotta sitten
vanhempi
commit
2eb15b0e14

+ 7 - 7
src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -515,21 +515,21 @@ public class TsaGoodsController extends TsaBaseController {
 		}
 		if (!StringUtils.isBlank(goodsSearch.getBrandList())) {
 			try {
-				String [] aa = mapper.readValue(goodsSearch.getBrandList(), String[].class);
-				goodsSearch.setMultiBrand(aa);
+				String [] arrBrandCd = mapper.readValue(goodsSearch.getBrandList(), String[].class);
+				goodsSearch.setMultiBrand(arrBrandCd);
 			} catch (Exception e) {
 				e.printStackTrace();
-				throw new IllegalStateException(message.getMessage("딜상품 저장 중 오류로 인해 저장되지 않았습니다."));
+				throw new IllegalStateException(message.getMessage("브랜드코드 검색중 오류로 인해 조회되지 않았습니다."));
 			}
 		}
 
-		if (!StringUtils.isBlank(goodsSearch.getBrandList())) {
+		if (!StringUtils.isBlank(goodsSearch.getSupplyCompList())) {
 			try {
-				String [] aa = mapper.readValue(goodsSearch.getBrandList(), String[].class);
-				goodsSearch.setMultiBrand(aa);
+				String [] arrSupplyComp = mapper.readValue(goodsSearch.getSupplyCompList(), String[].class);
+				goodsSearch.setMultiSupplyCompCd(arrSupplyComp);
 			} catch (Exception e) {
 				e.printStackTrace();
-				throw new IllegalStateException(message.getMessage("딜상품 저장 중 오류로 인해 저장되지 않았습니다."));
+				throw new IllegalStateException(message.getMessage("업체코드 검색중 오류로 인해 조회되지 않았습니다."));
 			}
 		}
 

+ 2 - 2
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -556,9 +556,9 @@
 		        AND G.SUPPLY_COMP_CD = #{supplyCompCd}
 		        </if>
 		        <if test="multiSupplyCompCd != null and multiSupplyCompCd != ''">
-		            AND G.SUPPLY_COMP_CD IN
+		        AND G.SUPPLY_COMP_CD IN
 		            <foreach collection="multiSupplyCompCd" item="item" index="index"  open="(" close=")" separator=",">
-		                #{item}
+		        #{item}
 		            </foreach>
 		        </if>
 		        <if test="brandCd != null and brandCd != ''">

+ 11 - 11
src/main/webapp/WEB-INF/views/goods/GoodsListForm.html

@@ -33,7 +33,7 @@
 			<!-- 검색조건 영역 -->
 			<!-- TITLE -->
 			<div class="panelTitle">
-				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 키워드, 발생일</font>중 하나를 꼭 입력해 주세요.</h3>
+				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 브랜드, 키워드, 발생일</font>중 하나를 꼭 입력해 주세요.</h3>
 				<span class="panelControl">
 					<i class="fa fa-chevron-up"></i>
 				</span>
@@ -52,8 +52,8 @@
 						<col style="width: 16%;"/>
 					</colgroup>
 					<tr>
-						<th>업체/브랜드<em class="required" title="필수"></em></th>
-						<td colspan="3">
+						<th>업체<em class="required" title="필수"></em></th>
+						<td>
 							<input type="text" class="w100" name="supplyCompSearchTxt" id="supplyCompSearchTxt" maxlength="20" />
 							<button type="button" class="btn icn" id="btnSearchSupplyComp"><i class="fa fa-search"></i></button>
 							<span id="supplyCompText"></span>
@@ -75,6 +75,13 @@
 							<span id="brandText"></span>
 							<input type="hidden" name="brandList"/>
 						</td>
+						<th>상품타입</th>
+						<td>
+							<select name="goodsType" id="goodsType">
+								<option value="">[전체]</option>
+								<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
 						<th rowspan="4">키워드<em class="required" title="필수"></em></th>
 						<td rowspan="4">
 							<select name="search" id="search">
@@ -209,14 +216,7 @@
 					</tr>
 					<tr>
 						<th>발생일<em class="required" title="필수"></em></th>
-						<td colspan="5" id="sellTerms"></td>
-						<th>상품타입</th>
-						<td>
-							<select name="goodsType" id="goodsType">
-								<option value="">[전체]</option>
-								<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-							</select>
-						</td>
+						<td colspan="7" id="sellTerms"></td>
 					</tr>
 				</table>
 				<ul class="panelBar">