cloud app重启接口实现

Signed-off-by: devad <cossjie@foxmail.com>
This commit is contained in:
devad 2024-01-03 13:01:03 +08:00
parent ab602b43a6
commit 3ad235d75e
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ func (l *RestartListLogic) RestartList(in *pcmCore.ApplyListReq) (*pcmCore.Apply
result := pcmCore.ApplyListResp{
InfoList: make([]*pcmCore.ApplyInfo, 0),
}
l.svcCtx.DbEngin.Raw("SELECT sppi.`name` as ParticipantName, c.ns_id as namespace,c.name as name FROM cloud c,sc_participant_phy_info sppi where c.`status` = 'WaitRestart' and sppi.id = c.participant_id").Scan(&result.InfoList)
l.svcCtx.DbEngin.Raw("SELECT sppi.`name` as ParticipantName, c.ns_id as namespace,c.name as name , c.kind as kind FROM cloud c,sc_participant_phy_info sppi where c.`status` = 'WaitRestart' and sppi.id = c.participant_id").Scan(&result.InfoList)
if len(result.InfoList) != 0 {
l.svcCtx.DbEngin.Exec("update cloud set status = ? where status = ?", "Issued", "WaitRestart")
}

View File

@ -296,7 +296,8 @@ message ApplyInfo{
string participantName = 1;
string yamlString = 2;
string namespace =3;
string name =4;
string name = 4;
string kind = 5;
}
// participant