格式化一下代码

This commit is contained in:
陈俊宏 2024-07-04 11:50:40 +08:00
parent 2488544363
commit da8a512777
1 changed files with 11 additions and 9 deletions

View File

@ -64,13 +64,13 @@ class AgreementService extends BaseService
$order->create_time = time(); $order->create_time = time();
$order->save(); $order->save();
} else { } else {
Sign::create( Sign::create([
['user_id' => $userId, 'user_id' => $userId,
'open_id' => $user->open_id, 'open_id' => $user->open_id,
'mobile' => $account, 'mobile' => $account,
'request_serial' => $params['requestSerial'], 'request_serial' => $params['requestSerial'],
'm_agreement_id' => $params['mAgreementId']] 'm_agreement_id' => $params['mAgreementId']
); ]);
// 创建订单 // 创建订单
$data = [ $data = [
'user_id' => $user->id, 'user_id' => $user->id,
@ -85,7 +85,7 @@ class AgreementService extends BaseService
Db::rollback(); Db::rollback();
throw new \LogicException($e->getMessage()); throw new \LogicException($e->getMessage());
} }
return CmbLifeUtils::genProtocol($funcName, $params); return CmbLifeUtils::genProtocol($funcName, $params);
} }
/** /**
@ -346,6 +346,7 @@ class AgreementService extends BaseService
} }
return ['success' => true]; return ['success' => true];
} }
/** /**
* 解约发送验证码 * 解约发送验证码
* @throws BusinessException * @throws BusinessException
@ -370,6 +371,7 @@ class AgreementService extends BaseService
$user = User::getUserById($userId); $user = User::getUserById($userId);
return ['mobile' => $user->mobile]; return ['mobile' => $user->mobile];
} }
/** /**
* 判断是否能兑换 * 判断是否能兑换
* @param array $params * @param array $params
@ -377,7 +379,7 @@ class AgreementService extends BaseService
* @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
*/ */
public static function getExchangeStatus(array $params): array public static function getExchangeStatus(array $params): array
{ {
$isCanAgree = self::checkCanAgree($params['user_id'], ''); $isCanAgree = self::checkCanAgree($params['user_id'], '');
return ['is_exchange' => $isCanAgree['success']]; return ['is_exchange' => $isCanAgree['success']];