|
|
@@ -1,6 +1,5 @@
|
|
|
package com.cyksj.web.controller.manage.goods;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
@@ -86,16 +85,16 @@ public class GiftCardController {
|
|
|
if (byId == null) {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
|
- if (!byId.getStatus()) {
|
|
|
- //校验礼品卡已上架多少个 最多上架三个
|
|
|
- int count = giftCardGoodsSkuService.count(Wrappers.lambdaQuery(GiftCardGoodsSku.class)
|
|
|
- .eq(GiftCardGoodsSku::getStatus, true)
|
|
|
- .eq(GiftCardGoodsSku::getDeleted, true)
|
|
|
- .eq(GiftCardGoodsSku::getGcType, byId.getGcType()));
|
|
|
- if (count > 2) {
|
|
|
- throw BusinessRuntimeException.getInstance(String.format("%s最多上架三个", byId.getGcType() == 1 ? "现金卡" : "虚拟卡"));
|
|
|
- }
|
|
|
- }
|
|
|
+// if (!byId.getStatus()) {
|
|
|
+// //校验礼品卡已上架多少个 最多上架三个
|
|
|
+// int count = giftCardGoodsSkuService.count(Wrappers.lambdaQuery(GiftCardGoodsSku.class)
|
|
|
+// .eq(GiftCardGoodsSku::getStatus, true)
|
|
|
+// .eq(GiftCardGoodsSku::getDeleted, true)
|
|
|
+// .eq(GiftCardGoodsSku::getGcType, byId.getGcType()));
|
|
|
+// if (count > 2) {
|
|
|
+// throw BusinessRuntimeException.getInstance(String.format("%s最多上架三个", byId.getGcType() == 1 ? "现金卡" : "虚拟卡"));
|
|
|
+// }
|
|
|
+// }
|
|
|
byId.setStatus(!byId.getStatus());
|
|
|
giftCardGoodsSkuService.updateById(byId);
|
|
|
//设置对应礼品卡平台 最低价格
|