新客立减清空测试方法

This commit is contained in:
张松
2025-11-24 15:30:03 +08:00
parent 97b03a8495
commit 64be8474de

View File

@@ -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")