Merge branch 'feature/user0812' into develop
This commit is contained in:
@@ -46,7 +46,7 @@ class UserController extends BaseController
|
|||||||
public function resignMember(Request $request)
|
public function resignMember(Request $request)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$userId = $request->post('user_id');
|
$userId = $request->get('user_id');
|
||||||
if(empty($userId)){
|
if(empty($userId)){
|
||||||
return $this->error('组员id不能为空');
|
return $this->error('组员id不能为空');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,6 +185,10 @@ class UserService
|
|||||||
// $config['where']['status'] = 1; // 关键字
|
// $config['where']['status'] = 1; // 关键字
|
||||||
$config['order']['id'] = 'desc';
|
$config['order']['id'] = 'desc';
|
||||||
|
|
||||||
|
if (isset($p['status']) && $p['status']) {
|
||||||
|
$config['where']['status'] = $p['status'];
|
||||||
|
}
|
||||||
|
|
||||||
$config['dataLimit']['type'] = 'relation';
|
$config['dataLimit']['type'] = 'relation';
|
||||||
$config['dataLimit']['userId'] = $request->user->uid;
|
$config['dataLimit']['userId'] = $request->user->uid;
|
||||||
$config['dataLimit']['userField'] = 'report_to';
|
$config['dataLimit']['userField'] = 'report_to';
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ class CustomerService
|
|||||||
$query->where(function ($query) use ($keyword) {
|
$query->where(function ($query) use ($keyword) {
|
||||||
$query->where('contacts', 'like', "%{$keyword}%")
|
$query->where('contacts', 'like', "%{$keyword}%")
|
||||||
->orWhere('phone', 'like', "%{$keyword}%")
|
->orWhere('phone', 'like', "%{$keyword}%")
|
||||||
|
->orWhere('email', 'like', "%{$keyword}%")
|
||||||
->orWhere('WhatsApp', 'like', "%{$keyword}%")
|
->orWhere('WhatsApp', 'like', "%{$keyword}%")
|
||||||
->orWhere('code', 'like', "%{$keyword}%");
|
->orWhere('code', 'like', "%{$keyword}%");
|
||||||
});
|
});
|
||||||
@@ -154,9 +155,16 @@ class CustomerService
|
|||||||
switch ($scene) {
|
switch ($scene) {
|
||||||
case 'index':
|
case 'index':
|
||||||
$config['where']['status'] = 1; // 关键字
|
$config['where']['status'] = 1; // 关键字
|
||||||
|
if (isset($p['user_id']) && $p['user_id']) {
|
||||||
|
$config['where']['user_id'] = $p['user_id'];
|
||||||
|
} // 关键字
|
||||||
if (isset($p['keyword']) && $p['keyword']) {
|
if (isset($p['keyword']) && $p['keyword']) {
|
||||||
$k = '%' . $p['keyword'] . '%';
|
$k = '%' . $p['keyword'] . '%';
|
||||||
$config['where']['contacts'] = ['like', $k];
|
$config['where']['contacts'] = ['like', $k];
|
||||||
|
$config['where']['phone'] = ['like', $k];
|
||||||
|
$config['where']['email'] = ['like', $k];
|
||||||
|
$config['where']['WhatsApp'] = ['like', $k];
|
||||||
|
$config['where']['code'] = ['like', $k];
|
||||||
}
|
}
|
||||||
$config['order']['id'] = 'desc';
|
$config['order']['id'] = 'desc';
|
||||||
$config['dataLimit']['type'] = 'relation';
|
$config['dataLimit']['type'] = 'relation';
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ class CustomerService
|
|||||||
$query->where(function ($query) use ($keyword) {
|
$query->where(function ($query) use ($keyword) {
|
||||||
$query->where('contacts', 'like', "%{$keyword}%")
|
$query->where('contacts', 'like', "%{$keyword}%")
|
||||||
->orWhere('phone', 'like', "%{$keyword}%")
|
->orWhere('phone', 'like', "%{$keyword}%")
|
||||||
|
->orWhere('email', 'like', "%{$keyword}%")
|
||||||
->orWhere('WhatsApp', 'like', "%{$keyword}%")
|
->orWhere('WhatsApp', 'like', "%{$keyword}%")
|
||||||
->orWhere('code', 'like', "%{$keyword}%");
|
->orWhere('code', 'like', "%{$keyword}%");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user