|
|
@@ -23,7 +23,7 @@ class User
|
|
|
*/
|
|
|
static public function create($username, $password)
|
|
|
{
|
|
|
- $user = new \App\Module\User\Model\User();
|
|
|
+ $user = new \App\Module\User\Models\User();
|
|
|
$user->username = $username;
|
|
|
$user->password = Hash::make($password);
|
|
|
$user->status2 = Status2::Normal;
|
|
|
@@ -44,9 +44,10 @@ class User
|
|
|
|
|
|
/**
|
|
|
* 使用手机号码注册
|
|
|
+ *
|
|
|
* @param $phone
|
|
|
* @param $password
|
|
|
- * @return Model\User|string|true
|
|
|
+ * @return Models\User|string|true
|
|
|
* @throws LogicException
|
|
|
*/
|
|
|
static public function createPhone($phone, $password)
|
|
|
@@ -74,7 +75,7 @@ class User
|
|
|
*/
|
|
|
static public function resetPassword($id, $password)
|
|
|
{
|
|
|
- $user = \App\Module\User\Model\User::query()->find($id);
|
|
|
+ $user = \App\Module\User\Models\User::query()->find($id);
|
|
|
if (!$user) {
|
|
|
return 'user-notfind';
|
|
|
}
|
|
|
@@ -99,7 +100,7 @@ class User
|
|
|
*/
|
|
|
static public function lisss($page, $limit, $where)
|
|
|
{
|
|
|
- $q = \App\Module\User\Model\User::query()->with([
|
|
|
+ $q = \App\Module\User\Models\User::query()->with([
|
|
|
'fund', 'merchant', 'info'
|
|
|
]);
|
|
|
$wArr = new Arr($where, $q);
|
|
|
@@ -115,7 +116,7 @@ class User
|
|
|
|
|
|
/**
|
|
|
* @param $id
|
|
|
- * @return Model\User|null
|
|
|
+ * @return Models\User|null
|
|
|
*/
|
|
|
static public function info($id, $create = false)
|
|
|
{
|
|
|
@@ -128,7 +129,7 @@ class User
|
|
|
*
|
|
|
* @param $id
|
|
|
* @param $create
|
|
|
- * @return Model\UserInfo|null
|
|
|
+ * @return Models\UserInfo|null
|
|
|
*/
|
|
|
static public function infoinfo($id, $create = false)
|
|
|
{
|
|
|
@@ -163,9 +164,9 @@ class User
|
|
|
$res = self::pinfoCaches($ids2);
|
|
|
if ($ids2) {
|
|
|
/**
|
|
|
- * @var \App\Module\User\Model\UserInfo[] $users
|
|
|
+ * @var \App\Module\User\Models\UserInfo[] $users
|
|
|
*/
|
|
|
- $users = \App\Module\User\Model\UserInfo::query()->whereIn('user_id', $ids2)->with([
|
|
|
+ $users = \App\Module\User\Models\UserInfo::query()->whereIn('user_id', $ids2)->with([
|
|
|
'merchant'
|
|
|
])->get();
|
|
|
|