You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

applylistlogic.go 1.0 kB

123456789101112131415161718192021222324252627282930313233
  1. package participantservicelogic
  2. import (
  3. "context"
  4. "gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/internal/svc"
  5. "gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/pcmCore"
  6. "github.com/zeromicro/go-zero/core/logx"
  7. )
  8. type ApplyListLogic struct {
  9. ctx context.Context
  10. svcCtx *svc.ServiceContext
  11. logx.Logger
  12. }
  13. func NewApplyListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ApplyListLogic {
  14. return &ApplyListLogic{
  15. ctx: ctx,
  16. svcCtx: svcCtx,
  17. Logger: logx.WithContext(ctx),
  18. }
  19. }
  20. // applyList 执行任务列表
  21. func (l *ApplyListLogic) ApplyList(in *pcmCore.ApplyListReq) (*pcmCore.ApplyListResp, error) {
  22. result := pcmCore.ApplyListResp{}
  23. 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)
  24. if len(result.InfoList) != 0 {
  25. l.svcCtx.DbEngin.Exec("update cloud set status = ? where status = ?", "Issued", "Saved")
  26. }
  27. return &result, nil
  28. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.