增加询单发布&分配&用户全量

This commit is contained in:
mzl
2025-07-23 17:06:48 +08:00
parent b22db8ac35
commit 36288fa64d
9 changed files with 149 additions and 539 deletions
@@ -6,6 +6,7 @@ use support\Request;
use app\common\service\CorpService;
use app\common\service\CorpFeishuAppService;
use app\common\service\SystemsService;
use app\common\service\UserService;
class PresetController extends BaseController
{
@@ -48,4 +49,15 @@ class PresetController extends BaseController
return $this->error($e->getMessage());
}
}
public function users()
{
try {
$result = (new UserService())->getList();
return $this->success($result, '获取用户列表');
} catch (\Throwable $e) {
return $this->error($e->getMessage());
}
}
}
+15
View File
@@ -53,4 +53,19 @@ class UserLogic
return $res;
}
/**
* 获取用户列表
*/
public function getList()
{
$list = User::where('status', 1)->orderBy('id', 'desc')->get();
$arr = [];
foreach ($list->toArray() as $item) {
$arr[] = [
'name' => $item['name'],
'id' => $item['id'],
];
}
return $arr;
}
}
+9
View File
@@ -5,6 +5,7 @@ namespace app\common\service;
use app\common\logic\UserLogic;
use app\common\model\Corp;
use app\common\model\User;
use app\common\utils\CrudUtil;
use app\crm\model\Country;
use support\exception\BusinessException;
@@ -99,4 +100,12 @@ class UserService
$user = $this->logic->savePassword($uid,$data);
return $user;
}
/**
* 获取用户列表
*/
public function getList()
{
return $this->logic->getList();
}
}
@@ -69,4 +69,12 @@ trait CrudLogicTrait
{
return CrudUtil::executeComplex($this->modelClass, $callback);
}
/**
* 根据主键查询
*/
public function findByPk(int $id, array $with = [])
{
return CrudUtil::findByPk($this->modelClass, $id, $with);
}
}
+1 -1
View File
@@ -117,7 +117,7 @@ trait CrudServiceTrait
$config['where']['id'] = $p['id'];
break;
case 'destroy':
// $config['where']['id'] = $p['id'];
$config['where']['id'] = $p['id'];
break;
}
+6 -1
View File
@@ -69,9 +69,14 @@ class InquiryLogValidate extends Validate
'store' => [
'enter_user_id', 'quality', 'channel', 'email', 'tel', 'whatsapp', 'country', 'contacts', 'content'
],
'update' => [
'quality', 'channel', 'email', 'tel', 'whatsapp', 'country', 'contacts', 'content'
],
'release' => [
'status', 'r_time'
],
'allocation' => [
'status', 't_time'
]
];