Merge branch 'feature/user0812' into develop

This commit is contained in:
2025-08-14 19:49:29 +08:00
4 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ class UserController extends BaseController
public function resignMember(Request $request)
{
try {
$userId = $request->post('user_id');
$userId = $request->get('user_id');
if(empty($userId)){
return $this->error('组员id不能为空');
}
+4
View File
@@ -185,6 +185,10 @@ class UserService
// $config['where']['status'] = 1; // 关键字
$config['order']['id'] = 'desc';
if (isset($p['status']) && $p['status']) {
$config['where']['status'] = $p['status'];
}
$config['dataLimit']['type'] = 'relation';
$config['dataLimit']['userId'] = $request->user->uid;
$config['dataLimit']['userField'] = 'report_to';
+8
View File
@@ -89,6 +89,7 @@ class CustomerService
$query->where(function ($query) use ($keyword) {
$query->where('contacts', 'like', "%{$keyword}%")
->orWhere('phone', 'like', "%{$keyword}%")
->orWhere('email', 'like', "%{$keyword}%")
->orWhere('WhatsApp', 'like', "%{$keyword}%")
->orWhere('code', 'like', "%{$keyword}%");
});
@@ -154,9 +155,16 @@ class CustomerService
switch ($scene) {
case 'index':
$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']) {
$k = '%' . $p['keyword'] . '%';
$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['dataLimit']['type'] = 'relation';
+1
View File
@@ -106,6 +106,7 @@ class CustomerService
$query->where(function ($query) use ($keyword) {
$query->where('contacts', 'like', "%{$keyword}%")
->orWhere('phone', 'like', "%{$keyword}%")
->orWhere('email', 'like', "%{$keyword}%")
->orWhere('WhatsApp', 'like', "%{$keyword}%")
->orWhere('code', 'like', "%{$keyword}%");
});