新客立减获取减免金额方法

This commit is contained in:
张松
2025-09-18 16:41:06 +08:00
parent 64b1841782
commit 8e95d7f68d
3 changed files with 6 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
package com.czg.service.market.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.czg.account.entity.ShopUser;
import com.czg.account.service.ShopUserService;
@@ -37,7 +36,7 @@ public class MkShopConsumeDiscountRecordServiceImpl extends ServiceImpl<MkShopCo
private ShopUserService shopUserService;
@Override
public boolean useDiscount(Long recordId) {
public boolean useDiscount(Long recordId, Long orderId, BigDecimal amount) {
return updateChain().eq(MkShopConsumeDiscountRecord::getId, recordId)
.eq(MkShopConsumeDiscountRecord::getIsUse, 0)
.set(MkShopConsumeDiscountRecord::getIsUse, 1).update();