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

일괄 저장시 일반상품만 체크로직 추가

eskim 4 лет назад
Родитель
Сommit
eb05dc3908
1 измененных файлов с 21 добавлено и 22 удалено
  1. 21 22
      src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

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

@@ -110,12 +110,10 @@ public class TsaGoodsController extends TsaBaseController {
 
 	@Autowired
 	private TscKakaotalkService coreKakaotalkService;
-	
+
 	@Autowired
 	private TsaCustomerService customerService;
-	
-	
-	
+
 	@Autowired
 	private ObjectMapper mapper;
 
@@ -685,17 +683,19 @@ public class TsaGoodsController extends TsaBaseController {
 					}
 
 					//고시정보
-					GoodsNotiInfo goodsNotiInfo = new GoodsNotiInfo();
-					goodsNotiInfo.setGoodsCd(tmpGoods.getGoodsCd());
-					goodsNotiInfo.setNiClsfCd(tmpGoods.getNiClsfCd());
-					Collection<GoodsNotiInfo> goodsNotiInfoList = goodsService.getGoodsNotiInfoList(goodsNotiInfo);
-					if (goodsNotiInfoList == null || goodsNotiInfoList.isEmpty()) {
-						returnGoods += tmpGoods.getGoodsCd() + ",";
-					} else {
-						for (GoodsNotiInfo tmpGoodsNotiInfo : goodsNotiInfoList) {
-							if (StringUtils.isBlank(tmpGoodsNotiInfo.getNiContent())) {
-								returnGoods += tmpGoods.getGoodsCd() + ",";
-								break;
+					if ("G056_N".equals(dataGoods.getGoodsType())) {
+						GoodsNotiInfo goodsNotiInfo = new GoodsNotiInfo();
+						goodsNotiInfo.setGoodsCd(tmpGoods.getGoodsCd());
+						goodsNotiInfo.setNiClsfCd(tmpGoods.getNiClsfCd());
+						Collection<GoodsNotiInfo> goodsNotiInfoList = goodsService.getGoodsNotiInfoList(goodsNotiInfo);
+						if (goodsNotiInfoList == null || goodsNotiInfoList.isEmpty()) {
+							returnGoods += tmpGoods.getGoodsCd() + ",";
+						} else {
+							for (GoodsNotiInfo tmpGoodsNotiInfo : goodsNotiInfoList) {
+								if (StringUtils.isBlank(tmpGoodsNotiInfo.getNiContent())) {
+									returnGoods += tmpGoods.getGoodsCd() + ",";
+									break;
+								}
 							}
 						}
 					}
@@ -2007,7 +2007,7 @@ public class TsaGoodsController extends TsaBaseController {
 	@PostMapping("/reinbound/inform/send")
 	@ResponseBody
 	public GagaResponse sendReinboundInform(@RequestBody ReinboundInform reinboundInform) {
-		
+
 		if (reinboundInform.getArrRinbdInfoSq().length <= 0) {
 			throw new IllegalStateException(message.getMessage("FAIL_1001"));
 		}
@@ -2032,7 +2032,7 @@ public class TsaGoodsController extends TsaBaseController {
 			// **** 알림톡 발송 start ****
 			try {
 				log.info("[카카오 알림톡 발송 정보] - 재입고알림 발송: " + oneParam.toString());
-				
+
 				GagaMap goods = new GagaMap();
 				goods.set("custNo", oneParam.getCustNo());
 				goods.set("custNm", oneParam.getCustNm());
@@ -2042,10 +2042,10 @@ public class TsaGoodsController extends TsaBaseController {
 				goods.set("cellPhnno", oneParam.getCellPhnno());
 				goods.set("goodsCd", oneParam.getGoodsCd());
 				goods.set("colorCd", oneParam.getOptCd1());
-				
-				log.info("sendReinboundInform goods={}", goods );
+
+				log.info("sendReinboundInform goods={}", goods);
 				coreKakaotalkService.goodsRestock(goods, TsaSession.getInfo().getUserNo());
-				
+
 			} catch (Exception e) {
 				e.getStackTrace();
 				throw new IllegalStateException("재입고알림 알림톡 발송을 실패하였습니다.");
@@ -2056,8 +2056,7 @@ public class TsaGoodsController extends TsaBaseController {
 //			goodsService.sendReinboundInform(oneParam);
 			idx++;
 		}
-		
-		
+
 		return super.ok(message.getMessage("SUCC_0001"));
 	}