| | |
| | | @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())); |
| | | for (UserPoint record : page.getRecords()) { |
| | | int i = record.getHistoricalPoint() - record.getBalance(); |
| | | if (i>0){ |
| | | record.setVariableType(2); |
| | | }else if (i<0){ |
| | | record.setVariableType(1); |
| | | }else{ |
| | | record.setVariableType(0); |
| | | } |
| | | } |
| | | return R.ok(page); |
| | | } |
| | | |