kk пре 1 месец
родитељ
комит
0eb302a31d

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

@@ -75,14 +75,6 @@ public class FinTranRecordController extends BaseController
     {
         JSONObject jsonObject = finTranRecordService.selecFinTranRecordCount(finTranRecord);
 
-        if(StringUtils.isNotBlank(finTranRecord.getBeginTime())){
-            finTranRecord.setBeginTime(finTranRecord.getBeginTime() + " 00:00:00");
-        }
-
-        if(StringUtils.isNotBlank(finTranRecord.getEndTime())){
-            finTranRecord.setEndTime(finTranRecord.getEndTime() + " 23:59:59");
-        }
-
         // 用户总统计(游戏投注)
         Map<String, BigDecimal> bettingAmountSum = appGameBettingService.getBettingAmountSum(finTranRecord.getUserId());
         jsonObject.put("bettingAmountSum", bettingAmountSum);

+ 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 (date_format(create_time, '%Y-%m-%d') &gt;= #{beginTime} and date_format(create_time, '%Y-%m-%d') &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 (date_format(uptime, '%Y-%m-%d') &gt;= #{beginTime} and date_format(uptime, '%Y-%m-%d') &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 (date_format(addtime, '%Y-%m-%d') &gt;= #{beginTime} and date_format(addtime, '%Y-%m-%d') &lt;= #{endTime})
         </if>
         group by type
     </select>