12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package logic
- import (
- "app.yhyue.com/moapp/jybase/common"
- "context"
- "jyBXBase/rpc/bxcollection/bxcol"
- "jyBXBase/api/internal/svc"
- "jyBXBase/api/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type IsCollActionLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewIsCollActionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IsCollActionLogic {
- return &IsCollActionLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *IsCollActionLogic) IsCollAction(req *types.IsCollAction) (resp *types.CommonRes, err error) {
- res, err0 := l.svcCtx.Bxcollection.IsCollAction(l.ctx, &bxcol.IsCollActionReq{
- UserId: req.UserId,
- Bids: req.Bids,
- Label: req.Label,
- })
- 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.Data,
- }, nil
- }
|