Просмотр исходного кода

Merge remote-tracking branch 'origin/develop' into xodud1202

xodud lee 4 лет назад
Родитель
Сommit
ff697d373f

+ 16 - 0
src/main/java/com/style24/scm/biz/service/TssGoodsService.java

@@ -2319,6 +2319,22 @@ public class TssGoodsService {
 			goods.setGoodsStat("10");
 			return goods;
 		}
+		
+		// 시즌
+		if (StringUtils.isBlank(goodsMass.getSeasonCd())) {
+			goods.setGoodsRegMsg("시즌코드 오류");
+			goods.setGoodsStat("10");
+			return goods;
+		}
+		goods.setSeasonCd(goodsMass.getSeasonCd().trim().toUpperCase());
+		commonCode.setCdGb("G006"); 	//시즌
+		commonCode.setCd(goods.getSeasonCd());
+		Collection<CommonCode> seasonCdList = rendererService.getCommonCodeList(commonCode);
+		if (seasonCdList == null || seasonCdList.isEmpty()) {
+			goods.setGoodsRegMsg("시즌코드구분 오류");
+			goods.setGoodsStat("10");
+			return goods;
+		}
 
 		// 브랜드 확인
 		Brand brand = new Brand();

+ 16 - 9
src/main/java/com/style24/scm/biz/web/TssCustomerController.java

@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.style24.core.biz.service.TscAnswerPhaseService;
+import com.style24.core.biz.service.TscKakaotalkService;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.domain.AnswerPhase;
 import com.style24.persistence.domain.Counsel;
@@ -47,6 +48,9 @@ public class TssCustomerController extends TssBaseController {
 
 	@Autowired
 	private TscAnswerPhaseService ansPhaseService;
+	
+	@Autowired
+	private TscKakaotalkService kakaotalkService;
 
 	/**
 	* 상품문의관리 화면
@@ -139,15 +143,18 @@ public class TssCustomerController extends TssBaseController {
 		// 상품문의상세 조회
 		Counsel tCounsel = counselService.getGoodsQna(counsel.getCounselSq());
 
-//		// TODO. 고객이 SMS답변수신을 요청했을 때
-//		if (counsel.getSmsReqYn().equals("Y")) {
-//			try {
-//				// 답변완료안내 카카오알림톡 발송
-//				kakaoService.sendQnaAnswer(tCounsel);
-//			} catch (Exception e) {
-//				// Do nothing
-//			}
-//		}
+		// TODO. 고객이 SMS답변수신을 요청했을 때
+		if (counsel.getSmsReqYn().equals("Y")) {
+			try {
+				if (counsel.getCounselType().equals("G")) {
+					//답변완료안내 카카오알림톡 발송
+					kakaotalkService.sendGoodsAskNotify(tCounsel,tCounsel.getCustNo());
+				}
+				// 		
+			} catch (Exception e) {
+				// Do nothing
+			}
+		}
 
 		return super.ok(message.getMessage("SUCC_0001"));
 	}

+ 1 - 1
src/main/java/com/style24/scm/biz/web/TssGoodsController.java

@@ -1205,7 +1205,7 @@ public class TssGoodsController extends TssBaseController {
 			// 입점상품등록
 			// DB 처리 시 사용되는 파라미터명(셀명) 설정 -
 			String[] goodsNames = {"supplyGoodsCd", "supplyCompCd", "brandCd", "goodsNm", "goodsTnm", "goodsSnm1", "itemkindCd",
-				"sexGb", "listPrice", "currPrice", "goodsGb", "formalGb", "originCd", "makeYmd", "taxGb", "ageGrpCd", "adultYn",
+				"sexGb", "listPrice", "currPrice", "goodsGb", "formalGb",  "seasonCd", "originCd", "makeYmd", "taxGb", "ageGrpCd", "adultYn",
 				"certTargetGb", "certFormGb", "certType", "certNum", "optStr", "goodsContent",
 				"niClsfCd", "niContent1", "niContent2", "niContent3", "niContent4", "niContent5",
 				"niContent6", "niContent7", "niContent8", "niContent9", "niContent10", "niContent11", "niContent12",

+ 1 - 0
src/main/webapp/WEB-INF/views/customer/GoodsQnaDetailForm.html

@@ -28,6 +28,7 @@
 			<form id="qnaDetailForm" name="qnaDetailForm" action="#" th:action="@{'/customer/qna/answer/save'}" th:method="post" th:object="${counselInfo}">
 				<input type="hidden" name="counselSq" th:value="*{counselSq}"/>
 				<input type="hidden" name="smsReqYn" th:value="*{smsReqYn}"/>
+				<input type="hidden" name="counselType" value="G"/>
 				
 				<h4>상담정보</h4>
 				<table class="tableStyle" aria-describedby="상담정보">

+ 3 - 3
src/main/webapp/WEB-INF/views/goods/GoodsDetailForm.html

@@ -162,7 +162,7 @@
 									</tr>
 									<tr>
 										<td rowspan="12">&nbsp;</td>
-										<th>시즌</th>
+										<th>시즌<em class="required" title="필수"></em></th>
 										<td >
 											<select  name="seasonCd" id="seasonCd">
 												<option value="">[선택]</option>
@@ -1527,7 +1527,7 @@
 		}
 
 		//시즌 - 입점은 필수 제외
-		if ("Y" == $("#goodsDetailForm input[name=selfGoodsYn]").val()){
+		//if ("Y" == $("#goodsDetailForm input[name=selfGoodsYn]").val()){
 			if(gagajf.isNull($("#goodsDetailForm select[name=seasonCd]").val())){
 				mcxDialog.alertC("시즌을 선택해 주세요.", {
 					sureBtnText: "확인",
@@ -1537,7 +1537,7 @@
 				});
 				return;
 			}	
-		}
+		//}
 		
 		//성별
 		if(gagajf.isNull($("#goodsDetailForm select[name=sexGb]").val())){

+ 2 - 2
src/main/webapp/WEB-INF/views/goods/GoodsRegisterForm.html

@@ -135,9 +135,9 @@
 											<label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y" checked="checked"/>Y</label>
 											<label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnN" value="N"/>N</label>
 										</td>
-										<th>시즌</th>
+										<th>시즌<em class="required" title="필수"></em></th>
 										<td >
-											<select  name="seasonCd" id="seasonCd">
+											<select  name="seasonCd" id="seasonCd" required="required" data-valid-name="시즌" >
 												<option value="">[선택]</option>
 												<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
 											</select>