|
@@ -109,7 +109,7 @@ class UserModel extends Model
|
|
|
*/
|
|
*/
|
|
|
public static function updateUserLevel(int $uid, int $parentId)
|
|
public static function updateUserLevel(int $uid, int $parentId)
|
|
|
{
|
|
{
|
|
|
- if (empty($parentId)) {
|
|
|
|
|
|
|
+ if (!empty($parentId)) {
|
|
|
$parent = self::where('id', $parentId)->find();
|
|
$parent = self::where('id', $parentId)->find();
|
|
|
//更新等级
|
|
//更新等级
|
|
|
if (empty($parent->address_level)) {
|
|
if (empty($parent->address_level)) {
|