通用校验

This commit is contained in:
2025-12-18 19:38:25 +08:00
parent 1f281c31ab
commit 3e40634e9e
4 changed files with 64 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ 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.market.dto.GbWareDTO;
import com.czg.market.dto.GbWareQueryParamDTO;
@@ -30,6 +31,9 @@ public class GbWareServiceImpl extends ServiceImpl<GbWareMapper, GbWare> impleme
@Override
public Page<GbWare> getGbWarePage(GbWareQueryParamDTO param, Long shopId) {
if (!shopInfoService.checkSwitch(shopId, ShopInfo::getIsGroupBuy)) {
return new Page<>();
}
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq(GbWare::getIsDel, 0)

View File

@@ -2,6 +2,8 @@ package com.czg.service.market.service.impl;
import cn.hutool.core.util.StrUtil;
import com.czg.BaseQueryParam;
import com.czg.account.entity.ShopInfo;
import com.czg.account.service.ShopInfoService;
import com.czg.market.entity.MkPointsGoods;
import com.czg.market.entity.MkPointsUser;
import com.czg.market.entity.ShopCoupon;
@@ -15,6 +17,7 @@ import com.github.pagehelper.PageInfo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;
import java.util.HashMap;
@@ -33,6 +36,8 @@ public class MkPointsGoodsServiceImpl extends ServiceImpl<MkPointsGoodsMapper, M
private MkPointsUserService pointsUserService;
@Resource
private ShopCouponService shopCouponService;
@DubboReference
private ShopInfoService shopInfoService;
@Override
public Page<MkPointsGoods> getPointsGoodsPage(BaseQueryParam param, Long shopId) {
@@ -57,6 +62,7 @@ public class MkPointsGoodsServiceImpl extends ServiceImpl<MkPointsGoodsMapper, M
@Override
public Map<String, Object> getPointsGoodsPageByUser(Integer page, Integer size, Long shopId, String goodsCategory, Long userId) {
// shopInfoService.checkSwitch(shopId, )
Map<String, Object> result = new HashMap<>(2);
MkPointsUser pointsUser = pointsUserService.getPointsUser(shopId, null, userId);
PageHelper.startPage(page, size);