Sfoglia il codice sorgente

tb_barnd_md.md_id => md_no 변경관련 수정

eskim 5 anni fa
parent
commit
377f11487f

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

@@ -322,7 +322,7 @@ public class TsaGoodsController extends TsaBaseController {
 		// 입점업체담당자는 업체코드 설정
 		if ("G001_B000".equals(TsaSession.getInfo().getRoleCd())) {
 			goodsSearch.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
-			goodsSearch.setMdId(Integer.toString(TsaSession.getInfo().getUserNo()));
+			goodsSearch.setMdNo(TsaSession.getInfo().getUserNo());
 		}
 
 		// multi row 검색관련 처리
@@ -362,7 +362,7 @@ public class TsaGoodsController extends TsaBaseController {
 		// 입점업체담당자는 업체코드 설정
 		if ("G001_B000".equals(TsaSession.getInfo().getRoleCd())) {
 			goodsSearch.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
-			goodsSearch.setMdId(Integer.toString(TsaSession.getInfo().getUserNo()));
+			goodsSearch.setMdNo(TsaSession.getInfo().getUserNo());
 		}
 		goodsSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 
@@ -534,7 +534,7 @@ public class TsaGoodsController extends TsaBaseController {
 		// 입점업체담당자는 업체코드 설정
 		if ("G001_B000".equals(TsaSession.getInfo().getRoleCd())) {
 			goodsSearch.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
-			goodsSearch.setMdId(Integer.toString(TsaSession.getInfo().getUserNo()));
+			goodsSearch.setMdNo(TsaSession.getInfo().getUserNo());
 		}
 		goodsSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		result.set("goodsExcelList", goodsService.getGoodsList(goodsSearch));
@@ -855,6 +855,7 @@ public class TsaGoodsController extends TsaBaseController {
 		return super.ok(message.getMessage("SUCC_0001"));
 	}
 
+
 	/**
 	 * 상품 대량 등록 화면
 	 *
@@ -1014,7 +1015,7 @@ public class TsaGoodsController extends TsaBaseController {
 		// 입점업체담당자는 업체코드 설정
 		if ("G001_B000".equals(TsaSession.getInfo().getRoleCd())) {
 			goodsSearch.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
-			goodsSearch.setMdId(Integer.toString(TsaSession.getInfo().getUserNo()));
+			goodsSearch.setMdNo(TsaSession.getInfo().getUserNo());
 		}
 
 		// multi row 검색관련 처리
@@ -1150,7 +1151,7 @@ public class TsaGoodsController extends TsaBaseController {
 		// 입점업체담당자는 업체코드 설정
 		if ("B000".equals(TsaSession.getInfo().getRoleCd())) {
 			goodsSearch.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
-			goodsSearch.setMdId(Integer.toString(TsaSession.getInfo().getUserNo()));
+			goodsSearch.setMdNo(TsaSession.getInfo().getUserNo());
 		}
 
 		// multi row 검색관련 처리
@@ -1324,7 +1325,7 @@ public class TsaGoodsController extends TsaBaseController {
 		// 입점업체담당자는 업체코드 설정
 		if ("G001_B000".equals(TsaSession.getInfo().getRoleCd())) {
 			goodsSearch.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
-			goodsSearch.setMdId(Integer.toString(TsaSession.getInfo().getUserNo()));
+			goodsSearch.setMdNo(TsaSession.getInfo().getUserNo());
 		}
 
 		// multi row 검색관련 처리
@@ -1348,5 +1349,4 @@ public class TsaGoodsController extends TsaBaseController {
 		return result;
 	}
 
-
 }

+ 1 - 1
style24.admin/src/main/java/com/style24/persistence/domain/GoodsSearch.java

@@ -36,7 +36,7 @@ public class GoodsSearch extends TscBaseDomain {
 	private String soldOutYn;
 	private String erpStockLinkYn;
 	private String erpPriceLinkYn;
-	private String mdId;
+	private int mdNo;
 	private String currPrice;
 	private String currPriceSt;
 	private String currPriceEd;

+ 19 - 17
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -230,11 +230,11 @@
 		                   ) SD
 		                   ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
 		                        OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')) 
-		                        <if test="mdId != null and mdId != ''">
+		                        <if test="mdNo != null and mdNo > 0">
 		                        AND G.BRAND_CD IN (
 		                                           SELECT DISTINCT BRAND_CD
 		                                           FROM TB_BRAND_MD
-		                                           WHERE MD_ID = #{mdId}
+		                                           WHERE MD_NO = #{mdNo}
 		                                           )
 		                       </if>
 		                   )
@@ -339,11 +339,11 @@
 		                   ) SD
 		                   ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
 		                        OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')) 
-		                        <if test="mdId != null and mdId != ''">
+		                        <if test="mdNo != null and mdNo > 0">
 		                        AND G.BRAND_CD IN (
 		                                           SELECT DISTINCT BRAND_CD
 		                                           FROM TB_BRAND_MD
-		                                           WHERE MD_ID = #{mdId}
+		                                           WHERE MD_NO = #{mdNo}
 		                                           )
 		                       </if>
 		                   )
@@ -500,11 +500,11 @@
 		        <if test="erpPriceLinkYn != null and erpPriceLinkYn != ''">
 		        AND G.ERP_PRICE_LINK_YN = #{erpPriceLinkYn}
 		        </if>
-		        <if test="mdId != null and mdId != ''">
+		        <if test="mdNo != null and mdNo > 0">
 		        AND G.BRAND_CD IN (
 		            SELECT DISTINCT BRAND_CD
 		            FROM   TB_BRAND_MD
-		            WHERE  MD_ID = #{mdId}
+		            WHERE  MD_NO = #{mdNo}
 		        )
 		        </if>
 		        <if test="currPriceSt != null and currPriceSt != ''">
@@ -661,11 +661,11 @@
 		          ) SD
 		           ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
 		                 OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')) 
-		                <if test="mdId != null and mdId != ''">
+		                <if test="mdNo != null and mdNo > 0">
 		                AND G.BRAND_CD IN (
 		                                   SELECT DISTINCT BRAND_CD
 		                                   FROM TB_BRAND_MD
-		                                   WHERE MD_ID = #{mdId}
+		                                   WHERE MD_NO = #{mdNo}
 		                                  )
 		               </if>
 		              )
@@ -1236,6 +1236,7 @@
 		  , GOODS_SNM
 		  , GOODS_SNM1
 		  , COLOR_CD
+		  , MAIN_COLOR_YN
 		  , STYLE_YEAR
 		  , SEASON_CD
 		  , SEX_GB
@@ -1276,6 +1277,7 @@
 		  , #{goodsSnm}
 		  , #{goodsSnm1}
 		  , #{colorCd}
+		  , #{mainColorYn}
 		  , #{styleYear}
 		  , #{seasonCd}
 		  , #{sexGb}
@@ -1549,7 +1551,7 @@
 	<!-- 상품코드 생성 -->
 	<insert id="createGoodsSequence" parameterType="Goods">
 		/* TsaGoods.createGoodsSequence */
-		<selectKey keyProperty="goodsSq" resultType="int" order="BEFORE">
+		<selectKey keyProperty="goodsSq" resultType="int" order="AFTER">
 		SELECT GOODS_SQ FROM TB_GOODS_SEQUENCE
 		</selectKey>
 		INSERT INTO TB_GOODS_SEQUENCE (GOODS_SQ) VALUES (NULL)
@@ -1589,11 +1591,11 @@
 		          ) SD
 		          ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
 		               OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')) 
-		               <if test="mdId != null and mdId != ''">
+		               <if test="mdNo != null and mdNo > 0">
 		               AND G.BRAND_CD IN (
 		                                  SELECT DISTINCT BRAND_CD
 		                                  FROM TB_BRAND_MD
-		                                  WHERE MD_ID = #{mdId}
+		                                  WHERE MD_NO = #{mdNo}
 		                                  )
 		              </if>
 		           )
@@ -1659,11 +1661,11 @@
 		                  ) SD
 		                  ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
 		                       OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')) 
