This commit is contained in:
邹宗楠
2023-03-01 17:12:36 +08:00
parent 370724e725
commit 8b41cd0139
2 changed files with 3 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ func AutoSettingFakeDelivery() {
db := dao.GetDB()
// 查询需要刷单的门店
configList, err := dao.QueryConfigs(db, "storeIdList", "AutoDelivery", "")
globals.SugarLogger.Debugf("configList------------;%s", utils.Format4Output(configList, false))
if err != nil {
globals.SugarLogger.Errorf("抖音自动刷单获取刷单门店列表错误:%v", err)
return
@@ -29,6 +30,7 @@ func AutoSettingFakeDelivery() {
// 获取刷单门店订单
orderList, err := dao.GetOrderListByStoreList(db, utils.StringSlice2Int64(strings.Split(configList[0].Value, ",")))
globals.SugarLogger.Debugf("orderList------------;%s", utils.Format4Output(orderList, false))
if err != nil {
globals.SugarLogger.Errorf("获取门店刷单记录错误")
return

View File

@@ -1821,7 +1821,7 @@ func GetOrderStoreIDs(db *DaoDB, beginAt, endAt time.Time, vendorID int) (storeI
// GetOrderListByStoreList 根据门店id获取正在刷单的门店商品
func GetOrderListByStoreList(db *DaoDB, storeId []int64) (order []*model.GoodsOrder, err error) {
sql := `SELECT * FROM goods_order g WHERE g.order_created_at >= ? AND g.order_created_at <= ? g.vendor_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, -7), time.Now(), storeId, model.VendorIDDD, model.OrderStatusDelivering}
if err := GetRows(db, &order, sql, sqlParam...); err != nil {