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") }