1
This commit is contained in:
parent
8ef9926c44
commit
768eaf80ba
@ -1,21 +1,14 @@
|
|||||||
package cn.iocoder.yudao.module.jx.controller.api;
|
package cn.iocoder.yudao.module.jx.controller.admin;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.security.config.SecurityProperties;
|
|
||||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach;
|
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach;
|
||||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo;
|
import cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo;
|
||||||
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolCoachMapper;
|
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolCoachMapper;
|
||||||
import cn.iocoder.yudao.module.jx.service.IDriveSchoolInfoService;
|
import cn.iocoder.yudao.module.jx.service.IDriveSchoolInfoService;
|
||||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
|
||||||
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
|
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
import cn.iocoder.yudao.module.system.service.auth.AdminAuthService;
|
|
||||||
import cn.iocoder.yudao.module.system.service.permission.MenuService;
|
|
||||||
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
||||||
import cn.iocoder.yudao.module.system.service.permission.RoleService;
|
|
||||||
import cn.iocoder.yudao.module.system.service.social.SocialClientService;
|
|
||||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -30,8 +23,6 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 认证")
|
@Tag(name = "管理后台 - 认证")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/jx/auth")
|
@RequestMapping("/jx/auth")
|
||||||
@ -61,13 +52,14 @@ public class JxAuthController {
|
|||||||
public CommonResult getJxInfo()
|
public CommonResult getJxInfo()
|
||||||
{
|
{
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
// 获取当前登录用户code
|
// 获取当前登录用户角色编码
|
||||||
Set<String> roles = permissionService.getRolePermission(user.getId());
|
Set<String> roles = permissionService.getRolePermission(user.getId());
|
||||||
//获取驾校的
|
//获取驾校的
|
||||||
Long userId = user.getId();
|
Long userId = user.getId();
|
||||||
|
|
||||||
AdminUserDO sysUser = userService.getUser(userId);
|
AdminUserDO sysUser = userService.getUser(userId);
|
||||||
String phonenumber = sysUser.getMobile();
|
String phonenumber = sysUser.getMobile();
|
||||||
|
//根据手机号查询驾校教练
|
||||||
DriveSchoolCoach driveSchoolCoach = driveSchoolCoachMapper.selectByPhonenumber(phonenumber);
|
DriveSchoolCoach driveSchoolCoach = driveSchoolCoachMapper.selectByPhonenumber(phonenumber);
|
||||||
|
|
||||||
if (ObjectUtils.isNotEmpty(driveSchoolCoach)){
|
if (ObjectUtils.isNotEmpty(driveSchoolCoach)){
|
||||||
|
@ -276,7 +276,7 @@ public class DriveSchoolInfoServiceImpl implements IDriveSchoolInfoService
|
|||||||
jlId = driveSchoolCoach.getId();
|
jlId = driveSchoolCoach.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
DriveSchoolInfoVO schoolInfoByDeptId = driveSchoolInfoMapper.getSchoolInfoByDeptId(227L);
|
DriveSchoolInfoVO schoolInfoByDeptId = driveSchoolInfoMapper.getSchoolInfoByDeptId(100L);
|
||||||
schoolInfoByDeptId.setJlId(jlId);
|
schoolInfoByDeptId.setJlId(jlId);
|
||||||
return schoolInfoByDeptId;
|
return schoolInfoByDeptId;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user