| | |
| | | import org.dromara.common.core.domain.model.RegisterBody; |
| | | import org.dromara.common.core.domain.model.SocialLoginBody; |
| | | import org.dromara.common.core.utils.*; |
| | | import org.dromara.common.encrypt.annotation.ApiEncrypt; |
| | | import org.dromara.common.json.utils.JsonUtils; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.common.social.config.properties.SocialLoginConfigProperties; |
| | |
| | | * @param body 登录信息 |
| | | * @return 结果 |
| | | */ |
| | | @ApiEncrypt |
| | | @PostMapping("/login") |
| | | public R<LoginVo> login(@Validated @RequestBody String body) { |
| | | LoginBody loginBody = JsonUtils.parseObject(body, LoginBody.class); |
| | |
| | | /** |
| | | * 用户注册 |
| | | */ |
| | | @ApiEncrypt |
| | | @PostMapping("/register") |
| | | public R<Void> register(@Validated @RequestBody RegisterBody user) { |
| | | if (!configService.selectRegisterEnabled(user.getTenantId())) { |