存算联动修改
Former-commit-id: 617e29e56c27fc6057e8d720c1b671440388bdbb
This commit is contained in:
parent
7c61eb220a
commit
48a529e08d
|
@ -99,7 +99,8 @@ type (
|
||||||
}
|
}
|
||||||
|
|
||||||
GetParticipantsResp {
|
GetParticipantsResp {
|
||||||
|
Success bool `json:"success"`
|
||||||
|
Participants []Participant `json:"participant"`
|
||||||
}
|
}
|
||||||
|
|
||||||
GetResourceSpecsReq {
|
GetResourceSpecsReq {
|
||||||
|
@ -107,6 +108,20 @@ type (
|
||||||
}
|
}
|
||||||
|
|
||||||
GetResourceSpecsResp {
|
GetResourceSpecsResp {
|
||||||
|
Success bool `json:"success"`
|
||||||
|
ResourceSpecs []ResourceSpec `json:"resourceSpecs"`
|
||||||
|
}
|
||||||
|
|
||||||
|
ResourceSpec {
|
||||||
|
ParticipantId string `json:"participantId"`
|
||||||
|
ParticipantName string `json:"participantName"`
|
||||||
|
SpecName string `json:"resourceSpecName"`
|
||||||
|
SpecId string `json:"resourceSpecId"`
|
||||||
|
}
|
||||||
|
|
||||||
|
Participant {
|
||||||
|
ParticipantId string `json:"id"`
|
||||||
|
ParticipantName string `json:"name"`
|
||||||
|
ParticipantType string `json:"type"`
|
||||||
}
|
}
|
||||||
)
|
)
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc"
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc"
|
||||||
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/types"
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/types"
|
||||||
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models"
|
||||||
"gitlink.org.cn/jcce-pcm/pcm-participant-octopus/octopus"
|
"gitlink.org.cn/jcce-pcm/pcm-participant-octopus/octopus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -33,9 +34,11 @@ type StoreLink struct {
|
||||||
ILinkage Linkage
|
ILinkage Linkage
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo 根据participantId 创建对应对象
|
|
||||||
func NewStoreLink(ctx context.Context, svcCtx *svc.ServiceContext, partId int64) *StoreLink {
|
func NewStoreLink(ctx context.Context, svcCtx *svc.ServiceContext, partId int64) *StoreLink {
|
||||||
linkStruct := NewOctopusLink(ctx, svcCtx, "hanwuji")
|
var participant models.ScParticipantPhyInfo
|
||||||
|
svcCtx.DbEngin.Raw("select * from sc_participant_phy_info where id = ?", partId).Scan(&participant)
|
||||||
|
|
||||||
|
linkStruct := NewOctopusLink(ctx, svcCtx, participant.Name)
|
||||||
return &StoreLink{ILinkage: linkStruct}
|
return &StoreLink{ILinkage: linkStruct}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue