1
This commit is contained in:
@@ -336,11 +336,7 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro
|
||||
}
|
||||
}
|
||||
}
|
||||
//if isJxIncomeArea {
|
||||
// begin = utils.MustInterface2Int64(params["jxIncomeBegin"])
|
||||
// end = utils.MustInterface2Int64(params["jxIncomeEnd"])
|
||||
//pageSize = math.MaxInt32
|
||||
//}
|
||||
|
||||
orders, totalCount, err := dao.GetOrders(db, nil, false, isIncludeFake, fromDateStr, toDateStr, isDateFinish, skuIDs, isJxFirst, "", params, offset, pageSize)
|
||||
if err == nil {
|
||||
pagedInfo = &model.PagedInfo{
|
||||
@@ -382,24 +378,15 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro
|
||||
}
|
||||
}
|
||||
}
|
||||
//count := &struct {
|
||||
// Count int
|
||||
//}{}
|
||||
//sql2 := `
|
||||
// SELECT COUNT(*) count
|
||||
// FROM goods_order WHERE IF(store_id = 0, jx_store_id ,store_id) = ?
|
||||
// WHERE order_created_at > ? AND order_created_at < ?
|
||||
//`
|
||||
//storeID := 0
|
||||
//if order.StoreID == 0 {
|
||||
// storeID = order.JxStoreID
|
||||
//} else {
|
||||
// storeID = order.StoreID
|
||||
//}
|
||||
//sqlParams2 := []interface{}{storeID, time.Now().Format("2006-01-02 00:00:00"), time.Now().Format("2006-01-02 23:59:59")}
|
||||
//if err = dao.GetRow(db, &count, sql2, sqlParams2); err == nil {
|
||||
// order.StoreDayOrderCount = count.Count
|
||||
//}
|
||||
// 统计订单的违约金
|
||||
var damages = &struct {
|
||||
Damages int64 `json:"damages"`
|
||||
}{}
|
||||
sqlDamages := ` SELECT SUM(w.desired_fee) damages FROM waybill w WHERE w.vendor_order_id = ? AND w.status = ? `
|
||||
paramDamages := []interface{}{order.VendorOrderID, model.OrderStatusCanceled}
|
||||
if err := dao.GetRow(db, damages, sqlDamages, paramDamages); err == nil {
|
||||
order.LiquidatedDamages = damages.Damages
|
||||
}
|
||||
return retVal, err
|
||||
}, orders)
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
|
||||
Reference in New Issue
Block a user