1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- package logic
- import (
- "context"
- "jyBXSubscribe/rpc/bxsubscribe"
- "jyBXSubscribe/api/internal/svc"
- "jyBXSubscribe/api/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type SetPushSetLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewSetPushSetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SetPushSetLogic {
- return &SetPushSetLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *SetPushSetLogic) SetPushSet(req *types.SetPushSetReq) (*types.CommonResp, error) {
- // todo: add your logic here and delete this line
- res, err := l.svcCtx.Suscribe.SetPushSet(l.ctx, &bxsubscribe.SetPushSetReq{
- UserId: req.UserId,
- EntId: req.EntId,
- EntUserId: req.EntUserId,
- PositionType: req.PositionType,
- Item: req.Item,
- PushType: req.PushType,
- PushValue: req.PushValue,
- Ratemode: req.Ratemode,
- Times: req.Times,
- SetType: req.SetType,
- })
- 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: res,
- }, nil
- }
|