1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package logic
- import (
- "context"
- "userCenter/api/internal/svc"
- "userCenter/api/internal/types"
- "userCenter/entity"
- . "userCenter/rpc/usercenter"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type UserUpdateLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewUserUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) UserUpdateLogic {
- return UserUpdateLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *UserUpdateLogic) UserUpdate(req types.UserUpdateReq) (*types.Resp, error) {
- // todo: add your logic here and delete this line
- res, err := entity.UserCenterRpc.UserUpdate(l.ctx, &UserIdReq{
- Appid: req.Appid,
- Id: req.Id,
- Phone: req.Phone,
- Nickname: req.Nickname,
- Headimg: req.Headimg,
- Company: req.Company,
- Position: req.Position,
- Password: req.Password,
- AOpenid: req.AOpenid,
- SOpenid: req.SOpenid,
- Unionid: req.Unionid,
- })
- return &types.Resp{
- Error_code: res.ErrorCode,
- Error_msg: res.ErrorMsg,
- Data: res.Data,
- }, err
- }
|