登录修改
This commit is contained in:
@ -12,6 +12,7 @@ import com.ruoyi.framework.web.service.AppLoginService;
|
|||||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||||
import com.ruoyi.framework.web.service.TokenService;
|
import com.ruoyi.framework.web.service.TokenService;
|
||||||
import com.ruoyi.system.service.ISysMenuService;
|
import com.ruoyi.system.service.ISysMenuService;
|
||||||
|
import com.ruoyi.wgz.service.IWgzUserService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@ -44,6 +45,9 @@ public class AppLoginController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IBgtUserService iBgtUserService;
|
private IBgtUserService iBgtUserService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWgzUserService wgzUserService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录方法
|
* 登录方法
|
||||||
*
|
*
|
||||||
@ -79,7 +83,7 @@ public class AppLoginController
|
|||||||
ajax.put("user", bgtUser);
|
ajax.put("user", bgtUser);
|
||||||
break;
|
break;
|
||||||
case Constants.WGZ:
|
case Constants.WGZ:
|
||||||
ajax.put("user", user);
|
ajax.put("user", wgzUserService.userLongIn(user.getPhonenumber()));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||||||
import com.ruoyi.wgz.bo.req.WgzAppPersonalBasicInformationReq;
|
import com.ruoyi.wgz.bo.req.WgzAppPersonalBasicInformationReq;
|
||||||
import com.ruoyi.wgz.bo.req.WgzAppUserLongInReq;
|
import com.ruoyi.wgz.bo.req.WgzAppUserLongInReq;
|
||||||
import com.ruoyi.wgz.bo.req.WgzAppUserRegisterReq;
|
import com.ruoyi.wgz.bo.req.WgzAppUserRegisterReq;
|
||||||
|
import com.ruoyi.wgz.bo.req.WgzRealNameAuthenticationReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppPersonalBasicInformationRes;
|
import com.ruoyi.wgz.bo.res.WgzAppPersonalBasicInformationRes;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppUserLongInRes;
|
import com.ruoyi.wgz.bo.res.WgzAppUserLongInRes;
|
||||||
import com.ruoyi.wgz.service.IWgzUserService;
|
import com.ruoyi.wgz.service.IWgzUserService;
|
||||||
@ -14,9 +15,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APP务工者Controller
|
* APP务工者Controller
|
||||||
@ -49,7 +48,7 @@ public class WgzAppController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("APP务工者-个人基本信息")
|
@ApiOperation("APP务工者-个人基本信息")
|
||||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userPersonalBasicInformation')")
|
@PreAuthorize("@ss.hasPermi('wgzApp:user:userPersonalBasicInformation')")
|
||||||
@PostMapping("/wgzPersonalBasicInformation")
|
@GetMapping("/wgzPersonalBasicInformation")
|
||||||
public AjaxResult<WgzAppPersonalBasicInformationRes> userPersonalBasicInformation(@Validated WgzAppPersonalBasicInformationReq req) {
|
public AjaxResult<WgzAppPersonalBasicInformationRes> userPersonalBasicInformation(@Validated WgzAppPersonalBasicInformationReq req) {
|
||||||
return AjaxResult.success(iWgzUserService.userPersonalBasicInformation(req));
|
return AjaxResult.success(iWgzUserService.userPersonalBasicInformation(req));
|
||||||
}
|
}
|
||||||
@ -60,7 +59,7 @@ public class WgzAppController {
|
|||||||
// @ApiOperation("APP务工者-实名认证")
|
// @ApiOperation("APP务工者-实名认证")
|
||||||
// @PreAuthorize("@ss.hasPermi('wgzApp:user:userRealNameAuthentication')")
|
// @PreAuthorize("@ss.hasPermi('wgzApp:user:userRealNameAuthentication')")
|
||||||
// @PostMapping("/wgzUserRealNameAuthentication")
|
// @PostMapping("/wgzUserRealNameAuthentication")
|
||||||
// public AjaxResult<WgzAppPersonalBasicInformationRes> userRealNameAuthentication(@Validated WgzAppPersonalBasicInformationReq req) {
|
// public AjaxResult userRealNameAuthentication(@Validated @RequestBody WgzRealNameAuthenticationReq req) {
|
||||||
// return AjaxResult.success(iWgzUserService.userPersonalBasicInformation(req));
|
// return AjaxResult.success(iWgzUserService.userPersonalBasicInformation(req));
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
|||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
import com.ruoyi.common.enums.UserStatus;
|
import com.ruoyi.common.enums.UserStatus;
|
||||||
import com.ruoyi.common.exception.BaseException;
|
import com.ruoyi.common.exception.BaseException;
|
||||||
|
import com.ruoyi.wgz.domain.WgzUser;
|
||||||
|
import com.ruoyi.wgz.service.IWgzUserService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -31,6 +33,9 @@ public class AppUserDetailsServiceImpl implements UserDetailsService
|
|||||||
{
|
{
|
||||||
private static final Logger log = LoggerFactory.getLogger(AppUserDetailsServiceImpl.class);
|
private static final Logger log = LoggerFactory.getLogger(AppUserDetailsServiceImpl.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWgzUserService wgzUserService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBgtUserService userService;
|
private IBgtUserService userService;
|
||||||
|
|
||||||
@ -46,7 +51,9 @@ public class AppUserDetailsServiceImpl implements UserDetailsService
|
|||||||
check(user,phone);
|
check(user,phone);
|
||||||
userDetailsl = createLoginUser(user,Constants.BGT);
|
userDetailsl = createLoginUser(user,Constants.BGT);
|
||||||
} else if (phone.contains(Constants.WGZ)) {
|
} else if (phone.contains(Constants.WGZ)) {
|
||||||
|
WgzUser wgzUser = wgzUserService.userLongIn(phone.replace(Constants.WGZ, ""));
|
||||||
|
check(wgzUser,phone);
|
||||||
|
userDetailsl = createLoginUser(wgzUser,Constants.WGZ);
|
||||||
}
|
}
|
||||||
return userDetailsl;
|
return userDetailsl;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.ruoyi.wgz.bo.req;
|
||||||
|
|
||||||
|
public class WgzRealNameAuthenticationReq {
|
||||||
|
}
|
@ -5,8 +5,10 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
import com.ruoyi.wgz.bo.WgzUserQueryBo;
|
import com.ruoyi.wgz.bo.WgzUserQueryBo;
|
||||||
import com.ruoyi.wgz.bo.req.WgzAppPersonalBasicInformationReq;
|
import com.ruoyi.wgz.bo.req.WgzAppPersonalBasicInformationReq;
|
||||||
import com.ruoyi.wgz.bo.req.WgzAppUserRegisterReq;
|
import com.ruoyi.wgz.bo.req.WgzAppUserRegisterReq;
|
||||||
|
import com.ruoyi.wgz.bo.req.WgzRealNameAuthenticationReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppPersonalBasicInformationRes;
|
import com.ruoyi.wgz.bo.res.WgzAppPersonalBasicInformationRes;
|
||||||
import com.ruoyi.wgz.domain.WgzUser;
|
import com.ruoyi.wgz.domain.WgzUser;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -84,4 +86,11 @@ public interface IWgzUserService extends IServicePlus<WgzUser> {
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
WgzAppPersonalBasicInformationRes userPersonalBasicInformation(WgzAppPersonalBasicInformationReq req);
|
WgzAppPersonalBasicInformationRes userPersonalBasicInformation(WgzAppPersonalBasicInformationReq req);
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 务工者APP实名认证
|
||||||
|
// * @param req APP务工者实名认证业务对象
|
||||||
|
// * @return bool
|
||||||
|
// */
|
||||||
|
// Boolean userRealNameAuthentication(WgzRealNameAuthenticationReq req);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user