所有跟余额相关模块开关同步开启关闭余额支付

This commit is contained in:
张松
2025-10-24 09:35:38 +08:00
parent 1f34a8c227
commit 5853d2b333
6 changed files with 80 additions and 4 deletions

View File

@@ -5,8 +5,10 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSONArray;
import com.czg.account.dto.shopuser.ShopUserMoneyEditDTO;
import com.czg.account.entity.ShopConfig;
import com.czg.account.entity.ShopInfo;
import com.czg.account.entity.ShopUser;
import com.czg.account.service.ShopConfigService;
import com.czg.account.service.ShopInfoService;
import com.czg.account.service.ShopUserService;
import com.czg.constant.TableValueConstant;
@@ -53,6 +55,8 @@ public class MkConsumeCashbackServiceImpl extends ServiceImpl<MkConsumeCashbackM
private ShopUserService shopUserService;
@DubboReference
private OrderInfoService orderInfoService;
@DubboReference
private ShopConfigService shopConfigService;
@Resource
private MkConsumeCashbackRecordService consumeCashbackRecordService;
@@ -91,6 +95,9 @@ public class MkConsumeCashbackServiceImpl extends ServiceImpl<MkConsumeCashbackM
}
}
shopConfigService.editStatusByShopIdList(shopId, consumeDiscountDTO.getIsEnable(), ShopConfig::getIsAccountPay,
consumeDiscountDTO.getUseType(), consumeDiscountDTO.getShopIdList());
if (consumeDiscountDTO.getCashbackStepList() != null && !consumeDiscountDTO.getCashbackStepList().isEmpty()) {
consumeCashback.setCashbackStepList(JSONArray.toJSONString(consumeDiscountDTO.getCashbackStepList()));
}

View File

@@ -4,9 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSONArray;
import com.czg.account.dto.shopuser.ShopUserMoneyEditDTO;
import com.czg.account.entity.ShopConfig;
import com.czg.account.entity.ShopInfo;
import com.czg.account.entity.ShopUser;
import com.czg.account.service.MemberPointsService;
import com.czg.account.service.ShopConfigService;
import com.czg.account.service.ShopInfoService;
import com.czg.account.service.ShopUserService;
import com.czg.enums.ShopUserFlowBizEnum;
@@ -32,6 +34,7 @@ import com.czg.service.market.mapper.MkShopRechargeMapper;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
@@ -60,6 +63,8 @@ public class MkShopRechargeServiceImpl extends ServiceImpl<MkShopRechargeMapper,
private MkShopCouponRecordService shopCouponRecordService;
@DubboReference
private ShopInfoService shopInfoService;
@DubboReference
private ShopConfigService shopConfigService;
@Override
public MkShopRechargeVO detailApp(Long shopId) {
@@ -134,6 +139,10 @@ public class MkShopRechargeServiceImpl extends ServiceImpl<MkShopRechargeMapper,
shopRechargeDetailService.save(mkShopRechargeDetail);
});
}
shopConfigService.editStatusByShopIdList(shopId, shopRechargeDTO.getIsEnable(), ShopConfig::getIsAccountPay,
shopRechargeDTO.getUseType(), shopRechargeDTO.getShopIdList());
return updateById(shopRecharge);
}