枚举问题

This commit is contained in:
2025-12-18 20:33:08 +08:00
parent 0b9ebaaa96
commit e4f51f2dec
7 changed files with 88 additions and 35 deletions

View File

@@ -2,8 +2,8 @@ package com.czg.service.market.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.czg.account.entity.ShopInfo;
import com.czg.account.service.ShopInfoService;
import com.czg.constants.ShopSwitchTypeEnum;
import com.czg.market.dto.GbWareDTO;
import com.czg.market.dto.GbWareQueryParamDTO;
import com.czg.market.entity.GbWare;
@@ -17,8 +17,6 @@ import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;
import java.io.Serializable;
/**
* 拼团商品 服务层实现。
*
@@ -26,14 +24,14 @@ import java.io.Serializable;
* @since 2025-12-15
*/
@Service
public class GbWareServiceImpl extends ServiceImpl<GbWareMapper, GbWare> implements GbWareService, Serializable {
public class GbWareServiceImpl extends ServiceImpl<GbWareMapper, GbWare> implements GbWareService {
@DubboReference
private ShopInfoService shopInfoService;
@Override
public Page<GbWare> getGbWarePage(GbWareQueryParamDTO param, Long shopId) {
if (!shopInfoService.checkSwitch(shopId, ShopInfo::getIsGroupBuy)) {
if (!shopInfoService.checkSwitch(shopId, ShopSwitchTypeEnum.GROUP_BUY)) {
return new Page<>();
}
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);