|
@@ -585,7 +585,17 @@ public class TssGoodsController extends TssBaseController {
|
|
|
@PostMapping("/detail/save")
|
|
@PostMapping("/detail/save")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public GagaResponse saveGoodsDetail(@RequestBody Goods goods) {
|
|
public GagaResponse saveGoodsDetail(@RequestBody Goods goods) {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ Goods goodsOrg = goodsService.getGoodsInfo(goods);
|
|
|
|
|
+
|
|
|
|
|
+ if (goodsOrg == null) {
|
|
|
|
|
+ throw new IllegalStateException("상품코드를 확인해 주세요.");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if ("G008_90".equals(goods.getGoodsStat()) && ("G008_20".equals(goodsOrg.getGoodsStat()) || "G008_40".equals(goodsOrg.getGoodsStat()))) {
|
|
|
|
|
+ throw new IllegalStateException("상품의 [승인완료]상태는 담당 MD에게 요청하세요.");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 상품상태에 따른 이미지 정보 확인 - 상품상태가 승인대기일 경우
|
|
// 상품상태에 따른 이미지 정보 확인 - 상품상태가 승인대기일 경우
|
|
|
if ("G008_40".equals(goods.getGoodsStat())) {
|
|
if ("G008_40".equals(goods.getGoodsStat())) {
|
|
|
Collection<Goods> goodsList = goodsService.getGoodsImgsYn(goods);
|
|
Collection<Goods> goodsList = goodsService.getGoodsImgsYn(goods);
|