Showing
11 changed files
with
60 additions
and
66 deletions
@@ -138,7 +138,7 @@ public class TkAdminController extends BaseController { | @@ -138,7 +138,7 @@ public class TkAdminController extends BaseController { | ||
138 | 138 | ||
139 | @DeleteMapping("/user/deleteTenantAdmin") | 139 | @DeleteMapping("/user/deleteTenantAdmin") |
140 | @PreAuthorize( | 140 | @PreAuthorize( |
141 | - "@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN'},{'api:yt:admin:user:deleteTenantAdmin:delete'})") | 141 | + "@check.checkPermissions({'SYS_ADMIN','PLATFORM_ADMIN','TENANT_ADMIN'},{'api:yt:admin:user:deleteTenantAdmin:delete'})") |
142 | public ResponseEntity<Boolean> deleteTenantAdmin( | 142 | public ResponseEntity<Boolean> deleteTenantAdmin( |
143 | @Validated(DeleteGroup.class) @RequestBody DeleteDTO deleteDTO) throws ThingsboardException { | 143 | @Validated(DeleteGroup.class) @RequestBody DeleteDTO deleteDTO) throws ThingsboardException { |
144 | for (String strUserId : deleteDTO.getIds()) { | 144 | for (String strUserId : deleteDTO.getIds()) { |
@@ -69,8 +69,6 @@ public class TkConvertDataToController extends BaseController { | @@ -69,8 +69,6 @@ public class TkConvertDataToController extends BaseController { | ||
69 | 69 | ||
70 | @Autowired private TbRuleChainService tbRuleChainService; | 70 | @Autowired private TbRuleChainService tbRuleChainService; |
71 | 71 | ||
72 | - @Autowired private DeviceMapper deviceMapper; | ||
73 | - | ||
74 | @GetMapping(params = {PAGE_SIZE, PAGE}) | 72 | @GetMapping(params = {PAGE_SIZE, PAGE}) |
75 | @ApiOperation("分页查询") | 73 | @ApiOperation("分页查询") |
76 | public TkPageData<ConvertConfigDTO> pageMessageConfig( | 74 | public TkPageData<ConvertConfigDTO> pageMessageConfig( |
@@ -117,26 +115,27 @@ public class TkConvertDataToController extends BaseController { | @@ -117,26 +115,27 @@ public class TkConvertDataToController extends BaseController { | ||
117 | public ResponseEntity<ConvertConfigDTO> createOrUpdateConvertData( | 115 | public ResponseEntity<ConvertConfigDTO> createOrUpdateConvertData( |
118 | @Validated @RequestBody ConvertConfigDTO convertConfigDTO) throws ThingsboardException { | 116 | @Validated @RequestBody ConvertConfigDTO convertConfigDTO) throws ThingsboardException { |
119 | convertConfigDTO.setTenantId(getCurrentUser().getCurrentTenantId()); | 117 | convertConfigDTO.setTenantId(getCurrentUser().getCurrentTenantId()); |
120 | - if(getCurrentUser().isPtCommonTenant()){ | ||
121 | - convertConfigDTO.setDatasourceType(DatasourceTypeEnum.DEVICES); | ||
122 | - JsonArray convertDevices = new JsonArray(); | ||
123 | - JsonNode productNode = convertConfigDTO.getDatasourceContent().get("convertProducts"); | ||
124 | - List<String> orgIds = commonTenantOrganizationAllIds(); | ||
125 | - for (JsonNode deviceProfileId: productNode ) { | ||
126 | - JsonObject product =new JsonObject(); | ||
127 | - JsonArray devices = new JsonArray(); | ||
128 | - List<DeviceDTO> dto=deviceMapper.findDevicesByProfileIdAndOrganizationId(orgIds,deviceProfileId.asText()); | ||
129 | - if(null!=dto&&dto.size()>0){ | ||
130 | - dto.forEach(device ->{devices.add(device.getTbDeviceId());}); | ||
131 | - product.addProperty("product",deviceProfileId.asText()); | ||
132 | - product.add("devices",devices); | ||
133 | - convertDevices.add(product); | ||
134 | - } | ||
135 | - } | ||
136 | - ObjectNode convertProducts = (ObjectNode) convertConfigDTO.getDatasourceContent(); | ||
137 | - convertProducts.set("convertDevices",JacksonUtil.toJsonNode(convertDevices.toString())); | ||
138 | - convertConfigDTO.setDatasourceContent(convertProducts); | ||
139 | - } | 118 | + //这里针对普通租户管理员的代码 暂时屏蔽根据后续清空看是否开启或删除 |
119 | +// if(getCurrentUser().isPtCommonTenant()){ | ||
120 | +// convertConfigDTO.setDatasourceType(DatasourceTypeEnum.DEVICES); | ||
121 | +// JsonArray convertDevices = new JsonArray(); | ||
122 | +// JsonNode productNode = convertConfigDTO.getDatasourceContent().get("convertProducts"); | ||
123 | +// List<String> orgIds = commonTenantOrganizationAllIds(); | ||
124 | +// for (JsonNode deviceProfileId: productNode ) { | ||
125 | +// JsonObject product =new JsonObject(); | ||
126 | +// JsonArray devices = new JsonArray(); | ||
127 | +// List<DeviceDTO> dto=deviceMapper.findDevicesByProfileIdAndOrganizationId(orgIds,deviceProfileId.asText()); | ||
128 | +// if(null!=dto&&dto.size()>0){ | ||
129 | +// dto.forEach(device ->{devices.add(device.getTbDeviceId());}); | ||
130 | +// product.addProperty("product",deviceProfileId.asText()); | ||
131 | +// product.add("devices",devices); | ||
132 | +// convertDevices.add(product); | ||
133 | +// } | ||
134 | +// } | ||
135 | +// ObjectNode convertProducts = (ObjectNode) convertConfigDTO.getDatasourceContent(); | ||
136 | +// convertProducts.set("convertDevices",JacksonUtil.toJsonNode(convertDevices.toString())); | ||
137 | +// convertConfigDTO.setDatasourceContent(convertProducts); | ||
138 | +// } | ||
140 | convertConfigDTO.setNodeType(FastIotConstants.CONVERT_DATA); | 139 | convertConfigDTO.setNodeType(FastIotConstants.CONVERT_DATA); |
141 | return ResponseEntity.ok(convertConfigService.createOrUpdate(convertConfigDTO)); | 140 | return ResponseEntity.ok(convertConfigService.createOrUpdate(convertConfigDTO)); |
142 | } | 141 | } |
@@ -46,7 +46,7 @@ public class TkRoleController extends BaseController { | @@ -46,7 +46,7 @@ public class TkRoleController extends BaseController { | ||
46 | @GetMapping( | 46 | @GetMapping( |
47 | path = "/tenant", | 47 | path = "/tenant", |
48 | params = {PAGE_SIZE, PAGE}) | 48 | params = {PAGE_SIZE, PAGE}) |
49 | - @PreAuthorize("hasAnyAuthority('SYS_ADMIN','PLATFORM_ADMIN')") | 49 | + @PreAuthorize("hasAnyAuthority('SYS_ADMIN','PLATFORM_ADMIN','TENANT_ADMIN')") |
50 | public TkPageData<RoleDTO> pageTenantRole( | 50 | public TkPageData<RoleDTO> pageTenantRole( |
51 | @RequestParam(PAGE_SIZE) int pageSize, | 51 | @RequestParam(PAGE_SIZE) int pageSize, |
52 | @RequestParam(PAGE) int page, | 52 | @RequestParam(PAGE) int page, |
@@ -64,12 +64,7 @@ public class TkTaskCenterController extends BaseController { | @@ -64,12 +64,7 @@ public class TkTaskCenterController extends BaseController { | ||
64 | queryMap.put("tbDeviceId", tbDeviceId); | 64 | queryMap.put("tbDeviceId", tbDeviceId); |
65 | } | 65 | } |
66 | if(getCurrentUser().isPtCommonTenant()){ | 66 | if(getCurrentUser().isPtCommonTenant()){ |
67 | - List<DeviceDTO> dto = deviceMapper.findDevicesByProfileIdAndOrganizationId(commonTenantOrganizationAllIds(),null); | ||
68 | - if(null!=dto&&dto.size()>0) { | ||
69 | - List<String> tbDeviceIds = new ArrayList<>(); | ||
70 | - dto.forEach(device -> {tbDeviceIds.add(device.getTbDeviceId());}); | ||
71 | - queryMap.put("tbDeviceIds",tbDeviceIds); | ||
72 | - } | 67 | + queryMap.put("orgIds",commonTenantOrganizationAllIds()); |
73 | } | 68 | } |
74 | return tkTaskCenterService.taskCenterPage(queryMap, getCurrentUser().getCurrentTenantId()); | 69 | return tkTaskCenterService.taskCenterPage(queryMap, getCurrentUser().getCurrentTenantId()); |
75 | } | 70 | } |
@@ -139,7 +139,7 @@ public class TkUserController extends AbstractUserAccount { | @@ -139,7 +139,7 @@ public class TkUserController extends AbstractUserAccount { | ||
139 | queryMap, getCurrentUser().isPtSysadmin(), getCurrentUser().isTenantAdmin()); | 139 | queryMap, getCurrentUser().isPtSysadmin(), getCurrentUser().isTenantAdmin()); |
140 | } | 140 | } |
141 | 141 | ||
142 | - @PreAuthorize("hasAnyAuthority('SYS_ADMIN','PLATFORM_ADMIN')") | 142 | + @PreAuthorize("hasAnyAuthority('SYS_ADMIN','PLATFORM_ADMIN','TENANT_ADMIN')") |
143 | @GetMapping( | 143 | @GetMapping( |
144 | path = "/tenant/page", | 144 | path = "/tenant/page", |
145 | params = {PAGE_SIZE, PAGE}) | 145 | params = {PAGE_SIZE, PAGE}) |
@@ -158,7 +158,7 @@ public class TkUserController extends AbstractUserAccount { | @@ -158,7 +158,7 @@ public class TkUserController extends AbstractUserAccount { | ||
158 | queryMap.put(ORDER_TYPE, orderType.name()); | 158 | queryMap.put(ORDER_TYPE, orderType.name()); |
159 | } | 159 | } |
160 | queryMap.put(ORDER_FILED, orderBy); | 160 | queryMap.put(ORDER_FILED, orderBy); |
161 | - if (getCurrentUser().isPtCommonTenant()) { | 161 | + if (getCurrentUser().isPtTenantAdmin()) { |
162 | queryMap.put("level", FastIotConstants.MagicNumber.FOUR); | 162 | queryMap.put("level", FastIotConstants.MagicNumber.FOUR); |
163 | }else{ | 163 | }else{ |
164 | queryMap.put("level", FastIotConstants.MagicNumber.TWO); | 164 | queryMap.put("level", FastIotConstants.MagicNumber.TWO); |
@@ -234,7 +234,7 @@ public class TkUserController extends AbstractUserAccount { | @@ -234,7 +234,7 @@ public class TkUserController extends AbstractUserAccount { | ||
234 | } | 234 | } |
235 | 235 | ||
236 | @PreAuthorize( | 236 | @PreAuthorize( |
237 | - "@check.checkPermissions({'TENANT_ADMIN'},{''})")//todo | 237 | + "@check.checkPermissions({'TENANT_ADMIN'},{'api:yt:user:saveCommonTenant:post'})")//todo |
238 | @PostMapping("save_common_tenant") | 238 | @PostMapping("save_common_tenant") |
239 | public UserDTO saveCommonTenant(@Validated(AddGroup.class) @RequestBody UserDTO userDTO) | 239 | public UserDTO saveCommonTenant(@Validated(AddGroup.class) @RequestBody UserDTO userDTO) |
240 | throws ThingsboardException { | 240 | throws ThingsboardException { |
@@ -265,7 +265,7 @@ public class TkUserController extends AbstractUserAccount { | @@ -265,7 +265,7 @@ public class TkUserController extends AbstractUserAccount { | ||
265 | throw handleException(e); | 265 | throw handleException(e); |
266 | } | 266 | } |
267 | UserDTO result = | 267 | UserDTO result = |
268 | - userService.saveTenantAdmin( | 268 | + userService.saveTenantAdmin( |
269 | userDTO, getCurrentUser().isPtSysadmin(), tenantId.getId().toString()); | 269 | userDTO, getCurrentUser().isPtSysadmin(), tenantId.getId().toString()); |
270 | 270 | ||
271 | userService.updateTenantAdminUserCredentials( | 271 | userService.updateTenantAdminUserCredentials( |
@@ -352,7 +352,8 @@ public class TkUserController extends AbstractUserAccount { | @@ -352,7 +352,8 @@ public class TkUserController extends AbstractUserAccount { | ||
352 | userService.getMyCustomers( | 352 | userService.getMyCustomers( |
353 | organizationId, | 353 | organizationId, |
354 | getCurrentUser().getCurrentTenantId(), | 354 | getCurrentUser().getCurrentTenantId(), |
355 | - getCurrentUser().isPtTenantAdmin())); | 355 | + getCurrentUser().isPtTenantAdmin(), |
356 | + getCurrentUser().isPtCommonTenant())); | ||
356 | } | 357 | } |
357 | 358 | ||
358 | @PostMapping("/reset_password/{userId}") | 359 | @PostMapping("/reset_password/{userId}") |
@@ -285,6 +285,7 @@ public class SysRoleServiceImpl extends AbstractBaseService<RoleMapper, SysRoleE | @@ -285,6 +285,7 @@ public class SysRoleServiceImpl extends AbstractBaseService<RoleMapper, SysRoleE | ||
285 | .collect(Collectors.toList()); | 285 | .collect(Collectors.toList()); |
286 | roleDTO.setRoleIds(roleIds.toArray(new String[roleIds.size()])); | 286 | roleDTO.setRoleIds(roleIds.toArray(new String[roleIds.size()])); |
287 | } | 287 | } |
288 | + | ||
288 | return baseMapper.findRoleInfo(roleDTO); | 289 | return baseMapper.findRoleInfo(roleDTO); |
289 | } | 290 | } |
290 | 291 |
@@ -462,15 +462,19 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE | @@ -462,15 +462,19 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE | ||
462 | throw new TkDataValidationException("用户已存在"); | 462 | throw new TkDataValidationException("用户已存在"); |
463 | } | 463 | } |
464 | baseMapper.insert(user); | 464 | baseMapper.insert(user); |
465 | - //查询租户的角色 | ||
466 | - List<SysTenantRoleEntity> tenantRoleList = validateTenantRole(userDTO.getTenantId()); | ||
467 | - for (SysTenantRoleEntity tenantRole : tenantRoleList) { | ||
468 | - roleMapper.saveUserRoleMapping(user.getId(), tenantRole.getRoleId()); | ||
469 | - } | ||
470 | - // 如果为普通租户绑定用户和组织的关系 | 465 | + // 如果为普通租户绑定用户和组织的关系和角色 |
471 | if(null!=user.getLevel()&&user.getLevel()==FastIotConstants.LevelValue.IS_CUSTOMER_TENANT){ | 466 | if(null!=user.getLevel()&&user.getLevel()==FastIotConstants.LevelValue.IS_CUSTOMER_TENANT){ |
472 | organizationService.bindUserToOrganization( | 467 | organizationService.bindUserToOrganization( |
473 | tenantId, user.getId(), userDTO.getOrganizationIds()); | 468 | tenantId, user.getId(), userDTO.getOrganizationIds()); |
469 | + for (String tenantRole : userDTO.getRoleIds()) { | ||
470 | + roleMapper.saveUserRoleMapping(user.getId(), tenantRole); | ||
471 | + } | ||
472 | + }else{ | ||
473 | + //查询租户的角色 | ||
474 | + List<SysTenantRoleEntity> tenantRoleList = validateTenantRole(userDTO.getTenantId()); | ||
475 | + for (SysTenantRoleEntity tenantRole : tenantRoleList) { | ||
476 | + roleMapper.saveUserRoleMapping(user.getId(), tenantRole.getRoleId()); | ||
477 | + } | ||
474 | } | 478 | } |
475 | 479 | ||
476 | user.copyToDTO(userDTO, PASSWORD, ACTIVATE_TOKEN); | 480 | user.copyToDTO(userDTO, PASSWORD, ACTIVATE_TOKEN); |
@@ -677,11 +681,11 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE | @@ -677,11 +681,11 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE | ||
677 | 681 | ||
678 | @Override | 682 | @Override |
679 | public List<UserDTO> getMyCustomers( | 683 | public List<UserDTO> getMyCustomers( |
680 | - String organizationId, String tenantId, boolean isTenantAdmin) { | 684 | + String organizationId, String tenantId, boolean isTenantAdmin,boolean isPtCommonTenant) { |
681 | if (StringUtils.isEmpty(organizationId)) { | 685 | if (StringUtils.isEmpty(organizationId)) { |
682 | throw new TkDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); | 686 | throw new TkDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); |
683 | } | 687 | } |
684 | - if (isTenantAdmin) { | 688 | + if (isTenantAdmin||isPtCommonTenant) { |
685 | List<String> userList = | 689 | List<String> userList = |
686 | userOrganizationMappingService.getUserIdByOrganizationIds(tenantId, OrganizationEnum.UP, organizationId); | 690 | userOrganizationMappingService.getUserIdByOrganizationIds(tenantId, OrganizationEnum.UP, organizationId); |
687 | if (null != userList && userList.size() > FastIotConstants.MagicNumber.ZERO) { | 691 | if (null != userList && userList.size() > FastIotConstants.MagicNumber.ZERO) { |
@@ -121,12 +121,6 @@ public class TkHomePageServiceImpl implements HomePageService { | @@ -121,12 +121,6 @@ public class TkHomePageServiceImpl implements HomePageService { | ||
121 | //查询所有组织id | 121 | //查询所有组织id |
122 | orgIds = organizationService.currentUserOrganizationAllIds(currentUserId); | 122 | orgIds = organizationService.currentUserOrganizationAllIds(currentUserId); |
123 | queryMap.put("organizationIds",orgIds); | 123 | queryMap.put("organizationIds",orgIds); |
124 | - //查询所有设备 | ||
125 | - List<DeviceDTO> devices = deviceMapper.findDevicesByDeviceTypeAndOrganizationId(orgIds,null, | ||
126 | - null,null,null); | ||
127 | - List<String> finalTbDevices = new ArrayList<>(); | ||
128 | - devices.forEach(item -> finalTbDevices.add(item.getId())); | ||
129 | - tbDevices = finalTbDevices; | ||
130 | alarmList = deviceMapper.findDeviceAlarmInfoByCustomer(startTs, null,orgIds); | 124 | alarmList = deviceMapper.findDeviceAlarmInfoByCustomer(startTs, null,orgIds); |
131 | }else{ | 125 | }else{ |
132 | customerId = userMapper.findCustomerIdByUserId(currentUserId); | 126 | customerId = userMapper.findCustomerIdByUserId(currentUserId); |
@@ -136,10 +130,10 @@ public class TkHomePageServiceImpl implements HomePageService { | @@ -136,10 +130,10 @@ public class TkHomePageServiceImpl implements HomePageService { | ||
136 | tbDevices = deviceMapper.findDeviceIdsByCustomerId(customerId); | 130 | tbDevices = deviceMapper.findDeviceIdsByCustomerId(customerId); |
137 | } | 131 | } |
138 | alarmList = deviceMapper.findDeviceAlarmInfoByCustomer(startTs, customerId,null); | 132 | alarmList = deviceMapper.findDeviceAlarmInfoByCustomer(startTs, customerId,null); |
139 | - } | ||
140 | - for (String devId : tbDevices) { | ||
141 | - setCustomerMessageInfo( | ||
142 | - todayBegin, todayEnd, currentTenantId, DeviceId.fromString(devId), messageInfo); | 133 | + for (String devId : tbDevices) { |
134 | + setCustomerMessageInfo( | ||
135 | + todayBegin, todayEnd, currentTenantId, DeviceId.fromString(devId), messageInfo); | ||
136 | + } | ||
143 | } | 137 | } |
144 | if (alarmList.size() > zero) { | 138 | if (alarmList.size() > zero) { |
145 | BaseHomePageTop baseHomePageTop = alarmList.get(0); | 139 | BaseHomePageTop baseHomePageTop = alarmList.get(0); |
@@ -54,6 +54,18 @@ public class TkTaskCenterServiceImpl | @@ -54,6 +54,18 @@ public class TkTaskCenterServiceImpl | ||
54 | IPage<TkTaskCenterEntity> page = | 54 | IPage<TkTaskCenterEntity> page = |
55 | getPage(queryMap, FastIotConstants.DefaultOrder.CREATE_TIME, false); | 55 | getPage(queryMap, FastIotConstants.DefaultOrder.CREATE_TIME, false); |
56 | IPage<TkTaskCenterDTO> iPage = baseMapper.getPageData(page, queryMap); | 56 | IPage<TkTaskCenterDTO> iPage = baseMapper.getPageData(page, queryMap); |
57 | + List<String> orgIds = (List<String>) queryMap.get("orgIds"); | ||
58 | + if(null!=orgIds&&!iPage.getRecords().isEmpty()){ | ||
59 | + List<TkTaskCenterDTO> list = new ArrayList<>(); | ||
60 | + iPage.getRecords().stream().forEach(dto->{ | ||
61 | + orgIds.forEach(orgId-> { | ||
62 | + if(dto.getExecuteTarget().getOrganizationId().equals(orgId)){ | ||
63 | + list.add(dto); | ||
64 | + } | ||
65 | + }); | ||
66 | + }); | ||
67 | + iPage.setRecords(list); | ||
68 | + } | ||
57 | if (!iPage.getRecords().isEmpty()) { | 69 | if (!iPage.getRecords().isEmpty()) { |
58 | iPage.setRecords( | 70 | iPage.setRecords( |
59 | iPage.getRecords().stream() | 71 | iPage.getRecords().stream() |
@@ -126,7 +126,7 @@ public interface TkUserService { | @@ -126,7 +126,7 @@ public interface TkUserService { | ||
126 | * @param isTenantAdmin 是否是租户管理员 | 126 | * @param isTenantAdmin 是否是租户管理员 |
127 | * @return 租户创建的所有用户 | 127 | * @return 租户创建的所有用户 |
128 | */ | 128 | */ |
129 | - List<UserDTO> getMyCustomers(String organizationId, String tenantId, boolean isTenantAdmin); | 129 | + List<UserDTO> getMyCustomers(String organizationId, String tenantId, boolean isTenantAdmin,boolean isPtCommonTenant); |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * 异步获取用户列表 | 132 | * 异步获取用户列表 |
@@ -37,16 +37,10 @@ | @@ -37,16 +37,10 @@ | ||
37 | <if test="queryMap.tbDeviceId !=null and queryMap.tbDeviceId !=''"> | 37 | <if test="queryMap.tbDeviceId !=null and queryMap.tbDeviceId !=''"> |
38 | ,tdc.allow_state,tdc.task_center_id,tdc.tb_device_id | 38 | ,tdc.allow_state,tdc.task_center_id,tdc.tb_device_id |
39 | </if> | 39 | </if> |
40 | - <if test="queryMap.tbDeviceIds !=null and queryMap.tbDeviceIds !=''"> | ||
41 | - ,tdc.allow_state,tdc.task_center_id,tdc.tb_device_id | ||
42 | - </if> | ||
43 | FROM tk_task_center tc | 40 | FROM tk_task_center tc |
44 | <if test="queryMap.tbDeviceId !=null and queryMap.tbDeviceId !=''"> | 41 | <if test="queryMap.tbDeviceId !=null and queryMap.tbDeviceId !=''"> |
45 | LEFT JOIN tk_device_task_center tdc ON tc.id = tdc.task_center_id | 42 | LEFT JOIN tk_device_task_center tdc ON tc.id = tdc.task_center_id |
46 | </if> | 43 | </if> |
47 | - <if test="queryMap.tbDeviceIds !=null and queryMap.tbDeviceIds !=''"> | ||
48 | - LEFT JOIN tk_device_task_center tdc ON tc.id = tdc.task_center_id | ||
49 | - </if> | ||
50 | <where> | 44 | <where> |
51 | <if test="queryMap.tenantId !=null and queryMap.tenantId !=''"> | 45 | <if test="queryMap.tenantId !=null and queryMap.tenantId !=''"> |
52 | AND tc.tenant_id = #{queryMap.tenantId} | 46 | AND tc.tenant_id = #{queryMap.tenantId} |
@@ -60,12 +54,6 @@ | @@ -60,12 +54,6 @@ | ||
60 | <if test="queryMap.tbDeviceId !=null and queryMap.tbDeviceId !=''"> | 54 | <if test="queryMap.tbDeviceId !=null and queryMap.tbDeviceId !=''"> |
61 | AND tdc.tb_device_id = #{queryMap.tbDeviceId} | 55 | AND tdc.tb_device_id = #{queryMap.tbDeviceId} |
62 | </if> | 56 | </if> |
63 | - <if test="queryMap.tbDeviceIds !=null and queryMap.tbDeviceIds !=''"> | ||
64 | - AND tdc.tb_device_id IN | ||
65 | - <foreach collection="queryMap.tbDeviceIds" item="tbDeviceId" open="(" separator="," close=")"> | ||
66 | - #{tbDeviceId} | ||
67 | - </foreach> | ||
68 | - </if> | ||
69 | </where> | 57 | </where> |
70 | </select> | 58 | </select> |
71 | </mapper> | 59 | </mapper> |