返回值 排序
This commit is contained in:
@@ -2,11 +2,11 @@ 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.MkPointsConfig;
|
||||
import com.czg.market.entity.MkPointsGoods;
|
||||
import com.czg.market.entity.MkPointsUser;
|
||||
import com.czg.market.entity.ShopCoupon;
|
||||
import com.czg.market.service.MkPointsConfigService;
|
||||
import com.czg.market.service.MkPointsGoodsService;
|
||||
import com.czg.market.service.MkPointsUserService;
|
||||
import com.czg.market.service.ShopCouponService;
|
||||
@@ -17,7 +17,6 @@ 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;
|
||||
@@ -32,15 +31,19 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
public class MkPointsGoodsServiceImpl extends ServiceImpl<MkPointsGoodsMapper, MkPointsGoods> implements MkPointsGoodsService {
|
||||
@Resource
|
||||
private MkPointsConfigService mkPointsConfigService;
|
||||
@Resource
|
||||
private MkPointsUserService pointsUserService;
|
||||
@Resource
|
||||
private ShopCouponService shopCouponService;
|
||||
@DubboReference
|
||||
private ShopInfoService shopInfoService;
|
||||
|
||||
@Override
|
||||
public Page<MkPointsGoods> getPointsGoodsPage(BaseQueryParam param, Long shopId) {
|
||||
boolean exists = mkPointsConfigService.exists(query().eq(MkPointsConfig::getShopId, shopId).eq(MkPointsConfig::getEnablePointsMall, 1));
|
||||
if (!exists) {
|
||||
return new Page<>();
|
||||
}
|
||||
Page<MkPointsGoods> page = page(Page.of(param.getPage(), param.getSize()),
|
||||
query()
|
||||
.eq(MkPointsGoods::getShopId, shopId)
|
||||
@@ -62,8 +65,11 @@ 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);
|
||||
boolean exists = mkPointsConfigService.exists(query().eq(MkPointsConfig::getShopId, shopId).eq(MkPointsConfig::getEnablePointsMall, 1));
|
||||
if (!exists) {
|
||||
return result;
|
||||
}
|
||||
MkPointsUser pointsUser = pointsUserService.getPointsUser(shopId, null, userId);
|
||||
PageHelper.startPage(page, size);
|
||||
List<MkPointsGoods> list = mapper.getPointsGoodsPageByUser(shopId, userId, StrUtil.trim(goodsCategory));
|
||||
|
||||
@@ -48,7 +48,8 @@ public class UserHomeServiceImpl implements UserHomeService {
|
||||
|
||||
ShopInfo shopInfo = shopInfoService.getById(shopId);
|
||||
if (shopInfo != null) {
|
||||
userHomeDataVo.setGroup(shopInfo.getIsGroupBuy());
|
||||
// userHomeDataVo.setGroup(shopInfo.getIsGroupBuy());
|
||||
userHomeDataVo.setGroup(1);
|
||||
}
|
||||
|
||||
// 用户信息
|
||||
@@ -62,7 +63,8 @@ public class UserHomeServiceImpl implements UserHomeService {
|
||||
// 积分商城
|
||||
MkPointsConfig pointsConfig = mkPointsConfigService.getById(shopId);
|
||||
if (pointsConfig != null) {
|
||||
userHomeDataVo.setPointsMall(pointsConfig.getEnablePointsMall());
|
||||
// userHomeDataVo.setPointsMall(pointsConfig.getEnablePointsMall());
|
||||
userHomeDataVo.setPointsMall(1);
|
||||
}
|
||||
|
||||
// 分销
|
||||
|
||||
Reference in New Issue
Block a user