积分商品获取问题
This commit is contained in:
@@ -13,5 +13,5 @@ import java.util.List;
|
||||
*/
|
||||
public interface MkPointsGoodsMapper extends BaseMapper<MkPointsGoods> {
|
||||
|
||||
List<MkPointsGoods> getPointsGoodsPageByUser(Long shopId, Long userId,String goodsCategory);
|
||||
List<MkPointsGoods> getPointsGoodsPageByUser(Long shopId, Long userId, String goodsCategory);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.czg.service.market.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.BaseQueryParam;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.market.entity.*;
|
||||
@@ -64,7 +65,14 @@ public class MkPointsGoodsServiceImpl extends ServiceImpl<MkPointsGoodsMapper, M
|
||||
Map<String, Object> result = new HashMap<>(2);
|
||||
MkPointsUser pointsUser = pointsUserService.getPointsUser(shopId, null, userId);
|
||||
PageHelper.startPage(page, size);
|
||||
List<MkPointsGoods> list = mapper.getPointsGoodsPageByUser(shopId, userId, goodsCategory.trim());
|
||||
if (StrUtil.isNotBlank(goodsCategory)) {
|
||||
if (goodsCategory.contains("优惠劵")) {
|
||||
goodsCategory = "优惠劵";
|
||||
} else if (goodsCategory.contains("其他商品")) {
|
||||
goodsCategory = "其他商品";
|
||||
}
|
||||
}
|
||||
List<MkPointsGoods> list = mapper.getPointsGoodsPageByUser(shopId, userId, StrUtil.trim(goodsCategory));
|
||||
list.forEach(goods -> {
|
||||
if (goods.getGoodsCategory().equals("优惠劵")) {
|
||||
ShopCoupon one = shopCouponService.getOne(query().eq(ShopCoupon::getId, goods.getCouponId())
|
||||
|
||||
Reference in New Issue
Block a user