1、修改因为合并代码出现的基础设施-视频资源,点击左侧树报错的问题,原因是sql语句去组织cache表中查询了

This commit is contained in:
yitonglei 2022-08-02 09:23:13 +08:00
parent ca9133004a
commit 95eb94f885
3 changed files with 8 additions and 2 deletions

View File

@ -25,9 +25,11 @@ public interface CameraOrgenizationMapper extends BaseDao<CameraOrganization> {
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 selectOrgenizationCacheById(@Param("id") String 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);

View File

@ -1251,7 +1251,7 @@ public class MonitorService {
//更新组织的path
public void setOrganizationPath(Map map ,String parentId){
Map map2 = cameraOrgenMapper.selectOrgenizationById(parentId);
Map map2 = cameraOrgenMapper.selectOrgenizationCacheById(parentId);
if(map2 != null){
String path = map2.get("name").toString();
String newNodeName = path + "->" + (map.get("path")==null?"":map.get("path").toString());

View File

@ -65,4 +65,8 @@
)
SELECT id,name,parent_id,sort,subCount,is_parent,path,is_root,channelCount,count FROM t_camera_organization_cache
</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>