This commit is contained in:
TS-QD1 2024-12-10 17:26:30 +08:00
parent 28487b8e98
commit 1293b64981
2 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
package cn.com.tenlion.operator.controller.app.api.systemuser;
package cn.com.tenlion.operator.controller.api.systemuser;
import cn.com.tenlion.operator.service.quick.login.QuickLoginService;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
@ -22,8 +22,8 @@ import org.springframework.web.bind.annotation.RestController;
*/
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "快速登录接口")
@RestController
@RequestMapping(ISystemConstant.APP_PREFIX + "/quick/login")
public class QuickLoginAppController {
@RequestMapping(ISystemConstant.API_PREFIX + "/quick/login")
public class QuickLoginController {
@Autowired
private ISmsService smsService;

View File

@ -39,13 +39,13 @@ public class QuickLoginService extends DefaultBaseService {
*/
public String saveAndLogin(RegisterPhoneVO registerPhoneVO) {
UserPO userPO = userService.getPOByUsername(registerPhoneVO.getPhone());
if (userPO == null) {
LOG.debug("用户不存在,注册用户");
}
try {
registerService.registerPhone(registerPhoneVO, new HashMap<String, Object>() {{
put("userRole", EnvManager.value("NORMAL_USER_ROLE_ID"));
}});
if (userPO == null) {
LOG.debug("用户不存在,注册用户");
registerService.registerPhone(registerPhoneVO, new HashMap<String, Object>() {{
put("userRole", EnvManager.value("NORMAL_USER_ROLE_ID"));
}});
}
AppLoginPhoneVO appLoginPhoneVO = new AppLoginPhoneVO();
appLoginPhoneVO.setUsername(registerPhoneVO.getPhone());
return appSignService.phoneSign(appLoginPhoneVO);