Browse Source

根据租户id获取当前部门列表

tags/v1.2.0^2
chengwang 1 year ago
parent
commit
d647623036
3 changed files with 33 additions and 0 deletions
  1. +10
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/RoadInformationController.java
  2. +3
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationService.java
  3. +20
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java

+ 10
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/RoadInformationController.java View File

@@ -38,6 +38,16 @@ public class RoadInformationController {
return roadInformationService.getListInfo(query);
}

/**
* 根据当前租户id获取
* @return
*/
@GetMapping("/getListByTenantId")
public JsonResult getListByTenantId(){
return roadInformationService.getListByTenantId();

}

/**
* 根据部门id获取该部门下公路信息列表
* @param deptId

+ 3
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationService.java View File

@@ -21,5 +21,8 @@ public interface RoadInformationService extends IBaseService<RoadInformation> {

JsonResult getListByUserType();

JsonResult getListByTenantId();


// JsonResult deleteRoadByIds(String[] ids);
}

+ 20
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java View File

@@ -206,6 +206,26 @@ public class RoadInformationServiceImpl extends BaseServiceImpl<RoadInformationM
return JsonResult.success(roadInformationList);
}

/**
* 根据租户id获取公路列表
* @return
*/
@Override
public JsonResult getListByTenantId() {
//获取当前租户下id
//String tenantId = CurrentUserUtil.getTenantId();
String tenantId = "1";
if(StringUtils.isEmpty(tenantId)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
//查询公路列表
List<RoadInformation> roadInformationList = roadInformationMapper.selectList(new LambdaQueryWrapper<RoadInformation>()
.eq(RoadInformation::getTenantId, tenantId)
.eq(RoadInformation::getMark, MarkEnum.VALID.getCode()));

return JsonResult.success(roadInformationList);
}

/**
* 根据部门列表获取公路列表
* @param tenantId

Loading…
Cancel
Save