临时提交

This commit is contained in:
648540858
2024-08-23 11:25:45 +08:00
parent ae0235c0f8
commit 5169eb66a3
9 changed files with 39 additions and 30 deletions

View File

@@ -343,7 +343,7 @@ public interface CommonGBChannelMapper {
@Select("<script>" +
" select " +
" concat('channel_', id) as tree_id," +
" id," +
" coalesce(gb_device_id, device_id) as device_id," +
" coalesce(gb_name, name) as name, " +
" coalesce(gb_parent_id, parent_id) as parent_device_id, " +

View File

@@ -62,8 +62,7 @@ public interface GroupMapper {
@Select(" <script>" +
" SELECT " +
" *," +
" concat('group_', id) as tree_id," +
" * , " +
" 0 as type," +
" false as is_leaf" +
" from wvp_common_group " +
@@ -76,8 +75,7 @@ public interface GroupMapper {
@Select(" <script>" +
" SELECT " +
" concat('group_', id) as tree_id," +
" *, " +
" * , " +
" 0 as type," +
" false as is_leaf" +
" from wvp_common_group " +
@@ -90,7 +88,6 @@ public interface GroupMapper {
@Select(" <script>" +
" SELECT " +
" *," +
" concat('group_', id) as tree_id," +
" 0 as type," +
" false as is_leaf" +
" from wvp_common_group " +
@@ -119,7 +116,7 @@ public interface GroupMapper {
@Update(" UPDATE wvp_common_group " +
" SET parent_device_id=#{group.deviceId}, business_group = #{group.businessGroup}" +
" WHERE parentId = #{parentId}")
" WHERE parent_id = #{parentId}")
int updateChild(@Param("parentId") Integer parentId, Group group);
@Select(" <script>" +

View File

@@ -140,6 +140,24 @@ public class ChannelProvider {
}
public String queryByGbDeviceIds(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(getBaseSelectSql());
sqlBuild.append("where device_db_id in ( ");
Collection<Integer> ids = (Collection<Integer>)params.get("deviceIds");
boolean first = true;
for (Integer id : ids) {
if (!first) {
sqlBuild.append(",");
}
sqlBuild.append(id);
first = false;
}
sqlBuild.append(" )");
return sqlBuild.toString() ;
}
public String queryByDeviceIds(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(getBaseSelectSql());
sqlBuild.append("where id in ( ");