From 64be8474de02df92a2006aa0a1536d2eb5c9b25a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Mon, 24 Nov 2025 15:30:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=AE=A2=E7=AB=8B=E5=87=8F=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E6=B5=8B=E8=AF=95=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/czg/controller/NotifyController.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cash-api/order-server/src/main/java/com/czg/controller/NotifyController.java b/cash-api/order-server/src/main/java/com/czg/controller/NotifyController.java index 435d84022..318f886ae 100644 --- a/cash-api/order-server/src/main/java/com/czg/controller/NotifyController.java +++ b/cash-api/order-server/src/main/java/com/czg/controller/NotifyController.java @@ -4,8 +4,12 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.io.IoUtil; import com.alibaba.fastjson2.JSONObject; import com.czg.CzgPayUtils; +import com.czg.account.service.ShopInfoService; import com.czg.entity.CzgBaseRespParams; +import com.czg.market.entity.MkShopConsumeDiscountRecord; import com.czg.market.service.MkDistributionUserService; +import com.czg.market.service.MkShopConsumeDiscountRecordService; +import com.czg.order.entity.OrderInfo; import com.czg.order.entity.OrderPayment; import com.czg.order.service.OrderInfoService; import com.czg.order.service.OrderPaymentService; @@ -15,8 +19,10 @@ import com.mybatisflex.core.query.QueryWrapper; import jakarta.annotation.Resource; import jakarta.servlet.http.HttpServletRequest; import lombok.extern.slf4j.Slf4j; +import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.io.IOException; @@ -41,6 +47,15 @@ public class NotifyController { private MkDistributionUserService distributionUserService; @Resource private OrderPaymentService paymentService; + @Resource + private MkShopConsumeDiscountRecordService consumeDiscountRecordService; + + @RequestMapping("clear") + public String clear(@RequestParam Integer shopId) { + consumeDiscountRecordService.remove(new QueryWrapper().eq(MkShopConsumeDiscountRecord::getShopId, shopId)); + orderInfoService.remove(new QueryWrapper().eq(OrderInfo::getShopId, shopId)); + return "success"; + } @RequestMapping("/payCallBack")