12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- package logic
- import (
- "app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
- "context"
- "app.yhyue.com/moapp/jybase/common"
- "app.yhyue.com/moapp/jyInfo/api/internal/svc"
- "app.yhyue.com/moapp/jyInfo/api/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type AssProjecctLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewAssProjecctLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssProjecctLogic {
- return &AssProjecctLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *AssProjecctLogic) AssProjecct(req *types.AssProjecctReq) (resp *types.CommonRes, err error) {
- assProject, err0 := l.svcCtx.Consumer.InfoRelated(l.ctx, &consumerclient.UserIdReq{
- UserId: req.UserId,
- Match: req.Match,
- AppId: req.AppId,
- MsgType: common.Int64All(req.MsgType),
- EntId: req.EntId,
- })
- if err0 != nil {
- return &types.CommonRes{
- Err_code: -1,
- Err_msg: "错误",
- Data: nil,
- }, nil
- }
- return &types.CommonRes{
- Err_code: common.IntAll(assProject.ErrCode),
- Err_msg: assProject.ErrMsg,
- Data: assProject.Data,
- }, nil
- }
|