release: app可根据中奖结果筛选用户

release-2024-04-25
huangyw 1 month ago
parent aa6dd2f391
commit e472433337

@ -372,14 +372,14 @@ public class PointController {
}
@ApiOperation(value = "3.10.已参与抽奖的人(APP)", notes = "APP")
@GetMapping("/lottery/participated/{page}/{size}")
@PostMapping("/lottery/participated/{page}/{size}")
@GlobalInterceptor(checkAppUserLogin = true)
public Result<PageResult<LotteryUserAPPVO>> findParticipatedLotteryUserList(
@ApiParam(value = "Header中的token信息", required = true) @RequestHeader("Authorization") String token,
@ApiParam(value = "抽奖id") @RequestParam("lotteryId") String lotteryId,
@ApiParam(value = "查询参数") @RequestBody LotteryParticipatedSearchDto lotteryParticipatedSearchDto,
@ApiParam(value = "页码", required = true) @PathVariable Integer page,
@ApiParam(value = "每页条数", required = true) @PathVariable Integer size) {
return Result.success(lotteryService.findPageByLotteryId(page, size, lotteryId));
return Result.success(lotteryService.findPageByLotteryId(page, size, lotteryParticipatedSearchDto));
}
@ApiOperation(value = "3.11.抽奖结果(APP)", notes = "APP")

@ -0,0 +1,24 @@
package com.luoo.user.dto.point;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @program: luoo_parent
* @description:
* @author: yawei.huang
* @create: 2024-10-14 12:13
**/
@Data
public class LotteryParticipatedSearchDto implements Serializable {
private static final long serialVersionUID = -1188283935760704569L;
@ApiModelProperty(value = "抽奖id")
private String lotteryId;
@ApiModelProperty(value = "中奖结果 1-中奖 2-未中奖 null-全部")
private Integer lotteryResult;
}

@ -9,6 +9,7 @@ import com.luoo.user.dao.LotteryRegionDao;
import com.luoo.user.dao.LotteryUserDao;
import com.luoo.user.dao.UserInfoDao;
import com.luoo.user.dto.point.DrawDTO;
import com.luoo.user.dto.point.LotteryParticipatedSearchDto;
import com.luoo.user.dto.point.LotterySearchDto;
import com.luoo.user.pojo.*;
import com.luoo.user.vo.point.*;
@ -581,13 +582,13 @@ public class LotteryService {
return lotteryRegionList;
}
public PageResult<LotteryUserAPPVO> findPageByLotteryId(Integer page, Integer size, String lotteryId) {
public PageResult<LotteryUserAPPVO> findPageByLotteryId(Integer page, Integer size, LotteryParticipatedSearchDto lotteryParticipatedSearchDto) {
QLotteryUser qLotteryUser = QLotteryUser.lotteryUser;
QUserInfo qUserInfo = QUserInfo.userInfo;
BooleanBuilder booleanBuilder = new BooleanBuilder();
checkLotteryUserCondition(booleanBuilder, qLotteryUser, lotteryId, null);
checkLotteryUserCondition(booleanBuilder, qLotteryUser, lotteryParticipatedSearchDto.getLotteryId(), lotteryParticipatedSearchDto.getLotteryResult());
Pageable pageable = PageRequest.of(page - 1, size);
// 头像字段拼接字符串

Loading…
Cancel
Save