This commit is contained in:
Mrx
2026-05-20 16:16:50 +08:00
parent a2913c26ab
commit 95006a2455
3 changed files with 15 additions and 12 deletions

View File

@@ -64,11 +64,12 @@ func ProcessQYGL4B2ERequest(
if errors.Is(err, shujubao.ErrDatasource) {
return nil, errors.Join(processors.ErrDatasource, err)
}
// if errors.Is(err, shujubao.ErrQueryEmpty) {
// return nil, errors.Join(processors.ErrNotFound, err)
// }
if errors.Is(err, shujubao.ErrQueryEmpty) {
data = map[string]interface{}{}
} else {
return nil, errors.Join(processors.ErrSystem, err)
}
}
// 原始返回结构处理 - data 是 map[string]interface{} 类型
dataMap, ok := data.(map[string]interface{})

View File

@@ -94,11 +94,12 @@ func ProcessQYGL7D9ARequest(ctx context.Context, params []byte, deps *processors
if errors.Is(err, shujubao.ErrDatasource) {
return nil, errors.Join(processors.ErrDatasource, err)
}
// if errors.Is(err, shujubao.ErrQueryEmpty) {
// return nil, errors.Join(processors.ErrNotFound, err)
// }
if errors.Is(err, shujubao.ErrQueryEmpty) {
data = map[string]interface{}{}
} else {
return nil, errors.Join(processors.ErrSystem, err)
}
}
// 原始返回结构处理 - data 是 map[string]interface{} 类型
dataMap, ok := data.(map[string]interface{})

View File

@@ -85,11 +85,12 @@ func ProcessQYGL8B4DRequest(ctx context.Context, params []byte, deps *processors
if errors.Is(err, shujubao.ErrDatasource) {
return nil, errors.Join(processors.ErrDatasource, err)
}
// if errors.Is(err, shujubao.ErrQueryEmpty) {
// return nil, errors.Join(processors.ErrNotFound, err)
// }
if errors.Is(err, shujubao.ErrQueryEmpty) {
data = map[string]interface{}{}
} else {
return nil, errors.Join(processors.ErrSystem, err)
}
}
// 原始返回结构处理 - data 是 map[string]interface{} 类型
dataMap, ok := data.(map[string]interface{})