1、修改因为合并代码出现的基础设施-视频资源,点击左侧树报错的问题,原因是sql语句去组织cache表中查询了
This commit is contained in:
parent
ca9133004a
commit
95eb94f885
|
@ -25,9 +25,11 @@ public interface CameraOrgenizationMapper extends BaseDao<CameraOrganization> {
|
||||||
|
|
||||||
void batchSaveOrgenization(List<Map> list);
|
void batchSaveOrgenization(List<Map> list);
|
||||||
|
|
||||||
@Select("SELECT name,parent_id,id,path FROM t_camera_organization_cache WHERE id = #{id}")
|
@Select("SELECT name,parent_id,id,path FROM t_camera_organization WHERE id = #{id}")
|
||||||
Map selectOrgenizationById(@Param("id") String id);
|
Map selectOrgenizationById(@Param("id") String id);
|
||||||
|
|
||||||
|
Map selectOrgenizationCacheById(@Param("id") String id);
|
||||||
|
|
||||||
@Update("UPDATE t_camera_organization SET path = TRIM( TRAILING '->' FROM #{path}) where id = #{id}")
|
@Update("UPDATE t_camera_organization SET path = TRIM( TRAILING '->' FROM #{path}) where id = #{id}")
|
||||||
void updateOrganizationPaht(@Param("path") String path,@Param("id") String id);
|
void updateOrganizationPaht(@Param("path") String path,@Param("id") String id);
|
||||||
|
|
||||||
|
|
|
@ -1251,7 +1251,7 @@ public class MonitorService {
|
||||||
|
|
||||||
//更新组织的path
|
//更新组织的path
|
||||||
public void setOrganizationPath(Map map ,String parentId){
|
public void setOrganizationPath(Map map ,String parentId){
|
||||||
Map map2 = cameraOrgenMapper.selectOrgenizationById(parentId);
|
Map map2 = cameraOrgenMapper.selectOrgenizationCacheById(parentId);
|
||||||
if(map2 != null){
|
if(map2 != null){
|
||||||
String path = map2.get("name").toString();
|
String path = map2.get("name").toString();
|
||||||
String newNodeName = path + "->" + (map.get("path")==null?"":map.get("path").toString());
|
String newNodeName = path + "->" + (map.get("path")==null?"":map.get("path").toString());
|
||||||
|
|
|
@ -65,4 +65,8 @@
|
||||||
)
|
)
|
||||||
SELECT id,name,parent_id,sort,subCount,is_parent,path,is_root,channelCount,count FROM t_camera_organization_cache
|
SELECT id,name,parent_id,sort,subCount,is_parent,path,is_root,channelCount,count FROM t_camera_organization_cache
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="selectOrgenizationCacheById" parameterType="java.lang.String" resultType="java.util.Map">
|
||||||
|
SELECT name,parent_id,id,path FROM t_camera_organization_cache WHERE id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue