123456789101112131415161718192021222324252627282930313233343536373839 |
- 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/pb"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type UpdateEntLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewUpdateEntLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateEntLogic {
- return &UpdateEntLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *UpdateEntLogic) UpdateEnt(req *types.UpdateEntReq) (resp *types.Resp, err error) {
- // todo: add your logic here and delete this line
- res, err := entity.UserCenterRpc.EntUpdate(l.ctx, &pb.EntUpdateReq{
- EntId: req.EntId,
- UpdateType: req.UpdateType,
- })
- return &types.Resp{
- Error_code: res.ErrorCode,
- Error_msg: res.ErrorMsg,
- Data: res.Data,
- }, err
- }
|