12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package logic
- import (
- "context"
- "jyBXSubscribe/rpc/bxsubscribe"
- "jyBXSubscribe/api/internal/svc"
- "jyBXSubscribe/api/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type SetReadLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewSetReadLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SetReadLogic {
- return &SetReadLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *SetReadLogic) SetRead(req *types.SetReadReq) (resp *types.CommonResp, err error) {
- // todo: add your logic here and delete this line
- res, err := l.svcCtx.Suscribe.SetRead(l.ctx, &bxsubscribe.SetReadReq{
- AppId: req.AppId,
- UserType: req.UserType,
- UserId: req.UserId,
- NewUserId: req.NewUserId,
- EntId: req.EntId,
- IsEnt: req.IsEnt,
- EntUserId: req.EntUserId,
- Vsid: req.Vsid,
- })
- if err != nil {
- return &types.CommonResp{
- Err_code: res.ErrorCode,
- Err_msg: res.ErrorMsg,
- Data: nil,
- }, nil
- }
- return &types.CommonResp{
- Err_code: res.ErrorCode,
- Err_msg: res.ErrorMsg,
- Data: nil,
- }, nil
- return
- }
|