临时提交
This commit is contained in:
@@ -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, " +
|
||||
|
||||
@@ -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>" +
|
||||
|
||||
@@ -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 ( ");
|
||||
|
||||
Reference in New Issue
Block a user