diff --git a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/controller/admin/JxAuthController.java b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/controller/admin/JxAuthController.java index 702f930e..6e283c80 100644 --- a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/controller/admin/JxAuthController.java +++ b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/controller/admin/JxAuthController.java @@ -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 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)){ diff --git a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/impl/DriveSchoolInfoServiceImpl.java b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/impl/DriveSchoolInfoServiceImpl.java index 2d7b1dd5..875a268b 100644 --- a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/impl/DriveSchoolInfoServiceImpl.java +++ b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/impl/DriveSchoolInfoServiceImpl.java @@ -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; }