|
|
|
@ -12,8 +12,9 @@ declare (strict_types=1); |
|
|
|
|
|
|
|
|
|
namespace app\store\model\dealer; |
|
|
|
|
|
|
|
|
|
use app\store\model\dealer\Referee as RefereeModel; |
|
|
|
|
use app\common\model\dealer\User as UserModel; |
|
|
|
|
use app\store\model\dealer\Apply as ApplyModel; |
|
|
|
|
use app\store\model\dealer\Referee as RefereeModel; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分销商用户模型 |
|
|
|
@ -85,6 +86,10 @@ class User extends UserModel |
|
|
|
|
} |
|
|
|
|
// 清空下级推荐记录 |
|
|
|
|
$RefereeModel->onClearTeam($this['user_id']); |
|
|
|
|
// 删除申请记录 |
|
|
|
|
$applyModel = new ApplyModel(); |
|
|
|
|
$applyModel->where(['user_id' => $this['user_id']])->delete(); |
|
|
|
|
$this->onDeleteReferee($this['user_id']); |
|
|
|
|
// 标记当前分销商记录为已删除 |
|
|
|
|
return $this->delete(); |
|
|
|
|
}); |
|
|
|
|