123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package logic
- import (
- quitl "app.yhyue.com/moapp/jybase/common"
- "app.yhyue.com/moapp/jybase/encrypt"
- "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
- "context"
- "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/api/messagecenter/internal/svc"
- "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/api/messagecenter/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type GroupNoticeGetLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewGroupNoticeGetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GroupNoticeGetLogic {
- return &GroupNoticeGetLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *GroupNoticeGetLogic) GroupNoticeGet(req *types.ChatGroupPersonReq) (resp *types.CommonRes, err error) {
- // todo: add your logic here and delete this line
- chatGroupId := quitl.Int64All(encrypt.SE.Decode4Hex(req.ChatGroupId))
- result, err := l.svcCtx.Message.GroupNoticeGet(l.ctx, &messagecenter.ChatGroupPersonReq{
- AppId: req.Appid,
- ChatGroupId: chatGroupId,
- })
- if err != nil {
- return nil, err
- }
- return &types.CommonRes{
- Error_msg: result.ErrorMsg,
- Error_code: int(result.ErrorCode),
- Data: result.Data,
- }, nil
- return
- }
|