Merge branch 'feature/purchase_record' into dev
This commit is contained in:
commit
ca384c6b90
@ -64,7 +64,9 @@ class StoreGroupOrderRepository extends BaseRepository
|
||||
$query = $this->search($where);
|
||||
$count = $query->count();
|
||||
$list = $query->with(['orderList' => function (Relation $query) {
|
||||
$query->field('order_id,group_order_id,activity_type,pay_price,status')->with(['orderProduct','presellOrder']);
|
||||
$query->field('order_id,group_order_id,activity_type,pay_price,status,mer_id')->with(['merchant' => function ($query) {
|
||||
$query->field('mer_id,mer_name,settle_cycle,interest_rate');
|
||||
}, 'orderProduct','presellOrder']);
|
||||
}])->page($page, $limit)->order('create_time DESC')->select();
|
||||
return compact('count', 'list');
|
||||
}
|
||||
@ -89,7 +91,7 @@ class StoreGroupOrderRepository extends BaseRepository
|
||||
$query->when($flag, function ($query) {
|
||||
$query->field('order_id,group_order_id,mer_id,order_sn,activity_type,pay_price,order_extend,order_type,is_virtual');
|
||||
})->with(['merchant' => function ($query) use ($flag) {
|
||||
$flag && $query->field('mer_id,mer_name');
|
||||
$flag && $query->field('mer_id,mer_name,settle_cycle,interest_rate');
|
||||
}, 'orderProduct', 'presellOrder']);
|
||||
}])
|
||||
->order('create_time DESC')->find();
|
||||
|
@ -14,6 +14,7 @@
|
||||
namespace app\controller\api\server;
|
||||
|
||||
|
||||
use app\common\model\store\order\StoreGroupOrder;
|
||||
use app\common\repositories\delivery\DeliveryStationRepository;
|
||||
use app\common\repositories\store\order\StoreOrderRepository;
|
||||
use app\common\repositories\store\order\StoreRefundOrderRepository;
|
||||
@ -347,6 +348,9 @@ class StoreOrder extends BaseController
|
||||
{
|
||||
$id = $this->request->param('id/d');
|
||||
$payType = $this->request->param('pay_type');
|
||||
if ($payType == 'creditBuy') {
|
||||
return app('json')->fail('支付方式不支持');
|
||||
}
|
||||
try {
|
||||
$data = $repository->settle($id, $payType, $this->request->userInfo());
|
||||
return app('json')->success('success', $data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user