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.

pushnoticelogic.go 740 B

12345678910111213141516171819202122232425262728293031
  1. package core
  2. import (
  3. "context"
  4. "github.com/zeromicro/go-zero/core/logx"
  5. clientCore "gitlink.org.cn/JointCloud/pcm-coordinator/client"
  6. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
  7. )
  8. type PushNoticeLogic struct {
  9. logx.Logger
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. }
  13. func NewPushNoticeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PushNoticeLogic {
  14. return &PushNoticeLogic{
  15. Logger: logx.WithContext(ctx),
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. }
  19. }
  20. func (l *PushNoticeLogic) PushNotice(req *clientCore.PushNoticeReq) (resp *clientCore.PushNoticeResp, err error) {
  21. result := l.svcCtx.DbEngin.Table("t_notice").Create(&req.NoticeInfo)
  22. if result.Error != nil {
  23. return nil, result.Error
  24. }
  25. return
  26. }

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.