-		                       <if test="mdId != null and mdId != ''">
+		                       <if test="mdNo != null and mdNo > 0">
 		                      AND G.BRAND_CD IN (
 		                                          SELECT DISTINCT BRAND_CD
 		                                          FROM TB_BRAND_MD
-		                                          WHERE MD_ID = #{mdId}
+		                                          WHERE MD_NO = #{mdNo}
 		                                          )
 		                      </if>
 		                   )
@@ -1812,11 +1814,11 @@
 		  ) SD
 		  ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
 		       OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')) 
-		       <if test="mdId != null and mdId != ''">
+		       <if test="mdNo != null and mdNo > 0">
 		       AND G.BRAND_CD IN (
 		                          SELECT DISTINCT BRAND_CD
 		                          FROM TB_BRAND_MD
-		                          WHERE MD_ID = #{mdId}
+		                          WHERE MD_NO = #{mdNo}
 		                          )
 		      </if>
 		   )
@@ -1881,11 +1883,11 @@
 		                  ) SD
 		                  ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
 		                       OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')) 
-		                       <if test="mdId != null and mdId != ''">
+		                       <if test="mdNo != null and mdNo > 0">
 		                      AND G.BRAND_CD IN (
 		                                          SELECT DISTINCT BRAND_CD
 		                                          FROM TB_BRAND_MD
-		                                          WHERE MD_ID = #{mdId}
+		                                          WHERE MD_NO = #{mdNo}
 		                                          )
 		                      </if>
 		                   )

