作者 tangxuhui

修正日志提示

... ... @@ -387,26 +387,26 @@ func (gateway HttplibAlliedCreationCooperation) CooperationApplicationsOneclickA
url := gateway.baseUrL + "/cooperation-applications/oneclick-approval"
method := "POST"
req := gateway.CreateRequest(url, method)
log.Logger.Debug("向业务模块请求数据:共创申请批量审核。", map[string]interface{}{
log.Logger.Debug("向业务模块请求数据:共创申请一键审核。", map[string]interface{}{
"api": method + ":" + url,
"param": param,
})
req, err := req.JSONBody(param)
if err != nil {
return nil, fmt.Errorf("请求共创申请批量审核失败:%w", err)
return nil, fmt.Errorf("请求共创申请一键审核失败:%w", err)
}
byteResult, err := req.Bytes()
if err != nil {
return nil, fmt.Errorf("获取共创申请批量审核失败:%w", err)
return nil, fmt.Errorf("获取共创申请一键审核失败:%w", err)
}
log.Logger.Debug("获取业务模块请求数据:共创申请批量审核。", map[string]interface{}{
log.Logger.Debug("获取业务模块请求数据:共创申请一键审核。", map[string]interface{}{
"result": string(byteResult),
})
var result service_gateway.GatewayResponse
err = json.Unmarshal(byteResult, &result)
if err != nil {
return nil, fmt.Errorf("解析共创申请批量审核:%w", err)
return nil, fmt.Errorf("解析共创申请一键审核:%w", err)
}
var data DataCooperationApplicationOneclickApproval
err = gateway.GetResponseData(result, &data)
... ... @@ -418,26 +418,26 @@ func (gateway HttplibAlliedCreationCooperation) ApplyForCooperation(param ReqApp
url := gateway.baseUrL + "/cooperation-applications/" + strconv.Itoa(param.CooperationProjectId) + "/apply-for-cooperation"
method := "POST"
req := gateway.CreateRequest(url, method)
log.Logger.Debug("向业务模块请求数据:创建共创申请。", map[string]interface{}{
log.Logger.Debug("向业务模块请求数据:申请共创项目。", map[string]interface{}{
"api": method + ":" + url,
"param": param,
})
req, err := req.JSONBody(param)
if err != nil {
return nil, fmt.Errorf("请求创建共创申请失败:%w", err)
return nil, fmt.Errorf("请求申请共创项目失败:%w", err)
}
byteResult, err := req.Bytes()
if err != nil {
return nil, fmt.Errorf("获取创建共创申请失败:%w", err)
return nil, fmt.Errorf("获取申请共创项目失败:%w", err)
}
log.Logger.Debug("获取业务模块请求数据:创建共创申请。", map[string]interface{}{
log.Logger.Debug("获取业务模块请求数据:申请共创项目。", map[string]interface{}{
"result": string(byteResult),
})
var result service_gateway.GatewayResponse
err = json.Unmarshal(byteResult, &result)
if err != nil {
return nil, fmt.Errorf("解析创建共创申请:%w", err)
return nil, fmt.Errorf("解析申请共创项目:%w", err)
}
var data DataApplyForCooperation
err = gateway.GetResponseData(result, &data)
... ...