格式化一下代码

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->save();
} else {
Sign::create(
['user_id' => $userId,
'open_id' => $user->open_id,
'mobile' => $account,
'request_serial' => $params['requestSerial'],
'm_agreement_id' => $params['mAgreementId']]
);
Sign::create([
'user_id' => $userId,
'open_id' => $user->open_id,
'mobile' => $account,
'request_serial' => $params['requestSerial'],
'm_agreement_id' => $params['mAgreementId']
]);
// 创建订单
$data = [
'user_id' => $user->id,
@ -85,7 +85,7 @@ class AgreementService extends BaseService
Db::rollback();
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];
}
/**
* 解约发送验证码
* @throws BusinessException
@ -370,6 +371,7 @@ class AgreementService extends BaseService
$user = User::getUserById($userId);
return ['mobile' => $user->mobile];
}
/**
* 判断是否能兑换
* @param array $params
@ -377,7 +379,7 @@ class AgreementService extends BaseService
* @throws \think\db\exception\DataNotFoundException
* @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'], '');
return ['is_exchange' => $isCanAgree['success']];