1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package logic
- import (
- "app.yhyue.com/moapp/jyInfo/rpc/manager/managerinfo"
- "app.yhyue.com/moapp/jybase/common"
- "context"
- "app.yhyue.com/moapp/jyInfo/api/internal/svc"
- "app.yhyue.com/moapp/jyInfo/api/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type OneKeyActionLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewOneKeyActionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OneKeyActionLogic {
- return &OneKeyActionLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *OneKeyActionLogic) OneKeyAction(req *types.OneKeyActionReq) (resp *types.CommonRes, err error) {
- req.UserId = "623c3742e7570166821228a7"
- organ, err0 := l.svcCtx.Manager.InfoOneKeyAction(l.ctx, &managerinfo.OneKeyActionReq{
- AppId: req.AppId,
- UserId: req.UserId,
- MsgType: common.InterfaceToStr(req.MsgType),
- MsgId: req.MsgId,
- Type: req.Type,
- EntName: req.EntName,
- })
- if err0 != nil {
- return &types.CommonRes{
- Err_code: -1,
- Err_msg: "错误",
- Data: nil,
- }, nil
- }
- return &types.CommonRes{
- Err_code: common.IntAll(organ.ErrCode),
- Err_msg: organ.ErrMsg,
- Data: nil,
- }, nil
- }
|