Commit dbe50609 authored by clone's avatar clone

bug

parent abe53d8a
...@@ -184,15 +184,11 @@ class OMarchInModel extends Model ...@@ -184,15 +184,11 @@ class OMarchInModel extends Model
$where_["b.is_del"] = 0;//选择正常状态的参数 $where_["b.is_del"] = 0;//选择正常状态的参数
} }
$return = Db::table($this->table) $return = Db::table($this->table)
->field("count(1) as num,a.create_time") ->field("count(1) as num,max(a.create_time) as create_time")
->alias("a") ->alias("a")
->join("o_order b", "a.order_id = b.id", "left") ->join("o_order b", "a.order_id = b.id", "left")
->where($where_) ->where($where_)
->order(" a.create_time desc")
->limit(1)
->select(); ->select();
// echo $this->getLastSql();
// echo '=============1';
return $return; return $return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment