|
|
@@ -6,14 +6,14 @@ import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
+import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.front.biz.service.TsfKollusService;
|
|
|
import com.style24.front.support.controller.TsfBaseController;
|
|
|
import com.style24.persistence.domain.KollusResult;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
-import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
-
|
|
|
/**
|
|
|
* Kollus Upload Controller (카테노이드 동영상 업로드)
|
|
|
*
|
|
|
@@ -28,6 +28,9 @@ public class TsfKollusUploadController extends TsfBaseController {
|
|
|
@Autowired
|
|
|
private TsfKollusService kollusService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TscMessageByLocale message;
|
|
|
+
|
|
|
/**
|
|
|
* 상품 동영상 업로드 결과
|
|
|
* @author gagamel
|
|
|
@@ -38,11 +41,16 @@ public class TsfKollusUploadController extends TsfBaseController {
|
|
|
public GagaResponse updateGoodsVideoResult(KollusResult result) {
|
|
|
log.info("{}", result);
|
|
|
|
|
|
+ int rst = 0;
|
|
|
if (StringUtils.isNotBlank(result.getMedia_content_key()) && StringUtils.isNotBlank(result.getUpload_file_key())) {
|
|
|
- kollusService.updateGoodsVideoResult(result);
|
|
|
+ rst = kollusService.updateGoodsVideoResult(result);
|
|
|
}
|
|
|
|
|
|
- return super.ok();
|
|
|
+ if (rst > 0) {
|
|
|
+ return super.ok();
|
|
|
+ } else {
|
|
|
+ return super.error(message.getMessage("FAIL_0004"));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -55,11 +63,16 @@ public class TsfKollusUploadController extends TsfBaseController {
|
|
|
public GagaResponse updateReviewVideoResult(KollusResult result) {
|
|
|
log.info("{}", result);
|
|
|
|
|
|
+ int rst = 0;
|
|
|
if (StringUtils.isNotBlank(result.getMedia_content_key()) && StringUtils.isNotBlank(result.getUpload_file_key())) {
|
|
|
- kollusService.updateReviewVideoResult(result);
|
|
|
+ rst = kollusService.updateReviewVideoResult(result);
|
|
|
}
|
|
|
|
|
|
- return super.ok();
|
|
|
+ if (rst > 0) {
|
|
|
+ return super.ok();
|
|
|
+ } else {
|
|
|
+ return super.error(message.getMessage("FAIL_0004"));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -72,11 +85,16 @@ public class TsfKollusUploadController extends TsfBaseController {
|
|
|
public GagaResponse updateDisplayVideoResult(KollusResult result) {
|
|
|
log.info("{}", result);
|
|
|
|
|
|
+ int rst = 0;
|
|
|
if (StringUtils.isNotBlank(result.getMedia_content_key()) && StringUtils.isNotBlank(result.getUpload_file_key())) {
|
|
|
- kollusService.updateDisplayVideoResult(result);
|
|
|
+ rst = kollusService.updateDisplayVideoResult(result);
|
|
|
}
|
|
|
|
|
|
- return super.ok();
|
|
|
+ if (rst > 0) {
|
|
|
+ return super.ok();
|
|
|
+ } else {
|
|
|
+ return super.error(message.getMessage("FAIL_0004"));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -89,10 +107,15 @@ public class TsfKollusUploadController extends TsfBaseController {
|
|
|
public GagaResponse updateGoodsDescVideoResult(KollusResult result) {
|
|
|
log.info("{}", result);
|
|
|
|
|
|
+ int rst = 0;
|
|
|
if (StringUtils.isNotBlank(result.getMedia_content_key()) && StringUtils.isNotBlank(result.getUpload_file_key())) {
|
|
|
- kollusService.updateGoodsDescVideoResult(result);
|
|
|
+ rst = kollusService.updateGoodsDescVideoResult(result);
|
|
|
}
|
|
|
|
|
|
- return super.ok();
|
|
|
+ if (rst > 0) {
|
|
|
+ return super.ok();
|
|
|
+ } else {
|
|
|
+ return super.error(message.getMessage("FAIL_0004"));
|
|
|
+ }
|
|
|
}
|
|
|
}
|