Explorar o código

상품상세 동영상 콜백함수

eskim %!s(int64=4) %!d(string=hai) anos
pai
achega
bca7fed2ab

+ 9 - 0
src/main/java/com/style24/front/biz/dao/TsfKollusDao.java

@@ -43,5 +43,14 @@ public interface TsfKollusDao {
 	 * @since 2021. 4. 19
 	 */
 	void updateDisplayVideo(KollusResult result);
+	
+	/**
+	 * 카테노이드 Kollus 상품 상세 동영상 업로드 결과 처리
+	 * @param result - 업로드결과 정보
+	 * @author eskim
+	 * @since 2021. 7. 15
+	 */
+	void updateGoodsDescVideo(KollusResult result);
+
 
 }

+ 11 - 0
src/main/java/com/style24/front/biz/service/TsfKollusService.java

@@ -56,4 +56,15 @@ public class TsfKollusService {
 		kollusDao.updateDisplayVideo(result);
 	}
 
+	/**
+	 * 카테노이드 Kollus 상품 상세 동영상 업로드 결과 처리
+	 * @param goods
+	 * @author eskim
+	 * @since 2021. 7. 15
+	 */
+	@Transactional("shopTxnManager")
+	public void updateGoodsDescVideoResult(KollusResult result) {
+		kollusDao.updateGoodsDescVideo(result);
+	}
+
 }

+ 16 - 0
src/main/java/com/style24/front/biz/web/TsfKollusUploadController.java

@@ -79,4 +79,20 @@ public class TsfKollusUploadController extends TsfBaseController {
 		return super.ok();
 	}
 
+	/**
+	 * 상품 상세 동영상 업로드 결과
+	 * @author eskim
+	 * @since 2021. 7. 15
+	 */
+	@RequestMapping("/goods/desc/upload/result")
+	@ResponseBody
+	public GagaResponse updateGoodsDescVideoResult(KollusResult result) {
+		log.info("{}", result);
+
+		if (StringUtils.isNotBlank(result.getMedia_content_key()) && StringUtils.isNotBlank(result.getUpload_file_key())) {
+			kollusService.updateGoodsDescVideoResult(result);
+		}
+
+		return super.ok();
+	}
 }

+ 13 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfKollus.xml

@@ -44,4 +44,17 @@
 		AND    STR_VAR2 = #{upload_file_key}
 	</update>
 	
+	
+	<!-- 카테노이드 Kollus 상품 상세 동영상 업로드 결과 처리 -->
+	<update id="updateGoodsDescVideo" parameterType="KollusResult">
+		/* TsfKollus.updateGoodsDescVideo */
+		UPDATE TB_GOODS_CONTENTS
+		SET    KMC_KEY = #{media_content_key}
+		     , UPD_NO = 0
+		     , UPD_DT = NOW()
+		WHERE  KUF_KEY = #{upload_file_key}
+		AND    GOODS_CONTENTS_TYPE = 'G086_1'
+	</update>
+	
+	
 </mapper>