aa
This commit is contained in:
@@ -311,7 +311,10 @@ func (c *OrderManager) ExportMTWaybills(ctx *jxcontext.Context, fromDateStr, toD
|
||||
|
||||
func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fromDateStr, toDateStr string, isDateFinish bool, skuIDs []int, isJxFirst bool, params map[string]interface{}, offset, pageSize int) (pagedInfo *model.PagedInfo, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
db = dao.GetDB()
|
||||
isJxIncomeArea = params["jxIncomeBegin"] != nil || params["jxIncomeEnd"] != nil
|
||||
begin = utils.MustInterface2Int64(params["jxIncomeBegin"])
|
||||
end = utils.MustInterface2Int64(params["jxIncomeEnd"])
|
||||
)
|
||||
//权限
|
||||
if permission.IsRoled(ctx) {
|
||||
@@ -339,7 +342,7 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro
|
||||
}
|
||||
}
|
||||
}
|
||||
if params["jxIncomeBegin"] != nil || params["jxIncomeEnd"] != nil {
|
||||
if isJxIncomeArea {
|
||||
//begin := utils.MustInterface2Int64(params["jxIncomeBegin"])
|
||||
//end := utils.MustInterface2Int64(params["jxIncomeEnd"])
|
||||
pageSize = math.MaxInt64
|
||||
@@ -385,21 +388,18 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro
|
||||
}
|
||||
}
|
||||
}
|
||||
if isJxIncomeArea {
|
||||
var order2 *model.GoodsOrderExt
|
||||
if order.JxIncome >= begin && order.JxIncome <= end {
|
||||
order2 = order
|
||||
return []*model.GoodsOrderExt{order2}, err
|
||||
}
|
||||
}
|
||||
return retVal, err
|
||||
}, orders)
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
task.GetResult(0)
|
||||
}
|
||||
if params["jxIncomeBegin"] != nil || params["jxIncomeEnd"] != nil {
|
||||
var orders2 []*model.GoodsOrderExt
|
||||
begin := utils.MustInterface2Int64(params["jxIncomeBegin"])
|
||||
end := utils.MustInterface2Int64(params["jxIncomeEnd"])
|
||||
for _, v := range orders {
|
||||
if v.JxIncome >= begin && v.JxIncome <= end {
|
||||
orders2 = append(orders2, v)
|
||||
}
|
||||
}
|
||||
pagedInfo.Data = orders2
|
||||
result, _ := task.GetResult(0)
|
||||
pagedInfo.Data = result
|
||||
} else {
|
||||
pagedInfo.Data = orders
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user