Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangliwen 2022-08-02 09:28:35 +08:00
commit fe7b406f52
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>