| | |
| | | import java.io.PrintWriter; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletionService; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | |
| | | |
| | | /** |
| | | * 获取赛事报名记录 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/base/competition/listAllPayment") |
| | | public List<PaymentCompetition> listAllPayment(@RequestBody CompetitionQuery query){ |
| | | return paymentCompetitionService.listAll(query); |
| | | List<PaymentCompetition> paymentCompetitions = paymentCompetitionService.listAll(query); |
| | | List<PaymentCompetition> result = new ArrayList<>(); |
| | | if (query.getOperatorId()!=null){ |
| | | for (PaymentCompetition paymentCompetition : paymentCompetitions) { |
| | | Integer competitionId = paymentCompetition.getCompetitionId(); |
| | | Competition byId = cttService.getById(competitionId); |
| | | if (byId!=null){ |
| | | Integer operatorId = byId.getOperatorId(); |
| | | if (operatorId!=null){ |
| | | if (operatorId == query.getOperatorId()){ |
| | | result.add(paymentCompetition); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | }else if (query.getStoreId()!=null){ |
| | | for (PaymentCompetition paymentCompetition : paymentCompetitions) { |
| | | Integer competitionId = paymentCompetition.getCompetitionId(); |
| | | Competition byId = cttService.getById(competitionId); |
| | | if (byId!=null){ |
| | | String storeId = byId.getStoreId(); |
| | | if (storeId.contains(query.getStoreId().toString())){ |
| | | result.add(paymentCompetition); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | return paymentCompetitions; |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/base/competition/getPayedCompetitions") |
| | |
| | | .eq("appUserId",appUserId) |
| | | .eq("payStatus",3)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/competition/queryByCode") |
| | | public Integer queryByCode(@RequestBody String code){ |
| | | |
| | | return paymentCompetitionService.queryByCode(code); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | ids.add(-1); |
| | | } |
| | | ArrayList<Object> integers = new ArrayList<>(); |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | int year = DateUtil.year(new Date()); |
| | | |
| | | for (int i = 0; i < 10; i++) { |
| | | integers.add(year-i); |
| | | } |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | // 年 |
| | | ArrayList<Integer> years = new ArrayList<>(); |
| | | ArrayList<Integer> yearsUser = new ArrayList<>(); |
| | |
| | | map.put("yearData",years); |
| | | map.put("yearsUser",yearsUser); |
| | | // 月 |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | ArrayList<Integer> months = new ArrayList<>(); |
| | | ArrayList<Integer> monthsUser = new ArrayList<>(); |
| | | for (int i = 1; i <= 12; i++) { |