京东商城取订单

This commit is contained in:
苏尹岚
2020-06-02 17:16:40 +08:00
parent c7a6fdc083
commit 73139f2860
14 changed files with 121 additions and 104 deletions

View File

@@ -231,7 +231,7 @@ func GetStoreCourierList(db *DaoDB, storeIDs []int, status, auditStatus int) (co
return nil, err
}
func GetStoresMapList2(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, status, isSync int, pricePack string, mustDirty bool) (storeMapList []*model.StoreMap, err error) {
func GetStoresMapList2(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, status, isSync int, pricePack, name string, mustDirty bool) (storeMapList []*model.StoreMap, err error) {
sql := `
SELECT t1.*
FROM store_map t1
@@ -266,6 +266,10 @@ func GetStoresMapList2(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, statu
sql += " AND t1.price_percentage_pack = ?"
sqlParams = append(sqlParams, pricePack)
}
if name != "" {
sql += " AND t2.name LIKE ?"
sqlParams = append(sqlParams, "%"+name+"%")
}
if mustDirty {
sql += " AND t1.sync_status <> 0"
}
@@ -300,8 +304,8 @@ func SetStoresMapSyncStatus(db *DaoDB, vendorIDs, storeIDs []int, syncStatus int
return err
}
func GetStoresMapList(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, status, isSync int, pricePack string) (storeMapList []*model.StoreMap, err error) {
return GetStoresMapList2(db, vendorIDs, storeIDs, storeStatuss, status, isSync, pricePack, false)
func GetStoresMapList(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, status, isSync int, pricePack, name string) (storeMapList []*model.StoreMap, err error) {
return GetStoresMapList2(db, vendorIDs, storeIDs, storeStatuss, status, isSync, pricePack, name, false)
}
func StoreMapList2Map(storeMapList []*model.StoreMap) (storeMapMap map[int][]*model.StoreMap) {

View File

@@ -1288,7 +1288,7 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
vendorIDs = []int{actVendorID}
}
} else {
storeMapList, err := GetStoresMapList(db, nil, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncAll, "")
storeMapList, err := GetStoresMapList(db, nil, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "")
if err != nil {
return err
}