1
This commit is contained in:
@@ -95,6 +95,7 @@ func AutoSettingFakeDelivery() {
|
||||
storeList := strings.Split(configList[0].Value, ",")
|
||||
for _, v := range storeList {
|
||||
storeIdAndVendorId := strings.Split(v, "-")
|
||||
globals.SugarLogger.Debugf("========storeIdAndVendorId : %s", utils.Format4Output(storeIdAndVendorId, false))
|
||||
orderList, err := dao.GetOrderListByStoreList(db, []int64{utils.Str2Int64(storeIdAndVendorId[0])}, utils.Str2Int(storeIdAndVendorId[1]))
|
||||
if err != nil {
|
||||
globals.SugarLogger.Errorf("获取门店刷单记录错误")
|
||||
|
||||
@@ -2,6 +2,7 @@ package dao
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"time"
|
||||
@@ -1907,9 +1908,11 @@ func GetOrderStoreIDs(db *DaoDB, beginAt, endAt time.Time, vendorID int) (storeI
|
||||
|
||||
// GetOrderListByStoreList 根据门店id获取正在刷单的门店商品
|
||||
func GetOrderListByStoreList(db *DaoDB, storeId []int64, vendorId int) (order []*model.GoodsOrder, err error) {
|
||||
sql := `SELECT * FROM goods_order g WHERE g.order_created_at >= ? AND g.order_created_at <= ? AND g.jx_store_id IN (` + GenQuestionMarks(len(storeId)) + `)` + `AND g.vendor_id = ?` + `AND g.status < ?`
|
||||
sql := `SELECT * FROM goods_order g WHERE g.order_created_at >= ? AND g.order_created_at <= ? AND g.jx_store_id IN (` + GenQuestionMarks(len(storeId)) + `)` + ` AND g.vendor_id = ?` + `AND g.status < ?`
|
||||
sqlParam := []interface{}{time.Now().AddDate(0, 0, -5), time.Now().AddDate(0, 0, 1), storeId, vendorId, model.OrderStatusDelivering}
|
||||
|
||||
globals.SugarLogger.Debugf("======sql : %s", sql)
|
||||
globals.SugarLogger.Debugf("======sql : %s", utils.Format4Output(sqlParam, false))
|
||||
if err := GetRows(db, &order, sql, sqlParam...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user