作者 刘朕
1 个管道 的构建 通过 耗费 0 秒

合并分支 '1iuzhen' 到 'master'

销售订单列表筛选问题修复



查看合并请求 !208
... ... @@ -296,20 +296,26 @@ class MemberSalesController extends HomeBaseController
$date = $this->request->param('date');
$sort_id = $this->request->param('sort_id');
$user_id = cmf_get_current_user_sale_id();
$order_where = [
'o.user_id' => $user_id,
'o.is_stop' => 0,
'o.delete_time' => 0
$order_where1 = [
'user_id' => $user_id,
'status' => 0,
'over_time' => ['egt',time()],
'is_stop' => 0,
'delete_time' => 0
];
$order_where2 = [
'user_id' => $user_id,
'status' => 1,
'is_stop' => 0,
'delete_time' => 0
];
if($date) {
$order_where['o.create_time'] = ['between',strtotime($date).','.strtotime("$date +1 day")];
$order_where1['create_time'] = $order_where2['create_time'] = ['between',strtotime($date).','.strtotime("$date +1 day")];
}
$orderList = $this->order_model
->alias('o')
->field(['o.id,o.order_sn,o.status,o.create_time,o.over_time,os.name'])
->join('__ORDER_SORT__ os','o.sort_id = os.id')
->where($order_where)
->select();
$orderList = Db::name('OrderView')
->where(function ($q) use ($order_where1) {$q->where($order_where1);})
->whereOr(function ($q) use ($order_where2) {$q->where($order_where2);})
->select()->toArray();
foreach ($orderList as $k=>$v) {
$orderList[$k]['detail_url'] = url('detail',['id'=>$sort_id,'order_id'=>$v['id']]);
$orderList[$k]['edit_url'] = url('edit',['id'=>$sort_id,'order_id'=>$v['id']]);
... ...