fix comb298y
This commit is contained in:
parent
bdb1d7b8e1
commit
59d07a4c71
@ -35,9 +35,9 @@ type APIRequest struct {
|
|||||||
|
|
||||||
// WestAPIResponse 定义西部API响应结构
|
// WestAPIResponse 定义西部API响应结构
|
||||||
type APIResponse struct {
|
type APIResponse struct {
|
||||||
SourceId string
|
ServiceId string
|
||||||
Resp json.RawMessage
|
Resp json.RawMessage
|
||||||
Success bool
|
Success bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// 将所有响应组装成JSON
|
// 将所有响应组装成JSON
|
||||||
@ -120,19 +120,19 @@ func (l *COMB298YLogic) COMB298Y(req *types.Request) (resp string, err *errs.App
|
|||||||
|
|
||||||
// 准备并发请求
|
// 准备并发请求
|
||||||
apiRequests := []APIRequest{
|
apiRequests := []APIRequest{
|
||||||
{SourceId: "YYSY09CD", ServiceId: "G16BJ02", Mapping: westmodel.YYSY09CDFieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G16BJ02", ServiceId: "YYSY09CD", Mapping: westmodel.YYSY09CDFieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "JRZQ0A03", ServiceId: "G27BJ05", Mapping: westmodel.JRZQ0A03FieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G27BJ05", ServiceId: "JRZQ0A03", Mapping: westmodel.JRZQ0A03FieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "JRZQ8203", ServiceId: "G28BJ05", Mapping: westmodel.JRZQ8203FieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G28BJ05", ServiceId: "JRZQ8203", Mapping: westmodel.JRZQ8203FieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "FLXG3D56", ServiceId: "G26BJ05", Mapping: westmodel.FLXG3D56FieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G26BJ05", ServiceId: "FLXG3D56", Mapping: westmodel.FLXG3D56FieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "FLXGCA3D", ServiceId: "G22SC01", Mapping: westmodel.FLXGCA3DFieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G22SC01", ServiceId: "FLXGCA3D", Mapping: westmodel.FLXGCA3DFieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "JRZQ4AA8", ServiceId: "G29BJ05", Mapping: westmodel.JRZQ4AA8FieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G29BJ05", ServiceId: "JRZQ4AA8", Mapping: westmodel.JRZQ4AA8FieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "FLXGC9D1", ServiceId: "G30BJ05", Mapping: westmodel.FLXGC9D1FieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G30BJ05", ServiceId: "FLXGC9D1", Mapping: westmodel.FLXGC9D1FieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "FLXG162A", ServiceId: "G32BJ05", Mapping: westmodel.FLXG162AFieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G32BJ05", ServiceId: "FLXG162A", Mapping: westmodel.FLXG162AFieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "FLXG54F5", ServiceId: "G03HZ01", Mapping: westmodel.FLXG54F5FieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G03HZ01", ServiceId: "FLXG54F5", Mapping: westmodel.FLXG54F5FieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "IVYZ5733", ServiceId: "G09XM02", Mapping: westmodel.IVYZ5733FieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G09XM02", ServiceId: "IVYZ5733", Mapping: westmodel.IVYZ5733FieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "IVYZ9A2B", ServiceId: "G11BJ06", Mapping: westmodel.IVYZ9A2BFieldMapping, Wrap: "data", Service: "west"},
|
{SourceId: "G11BJ06", ServiceId: "IVYZ9A2B", Mapping: westmodel.IVYZ9A2BFieldMapping, Wrap: "data", Service: "west"},
|
||||||
{SourceId: "QYGLB4C0", ServiceId: "G05HZ01", Mapping: westmodel.QYGLB4C0FieldMapping, Wrap: "", Service: "west"},
|
{SourceId: "G05HZ01", ServiceId: "QYGLB4C0", Mapping: westmodel.QYGLB4C0FieldMapping, Wrap: "", Service: "west"},
|
||||||
{SourceId: "FLXG8UI0", ServiceId: "RIS031", Mapping: westmodel.FLXG8UI0FieldMapping, Wrap: "data", Service: "yushan"},
|
{SourceId: "RIS031", ServiceId: "FLXG8UI0", Mapping: westmodel.FLXG8UI0FieldMapping, Wrap: "data", Service: "yushan"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// 为每个请求构建对应的请求参数
|
// 为每个请求构建对应的请求参数
|
||||||
@ -214,9 +214,9 @@ func (l *COMB298YLogic) COMB298Y(req *types.Request) (resp string, err *errs.App
|
|||||||
}
|
}
|
||||||
|
|
||||||
responseChan <- APIResponse{
|
responseChan <- APIResponse{
|
||||||
SourceId: req.ServiceId,
|
ServiceId: req.ServiceId,
|
||||||
Resp: jsonResp,
|
Resp: jsonResp,
|
||||||
Success: success,
|
Success: success,
|
||||||
}
|
}
|
||||||
}(apiReq)
|
}(apiReq)
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ func (l *COMB298YLogic) COMB298Y(req *types.Request) (resp string, err *errs.App
|
|||||||
Data json.RawMessage `json:"data"`
|
Data json.RawMessage `json:"data"`
|
||||||
Success bool `json:"success"`
|
Success bool `json:"success"`
|
||||||
}{
|
}{
|
||||||
ServiceId: resp.SourceId,
|
ServiceId: resp.ServiceId,
|
||||||
Data: resp.Resp,
|
Data: resp.Resp,
|
||||||
Success: resp.Success,
|
Success: resp.Success,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user