Selaa lähdekoodia

现兑换价格赋值原兑换价格

Liugl 3 vuotta sitten
vanhempi
commit
b9517157a0

+ 3 - 3
mp-admin/src/main/java/com/qs/mp/web/controller/api/admin/GoodsMgrController.java

@@ -166,9 +166,6 @@ public class GoodsMgrController extends BaseApiController {
 		String description = URLDecoder.decode(goodsParam.getDescription());
 		goods.setDescription(description);
 		goods.setStatus(GoodsStatusEnum.PUT_INIT);
-		if(null == goods.getOriginPrice()) {
-			goods.setOriginPrice(goods.getExchangePrice());
-		}
 		// 多SKU
 		List<GoodsSku> skuList = goodsParam.getSkuList();
 		if(goods.getMultiSku() == 1) { // 
@@ -185,6 +182,9 @@ public class GoodsMgrController extends BaseApiController {
 				goods.setQuantity(totalQuantity);
 			}
 		}
+		if(null == goods.getOriginPrice()) {
+			goods.setOriginPrice(goods.getExchangePrice());
+		}
 		// 3.插入数据
 		try {
 			goodsService.saveGoods(goods, skuList);