+ 7 - 7
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaRenderer.xml

@@ -171,7 +171,7 @@
 		FROM   TB_BRAND A
 		INNER JOIN TB_BRAND_MD B ON A.BRAND_CD = B.BRAND_CD
 		WHERE  A.USE_YN = 'Y'
-		AND    B.MD_ID = #{userNo}
+		AND    B.MD_NO = #{userNo}
 		GROUP  BY A.BRAND_CD, A.BRAND_ENM
 		ORDER  BY A.BRAND_CD
 	</select>
@@ -265,11 +265,11 @@
 	<select id="getBrandMdList" resultType="CommonCode">
 		/* TsaRenderer.getBrandMdList */
 		SELECT DISTINCT
-		       A.MD_ID   AS CD
+		       A.MD_NO   AS CD
 		     , C.USER_NM AS CD_NM
 		FROM   TB_BRAND_MD A
 		INNER JOIN TB_BRAND B ON A.BRAND_CD = B.BRAND_CD
-		INNER JOIN TB_USER C ON A.MD_ID = C.USER_ID
+		INNER JOIN TB_USER C ON A.MD_NO = C.USER_NO
 		ORDER  BY C.USER_NM
 	</select>
 
@@ -294,8 +294,8 @@
 		FROM   TB_BRAND_MD A
 		     , TB_BRAND B
 		WHERE  A.BRAND_CD = B.BRAND_CD
-		<if test='mdId != null and mdId != "" and mdId != "all"'>
-		AND    A.MD_ID = #{mdId}
+		<if test='mdNo != null and mdNo != "" and mdNo != "all"'>
+		AND    A.MD_NO = #{mdNo}
 		</if>
 	</select>
 
@@ -308,8 +308,8 @@
 		FROM   TB_BRAND_MD A
 		      ,TB_BRAND B
 		WHERE  A.BRAND_CD = B.BRAND_CD
-		<if test='mdId != null and mdId != "" and mdId != "all"'>
-		AND    A.MD_ID = #{mdId}
+		<if test='mdNo != null and mdNo != "" and mdNo != "all"'>
+		AND    A.MD_NO = #{mdNo}
 		</if>
 		GROUP  BY BRAND_GRP_NM
 	</select>