| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace bizJd\apply\services;
- use biz\shop\classes\MainClass;
- use bizJd\apply\classes\ApplyClass;
- use bizJd\base\services\BaseService;
- use bizJd\sj\services\SjService;
- use Yii;
- class ApplyService extends BaseService
- {
- public static $baseFile = '\bizJd\apply\classes\ApplyClass';
- //审核通过,商家初始化 ssh 2021.2.23
- public static function pass($id, $remark = '')
- {
- $apply = ApplyClass::getById($id);
- if (empty($apply)) {
- util::fail('没有找到申请记录');
- }
- $applyId = $apply['id'];
- ApplyClass::updateById($applyId, ['status' => ApplyClass::STATUS_PASS, 'remark' => $remark]);
- $apply['name'] = isset($apply['name']) ? $apply['name'] : '';
- $main = MainClass::add(['id' => null], true);
- $respond = SjService::initJdGhsBaseInfo($apply, $main, true);
- return $respond;
- }
- }
|