1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package logic
- import (
- "app.yhyue.com/moapp/jybase/common"
- "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXBase/api/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXBase/api/internal/types"
- "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXBase/rpc/type/bxbase"
- "context"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type LabelActionLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewLabelActionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *LabelActionLogic {
- return &LabelActionLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *LabelActionLogic) LabelAction(req *types.LabelAction) (resp *types.CommonRes, err error) {
- res, err0 := l.svcCtx.Bxbase.LabelAction(l.ctx, &bxbase.LabelActionReq{
- UserId: req.UserId,
- Laction: req.Laction,
- Binfo: req.Binfo,
- Lids: req.Lids,
- Lname: req.Lname,
- AppId: req.AppId,
- })
- if err0 != nil {
- return &types.CommonRes{
- Err_code: -1,
- Err_msg: "错误",
- Data: nil,
- }, nil
- }
- return &types.CommonRes{
- Err_code: common.IntAll(res.ErrCode),
- Err_msg: res.ErrMsg,
- Data: res.Status,
- }, nil
- }
|