ソースを参照

统计区分不记返点

dos 2 週間 前
コミット
67b8cc6e68

+ 1 - 1
game-admin/src/main/resources/logback.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/ruoyi/logs" />
+	<property name="log.path" value="game/logs" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 

+ 4 - 0
game-business/src/main/java/com/game/business/vo/RechargeSumVo.java

@@ -13,4 +13,8 @@ public class RechargeSumVo implements Serializable {
 
     private Double totalDiamondCoin;
 
+    private Double dontTotalCoin;
+
+    private Double dontTotalDiamondCoin;
+
 }

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

@@ -82,8 +82,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectRechargeSum" parameterType="com.game.business.domain.AppUsersCharge" resultType="com.game.business.vo.RechargeSumVo">
-        select ifnull(sum(case when coin_type=0 then coin else 0 end),0) as totalCoin,
-               ifnull(sum(case when coin_type=1 then coin else 0 end),0) as totalDiamondCoin
+        select
+                ifnull(sum(case when coin_type=0 and channel_id is not null then coin else 0 end),0) as totalCoin,
+               ifnull(sum(case when coin_type=1 and channel_id is not null then coin else 0 end),0) as totalDiamondCoin,
+                ifnull(sum(case when coin_type=0 and channel_id is null then coin else 0 end),0) as dontTotalCoin,
+               ifnull(sum(case when coin_type=1 and channel_id is null then coin else 0 end),0) as dontTotalDiamondCoin
         from app_users_charge
         <where>
             <if test="addtime != null "> and addtime = #{addtime}</if>

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

@@ -298,7 +298,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select
 
         case
-        when ifnull(b.type,-2) = -2 and a.type = 4  then 4
+        when ifnull(b.type,-2) = -2 and a.type = 4 and a.channel_id is null  then 5
+        when ifnull(b.type,-2) = -2 and a.type = 4 and a.channel_id is not null then 4
         when ifnull(b.type,-2) = 1 then 8085
         when ifnull(b.type,-2) = 2 then 8086
         when ifnull(b.type,-2) = 3 then 8087
@@ -321,7 +322,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ifnull(sum(case when a.coin_type = 1 and a.rule_id = 0 then a.coin else 0.00 end) ,0.00) as actualDiamondCoinDownSum,
         ifnull(sum(case when a.coin_type = 1 and a.rule_id = 0 then a.platform_service else 0.00 end) ,0.00) as platformServiceDiamondCoinDownSum
 
-        from app_users_charge as a left join app_charge_channel as b on a.type = b.channel_no where a.status = 1
+        from (
+            SELECT
+                coin_type,
+                rule_id,
+                platform_service,
+                coin,
+                STATUS,
+                addtime,
+                channel_id,
+                type,
+                CASE WHEN channel_id IS NULL THEN 1 ELSE 2 END channelType
+            FROM
+            app_users_charge
+        ) as a left join app_charge_channel as b on a.type = b.channel_no where a.status = 1
 
         <if test="userId != null">
             and a.uid = #{userId}
@@ -329,7 +343,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
             and (date_format(a.addtime, '%Y-%m-%d') &gt;= #{beginTime} and date_format(a.addtime, '%Y-%m-%d') &lt;= #{endTime})
         </if>
-        group by b.type
+        group by b.type,a.channelType
     </select>
 
     <select id="selectTranList" parameterType="com.game.business.dto.FinTranDto" resultType="com.game.business.vo.FinTranVo">

+ 5 - 1
game-ui/src/views/business/user/index.vue

@@ -492,10 +492,14 @@
       <div style="border-top: 4px solid #c2b8b8; margin-top: 22px;">
         <h3><b>充值记录</b></h3>
       </div>
-      <div style="    margin-bottom: 18px;">
+      <div>
         <span>已充值余额:{{rechargeSum.totalDiamondCoin}}</span>
         <span style="padding-left: 15px">已充值金币:{{rechargeSum.totalCoin}}</span>
       </div>
+      <div style="    margin-bottom: 18px;">
+        <span>已充值余额(不记返点):{{rechargeSum.dontTotalDiamondCoin}}</span>
+        <span style="padding-left: 15px">已充值金币(不记返点):{{rechargeSum.dontTotalCoin}}</span>
+      </div>
       <el-form :model="rechargeQueryParams" ref="rechargeQueryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
         <el-form-item label="充值渠道" prop="channelId">
           <el-select v-model="rechargeQueryParams.channelId" placeholder="请选择充值渠道">

+ 10 - 0
game-ui/src/views/index.vue

@@ -91,6 +91,7 @@
                       <th class="el-table__cell is-leaf"><div class="cell"></div></th>
                       <th class="el-table__cell is-leaf"><div class="cell">线上充值总额</div></th>
                       <th class="el-table__cell is-leaf"><div class="cell">人工充值</div></th>
+                      <th class="el-table__cell is-leaf"><div class="cell">人工充值(不记返点)</div></th>
                       <th class="el-table__cell is-leaf"><div class="cell">充值总额</div></th>
                     </tr>
                     </thead>
@@ -99,6 +100,7 @@
                       <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">充值总额</div></td>
                       <td class="el-table__cell is-leaf"><div class="cell">支付宝:{{getVal(getCharge('8085'),0)}}</div></td>
                       <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">充值:{{getVal(getCharge('4'),1)}}</div></td>
+                      <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">充值:{{getVal(getCharge('5'),1)}}</div></td>
                       <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">总额:{{getTotal()}}</div></td>
                     </tr>
                     <tr>
@@ -487,6 +489,8 @@ export default {
       let bank = this.getCharge("8087");
       //线下
       let down = this.getCharge("4");
+      //线下
+      let downBJ = this.getCharge("5");
       let total = 0;
       let totalService = 0;
       if (down["diamondCoinDownSum"] != undefined) {
@@ -495,6 +499,12 @@ export default {
       if(down["platformServiceDiamondCoinDownSum"] != undefined){
         totalService += down["platformServiceDiamondCoinDownSum"];
       }
+      if (downBJ["diamondCoinDownSum"] != undefined) {
+        total += down["diamondCoinDownSum"];
+      }
+      if(downBJ["platformServiceDiamondCoinDownSum"] != undefined){
+        totalService += down["platformServiceDiamondCoinDownSum"];
+      }
 
       if (ali["diamondCoinUpSum"] != undefined) {
         total += ali["diamondCoinUpSum"];