Commit 5f44ef23 authored by hujun's avatar hujun

无效客户

parent f283bf83
...@@ -463,4 +463,28 @@ class Member extends Basic{ ...@@ -463,4 +463,28 @@ class Member extends Basic{
$user->commit(); $user->commit();
return $this->response(200, '', ['total'=>count($total)]); return $this->response(200, '', ['total'=>count($total)]);
} }
/**
* 无效客户
*
* @return \think\Response
*/
public function updateUserStatus() {
if (empty($this->params['user_id'])) {
return $this->response(101, '参数错误');
}
$msg = "";
$code = 200;
$update_data['id'] = $this->params['user_id'];
$update_data['user_status'] = -1;
try {
$m_user = new Users();
$m_user->update_user_status($update_data);
} catch (\Exception $e) {
$code = 101;
$msg = '修改失败';
}
return $this->response($code, $msg);
}
} }
...@@ -578,12 +578,25 @@ class Users extends Model ...@@ -578,12 +578,25 @@ class Users extends Model
/** /**
* 普通跟进,对客户状态进行更新 * 普通跟进,对客户状态进行更新
*
* @param string $conditions
* @return int|string
* @throws \think\Exception
* @throws \think\exception\PDOException
*/ */
public function update_user_status($conditions = '') public function update_user_status($conditions = '')
{ {
return db('u_users')->update($conditions); return db('u_users')->update($conditions);
} }
/**
* @param string $params
* @param $pagesize
* @param $pagenum
* @return mixed
* @throws \think\Exception
* @throws \think\exception\DbException
*/
public function all_user($params = '', $pagesize, $pagenum) public function all_user($params = '', $pagesize, $pagenum)
{ {
return db('u_users') return db('u_users')
...@@ -597,6 +610,17 @@ class Users extends Model ...@@ -597,6 +610,17 @@ class Users extends Model
->select(); ->select();
} }
/**
* @param $field
* @param $params
* @param $pageNo
* @param $pageSize
* @param string $order
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function selectUserList($field, $params, $pageNo, $pageSize, $order = " id desc") public function selectUserList($field, $params, $pageNo, $pageSize, $order = " id desc")
{ {
$result = Db::table($this->table) $result = Db::table($this->table)
......
...@@ -80,6 +80,7 @@ Route::group('index', [ ...@@ -80,6 +80,7 @@ Route::group('index', [
'pcAddFollow' => [ 'index/member/pcAddFollow', [ 'method' => 'post' ] ], 'pcAddFollow' => [ 'index/member/pcAddFollow', [ 'method' => 'post' ] ],
'pcEditClient' => [ 'index/member/pcEditClient', [ 'method' => 'post | get' ] ], 'pcEditClient' => [ 'index/member/pcEditClient', [ 'method' => 'post | get' ] ],
'batchEditCustomer' => [ 'index/member/batchEditCustomer', [ 'method' => 'post' ] ], //批量修改客方 'batchEditCustomer' => [ 'index/member/batchEditCustomer', [ 'method' => 'post' ] ], //批量修改客方
'updateUserStatus' => [ 'index/member/updateUserStatus', [ 'method' => 'post' ] ], //无效客户
//transfer转铺列表 //transfer转铺列表
'transfer_list' => [ 'index/transfer/index', [ 'method' => 'get' ] ], 'transfer_list' => [ 'index/transfer/index', [ 'method' => 'get' ] ],
......
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