一公司地图bug修复

liujun-2024-05-23-接口漏洞修复
liujun 2024-04-17 14:22:06 +08:00
parent 086632290b
commit 3dd180d333
2 changed files with 19 additions and 18 deletions

View File

@ -234,12 +234,10 @@ public class MeteorologicalinfoServiceImpl implements MeteorologicalinfoService
pd.put("OUTSOURCED_ID",pd.getString("CORPINFO_ID")); pd.put("OUTSOURCED_ID",pd.getString("CORPINFO_ID"));
List<PageData> getListByCorpinfoId = meteorologicalMapper.listAll(pd); List<PageData> getListByCorpinfoId = meteorologicalMapper.listAll(pd);
if(getListByCorpinfoId.size() > 0){ if(getListByCorpinfoId.size() > 0){
String codes = ""; List<String> codes = new ArrayList<String>();
for (PageData met : getListByCorpinfoId){ for (PageData met : getListByCorpinfoId){
codes += "'" + met.getString("CODE")+"',"; codes.add(met.getString("CODE"));
} }
System.out.println();
codes = codes.substring(0,codes.length()-1);
pd.put("codes",codes); pd.put("codes",codes);
return meteorologicalinfoMapper.listbymeteorologicalByCodes(pd); return meteorologicalinfoMapper.listbymeteorologicalByCodes(pd);
} }

View File

@ -512,22 +512,25 @@
</select> </select>
<select id="listbymeteorologicalByCodes" resultType="pd" parameterType="pd"> <select id="listbymeteorologicalByCodes" resultType="pd" parameterType="pd">
SELECT SELECT
f.TEMPERATURE, f.TEMPERATURE,
f.HUMIDITY, f.HUMIDITY,
f.WINDDIRECTION, f.WINDDIRECTION,
f.WINDSPEED, f.WINDSPEED,
f.ISDELETE, f.ISDELETE,
f.OPERATTIME, f.OPERATTIME,
f.METEOROLOGICAL_ID, f.METEOROLOGICAL_ID,
f.METEOROLOGICALINFO_ID, f.METEOROLOGICALINFO_ID,
f.OPERATOR, f.OPERATOR,
f.CODE f.CODE
FROM FROM
bus_meteorologicalinfo f bus_meteorologicalinfo f
WHERE 1=1 WHERE 1=1
and f.code in ( #{codes}) and f.code in
<foreach item="item" index="index" collection="codes" open="(" separator="," close=")">
#{item}
</foreach>
ORDER BY ORDER BY
f.OPERATTIME DESC f.OPERATTIME DESC
LIMIT 1 ; LIMIT 1
</select> </select>
</mapper> </mapper>