|
|
@@ -257,4 +257,22 @@ class CustomController extends BaseController
|
|
|
util::complete();
|
|
|
}
|
|
|
|
|
|
+ //修改客户等级 shish 20211007
|
|
|
+ public function actionChangeLevel()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $customId = $get['customId'] ?? 0;
|
|
|
+ $level = $get['level'] ?? 0;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ CustomClass::valid($custom, $this->shopId);
|
|
|
+ $custom->level = $level;
|
|
|
+ $custom->save();
|
|
|
+ $ghsId = $custom->ghsId ?? 0;
|
|
|
+ $ghs = GhsClass::getById($ghsId, true);
|
|
|
+ GhsClass::valid($ghs, $this->shopId);
|
|
|
+ $ghs->giveLevel = $level;
|
|
|
+ $ghs->save();
|
|
|
+ util::complete('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
}
|