ChangeBalanceForm.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. <?php
  2. namespace common\models\forms;
  3. use backendApi\modules\v1\models\Admin;
  4. use common\components\Model;
  5. use common\helpers\Date;
  6. use common\helpers\Form;
  7. use common\helpers\Tool;
  8. use common\helpers\user\Balance;
  9. use common\helpers\user\Cash;
  10. use common\helpers\user\Info;
  11. use common\libs\logging\operate\AdminOperate;
  12. use common\models\BalanceAudit;
  13. use common\models\DealType;
  14. use common\models\User;
  15. use common\models\UserBonus;
  16. use common\models\UserInfo;
  17. use common\models\UserWallet;
  18. use common\models\Withdraw;
  19. use yii\base\Exception;
  20. /**
  21. * Login form
  22. */
  23. class ChangeBalanceForm extends Model {
  24. public $id;
  25. public $selected;
  26. public $userName;
  27. public $realName;
  28. public $type;
  29. public $dealType;
  30. public $amount;
  31. public $remark;
  32. public $auditStatus;
  33. public $isShow;
  34. public $allowMinus;
  35. public $balanceCode;
  36. private $_model;
  37. private $_userId;
  38. public function init() {
  39. parent::init();
  40. $this->adminOperateLogger = new AdminOperate([
  41. 'fetchClass' => UserBonus::class,
  42. ]);
  43. }
  44. /**
  45. * @inheritdoc
  46. */
  47. public function rules() {
  48. return [
  49. [['id', 'selected', 'userName', 'type', 'amount', 'remark', 'auditStatus', 'isShow', 'dealType', 'allowMinus'], 'trim'],
  50. [['id', 'userName', 'type', 'amount', 'remark', 'auditStatus', 'dealType','balanceCode'], 'required'],
  51. [['id'], 'exist', 'targetClass' => BalanceAudit::class, 'targetAttribute' => 'ID', 'message' => '余额变动申请不存在'],
  52. [['id'], 'initModel'],
  53. [['userName'], 'exist', 'targetClass' => UserInfo::class, 'targetAttribute' => 'USER_NAME', 'message' => '会员不存在'],
  54. [['userName'], 'isUserName'],
  55. [['type'], 'isType'],
  56. [['dealType'], 'isDealType'],
  57. [['amount'], 'fullPrice'],
  58. [['amount'], 'isAmount'],
  59. [['auditStatus'], 'isStatus'],
  60. [['selected'], 'isSelected'],
  61. [['balanceCode'], 'validateRejectCode'],
  62. ];
  63. }
  64. /**
  65. * 指定场景
  66. * @return array
  67. */
  68. public function scenarios() {
  69. $parentScenarios = parent::scenarios();
  70. $customScenarios = [
  71. 'changeAdd' => ['userName', 'type', 'amount', 'remark', 'isShow', 'dealType', 'balanceCode'],
  72. 'changeAudit' => ['selected', 'allowMinus', 'remark', 'auditStatus', 'balanceCode'],
  73. 'edit' => ['id', 'type', 'amount', 'remark', 'isShow', 'dealType'],
  74. 'pass' => ['id', 'type', 'amount', 'auditStatus', 'remark', 'isShow', 'dealType', 'balanceCode'],
  75. 'excelChangeBalance' => ['userName', 'realName', 'type', 'amount', 'dealType', 'remark', 'isShow'],
  76. ];
  77. return array_merge($parentScenarios, $customScenarios);
  78. }
  79. /**
  80. * @return array
  81. */
  82. public function attributeLabels() {
  83. return [
  84. 'id' => '余额变动申请的ID',
  85. 'userName' => '会员编号',
  86. 'type' => '余额类型',
  87. 'amount' => '变动金额',
  88. 'remark' => '备注',
  89. 'auditStatus' => '状态',
  90. 'isShow' => '前台显示备注',
  91. 'dealType' => '交易类型',
  92. 'balanceCode' => '余额调整校验码',
  93. ];
  94. }
  95. /**
  96. * 初始化广告model类
  97. * @param $attribute
  98. */
  99. public function initModel($attribute) {
  100. $model = $this->_model = BalanceAudit::findOne(['ID' => $this->id]);
  101. $this->_userId = $model['USER_ID'];
  102. if ($model->AUDIT_STATUS > \Yii::$app->params['auditStatus']['un']['value']) {
  103. $this->addError($attribute, \Yii::t('ctx', 'applicationCannotReviewedAgain'));// 该申请已经被审核,不能重复审核
  104. }
  105. }
  106. /**
  107. * 设置userId
  108. * @param $attribute
  109. */
  110. public function isUserName($attribute) {
  111. $userInfo = UserInfo::find()->select('USER_ID')->where(['USER_NAME' => $this->userName])->asArray()->one();
  112. if ($userInfo) {
  113. $this->_userId = $userInfo['USER_ID'];
  114. if ($this->scenario == 'excelChangeBalance') {
  115. $realName = Info::getUserRealNameByUserId($this->_userId);
  116. if ($realName != $this->realName) {
  117. $this->addError($attribute, \Yii::t('ctx', 'idNotMatchName'));
  118. }
  119. }
  120. } else {
  121. $this->addError($attribute, \Yii::t('ctx', 'memberDoesNotExist')); // 会员不存在
  122. }
  123. }
  124. /**
  125. * 校验余额类型
  126. * @param $attribute
  127. */
  128. public function isType($attribute) {
  129. if (!key_exists($this->type, BalanceAudit::getBalanceAuditType())) {
  130. $this->addError($attribute, \Yii::t('ctx', 'incorrectBalanceType'));
  131. }
  132. // 查看表里面是否有想同类型的未审核单,如果有的话,不允许再申请,需等审核完成以后,才能申请
  133. /*if(BalanceAudit::find()->where('USER_ID=:USER_ID AND TYPE=:TYPE AND STATUS=:STATUS', [':USER_ID'=>$this->_userId, ':TYPE'=>$this->type, ':STATUS'=>BalanceAudit::STATUS_APPLIED])->exists()){
  134. $this->addError($attribute, '已提交过该会员的其他余额调整申请,等待审核后,才可以申请新的余额调整申请');
  135. }*/
  136. }
  137. /**
  138. * 校验交易类型
  139. * @param $attribute
  140. */
  141. public function isDealType($attribute) {
  142. if (!key_exists($this->dealType, DealType::getTypes())) {
  143. $this->addError($attribute, \Yii::t('ctx', 'incorrectTransactionType'));
  144. }
  145. }
  146. /**
  147. * 金额是否正确
  148. * @param $attribute
  149. */
  150. public function isAmount($attribute) {
  151. if ($this->amount == 0) $this->addError($attribute, \Yii::t('ctx', 'adjustmentAmountCannotZero'));
  152. if ($this->amount < 0 && $this->type == 'reconsume_points' && abs($this->amount) > Balance::getBalanceReconsumePoints($this->_userId)) {
  153. $this->addError('scenario', \Yii::t('ctx', 'pointsEnoughAdjustmentNotAllowed'));
  154. }
  155. // if ($this->amount < 0 && $this->type == 'lx' && abs($this->amount) > Balance::getBalanceLX($this->_userId)) {
  156. // $this->addError('scenario', '会员领袖分红余额不足,不允许调整');
  157. // }
  158. }
  159. /**
  160. * 校验状态
  161. * @param $attribute
  162. */
  163. public function isStatus($attribute) {
  164. // 获取当前提现单的状态
  165. $oneData = BalanceAudit::findOneAsArray(['ID' => $this->id]);
  166. if (empty($oneData) && empty($this->id) && !empty($this->selected)) {
  167. if (is_array($this->selected) && count($this->selected) == 1) {
  168. $oneData = BalanceAudit::findOneAsArray(['ID' => $this->selected[0]]);
  169. }
  170. }
  171. switch ($this->auditStatus) {
  172. case 'un':
  173. $this->addError($attribute, \Yii::t('ctx', 'cannotSetPendingReview') . $this->auditStatus); // 不能设置为待审核状态
  174. break;
  175. case 'true':
  176. if (isset($oneData['AUDIT_STATUS']) && $oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['true']['value']) {
  177. $this->addError($attribute, \Yii::t('ctx', 'auditCannotRepeated')); // 已经审核通过不能重复审核
  178. } elseif (isset($oneData['AUDIT_STATUS']) && $oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['reject']['value']) {
  179. $this->addError($attribute, \Yii::t('ctx', 'rejectedAuditCannotRepeated')); // 已经审核拒绝不能重复审核
  180. }
  181. break;
  182. case 'reject':
  183. if ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['true']['value']) {
  184. $this->addError($attribute, \Yii::t('ctx', 'auditCannotRepeated')); // 已经审核通过不能重复审核
  185. } elseif ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['reject']['value']) {
  186. $this->addError($attribute, \Yii::t('ctx', 'rejectedAuditCannotRepeated')); // 已经审核拒绝不能重复审核
  187. }
  188. break;
  189. default:
  190. $this->addError($attribute, \Yii::t('ctx', 'statusParameterError'));
  191. }
  192. }
  193. public function validateRejectCode($attribute) {
  194. $adminId = \Yii::$app->user->id;
  195. $redisCode = \Yii::$app->redis->getset('balanceCode_'.$adminId,'');
  196. if ($this->balanceCode!=$redisCode) {
  197. $this->addError($attribute, \Yii::t('ctx', 'adjustmentBalanceCodeFailed'));
  198. }
  199. }
  200. /**
  201. * 批量数据
  202. * @param $attributes
  203. */
  204. public function isSelected($attributes) {
  205. if (!$this->selected) {
  206. $this->addError($attributes, \Yii::t('ctx', 'aPieceMustBeSelected')); // 必须选择一条数据
  207. }
  208. if (!is_array($this->selected)) {
  209. $this->selected = [$this->selected];
  210. }
  211. $this->selected = array_unique($this->selected);
  212. if ($this->auditStatus == 'true') {
  213. foreach ($this->selected as $key => $select) {
  214. $model = BalanceAudit::findOne(['ID' => $select]);
  215. if (!$this->allowMinus) {
  216. $oneUserBonusModel = UserBonus::findOneAsArray(['USER_ID' => $model->USER_ID]);
  217. if ($model->AMOUNT < 0 && abs($oneUserBonusModel[strtoupper($model->TYPE)]) < abs($model->AMOUNT)) unset($this->selected[$key]);
  218. } else {
  219. if (in_array($model->TYPE, ['cf', 'lx'])) {
  220. $oneUserBonusModel = UserBonus::findOneAsArray(['USER_ID' => $model->USER_ID]);
  221. if ($model->AMOUNT < 0 && abs($oneUserBonusModel[strtoupper($model->TYPE)]) < abs($model->AMOUNT)) unset($this->selected[$key]);
  222. }
  223. }
  224. if ($model->AUDIT_STATUS > \Yii::$app->params['auditStatus']['un']['value']) unset($this->selected[$key]);
  225. }
  226. }
  227. $this->selected = array_values($this->selected);
  228. if (!$this->selected) {
  229. $this->addError($attributes, \Yii::t('ctx', 'noEligibleData'));
  230. }
  231. }
  232. /**
  233. * 添加变动申请
  234. * @return BalanceAudit|null
  235. * @throws \yii\db\Exception
  236. */
  237. public function changeAdd() {
  238. if (!$this->validate()) {
  239. return null;
  240. }
  241. $db = \Yii::$app->db;
  242. $transaction = $db->beginTransaction();
  243. try {
  244. // 添加申请
  245. $userInfo = Info::baseInfo($this->_userId);
  246. $model = new BalanceAudit();
  247. $model->USER_ID = $this->_userId;
  248. $model->LAST_DEC_LV = $userInfo['DEC_LV'];
  249. $model->LAST_EMP_LV = $userInfo['EMP_LV'];
  250. $model->LAST_DEC_ROLE_ID = $userInfo['DEC_ROLE_ID'];
  251. $model->TYPE = $this->type;
  252. $model->DEAL_TYPE = $this->dealType;
  253. $model->AMOUNT = $this->amount;
  254. $model->CREATE_REMARK = $this->remark;
  255. $model->AUDIT_STATUS = \Yii::$app->params['auditStatus']['un']['value'];
  256. $model->REMARK_IS_SHOW = $this->isShow;
  257. $model->UPDATE_ADMIN_ID = \Yii::$app->user->id;
  258. $model->CREATED_AT = Date::nowTime();
  259. if (!$model->save()) {
  260. throw new Exception(Form::formatErrorsForApi($model->getErrors()));
  261. }
  262. $adminId = \Yii::$app->user->id;
  263. \Yii::$app->redis->del('balanceCode_'.$adminId);
  264. $transaction->commit();
  265. } catch (Exception $e) {
  266. $transaction->rollBack();
  267. $this->addError('changeAdd', $e->getMessage());
  268. return null;
  269. }
  270. // 记录日志
  271. $this->adminOperateLogger->fetchClass = BalanceAudit::class;
  272. $this->adminOperateLogger->afterInsert($model)->clean()->save([
  273. 'optType' => '申请变动会员余额',
  274. 'userId' => $model->USER_ID,
  275. 'userName' => $userInfo['USER_NAME'],
  276. 'remark' => $model->CREATE_REMARK,
  277. ]);
  278. return $model;
  279. }
  280. /**
  281. * 修改信息
  282. * @return null
  283. * @throws \yii\db\Exception
  284. */
  285. public function edit() {
  286. //关闭修改
  287. return null;
  288. if (!$this->validate()) {
  289. return null;
  290. }
  291. $db = \Yii::$app->db;
  292. $transaction = $db->beginTransaction();
  293. try {
  294. $model = $this->_model;
  295. $model->TYPE = $this->type;
  296. $model->DEAL_TYPE = $this->dealType;
  297. $model->AMOUNT = $this->amount;
  298. $model->CREATE_REMARK = $this->remark;
  299. $model->REMARK_IS_SHOW = $this->isShow;
  300. if (!$model->save()) {
  301. throw new Exception(Form::formatErrorsForApi($model->getErrors()));
  302. }
  303. $transaction->commit();
  304. } catch (Exception $e) {
  305. $transaction->rollBack();
  306. $this->addError('edit', $e->getMessage());
  307. return null;
  308. }
  309. return $model;
  310. }
  311. /**
  312. * 审核通过
  313. * @return null
  314. * @throws \yii\db\Exception
  315. */
  316. public function pass() {
  317. if (!$this->validate()) {
  318. return null;
  319. }
  320. // 日志记录操作前的数据
  321. if($this->type=='cash'){
  322. $beforeData = UserWallet::getCashByUserId($this->_userId);
  323. $this->adminOperateLogger->fetchClass = UserWallet::class;
  324. }else {
  325. $beforeData = UserBonus::getBonusByUserId($this->_userId);
  326. $this->adminOperateLogger->fetchClass = UserBonus::class;
  327. }
  328. $this->adminOperateLogger->beforeUpdate($beforeData);
  329. $db = \Yii::$app->db;
  330. $transaction = $db->beginTransaction();
  331. try {
  332. $model = $this->_model;
  333. $model->AUDIT_STATUS = \Yii::$app->params['auditStatus'][$this->auditStatus]['value'];
  334. $model->AUDIT_ADMIN_ID = \Yii::$app->user->id;
  335. $model->TYPE = $this->type;
  336. $model->DEAL_TYPE = $this->dealType;
  337. $model->AMOUNT = $this->amount;
  338. $model->REMARK_IS_SHOW = $this->isShow;
  339. $model->CREATE_REMARK = $this->remark;
  340. $model->AUDITED_AT = Date::nowTime();
  341. if (!$model->save()) {
  342. throw new Exception(Form::formatErrorsForApi($model->getErrors()));
  343. }
  344. // 如果是审核通过状态
  345. if ($this->auditStatus == 'true') {
  346. if($model->TYPE=='cash') {
  347. Cash::changeUserCash($model->USER_ID, 'CASH', $model->AMOUNT, ['REMARK' => 'Background administrator recharge']);
  348. }else{
  349. Balance::changeUserBonus($model->USER_ID, $model->TYPE, $model->AMOUNT, ['REMARK' => $model->CREATE_REMARK, 'REMARK_IS_SHOW' => $model->REMARK_IS_SHOW, 'DEAL_TYPE_ID' => $model->DEAL_TYPE, 'DEAL_TYPE_IS_PRESET' => 0, 'ADMIN_NAME' => Admin::getAdminNameById(\Yii::$app->user->id)]);
  350. }
  351. }
  352. $adminId = \Yii::$app->user->id;
  353. \Yii::$app->redis->del('balanceCode_'.$adminId);
  354. $transaction->commit();
  355. } catch (Exception $e) {
  356. $transaction->rollBack();
  357. $this->addError('pass', $e->getMessage());
  358. return null;
  359. }
  360. // 记录日志
  361. if($this->type=='cash'){
  362. $afterData = UserWallet::getCashByUserId($this->_userId);
  363. $this->adminOperateLogger->fetchClass = UserWallet::class;
  364. }else {
  365. $afterData = UserBonus::getBonusByUserId($this->_userId);
  366. $this->adminOperateLogger->fetchClass = UserBonus::class;
  367. }
  368. $this->adminOperateLogger->afterInsert($afterData)->clean()->save([
  369. 'optType' => '审核变动会员余额',
  370. 'userId' => $model->USER_ID,
  371. 'userName' => Info::getUserNameByUserId($model->USER_ID),
  372. 'remark' => $model->CREATE_REMARK,
  373. ]);
  374. return $model;
  375. }
  376. /**
  377. * 审核余额变动
  378. * @return null
  379. * @throws \yii\db\Exception
  380. */
  381. public function changeAudit() {
  382. if (!$this->validate()) {
  383. return null;
  384. }
  385. $uids=[];
  386. if($this->auditStatus=='true'){
  387. foreach ($this->selected as $select) {
  388. $oneBalanceAudit = BalanceAudit::findOneAsArray('ID=:ID',[':ID'=>$select],'USER_ID');
  389. $uids[]=$oneBalanceAudit['USER_ID'];
  390. }
  391. }
  392. if($this->auditStatus=='true'){
  393. $this->adminOperateLogger->fetchClass = UserBonus::class;
  394. $this->adminOperateLogger->setIsBatch(true)->beforeUpdate($uids, 'USER_ID');
  395. }else{
  396. $this->adminOperateLogger->fetchClass = BalanceAudit::class;
  397. $this->adminOperateLogger->setIsBatch(true)->beforeUpdate($this->selected, 'ID');
  398. }
  399. $db = \Yii::$app->db;
  400. $transaction = $db->beginTransaction();
  401. $logs=[];
  402. try {
  403. foreach ($this->selected as $select) {
  404. $model = BalanceAudit::findOne(['ID' => $select]);
  405. $model->AUDIT_STATUS = \Yii::$app->params['auditStatus'][$this->auditStatus]['value'];
  406. $model->AUDIT_ADMIN_ID = \Yii::$app->user->id;
  407. $model->CREATE_REMARK = $this->remark;
  408. $model->AUDITED_AT = Date::nowTime();
  409. if (!$model->save()) {
  410. throw new Exception(Form::formatErrorsForApi($model->getErrors()));
  411. }
  412. if ($model->AUDIT_STATUS == \Yii::$app->params['auditStatus']['true']['value']) {
  413. Balance::changeUserBonus($model->USER_ID, $model->TYPE, $model->AMOUNT, ['REMARK' => $model->CREATE_REMARK, 'REMARK_IS_SHOW' => $model->REMARK_IS_SHOW, 'DEAL_TYPE_ID' => $model->DEAL_TYPE, 'DEAL_TYPE_IS_PRESET' => 0, 'ADMIN_NAME' => Admin::getAdminNameById(\Yii::$app->user->id)]);
  414. }
  415. $logs[]=['userId'=>$select,'type'=>$model->TYPE];
  416. }
  417. $adminId = \Yii::$app->user->id;
  418. \Yii::$app->redis->del('balanceCode_'.$adminId);
  419. $transaction->commit();
  420. } catch (Exception $e) {
  421. $transaction->rollBack();
  422. $this->addError('changeAudit', $e->getMessage());
  423. return null;
  424. }
  425. if($this->auditStatus=='true'){
  426. $this->adminOperateLogger->fetchClass = UserBonus::class;
  427. $this->adminOperateLogger->setIsBatch(true)->afterUpdate($uids, 'USER_ID')->clean()->save([
  428. 'optType' => '审核会员余额',
  429. 'remark' => $this->remark,
  430. ]);
  431. }else{
  432. $this->adminOperateLogger->fetchClass = BalanceAudit::class;
  433. $this->adminOperateLogger->setIsBatch(true)->afterUpdate($this->selected, 'ID')->clean()->save([
  434. 'optType' => '审核会员余额',
  435. 'remark' => $this->remark,
  436. ]);
  437. }
  438. return $logs;
  439. }
  440. /**
  441. * 导入会员余额调整
  442. * @return null|static
  443. * @throws \yii\db\Exception
  444. */
  445. public function excelChangeBalance() {
  446. if (!$this->validate()) {
  447. return null;
  448. }
  449. $db = \Yii::$app->db;
  450. $transaction = $db->beginTransaction();
  451. try {
  452. $userInfo = Info::baseInfo($this->_userId);
  453. // 添加申请
  454. $model = new BalanceAudit();
  455. $model->USER_ID = $this->_userId;
  456. $model->LAST_DEC_LV = $userInfo['DEC_LV'];
  457. $model->LAST_EMP_LV = $userInfo['EMP_LV'];
  458. $model->LAST_DEC_ROLE_ID = $userInfo['DEC_ROLE_ID'];
  459. $model->TYPE = $this->type;
  460. $model->DEAL_TYPE = $this->dealType;
  461. $model->AMOUNT = $this->amount;
  462. $model->CREATE_REMARK = $this->remark;
  463. $model->AUDIT_STATUS = \Yii::$app->params['auditStatus']['un']['value'];
  464. $model->REMARK_IS_SHOW = $this->isShow;
  465. $model->UPDATE_ADMIN_ID = \Yii::$app->user->id;
  466. $model->CREATED_AT = Date::nowTime();
  467. if (!$model->save()) {
  468. throw new Exception(Form::formatErrorsForApi($model->getErrors()));
  469. }
  470. $transaction->commit();
  471. } catch (Exception $e) {
  472. $transaction->rollBack();
  473. $this->addError('auditStatus', $e->getMessage());
  474. return null;
  475. }
  476. // 日志记录操作前的数据
  477. $beforeData = UserBonus::getBonusByUserId($this->_userId);
  478. $this->adminOperateLogger->fetchClass = UserBonus::class;
  479. $this->adminOperateLogger->beforeUpdate($beforeData);
  480. // 记录日志
  481. $this->adminOperateLogger->fetchClass = BalanceAudit::class;
  482. $this->adminOperateLogger->afterInsert($model)->clean()->save([
  483. 'optType' => '批量申请变动会员余额',
  484. 'userId' => $model->USER_ID,
  485. 'userName' => $userInfo['USER_NAME'],
  486. 'remark' => $model->CREATE_REMARK,
  487. ]);
  488. return $model;
  489. }
  490. /**
  491. * 删除前
  492. * @param $selected
  493. */
  494. public function beforeDelete($selected) {
  495. $this->adminOperateLogger->fetchClass = BalanceAudit::class;
  496. $this->adminOperateLogger->setIsBatch(true)->beforeDelete($selected, 'ID');
  497. }
  498. /**
  499. * 删除
  500. * @param $selected
  501. * @throws Exception
  502. */
  503. public function delete($selected) {
  504. $this->adminOperateLogger->clean()->save([
  505. 'optType' => '删除余额调整待审核数据',
  506. ]);
  507. }
  508. }