From 8f044d5f3768a05d7e72aa6a11432644768d48eb Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Wed, 6 Dec 2023 15:15:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=A7=E8=A1=8C=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 96060f7cecabd94b935f2f96acef08b6057b651d --- rpc/internal/logic/participantservice/applylistlogic.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rpc/internal/logic/participantservice/applylistlogic.go b/rpc/internal/logic/participantservice/applylistlogic.go index 1ba5d4d7..edf61758 100644 --- a/rpc/internal/logic/participantservice/applylistlogic.go +++ b/rpc/internal/logic/participantservice/applylistlogic.go @@ -24,8 +24,10 @@ func NewApplyListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ApplyLi // applyList 执行任务列表 func (l *ApplyListLogic) ApplyList(in *pcmCore.ApplyListReq) (*pcmCore.ApplyListResp, error) { - result := pcmCore.ApplyListResp{} - l.svcCtx.DbEngin.Raw("SELECT sppi.`name` as participantName,c.yaml_string as yamlString FROM cloud c,sc_participant_phy_info sppi where c.`status` = 'Saved' and sppi.id = c.participant_id").Scan(&result.InfoList) + result := pcmCore.ApplyListResp{ + InfoList: make([]*pcmCore.ApplyInfo, 0), + } + l.svcCtx.DbEngin.Raw("SELECT sppi.`name` as ParticipantName,c.yaml_string as YamlString FROM cloud c,sc_participant_phy_info sppi where c.`status` = 'Saved' 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", "Saved") }