|
@@ -11,6 +11,7 @@ use App\Model\UserLogin;
|
|
|
use App\Model\WebsiteGroup;
|
|
|
use App\Model\Wechat;
|
|
|
use App\Tools\Result;
|
|
|
+use Hamcrest\Arrays\IsArray;
|
|
|
use Hyperf\DbConnection\Db;
|
|
|
use Hyperf\RpcServer\Annotation\RpcService;
|
|
|
|
|
@@ -42,8 +43,12 @@ class UserService implements UserServiceInterface
|
|
|
'last_login_ip' => $data['last_login_ip'] ?? '',
|
|
|
'sszq' => $data['sszq'] ?? '',
|
|
|
];
|
|
|
+ $data['other'] = is_array($data['other']) ? json_encode($data['other'] ?? []) : $data['other'];
|
|
|
+ $data['city_arr_id'] = is_array($data['city_arr_id']) ? json_encode($data['city_arr_id'] ?? []) : $data['city_arr_id'];
|
|
|
+ $data['address_arr_id'] = is_array($data['address_arr_id']) ? json_encode($data['address_arr_id'] ?? []) : $data['address_arr_id'];
|
|
|
var_dump("user:", $dataUserReq);
|
|
|
$userid = User::query()->insertGetId($dataUserReq);
|
|
|
+ // $data['administrative_unit_arr_id'] = is_array($data['administrative_unit_arr_id']) ? json_encode($data['administrative_unit_arr_id'] ?? []): $data['administrative_unit_arr_id'];
|
|
|
$dataUserInfoReq = [
|
|
|
'user_id' => $userid,
|
|
|
'id_card' => $data['id_card'] ?? '',
|
|
@@ -281,6 +286,9 @@ class UserService implements UserServiceInterface
|
|
|
];
|
|
|
|
|
|
$userRep = User::where(['id' => $data['id']])->update($dataUserReq);
|
|
|
+ $data['other'] = is_array($data['other']) ? json_encode($data['other'] ?? []) : $data['other'];
|
|
|
+ $data['city_arr_id'] = is_array($data['city_arr_id']) ? json_encode($data['city_arr_id'] ?? []) : $data['city_arr_id'];
|
|
|
+ $data['address_arr_id'] = is_array($data['address_arr_id']) ? json_encode($data['address_arr_id'] ?? []) : $data['address_arr_id'];
|
|
|
var_dump("修改user:", $userRep);
|
|
|
$dataUserInfoReq = [
|
|
|
'id_card' => $data['id_card'] ?? '',
|