123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package logic
- import (
- "context"
- "bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/types"
- "bp.jydev.jianyu360.cn/BaseService/userCenter/entity"
- . "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/usercenter"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type UserAddLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewUserAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) UserAddLogic {
- return UserAddLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *UserAddLogic) UserAdd(req types.UserAddReq) (*types.Resp, error) {
- // todo: add your logic here and delete this line
- res, err := entity.UserCenterRpc.UserAdd(l.ctx, &UserAddReq{
- Appid: req.Appid,
- Phone: req.Phone,
- Nickname: req.Nickname,
- Headimg: req.Headimg,
- Company: req.Company,
- Position: req.Position,
- Password: req.Password,
- Openid: req.Openid,
- Unionid: req.Unionid,
- })
- return &types.Resp{
- Error_code: res.ErrorCode,
- Error_msg: res.ErrorMsg,
- Data: res.Data,
- }, err
- }
|