1
This commit is contained in:
@@ -406,18 +406,14 @@ class User extends Wxapp
|
||||
$where_today_xs = ['biz_id' => $biz_id, 'status>=' => 0, 'p_time>=' => $s_today, 'p_time<=' => $e_today];
|
||||
$where_month_xs = ['biz_id' => $biz_id, 'status>=' => 0, 'p_time>=' => $s_month, 'p_time<=' => $e_month];
|
||||
//到店
|
||||
$where_today_dd = ['biz_id' => $biz_id, 'status>=' => 0,
|
||||
"id in(select customer_id from lc_receiver_customer_oplogs where type=4 and uid in({$str_uids}) and c_time>=" . strtotime($s_today) . " and c_time<=" . strtotime($e_today) . ")" => null];
|
||||
$where_month_dd = ['biz_id' => $biz_id, 'status>=' => 0,
|
||||
"id in(select customer_id from lc_receiver_customer_oplogs where type=4 and uid in({$str_uids}) and c_time>=" . strtotime($s_month) . " and c_time<=" . strtotime($e_month) . ")" => null];
|
||||
$where_today_dd = ['biz_id' => $biz_id, 'status>=' => 0, 'dt_time >= ' => $s_today, 'dt_time<=' => $e_today];
|
||||
$where_month_dd = ['biz_id' => $biz_id, 'status>=' => 0, 'dt_time >= ' => $s_month, 'dt_time<=' => $e_month];
|
||||
//订单
|
||||
$where_today_order = ['biz_id' => $biz_id, 'status>=' => 0, 'c_time>=' => strtotime($s_today), 'c_time<=' => strtotime($e_today)];
|
||||
$where_month_order = ['biz_id' => $biz_id, 'status>=' => 0, 'c_time>=' => strtotime($s_month), 'c_time<=' => strtotime($e_month)];
|
||||
//战败
|
||||
$where_today_defeat = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1,
|
||||
"id in(select customer_id from lc_receiver_customer_oplogs where type=7 and uid in({$str_uids}) and c_time>=" . strtotime($s_today) . " and c_time<=" . strtotime($e_today) . ")" => null];
|
||||
$where_month_defeat = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1,
|
||||
"id in(select customer_id from lc_receiver_customer_oplogs where type=7 and uid in({$str_uids}) and c_time>=" . strtotime($s_month) . " and c_time<=" . strtotime($e_month) . ")" => null];
|
||||
$where_today_defeat = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1, 'def_time >= ' => $s_today, 'def_time<=' => $e_today];
|
||||
$where_month_defeat = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1, 'def_time >= ' => $s_month, 'def_time<=' => $e_month];
|
||||
if ($group_id == 1) {
|
||||
$where_today_xs['admin_id'] = $uid;
|
||||
$where_month_xs['admin_id'] = $uid;
|
||||
|
||||
@@ -225,11 +225,10 @@ class Score_entity
|
||||
} else {
|
||||
Receiver_score_log_model::add_score($uid, $biz_id, $day, $type, $sub_type, "{$desc}默认值", 1, 0, 0);
|
||||
}
|
||||
} elseif ($sub_type == Receiver_score_config_model::TYPE_DEDUCT__TIMEOUT && $group_id == App_licheb_users_model::GROUP_BIZ) {
|
||||
} elseif ($sub_type == Receiver_score_config_model::TYPE_DEDUCT_TIMEOUT && $group_id == App_licheb_users_model::GROUP_BIZ) {
|
||||
$receiverOrdersModel = new Receiver_orders_model();
|
||||
$where = [
|
||||
'status>=' => 0, 'biz_id' => $biz_id, 'apply_def_time!=' => '0000-00-00 00:00:00', 'if_defeat' => 1,
|
||||
'apply_def_time>=' => $day . ' 00:00:00', 'apply_def_time<=' => $day . ' 23:59:59'
|
||||
'status in (0,1)' => null, 'biz_id' => $biz_id, 'if_defeat' => 1, 'apply_def_time>=' => $day . ' 00:00:00', 'apply_def_time<=' => $day . ' 23:59:59'
|
||||
];
|
||||
$rows = $receiverOrdersModel->select($where, '', 1, 1000, 'id');
|
||||
$desc = '战败申请当日未处理';
|
||||
|
||||
@@ -34,7 +34,7 @@ class Receiver_score_config_model extends HD_Model
|
||||
const TYPE_DEDUCT_ORDER_CTIME = 2;
|
||||
const TYPE_DEDUCT_VISIT_TIMEOUT = 3;
|
||||
const TYPE_DEDUCT_P_TIME_TIMEOUT = 4;
|
||||
const TYPE_DEDUCT__TIMEOUT = 5;
|
||||
const TYPE_DEDUCT_TIMEOUT = 5;
|
||||
|
||||
const TYPE_BASE_LIST = [
|
||||
self::TYPE_BASE_KG => '正常开工',
|
||||
@@ -58,7 +58,7 @@ class Receiver_score_config_model extends HD_Model
|
||||
self::TYPE_DEDUCT_VISIT_TIMEOUT => '线索逾期未跟进',
|
||||
//店长
|
||||
self::TYPE_DEDUCT_P_TIME_TIMEOUT => '分配时间超过10分钟',
|
||||
self::TYPE_DEDUCT__TIMEOUT => '战败申请当日未处理'
|
||||
self::TYPE_DEDUCT_TIMEOUT => '战败申请当日未处理'
|
||||
];
|
||||
|
||||
const STATUS_NORMAL = 1; //正常状态
|
||||
|
||||
Reference in New Issue
Block a user