商品类型
This commit is contained in:
@@ -39,8 +39,9 @@ public class UPointGoodsController {
|
|||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public CzgResult<Page<MkPointsGoods>> getPointsGoodsSettingPage(@RequestParam(defaultValue = "1", required = false) Integer page,
|
public CzgResult<Page<MkPointsGoods>> getPointsGoodsSettingPage(@RequestParam(defaultValue = "1", required = false) Integer page,
|
||||||
@RequestParam(defaultValue = "10", required = false) Integer size,
|
@RequestParam(defaultValue = "10", required = false) Integer size,
|
||||||
|
@RequestParam(required = false) String goodsCategory,
|
||||||
Long shopId) {
|
Long shopId) {
|
||||||
Page<MkPointsGoods> data = pointsGoodsService.getPointsGoodsPageByUser(page, size, shopId, StpKit.USER.getLoginIdAsLong());
|
Page<MkPointsGoods> data = pointsGoodsService.getPointsGoodsPageByUser(page, size, shopId, goodsCategory, StpKit.USER.getLoginIdAsLong());
|
||||||
return CzgResult.success(data);
|
return CzgResult.success(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public interface MkPointsGoodsService extends IService<MkPointsGoods> {
|
|||||||
|
|
||||||
Page<MkPointsGoods> getPointsGoodsPage(BaseQueryParam param, Long shopId);
|
Page<MkPointsGoods> getPointsGoodsPage(BaseQueryParam param, Long shopId);
|
||||||
|
|
||||||
Page<MkPointsGoods> getPointsGoodsPageByUser(Integer page, Integer size, Long shopId, Long userId);
|
Page<MkPointsGoods> getPointsGoodsPageByUser(Integer page, Integer size, Long shopId, String goodsCategory, Long userId);
|
||||||
|
|
||||||
Page<MkPointsGoodsRecord> getGoodsRecordPage(Integer page, Integer size, Long shopId, Long userId);
|
Page<MkPointsGoodsRecord> getGoodsRecordPage(Integer page, Integer size, Long shopId, Long userId);
|
||||||
|
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface MkPointsGoodsMapper extends BaseMapper<MkPointsGoods> {
|
public interface MkPointsGoodsMapper extends BaseMapper<MkPointsGoods> {
|
||||||
|
|
||||||
List<MkPointsGoods> getPointsGoodsPageByUser(Long shopId, Long userId);
|
List<MkPointsGoods> getPointsGoodsPageByUser(Long shopId, Long userId,String goodsCategory);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ public class MkPointsGoodsServiceImpl extends ServiceImpl<MkPointsGoodsMapper, M
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<MkPointsGoods> getPointsGoodsPageByUser(Integer page, Integer size, Long shopId, Long userId) {
|
public Page<MkPointsGoods> getPointsGoodsPageByUser(Integer page, Integer size, Long shopId, String goodsCategory, Long userId) {
|
||||||
PageHelper.startPage(page, size);
|
PageHelper.startPage(page, size);
|
||||||
List<MkPointsGoods> list = mapper.getPointsGoodsPageByUser(shopId, userId);
|
List<MkPointsGoods> list = mapper.getPointsGoodsPageByUser(shopId, userId,goodsCategory);
|
||||||
return PageUtil.convert(new PageInfo<>(list));
|
return PageUtil.convert(new PageInfo<>(list));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,9 @@
|
|||||||
where goods.shop_id = #{shopId}
|
where goods.shop_id = #{shopId}
|
||||||
and goods.del_flag = 0
|
and goods.del_flag = 0
|
||||||
and goods.status = 1
|
and goods.status = 1
|
||||||
|
<if test="goodsCategory != null and goodsCategory !=''">
|
||||||
|
and goods.goods_category = #{goodsCategory}
|
||||||
|
</if>
|
||||||
order by goods.sort desc, goods.id desc
|
order by goods.sort desc, goods.id desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user