Commit 36ab4ca0 authored by zw's avatar zw

Merge branch 'test'

parents 0e9d8e21 876a3b84
...@@ -1043,10 +1043,13 @@ class Broker extends Basic ...@@ -1043,10 +1043,13 @@ class Broker extends Basic
return $this->response($code, $msg); return $this->response($code, $msg);
} }
/** /**
* 电话记录 * 电话记录
*
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function getCallLog() public function getCallLog()
{ {
...@@ -1078,11 +1081,11 @@ class Broker extends Basic ...@@ -1078,11 +1081,11 @@ class Broker extends Basic
} }
if (is_numeric($params['users_type']) && !empty($this->params['users_id'])) { if (is_numeric($params['users_type']) && !empty($this->params['users_id'])) {
$where['a.user_type'] = $params['users_type']; $where['a.user_type'] = (int)$params['users_type'];
$where['a.users_id'] = $params['users_id']; $where['a.users_id'] = (int)$params['users_id'];
} }
$res = $m_secret_report->getCallList($pageNo, $pageSize, 'id desc', $field, $where); $res = $m_secret_report->getCallList($pageNo, $pageSize, '', $field, $where);
$res_total = $m_secret_report->getCallListTotal($where); $res_total = $m_secret_report->getCallListTotal($where);
$data['list'] = $res; $data['list'] = $res;
......
...@@ -107,18 +107,31 @@ class User extends Basic ...@@ -107,18 +107,31 @@ class User extends Basic
} }
if (isset($params['user_name'])) { if (isset($params['user_name'])) {
if (strlen($params['user_name']) > 20) {
return $this->response(101, '输入内容长度超限');
}
$conditions['user_name'] = array( "like", "%" . trim($params['user_name']) . "%" ); $conditions['user_name'] = array( "like", "%" . trim($params['user_name']) . "%" );
$is_search = true; $is_search = true;
} }
if (isset($params['user_nick'])) { if (isset($params['user_nick'])) {
if (strlen($params['user_nick']) > 20) {
return $this->response(101, '输入内容长度超限');
}
$conditions['user_nick'] = array( "like", "%" . trim($params['user_nick']) . "%" ); $conditions['user_nick'] = array( "like", "%" . trim($params['user_nick']) . "%" );
$is_search = true; $is_search = true;
} }
if (isset($params['user_phone'])) { if (isset($params['user_phone'])) {
if (!is_numeric($params['user_phone'])) {
return $this->response(101, '请输入正确手机号');
}
if (strlen($params['user_phone']) > 20) {
return $this->response(101, '输入内容长度超限');
}
$conditions['user_phone'] = array( "like", "%" . trim($params['user_phone']) . "%" ); $conditions['user_phone'] = array( "like", "%" . trim($params['user_phone']) . "%" );
$is_search = true; $is_search = true;
} }
if (isset($params['yetai'])) { if (isset($params['yetai'])) {
$conditions['industry_type'] = array( "like", "%" . trim($params['yetai']) . "%" ); $conditions['industry_type'] = array( "like", "%" . trim($params['yetai']) . "%" );
} }
......
...@@ -3290,7 +3290,7 @@ class Finance extends Basic ...@@ -3290,7 +3290,7 @@ class Finance extends Basic
$excel_data_[] = $v['bargain_id'];//成交报告ID $excel_data_[] = $v['bargain_id'];//成交报告ID
$excel_data_[] = $v['income_time'];//入账日期 $excel_data_[] = $v['income_time'];//入账日期
$excel_data_[] = $v['agent_name'];//提交人 $excel_data_[] = $v['agent_name'];//提交人
$excel_data_[] = $v['name'];//对应业务员 $excel_data_[] = $v['current_agent_name'];//对应业务员
$excel_data_[] = $v['store_name'];//所属门店 $excel_data_[] = $v['store_name'];//所属门店
$excel_data_[] = $v['type'];//类型 $excel_data_[] = $v['type'];//类型
$excel_data_[] = $v['money'];//收款金额 $excel_data_[] = $v['money'];//收款金额
...@@ -3322,7 +3322,7 @@ class Finance extends Basic ...@@ -3322,7 +3322,7 @@ class Finance extends Basic
} }
} catch (\Exception $e) { } catch (\Exception $e) {
$msg = '内部错误:' . $e->getMessage(); $msg = '内部错误:' . $e->getMessage();
return $this->error($msg); return $this->error($msg);
} }
......
...@@ -606,6 +606,8 @@ Route::group('task', [ ...@@ -606,6 +606,8 @@ Route::group('task', [
'updateForActivityBegins' => ['task/UpdateActivityTask/updateForActivityBegins', ['method' => 'get']], 'updateForActivityBegins' => ['task/UpdateActivityTask/updateForActivityBegins', ['method' => 'get']],
'updateCouponExpired' => ['task/UpdateCouponTask/updateCouponExpired', ['method' => 'get']],//超过有效期的券改过期 'updateCouponExpired' => ['task/UpdateCouponTask/updateCouponExpired', ['method' => 'get']],//超过有效期的券改过期
'killOutTimeSql' => ['task/KillOutTimeSql/killOutTimeSql', ['method' => 'get']],//超过有效期的券改过期
]); ]);
Route::group('broker', [ Route::group('broker', [
......
<?php
namespace app\task\controller;
use app\model\ASite;
use think\console\command\make\Model;
/**
* Created by PhpStorm.
* User: zw
* Date: 2019/3/25
* Time: 14:14
*/
class KillOutTimeSql{
public function killOutTimeSql(){
$model = new ASite();
$sql = "select concat('KILL ',id,';') as kill_sql,info from information_schema.processlist where user='tl_root' and time > 20 and db='db_tongliandichan' or db is null";
//$sql = "select concat('KILL ',id,';') as kill_sql from information_schema.processlist where user='tldc_online' and time > 20 and db='db_tongliandichan' or db is null";
$result = $model->query($sql);
if($result){
foreach ($result as $item){
$kill_sql = $item["kill_sql"];
$log = "out_time_sql :" .$item["info"];
big_log($log);
$model->query($kill_sql);
}
}
}
}
\ No newline at end of file
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