| | |
| | | stationId=stationIdMax+1; |
| | | } |
| | | fileInfo.setFileId(String.valueOf(fileIdMax+1)); |
| | | count=infoMapper.insert(fileInfo); |
| | | //判断文件已经添加过则不再重复添加 |
| | | int flag=judgeFile(stationId,fileInfo.getFileUrl()); |
| | | if(flag>0){ |
| | | return new FileInfo(); |
| | | }else{ |
| | | count=infoMapper.insert(fileInfo); |
| | | } |
| | | //将解析出来的文件信息插入数据库 |
| | | FileParam fparam=fileInfo.getFileParam(); |
| | | //去除groupinfo |
| | |
| | | mapper.update(null,uwrapper); |
| | | } |
| | | return fileInfo; |
| | | } |
| | | //判断文件已经添加过则不再重复添加 |
| | | public int judgeFile(int stationId,String fileUrl){ |
| | | int flag=0; |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("station_id",stationId); |
| | | wrapper.eq("file_url",fileUrl); |
| | | FileInfo fileInfo=infoMapper.selectOne(wrapper); |
| | | if(fileInfo!=null){ |
| | | flag=1; |
| | | } |
| | | return flag; |
| | | } |
| | | //编辑台站 |
| | | public Response updateStation(String stationName1, String stationName2, String stationName3, String updateName) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |