This commit is contained in:
richboo111
2023-01-10 14:06:08 +08:00
parent 156e9e18a1
commit c14956703d

View File

@@ -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 {
return nil, errors.New("门店ID为空请检查")
}
errList := errlist.ErrList{}
tAutoCallInfos := make(map[int64]*superm_getStoreAutoCallRiderInfo_response.AutoCallInfo, 0)
for _, i := range storeIDs {
if autoCallInfo, err := getAPI(vendorOrgCode, 0, "").GetStoreAutoCallRiderInfo(i); err != nil {
errList.AddErr(err)
} else {
autoCallInfos[i] = &superm_getStoreAutoCallRiderInfo_response.AutoCallInfo{
tAutoCallInfos[i] = &superm_getStoreAutoCallRiderInfo_response.AutoCallInfo{
ServiceStatus: autoCallInfo.ServiceStatus,
ServiceType: autoCallInfo.ServiceType,
DelayTime: autoCallInfo.DelayTime,
@@ -108,5 +109,5 @@ func GetStoreAutoCallRiderInfo(vendorOrgCode string, storeIDs []int64) (autoCall
if errList.GetErrListAsOne() != nil {
return nil, errList.GetErrListAsOne()
}
return autoCallInfos, nil
return tAutoCallInfos, nil
}