sqlparams

This commit is contained in:
richboo111
2022-11-18 14:48:13 +08:00
parent d69f5d413d
commit 0cfa20578c

View File

@@ -940,7 +940,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
} else { } else {
sqlWhere += " AND IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) IN (" + GenQuestionMarks(len(storeIDs)) + ")" sqlWhere += " AND IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) IN (" + GenQuestionMarks(len(storeIDs)) + ")"
sqlParams = append(sqlParams, storeIDs) sqlParams = append(sqlParams, storeIDs)
globals.SugarLogger.Debugf("sqlParams GenQuestionMarks(len(storeIDs))========%s", GenQuestionMarks(len(storeIDs))) globals.SugarLogger.Debugf("sqlParams storeIDs========%d", storeIDs)
} }
} }
} }
@@ -952,7 +952,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
if len(statuss) > 0 { if len(statuss) > 0 {
sqlWhere += " AND t1.status IN (" + GenQuestionMarks(len(statuss)) + ")" sqlWhere += " AND t1.status IN (" + GenQuestionMarks(len(statuss)) + ")"
sqlParams = append(sqlParams, statuss) sqlParams = append(sqlParams, statuss)
globals.SugarLogger.Debugf("sqlParams GenQuestionMarks(len(statuss))===========%s", GenQuestionMarks(len(statuss))) globals.SugarLogger.Debugf("sqlParams statuss===========%d", statuss)
} }
} }
if params["lockStatuss"] != nil { if params["lockStatuss"] != nil {
@@ -1038,7 +1038,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
if len(vendorIDs) > 0 { if len(vendorIDs) > 0 {
sqlWhere += " AND t1.vendor_id IN (" + GenQuestionMarks(len(vendorIDs)) + ")" sqlWhere += " AND t1.vendor_id IN (" + GenQuestionMarks(len(vendorIDs)) + ")"
sqlParams = append(sqlParams, vendorIDs) sqlParams = append(sqlParams, vendorIDs)
globals.SugarLogger.Debugf("sqlParams GenQuestionMarks(len(vendorIDs))================%s", GenQuestionMarks(len(vendorIDs))) globals.SugarLogger.Debugf("sqlParams vendorIDs================%d", vendorIDs)
} }
} }
if userID != "" { if userID != "" {