This commit is contained in:
苏尹岚
2020-12-01 17:22:03 +08:00
parent 43186f5b12
commit 303a638aca
14 changed files with 41 additions and 37 deletions

View File

@@ -243,7 +243,7 @@ func GetStoreCourierList(db *DaoDB, storeIDs, vendorIDs []int, status, auditStat
return nil, err
}
func GetStoresMapList2(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, status, isSync int, pricePack, name string, mustDirty bool) (storeMapList []*model.StoreMap, err error) {
func GetStoresMapList2(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, status, isSync int, pricePack, name, vendorOrgCode string, mustDirty bool) (storeMapList []*model.StoreMap, err error) {
sql := `
SELECT t1.*
FROM store_map t1
@@ -282,6 +282,10 @@ func GetStoresMapList2(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, statu
sql += " AND t2.name LIKE ?"
sqlParams = append(sqlParams, "%"+name+"%")
}
if vendorOrgCode != "" {
sql += " AND t1.vendor_org_code = ?"
sqlParams = append(sqlParams, vendorOrgCode)
}
if mustDirty {
sql += " AND t1.sync_status <> 0"
}
@@ -316,8 +320,8 @@ func SetStoresMapSyncStatus(db *DaoDB, vendorIDs, storeIDs []int, syncStatus int
return err
}
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 GetStoresMapList(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, status, isSync int, pricePack, name, vendorOrgCode string) (storeMapList []*model.StoreMap, err error) {
return GetStoresMapList2(db, vendorIDs, storeIDs, storeStatuss, status, isSync, pricePack, name, vendorOrgCode, false)
}
func StoreMapList2Map(storeMapList []*model.StoreMap) (storeMapMap map[int][]*model.StoreMap) {