空白字符问题
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.czg.controller.user;
|
||||
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.vo.PointsShopListVO;
|
||||
import com.czg.market.entity.MkPointsConfig;
|
||||
import com.czg.market.entity.MkPointsUser;
|
||||
@@ -84,6 +85,9 @@ public class UPointsController {
|
||||
@RequestParam(required = false, defaultValue = "10") Integer size,
|
||||
@RequestParam Long id) {
|
||||
return CzgResult.success(pointsUserRecordService.page(Page.of(page, size),
|
||||
QueryWrapper.create().eq(MkPointsUserRecord::getMkPointsUserId, id).orderBy(MkPointsUserRecord::getCreateTime, false)));
|
||||
QueryWrapper.create().select().select(ShopInfo::getShopName)
|
||||
.eq(MkPointsUserRecord::getMkPointsUserId, id)
|
||||
.leftJoin(ShopInfo.class).on(ShopInfo::getId, MkPointsUserRecord::getShopId)
|
||||
.orderBy(MkPointsUserRecord::getCreateTime, false)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,11 +40,15 @@ public class MkPointsUserRecord implements Serializable {
|
||||
* 积分用户Id
|
||||
*/
|
||||
private Long mkPointsUserId;
|
||||
private Long shopId;
|
||||
private Long shopUserId;
|
||||
|
||||
/**
|
||||
* 摘要信息(如:兑换某个商品/消费多少钱/充值多少钱/新会员赠送积分等)
|
||||
*/
|
||||
private String content;
|
||||
@Column(ignore = true)
|
||||
private String shopName;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user