商家账单添加时间筛选
This commit is contained in:
parent
58597a09e3
commit
0bfa8b21de
@ -274,13 +274,16 @@ class LocalStoreLogic extends Logic
|
|||||||
|
|
||||||
public function getLocalOrderList($data)
|
public function getLocalOrderList($data)
|
||||||
{
|
{
|
||||||
$where[] = [];
|
$where = [];
|
||||||
if (!empty($data['start_time']) && !empty($data['end_time']) ) {
|
if (!empty($data['start_time']) && !empty($data['end_time']) ) {
|
||||||
$where[] = ['lso.create_time', '>=', $data['start_time']];
|
$where[] = ['lso.create_time', '>=', $data['start_time'] . ' 00:00:00'];
|
||||||
$where[] = ['lso.create_time', '<=', $data['end_time']];
|
$where[] = ['lso.create_time', '<=', $data['end_time'] . '23:59:59'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$count = LocalStoreOrder::where(['lstore_id' => $data['lstore_id'], 'pay_shop_type' => 1, 'state' => 1])->count();
|
$count = LocalStoreOrder::alias('lso')
|
||||||
|
->where(['lstore_id' => $data['lstore_id'], 'pay_shop_type' => 1, 'state' => 1])
|
||||||
|
->where($where)
|
||||||
|
->count();
|
||||||
|
|
||||||
$lists = LocalStoreOrder::alias('lso')
|
$lists = LocalStoreOrder::alias('lso')
|
||||||
->field('lso.*, u.id, u.nickname')
|
->field('lso.*, u.id, u.nickname')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user