|
|
@ -246,7 +246,7 @@ class User extends UserModel |
|
|
|
$oldGradeId = $this['grade_id']; |
|
|
|
$oldGradeId = $this['grade_id']; |
|
|
|
return $this->transaction(function () use ($oldGradeId, $data) { |
|
|
|
return $this->transaction(function () use ($oldGradeId, $data) { |
|
|
|
// 更新用户的等级 |
|
|
|
// 更新用户的等级 |
|
|
|
$status = $this->save(['grade_id' => $data['grade_id']]); |
|
|
|
$status = $this->save(['grade_id' => $data['grade_id'],'user_type' => $data['user_type'] ?? 10]); |
|
|
|
// 新增用户等级修改记录 |
|
|
|
// 新增用户等级修改记录 |
|
|
|
if ($status) { |
|
|
|
if ($status) { |
|
|
|
(new GradeLogModel)->record([ |
|
|
|
(new GradeLogModel)->record([ |
|
|
|