userauthinfosavelogic.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity"
  4. "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service"
  5. "context"
  6. "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/internal/svc"
  7. "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type UserAuthInfoSaveLogic struct {
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. logx.Logger
  14. }
  15. func NewUserAuthInfoSaveLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserAuthInfoSaveLogic {
  16. return &UserAuthInfoSaveLogic{
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. Logger: logx.WithContext(ctx),
  20. }
  21. }
  22. // 用户认证信息保存
  23. func (l *UserAuthInfoSaveLogic) UserAuthInfoSave(in *medical.UserInfo) (*medical.CommonResp, error) {
  24. // todo: add your logic here and delete this line
  25. m := service.AuthService{}
  26. errcode, msg := m.UserAuthInfoSave(in)
  27. result := &medical.CommonResp{}
  28. if errcode {
  29. result.ErrorCode = entity.ERRORCODE
  30. } else {
  31. result.ErrorCode = entity.ERRORCODE
  32. result.ErrorMsg = msg
  33. }
  34. return result, nil
  35. }