Explorar o código

盈亏记录统计

Ethan %!s(int64=6) %!d(string=hai) anos
pai
achega
f3765c0dd9
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Application/Commons/Model/Money_buy_simplex.php

+ 2 - 2
Application/Commons/Model/Money_buy_simplex.php

@@ -127,12 +127,12 @@ class Money_buy_simplex extends Model {
     public function winLoseCount($where, $between) {
         $select = ['order_id'];
         $mnyBuyStrMdl = lm('Money_buy_str', "commons");
-        $mnyBuyStrSql = $mnyBuyStrMdl->select($select)->where($where);
+        $mnyBuyStrSql = $mnyBuyStrMdl->select($select)->where($where)->whereBetween('money_time', $between);
         $mnyBuySpxSql = $this
             ->select($select)
             ->where($where)
-            ->unionAll($mnyBuyStrSql)
             ->whereBetween('money_time', $between)
+            ->unionAll($mnyBuyStrSql)
             ->get();
 
         return count($mnyBuySpxSql);