| | |
| | | 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") |