1
This commit is contained in:
@@ -89,16 +89,17 @@ func SetStoreAutoCallRider(vendorOrgCode, opType string, storeID int64) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//批量查询自动呼叫运力配置
|
//批量查询自动呼叫运力配置
|
||||||
func GetStoreAutoCallRiderInfo(vendorOrgCode string, storeIDs []int64) (autoCallInfos map[int64]*superm_getStoreAutoCallRiderInfo_response.AutoCallInfo, err error) {
|
func GetStoreAutoCallRiderInfo(vendorOrgCode string, storeIDs []int64) (map[int64]*superm_getStoreAutoCallRiderInfo_response.AutoCallInfo, error) {
|
||||||
if len(storeIDs) == 0 {
|
if len(storeIDs) == 0 {
|
||||||
return nil, errors.New("门店ID为空,请检查")
|
return nil, errors.New("门店ID为空,请检查")
|
||||||
}
|
}
|
||||||
errList := errlist.ErrList{}
|
errList := errlist.ErrList{}
|
||||||
|
tAutoCallInfos := make(map[int64]*superm_getStoreAutoCallRiderInfo_response.AutoCallInfo, 0)
|
||||||
for _, i := range storeIDs {
|
for _, i := range storeIDs {
|
||||||
if autoCallInfo, err := getAPI(vendorOrgCode, 0, "").GetStoreAutoCallRiderInfo(i); err != nil {
|
if autoCallInfo, err := getAPI(vendorOrgCode, 0, "").GetStoreAutoCallRiderInfo(i); err != nil {
|
||||||
errList.AddErr(err)
|
errList.AddErr(err)
|
||||||
} else {
|
} else {
|
||||||
autoCallInfos[i] = &superm_getStoreAutoCallRiderInfo_response.AutoCallInfo{
|
tAutoCallInfos[i] = &superm_getStoreAutoCallRiderInfo_response.AutoCallInfo{
|
||||||
ServiceStatus: autoCallInfo.ServiceStatus,
|
ServiceStatus: autoCallInfo.ServiceStatus,
|
||||||
ServiceType: autoCallInfo.ServiceType,
|
ServiceType: autoCallInfo.ServiceType,
|
||||||
DelayTime: autoCallInfo.DelayTime,
|
DelayTime: autoCallInfo.DelayTime,
|
||||||
@@ -108,5 +109,5 @@ func GetStoreAutoCallRiderInfo(vendorOrgCode string, storeIDs []int64) (autoCall
|
|||||||
if errList.GetErrListAsOne() != nil {
|
if errList.GetErrListAsOne() != nil {
|
||||||
return nil, errList.GetErrListAsOne()
|
return nil, errList.GetErrListAsOne()
|
||||||
}
|
}
|
||||||
return autoCallInfos, nil
|
return tAutoCallInfos, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user