|
@@ -46,12 +46,14 @@ public class LuckyDrawFrontController {
|
|
|
|
|
|
|
|
private final UserMapper userMapper;
|
|
private final UserMapper userMapper;
|
|
|
|
|
|
|
|
|
|
+ private final HttpServletRequest request;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 奖品列表
|
|
* 奖品列表
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/get")
|
|
@GetMapping("/get")
|
|
|
public Result<List<LuckyDrawView>> getLuckyDraw(@RequestParam(defaultValue = "true") Boolean isRepeat) throws Exception {
|
|
public Result<List<LuckyDrawView>> getLuckyDraw(@RequestParam(defaultValue = "true") Boolean isRepeat) throws Exception {
|
|
|
- List<LuckyDrawView> drawViews = beanSearcher.searchAll(LuckyDrawView.class, MapUtils.builder()
|
|
|
|
|
|
|
+ List<LuckyDrawView> drawViews = beanSearcher.searchAll(LuckyDrawView.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
.field(LuckyDrawView::getStatus, true).op(Operator.Equal).build());
|
|
.field(LuckyDrawView::getStatus, true).op(Operator.Equal).build());
|
|
|
if (drawViews.isEmpty()) {
|
|
if (drawViews.isEmpty()) {
|
|
|
throw BusinessRuntimeException.getInstance("暂未配置奖品");
|
|
throw BusinessRuntimeException.getInstance("暂未配置奖品");
|