aa
This commit is contained in:
@@ -312,6 +312,9 @@ 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) {
|
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 (
|
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) {
|
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"])
|
//begin := utils.MustInterface2Int64(params["jxIncomeBegin"])
|
||||||
//end := utils.MustInterface2Int64(params["jxIncomeEnd"])
|
//end := utils.MustInterface2Int64(params["jxIncomeEnd"])
|
||||||
pageSize = math.MaxInt64
|
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
|
return retVal, err
|
||||||
}, orders)
|
}, orders)
|
||||||
tasksch.HandleTask(task, nil, true).Run()
|
tasksch.HandleTask(task, nil, true).Run()
|
||||||
task.GetResult(0)
|
result, _ := task.GetResult(0)
|
||||||
}
|
pagedInfo.Data = result
|
||||||
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
|
|
||||||
} else {
|
} else {
|
||||||
pagedInfo.Data = orders
|
pagedInfo.Data = orders
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user