Merge branch 'feature/purchase_record' into dev
This commit is contained in:
commit
a27810f9df
@ -2515,14 +2515,14 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
* @return void
|
* @return void
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function confirm($user, $id, $type)
|
public function confirm($id, $type)
|
||||||
{
|
{
|
||||||
/** @var StoreGroupOrderRepository $groupOrderRepository */
|
/** @var StoreGroupOrderRepository $groupOrderRepository */
|
||||||
$groupOrderRepository = app()->make(StoreGroupOrderRepository::class);
|
$groupOrderRepository = app()->make(StoreGroupOrderRepository::class);
|
||||||
$groupOrderRepository->getAll = true;
|
$groupOrderRepository->getAll = true;
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
$groupOrder = $groupOrderRepository->detail($user['uid'], $id, false);
|
$groupOrder = $groupOrderRepository->get($id);
|
||||||
if ($groupOrder->pay_type != StoreGroupOrder::PAY_TYPE_CREDIT_BUY) {
|
if ($groupOrder->pay_type != StoreGroupOrder::PAY_TYPE_CREDIT_BUY) {
|
||||||
throw new Exception('订单类型错误');
|
throw new Exception('订单类型错误');
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ class StoreOrder extends BaseController
|
|||||||
$id = $this->request->param('id/d');
|
$id = $this->request->param('id/d');
|
||||||
$type = $this->request->param('type/d');
|
$type = $this->request->param('type/d');
|
||||||
try {
|
try {
|
||||||
$repository->confirm($this->request->userInfo(), $id, $type);
|
$repository->confirm($id, $type);
|
||||||
return app('json')->success('success');
|
return app('json')->success('success');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return app('json')->fail($e->getMessage());
|
return app('json')->fail($e->getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user