From 6d5893672dc31b6c7bfa39801ddd95516014c380 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 05 三月 2024 14:12:17 +0800
Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0

---
 cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java
index 30e792b..f1d4cd7 100644
--- a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java
+++ b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java
@@ -411,7 +411,8 @@
         worldCupPayment.setEntrant(paymentWorldCup.getIds());
         int num = JSON.parseArray(paymentWorldCup.getIds()).size();
         //不免费
-        if(worldCup.getPayType() != 0){
+        String payType1 = worldCup.getPayType().split(",")[0];
+        if(!"0".equals(payType1)){
             Integer payType = paymentWorldCup.getPayType();
             //微信
             if(payType == 1){
@@ -606,6 +607,33 @@
 
 
     /**
+     * 获取比赛管理列表数据
+     * @param worldCupListAll
+     * @return
+     */
+    @Override
+    public Map<String, Object> getWorldCupListAll(WorldCupListAll worldCupListAll) {
+        Map<String, Object> map = new HashMap<>();
+        List<Map<String, Object>> list = this.baseMapper.getWorldCupListAll(worldCupListAll);
+        for (Map<String, Object> map1 : list) {
+            String maxPeople = map1.get("maxPeople").toString();
+            Integer id = Integer.valueOf(map1.get("id").toString());
+            List<WorldCupPayment> lists = worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("worldCupId", id).eq("payStatus", 2).eq("state", 1));
+            List<Long> collect = lists.stream().map(WorldCupPayment::getId).collect(Collectors.toList());
+            Integer count = 0;
+            if(collect.size() > 0){
+                count = worldCupPaymentParticipantService.count(new QueryWrapper<WorldCupPaymentParticipant>().in("worldCupPaymentId", collect));
+            }
+            map1.put("maxPeople", maxPeople + " - " + count);
+        }
+        Integer count = this.baseMapper.getWorldCupListAllCount(worldCupListAll);
+        map.put("rows", list);
+        map.put("total", count);
+        return map;
+    }
+
+
+    /**
      * 取消赛事后退还费用
      * @param id
      */

--
Gitblit v1.7.1