This commit is contained in:
PQZ 2024-08-28 17:10:41 +08:00
parent 8ef9926c44
commit 768eaf80ba
2 changed files with 4 additions and 12 deletions

View File

@ -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.security.config.SecurityProperties;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo;
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolCoachMapper;
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.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.RoleService;
import cn.iocoder.yudao.module.system.service.social.SocialClientService;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -30,8 +23,6 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 认证")
@RestController
@RequestMapping("/jx/auth")
@ -61,13 +52,14 @@ public class JxAuthController {
public CommonResult getJxInfo()
{
LoginUser user = SecurityFrameworkUtils.getLoginUser();
// 获取当前登录用户code
// 获取当前登录用户角色编码
Set<String> roles = permissionService.getRolePermission(user.getId());
//获取驾校的
Long userId = user.getId();
AdminUserDO sysUser = userService.getUser(userId);
String phonenumber = sysUser.getMobile();
//根据手机号查询驾校教练
DriveSchoolCoach driveSchoolCoach = driveSchoolCoachMapper.selectByPhonenumber(phonenumber);
if (ObjectUtils.isNotEmpty(driveSchoolCoach)){

View File

@ -276,7 +276,7 @@ public class DriveSchoolInfoServiceImpl implements IDriveSchoolInfoService
jlId = driveSchoolCoach.getId();
}
DriveSchoolInfoVO schoolInfoByDeptId = driveSchoolInfoMapper.getSchoolInfoByDeptId(227L);
DriveSchoolInfoVO schoolInfoByDeptId = driveSchoolInfoMapper.getSchoolInfoByDeptId(100L);
schoolInfoByDeptId.setJlId(jlId);
return schoolInfoByDeptId;
}