| | |
| | | @GetMapping("/user/list") |
| | | @ApiOperation(value = "积分管理-用户积分明细(必传用户id)", tags = "后台") |
| | | public R<Page<UserPoint>> userlist(UserPoint userPoint) { |
| | | Page<UserPoint> page = userPointService.lambdaQuery().eq(UserPoint::getAppUserId, userPoint.getAppUserId()).orderByDesc(UserPoint::getCreateTime).page(Page.of(userPoint.getPageNum(), userPoint.getPageSize())); |
| | | Page<UserPoint> page = userPointService.lambdaQuery() |
| | | .eq(UserPoint::getType, userPoint.getType()) |
| | | .eq(UserPoint::getAppUserId, userPoint.getAppUserId()) |
| | | .orderByDesc(UserPoint::getCreateTime) |
| | | .page(Page.of(userPoint.getPageNum(), userPoint.getPageSize())); |
| | | for (UserPoint record : page.getRecords()) { |
| | | int i = record.getHistoricalPoint() - record.getBalance(); |
| | | if (i>0){ |
| | |
| | | @Data |
| | | public class WithQuery { |
| | | @ApiModelProperty("用户名称") |
| | | private String name; |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("电话") |
| | | private String phone; |
| | |
| | | <if test="withQuery.phone != null and withQuery.phone != ''"> |
| | | AND t2.phone LIKE concat('%',#{withQuery.phone},'%') |
| | | </if> |
| | | <if test="withQuery.name != null and withQuery.name != ''"> |
| | | AND t2.phone LIKE concat('%',#{withQuery.name},'%') |
| | | <if test="withQuery.userName != null and withQuery.userName != ''"> |
| | | AND t2.name LIKE concat('%',#{withQuery.userName},'%') |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |