fix(个人用户信息接口): 添加班组名称字段
parent
a7b5f33775
commit
b9eecf94ed
|
@ -9,6 +9,7 @@ use app\model\Account;
|
||||||
use app\model\AccountRecord;
|
use app\model\AccountRecord;
|
||||||
use app\model\AccountStar;
|
use app\model\AccountStar;
|
||||||
use app\model\ClockLog;
|
use app\model\ClockLog;
|
||||||
|
use app\model\Outsource;
|
||||||
use app\model\PayLog;
|
use app\model\PayLog;
|
||||||
use app\model\Worksite;
|
use app\model\Worksite;
|
||||||
use app\repository\AccountRepository;
|
use app\repository\AccountRepository;
|
||||||
|
@ -46,9 +47,9 @@ class User extends Base
|
||||||
{
|
{
|
||||||
$params = input();
|
$params = input();
|
||||||
|
|
||||||
// Log::error('进入参数');
|
// Log::error('进入参数');
|
||||||
// Log::error($params);
|
// Log::error($params);
|
||||||
// Log::error('参数结束');
|
// Log::error('参数结束');
|
||||||
$validate = new UserValidate();
|
$validate = new UserValidate();
|
||||||
if (!$validate->scene('wx_applets')->check($params)) {
|
if (!$validate->scene('wx_applets')->check($params)) {
|
||||||
return $this->json(4000, $validate->getError());
|
return $this->json(4000, $validate->getError());
|
||||||
|
@ -169,6 +170,8 @@ class User extends Base
|
||||||
$accountId = $this->request->user['user_id'] ?? 0;
|
$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);
|
return $this->json(0, 'success', $user);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
Loading…
Reference in New Issue