|
@@ -1,18 +1,18 @@
|
|
package beilv.web.controller.competition;
|
|
package beilv.web.controller.competition;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Objects;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import beilv.competition.domain.Competition;
|
|
import beilv.competition.domain.Competition;
|
|
import beilv.competition.service.ICompetitionService;
|
|
import beilv.competition.service.ICompetitionService;
|
|
|
|
+import beilv.stadium.domain.Stadium;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.ui.ModelMap;
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
import beilv.common.annotation.Log;
|
|
import beilv.common.annotation.Log;
|
|
import beilv.common.enums.BusinessType;
|
|
import beilv.common.enums.BusinessType;
|
|
import beilv.common.core.controller.BaseController;
|
|
import beilv.common.core.controller.BaseController;
|
|
@@ -141,4 +141,35 @@ public class CompetitionController extends BaseController {
|
|
public AjaxResult getCompetitionList(){
|
|
public AjaxResult getCompetitionList(){
|
|
return AjaxResult.success(competitionService.getCompetitionList());
|
|
return AjaxResult.success(competitionService.getCompetitionList());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @RequiresPermissions("system:competition:view")
|
|
|
|
+ @GetMapping("/openDetails/{id}")
|
|
|
|
+ public String openDetails(@PathVariable("id") Integer id, ModelMap mmap) {
|
|
|
|
+ mmap.put("id", id);
|
|
|
|
+ return prefix + "/details";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 修改赛事发布
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/getTakePartList")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public TableDataInfo getTakePartList(Competition competition) {
|
|
|
|
+
|
|
|
|
+ startPage();
|
|
|
|
+ //通过id获取参赛集合
|
|
|
|
+ List<Stadium> stadiumList = competitionService.getTakePartList(competition.getId());
|
|
|
|
+ return getDataTable(stadiumList);
|
|
|
|
+ /*List<Stadium> takePartList = stadiumList.stream()
|
|
|
|
+ .filter(stadium -> Objects.equals(stadium.getOrderType(), "1"))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ List<Stadium> watchList = stadiumList.stream()
|
|
|
|
+ .filter(stadium -> Objects.equals(stadium.getOrderType(), "2"))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ mmap.put("takePartList", takePartList);
|
|
|
|
+ mmap.put("watchList", watchList);
|
|
|
|
+ return prefix + "/detail";*/
|
|
|
|
+ }
|
|
}
|
|
}
|