更新
This commit is contained in:
parent
c54ccb4ac2
commit
bf8ea2a150
@ -49,6 +49,7 @@ class RetailOrderController extends BaseApiController
|
||||
}
|
||||
$where[] = ['merchant', '=',$this->userInfo['merchant']['mer_id']];
|
||||
$where[] = ['paid', '=',1];
|
||||
$where[] = ['is_opurchase', '=',0];
|
||||
$res = Cashierclass::where($where)->page($page_no, 25)->whereDay('create_time', $date)
|
||||
->order('address_id','asc')
|
||||
->select()->each(function($item){
|
||||
|
@ -137,7 +137,7 @@ class OrderLogic extends BaseLogic
|
||||
return false;
|
||||
}
|
||||
$mer_id = $user['merchant']['mer_id'];
|
||||
$where1 = ['paid' => 1];
|
||||
$where1 = ['paid' => 1,'is_opurchase'=>0];
|
||||
$arrs = Cashierclass::where('merchant', $mer_id)->whereDay('create_time')->where($where1)->column('cart_id,id,address_id');
|
||||
|
||||
// $order_id = Cashierclass::where('merchant', $mer_id)->whereDay('create_time')->where($where1)->column('id');
|
||||
@ -198,16 +198,6 @@ class OrderLogic extends BaseLogic
|
||||
return false;
|
||||
}
|
||||
$_order = $orderInfo['order'];
|
||||
$where=[
|
||||
'merchant'=>$mer_id,
|
||||
'order_arr'=>$_order['order_arr'],
|
||||
'cart_id'=>$_order['cart_id'],
|
||||
];
|
||||
$find=Opurchaseclass::where($where)->find();
|
||||
if($find){
|
||||
self::setError('订单已存在,不能重复提交');
|
||||
return false;
|
||||
}
|
||||
// if ($_order['total'] < $merchant['mer_money']) {
|
||||
// self::setError('商户余额不足');
|
||||
// return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user