空白字符问题

This commit is contained in:
2025-12-10 16:02:49 +08:00
parent 6ff5436128
commit fd2c2a488a
5 changed files with 20 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ 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);
List<MkPointsGoods> list = mapper.getPointsGoodsPageByUser(shopId, userId, goodsCategory.trim());
result.put("pointsGoods", PageUtil.convert(new PageInfo<>(list)));
result.put("pointsUser", pointsUser == null ? "" : pointsUser);
return result;

View File

@@ -135,6 +135,8 @@ public class MkPointsUserServiceImpl extends ServiceImpl<MkPointsUserMapper, MkP
saveOrUpdate(pointsUser);
MkPointsUserRecord record = MkPointsUserRecord.builder()
.mkPointsUserId(pointsUser.getId())
.shopId(pointsUser.getShopId())
.shopUserId(pointsUser.getShopUserId())
.floatType(floatType.getValue())
.floatPoints(points)
.sourceId(sourceId.toString())

View File

@@ -7,14 +7,15 @@
<select id="getPointsGoodsPageByUser" resultType="com.czg.market.entity.MkPointsGoods">
select goods.*, count(record.id) as boughtCount
from mk_points_goods goods
left join mk_points_goods_record record
on record.points_goods_id = goods.id and record.user_id = #{userId} and record.status != '已退款'
left join mk_points_goods_record record
on record.points_goods_id = goods.id and record.user_id = #{userId} and record.status != '已退款'
where goods.shop_id = #{shopId}
and goods.del_flag = 0
and goods.status = 1
<if test="goodsCategory != null and goodsCategory !=''">
and goods.del_flag = 0
and goods.status = 1
<if test="goodsCategory != null and goodsCategory !=''">
and goods.goods_category = #{goodsCategory}
</if>
HAVING goods.id IS NOT NULL
order by goods.sort desc, goods.id desc
</select>
</mapper>