格式化一下代码
This commit is contained in:
parent
2488544363
commit
da8a512777
|
@ -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']];
|
||||||
|
|
Loading…
Reference in New Issue