|
@@ -1,4 +1,5 @@
|
|
<?php
|
|
<?php
|
|
|
|
+
|
|
namespace App\JsonRpc;
|
|
namespace App\JsonRpc;
|
|
|
|
|
|
use App\Model\Role;
|
|
use App\Model\Role;
|
|
@@ -26,7 +27,6 @@ class UserService implements UserServiceInterface
|
|
{
|
|
{
|
|
Db::beginTransaction();
|
|
Db::beginTransaction();
|
|
try {
|
|
try {
|
|
-
|
|
|
|
$dataUserReq = [
|
|
$dataUserReq = [
|
|
'user_name' => $data['user_name'],
|
|
'user_name' => $data['user_name'],
|
|
'password' => md5(md5($data['password']) . $data['salt']),
|
|
'password' => md5(md5($data['password']) . $data['salt']),
|
|
@@ -37,7 +37,7 @@ class UserService implements UserServiceInterface
|
|
'email' => $data['email'] ?? '',
|
|
'email' => $data['email'] ?? '',
|
|
'salt' => $data['salt'],
|
|
'salt' => $data['salt'],
|
|
'admin_id' => isset($data['admin_id']) && $data['admin_id'] != '' ? $data['admin_id'] : 0,
|
|
'admin_id' => isset($data['admin_id']) && $data['admin_id'] != '' ? $data['admin_id'] : 0,
|
|
-// 'level_id'=>$data['level_id']??0, //会员等级
|
|
|
|
|
|
+ // 'level_id'=>$data['level_id']??0, //会员等级
|
|
'nickname' => $data['nickname'] ?? $data['user_name'], //把账号同步到昵称里面
|
|
'nickname' => $data['nickname'] ?? $data['user_name'], //把账号同步到昵称里面
|
|
'last_login_ip' => $data['last_login_ip'] ?? '',
|
|
'last_login_ip' => $data['last_login_ip'] ?? '',
|
|
'sszq' => $data['sszq'] ?? '',
|
|
'sszq' => $data['sszq'] ?? '',
|
|
@@ -77,11 +77,11 @@ class UserService implements UserServiceInterface
|
|
'department_id' => $data['department_id'] ?? 0,
|
|
'department_id' => $data['department_id'] ?? 0,
|
|
'department_arr_id' => $data['department_arr_id'] ?? '',
|
|
'department_arr_id' => $data['department_arr_id'] ?? '',
|
|
// 企业会员 相关 公司信息
|
|
// 企业会员 相关 公司信息
|
|
- 'company_hy_id' => $data['company_hy_id']?? 0,
|
|
|
|
- 'company_size' => $data['company_size']?? 0,
|
|
|
|
- 'company_nature' => $data['company_nature']?? '',
|
|
|
|
- 'introduction' => $data['introduction']?? '',
|
|
|
|
- 'company_url' => $data['company_url']?? '',
|
|
|
|
|
|
+ 'company_hy_id' => $data['company_hy_id'] ?? 0,
|
|
|
|
+ 'company_size' => $data['company_size'] ?? 0,
|
|
|
|
+ 'company_nature' => $data['company_nature'] ?? 0,
|
|
|
|
+ 'introduction' => $data['introduction'] ?? '',
|
|
|
|
+ 'company_url' => $data['company_url'] ?? '',
|
|
|
|
|
|
];
|
|
];
|
|
var_dump("UserINfo:::", $dataUserInfoReq);
|
|
var_dump("UserINfo:::", $dataUserInfoReq);
|
|
@@ -124,20 +124,23 @@ class UserService implements UserServiceInterface
|
|
->leftJoin("user_info as user_infoA", 'user.admin_id', "user_infoA.user_id")
|
|
->leftJoin("user_info as user_infoA", 'user.admin_id', "user_infoA.user_id")
|
|
->leftJoin("role_user", 'role_user.user_id', "user.id")
|
|
->leftJoin("role_user", 'role_user.user_id', "user.id")
|
|
->leftJoin("role", 'role.id', "role_user.role_id")
|
|
->leftJoin("role", 'role.id', "role_user.role_id")
|
|
- ->orderBy("user.id", "desc")->paginate(intval($data['pageSize']),
|
|
|
|
- [
|
|
|
|
- 'user.id',
|
|
|
|
- 'user.admin_id',
|
|
|
|
- 'user.user_name',
|
|
|
|
- 'user_info.real_name',
|
|
|
|
- 'user.mobile',
|
|
|
|
- 'user.type_id',
|
|
|
|
- 'user.created_at',
|
|
|
|
- 'user.status',
|
|
|
|
- 'user_infoA.real_name as admin_real_name',
|
|
|
|
- 'role.role_name',
|
|
|
|
- ],
|
|
|
|
- 'page', intval($data['page']));
|
|
|
|
|
|
+ ->orderBy("user.id", "desc")->paginate(
|
|
|
|
+ intval($data['pageSize']),
|
|
|
|
+ [
|
|
|
|
+ 'user.id',
|
|
|
|
+ 'user.admin_id',
|
|
|
|
+ 'user.user_name',
|
|
|
|
+ 'user_info.real_name',
|
|
|
|
+ 'user.mobile',
|
|
|
|
+ 'user.type_id',
|
|
|
|
+ 'user.created_at',
|
|
|
|
+ 'user.status',
|
|
|
|
+ 'user_infoA.real_name as admin_real_name',
|
|
|
|
+ 'role.role_name',
|
|
|
|
+ ],
|
|
|
|
+ 'page',
|
|
|
|
+ intval($data['page'])
|
|
|
|
+ );
|
|
|
|
|
|
$count = $result->total();
|
|
$count = $result->total();
|
|
if (empty($result)) {
|
|
if (empty($result)) {
|
|
@@ -150,7 +153,7 @@ class UserService implements UserServiceInterface
|
|
if ($rep) {
|
|
if ($rep) {
|
|
foreach ($rep as $k => $v) {
|
|
foreach ($rep as $k => $v) {
|
|
$rep[$k]['type_name'] = $type[$v['type_id']];
|
|
$rep[$k]['type_name'] = $type[$v['type_id']];
|
|
-// $rep[$k]['gender_name'] = $gender[$v['gender']];
|
|
|
|
|
|
+ // $rep[$k]['gender_name'] = $gender[$v['gender']];
|
|
// $rep[$k]['status_name'] = $status[$v['status']];
|
|
// $rep[$k]['status_name'] = $status[$v['status']];
|
|
// $rep[$k]['city_id'] = $v['city_id']?json_decode($v['city_id']):[];
|
|
// $rep[$k]['city_id'] = $v['city_id']?json_decode($v['city_id']):[];
|
|
}
|
|
}
|
|
@@ -170,7 +173,8 @@ class UserService implements UserServiceInterface
|
|
$userInfo = Db::table('user')
|
|
$userInfo = Db::table('user')
|
|
->leftJoin('user_info', 'user.id', '=', 'user_info.user_id')
|
|
->leftJoin('user_info', 'user.id', '=', 'user_info.user_id')
|
|
->leftJoin('role_user', 'role_user.user_id', '=', 'user.id')
|
|
->leftJoin('role_user', 'role_user.user_id', '=', 'user.id')
|
|
- ->select('user.*',
|
|
|
|
|
|
+ ->select(
|
|
|
|
+ 'user.*',
|
|
'user_info.id as user_info_id',
|
|
'user_info.id as user_info_id',
|
|
'user_info.real_name',
|
|
'user_info.real_name',
|
|
'user_info.id_card',
|
|
'user_info.id_card',
|
|
@@ -309,12 +313,12 @@ class UserService implements UserServiceInterface
|
|
'administrative_unit_id' => $data['administrative_unit_id'] ?? 0,
|
|
'administrative_unit_id' => $data['administrative_unit_id'] ?? 0,
|
|
'department_id' => $data['department_id'] ?? 0,
|
|
'department_id' => $data['department_id'] ?? 0,
|
|
'department_arr_id' => $data['department_arr_id'] ?? '',
|
|
'department_arr_id' => $data['department_arr_id'] ?? '',
|
|
- // 企业会员 相关 公司信息
|
|
|
|
- 'company_hy_id' => $data['company_hy_id']?? 0,
|
|
|
|
- 'company_size' => $data['company_size']?? 0,
|
|
|
|
- 'company_nature' => $data['company_nature']?? 0,
|
|
|
|
- 'introduction' => $data['introduction']?? '',
|
|
|
|
- 'company_url' => $data['company_url']?? '',
|
|
|
|
|
|
+ // 企业会员 相关 公司信息
|
|
|
|
+ 'company_hy_id' => $data['company_hy_id'] ?? 0,
|
|
|
|
+ 'company_size' => $data['company_size'] ?? 0,
|
|
|
|
+ 'company_nature' => $data['company_nature'] ?? 0,
|
|
|
|
+ 'introduction' => $data['introduction'] ?? '',
|
|
|
|
+ 'company_url' => $data['company_url'] ?? '',
|
|
|
|
|
|
];
|
|
];
|
|
|
|
|
|
@@ -384,7 +388,6 @@ class UserService implements UserServiceInterface
|
|
return Result::error("删除失败", 0);
|
|
return Result::error("删除失败", 0);
|
|
}
|
|
}
|
|
return Result::success([]);
|
|
return Result::success([]);
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|