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

상품 동영상 업로드 관련 수정

eskim 5 лет назад
Родитель
Сommit
0489ffce32
1 измененных файлов с 6 добавлено и 4 удалено
  1. 6 4
      src/main/java/com/style24/admin/biz/service/TsaGoodsService.java

+ 6 - 4
src/main/java/com/style24/admin/biz/service/TsaGoodsService.java

@@ -2235,10 +2235,12 @@ public class TsaGoodsService {
 
 
 		if (goodsVideo.getVideoSq() == null || goodsVideo.getVideoSq() == 0) {
 		if (goodsVideo.getVideoSq() == null || goodsVideo.getVideoSq() == 0) {
 
 
-			Collection<GoodsVideo> goodsVideoList = goodsDao.getGoodsVideoList(goodsVideo);
-			if (goodsVideoList != null && goodsVideoList.size() > 0) {
-				GoodsVideo orgingGoodsVideo = goodsVideoList.iterator().next();
-				goodsVideo.setVideoSq(orgingGoodsVideo.getVideoSq());
+			if ("Y".equals(goodsVideo.getVideoGb())) {
+				Collection<GoodsVideo> goodsVideoList = goodsDao.getGoodsVideoList(goodsVideo);
+				if (goodsVideoList != null && goodsVideoList.size() > 0) {
+					GoodsVideo orgingGoodsVideo = goodsVideoList.iterator().next();
+					goodsVideo.setVideoSq(orgingGoodsVideo.getVideoSq());
+				}	
 			}
 			}
 			goodsDao.createGoodsVideo(goodsVideo);
 			goodsDao.createGoodsVideo(goodsVideo);