积分商品 支付回调处理

This commit is contained in:
2025-12-11 11:37:17 +08:00
parent cf17edee43
commit 62588e5829
2 changed files with 2 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
package com.czg.controller.user;
import com.czg.account.entity.ShopInfo;
import com.czg.account.vo.PointsShopListVO;
import com.czg.market.entity.MkPointsConfig;
import com.czg.market.entity.MkPointsUser;
@@ -11,8 +10,6 @@ import com.czg.market.service.MkPointsUserService;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.query.QueryCondition;
import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -172,7 +172,7 @@ public class PointsGoodPayServiceImpl implements PointsGoodPayService {
}
record.setStatus("已完成");
record.setCheckoutTime(LocalDateTime.now());
goodsRecordService.save(record);
goodsRecordService.saveOrUpdate(record);
MkShopCouponGiftDTO giftDTO = new MkShopCouponGiftDTO()
.setCouponId(goods.getCouponId())
.setShopId(record.getShopId())
@@ -188,7 +188,7 @@ public class PointsGoodPayServiceImpl implements PointsGoodPayService {
} else {
record.setStatus("待核销");
record.setCouponCode(RandomUtil.randomNumbers(12));
goodsRecordService.save(record);
goodsRecordService.saveOrUpdate(record);
goodsService.upNumberById(goods.getId(), goods.getQuantity() - record.getNumber(), goods.getTotalExchangeCount() + record.getNumber());
//扣除积分
pointsUserService.alterPoints(record.getUserId(), null, record.getShopId(), PointsConstant.SUB,