用户列表增加余额筛选

This commit is contained in:
张松
2025-03-25 15:45:45 +08:00
parent 4a48e272c5
commit ae6b5fcbd1
5 changed files with 13 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ import java.util.List;
*/
public interface ShopUserMapper extends BaseMapper<ShopUser> {
List<ShopUserDTO> selectPageByKeyAndIsVip(@Param("shopId") Long shopId, @Param("isVip") Integer isVip, @Param("key") String key);
List<ShopUserDTO> selectPageByKeyAndIsVip(@Param("shopId") Long shopId, @Param("isVip") Integer isVip, @Param("key") String key, @Param("amount") BigDecimal amount);
int incrAccount(@Param("shopId") long shopId, @Param("id") Long id, @Param("time") LocalDateTime time, @Param("money") BigDecimal money);
int decrAccount(@Param("shopId") long shopId, @Param("id") Long id, @Param("time") LocalDateTime time, @Param("money") BigDecimal money);

View File

@@ -78,9 +78,9 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
}
@Override
public Page<ShopUserDTO> getPage(String key, Integer isVip) {
public Page<ShopUserDTO> getPage(String key, Integer isVip, BigDecimal amount) {
PageHelper.startPage(PageUtil.buildPageHelp());
return PageUtil.convert(new PageInfo<>(mapper.selectPageByKeyAndIsVip(StpKit.USER.getShopId(), isVip, key)));
return PageUtil.convert(new PageInfo<>(mapper.selectPageByKeyAndIsVip(StpKit.USER.getShopId(), isVip, key, amount)));
}
@Override

View File

@@ -73,6 +73,10 @@
<if test="key != null and key != ''">
and (a.nick_name like concat('%', #{key}, '%') or a.phone like concat('%', #{key}, '%'))
</if>
<if test="amount != null">
and a.amount >= #{amount}
</if>
GROUP BY a.id
order by a.create_time desc
</select>