kk 1 ヶ月 前
コミット
7670389a2c

+ 8 - 0
game-business/src/main/java/com/game/business/controller/FinTranRecordController.java

@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.alibaba.fastjson2.JSONObject;
 import com.game.business.dto.FinTranRecordDTO;
 import com.game.business.service.IAppGameBettingService;
+import com.game.business.service.IAppUserService;
 import com.game.common.core.domain.R;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -47,6 +48,9 @@ public class FinTranRecordController extends BaseController
     @Autowired
     private IAppGameBettingService appGameBettingService;
 
+    @Autowired
+    private IAppUserService appUserService;
+
     /**
      * 查询消费记录列表
      */
@@ -78,6 +82,10 @@ public class FinTranRecordController extends BaseController
         Map<String, BigDecimal> bettingAmountDateSum = appGameBettingService.getBettingAmountByDateSum(finTranRecord);
         jsonObject.put("bettingAmountDateSum", bettingAmountDateSum);
 
+        // 用户总统计(金币、可兑换金币、剩余余额)
+        Map<String, BigDecimal> userCount = appUserService.getUserCount(finTranRecord.getUserId());
+        jsonObject.put("userCount", userCount);
+
         return R.ok(jsonObject);
     }
 

+ 0 - 4
game-business/src/main/java/com/game/business/service/impl/FinTranRecordServiceImpl.java

@@ -272,10 +272,6 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
 
         JSONObject jsonObject = new JSONObject();
 
-        // 用户总统计(金币、可兑换金币、剩余余额)
-        Map<String, BigDecimal> userCount = appUserService.getUserCount(finTranRecordDTO.getUserId());
-        jsonObject.put("userCount", userCount);
-
         // 用户总统计(充值)
         Map<String, BigDecimal> rechargeCount = finTranRecordMapper.getRechargeSum(finTranRecordDTO.getUserId());
         jsonObject.put("rechargeCount", rechargeCount);

+ 1 - 1
game-business/src/main/resources/mapper/business/AppGameBettingMapper.xml

@@ -65,7 +65,7 @@
                 and user_id = #{userId}
             </if>
             <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
-                and (create_time &gt;= #{beginTime} and create_time &lt;= #{endTime}
+                and (create_time &gt;= #{beginTime} and create_time &lt;= #{endTime})
             </if>
         </where>
     </select>

+ 2 - 2
game-business/src/main/resources/mapper/business/FinTranRecordMapper.xml

@@ -269,7 +269,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and uid = #{userId}
         </if>
         <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
-            and (uptime &gt;= #{beginTime} and uptime &lt;= #{endTime}
+            and (uptime &gt;= #{beginTime} and uptime &lt;= #{endTime})
         </if>
         group by type
     </select>
@@ -299,7 +299,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and uid = #{userId}
         </if>
         <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
-            and (addtime &gt;= #{beginTime} and addtime &lt;= #{endTime}
+            and (addtime &gt;= #{beginTime} and addtime &lt;= #{endTime})
         </if>
         group by type
     </select>