fix(个人用户信息接口): 添加班组名称字段

master
yin5th 2023-02-16 16:04:17 +08:00
parent a7b5f33775
commit b9eecf94ed
1 changed files with 7 additions and 4 deletions

View File

@ -9,6 +9,7 @@ use app\model\Account;
use app\model\AccountRecord;
use app\model\AccountStar;
use app\model\ClockLog;
use app\model\Outsource;
use app\model\PayLog;
use app\model\Worksite;
use app\repository\AccountRepository;
@ -46,9 +47,9 @@ class User extends Base
{
$params = input();
// Log::error('进入参数');
// Log::error($params);
// Log::error('参数结束');
// Log::error('进入参数');
// Log::error($params);
// Log::error('参数结束');
$validate = new UserValidate();
if (!$validate->scene('wx_applets')->check($params)) {
return $this->json(4000, $validate->getError());
@ -168,7 +169,9 @@ class User extends Base
try {
$accountId = $this->request->user['user_id'] ?? 0;
$user = Account::getUser($accountId);
$user = Account::getUser($accountId);
$outsourceList = Outsource::column('name', 'id');
$user['outsource_name'] = $outsourceList[$user['outsource_id']] ?? '';
return $this->json(0, 'success', $user);
} catch (Exception $e) {