You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
482 B
23 lines
482 B
9 months ago
|
package service
|
||
|
|
||
|
import (
|
||
|
"pure-admin/global"
|
||
|
"pure-admin/model"
|
||
|
)
|
||
|
|
||
|
func getSellerStoreMap(stores []string) (map[string]model.StoreInfo, error) {
|
||
|
var (
|
||
|
err error
|
||
|
list []model.StoreInfo
|
||
|
result = make(map[string]model.StoreInfo)
|
||
|
)
|
||
|
err = global.MG_DB.Model(&model.BillFund{}).Where("store_no IN (?)").Select("store_no,email").Find(&list).Error
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
for _, store := range list {
|
||
|
result[store.StoreNo] = store
|
||
|
}
|
||
|
return result, nil
|
||
|
}
|