소스 검색

盈亏记录统计

Ethan 6 년 전
부모
커밋
f3765c0dd9
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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);