Commit d688eff4 authored by zhuwei's avatar zhuwei

1

parent 9acd5f12
......@@ -89,7 +89,7 @@ class ClinchMap extends Basic
*/
public function getUserNum($params=[])
{
$conditions = [ 'status' => 0 ];
$conditions = [];
if(isset($params['start_time']) && isset($params['end_time'])){
$conditions['create_time'] = array( 'between', array( $params['start_time'] . " 00:00:00", $params['end_time'] . " 23:59:59" ) );
}
......@@ -139,7 +139,7 @@ class ClinchMap extends Basic
$month_bargain_num = $performanceSum ? count($performanceSum) : 0;
$city_arr[$key]['month_bargain_num'] = $month_bargain_num;
$conditions = [];
$conditions['c.city'] = $key;
$conditions['c.city'] = $v['city'];
$performanceSum = $m_bargain->getAddBargainNumClinchMap($conditions);
$all_bargain_num = $performanceSum ? count($performanceSum) : 0;
$city_arr[$key]['all_bargain_num'] = $all_bargain_num;
......
......@@ -1644,7 +1644,8 @@ class OBargainModel extends Model
public function getAddBargainNumClinchMap($params)
{
$field = "count(1) as num";
$params["a.role"] = 3;//必须是反签方
$params["a.role"] = 3;//必须是反签方
$params["a.status"] = array( 'in', '10,11,13' );
$return = Db::table($this->table)
->field($field)
->alias("a")
......@@ -1653,7 +1654,7 @@ class OBargainModel extends Model
->where($params)
->group('b.house_id')
->select();
// big_log($this->getLastSql());
// dump($this->getLastSql());
return $return;
}
/**
......
......@@ -44,6 +44,10 @@ class UAccountBalance extends Model
if (!empty($params['user_id'])) {
$where_str .= " and a.user_id = {$params['user_id']}";
}
if (isset($params['status']) && is_numeric($params['status'])) {
$where_str .= " and a.status = {$params['status']}";
}
$sql = "SELECT * FROM (
( SELECT a.id, a.user_id, a.source_id, a.money,a.user_name, a.create_time, 1 AS is_essay,a.status,c.title,a.user_phone,a.operator_name
FROM `u_account_balance` a left join c_coupon b on a.source_id=b.id
......
......@@ -1027,10 +1027,11 @@ class Users extends Model
->field($field)
->where($params)
->select();
// dump($this->getLastSql());
// dump($this->getLastSql());
return $result;
}
public function getInviteTotal($field,$params,$page_no,$page_size){
return Db::table($this->table)
......
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