@Query(nativeQuery =true, value ="select A.* "+"from epidemic_case_info A where A.delete_flag = '0' "+"and (case "+"when right(:distCode, 4) = '0000' then A.dist_code like concat(substring(:distCode, 1, 2 ), '%') "+"when right(:distCode, 2) = '00' then A.dist_code like concat(substring(:distCode, 1, 4 ), '%') "+"else A.dist_code = :distCode end) "+"and A.report_time >= :startDate and A.report_time <= :endDate "+"and (case when :name is not null and :name != '' then A.name = :name else 1 = 1 end) ")List<EpidemicCaseInfoPO>caseArea(@Param("distCode")String distCode,@Param("startDate")String startDate,@Param("endDate")String endDate,@Param("name")String name);
根据经纬度距离查询
@Query(nativeQuery =true, value =""+"select * from (select round(ST_Distance"+"(ST_Transform(ST_SetSRID(ST_MakePoint(:longitude,:latitude),4326),3857)"+", ST_Transform(ST_SetSRID(ST_MakePoint(longitude\\:\\:float,latitude\\:\\:float),4326),3857))\\:\\:numeric, 2) as distance"+",t.* from task_emer.task_storehouse_info t "+"where t.longitude is not null and t.longitude != '' and t.latitude is not null and t.latitude != ''"+" AND case when :storehouseName is not null and :storehouseName != '' then t.name like concat('%', :storehouseName, '%') else 1 = 1 end "+" AND case when :type is not null and :type != '' then t.type = :type else 1 = 1 end "+") x where x.distance < :range "+"ORDER BY x.distance ")List<TaskStorehouseInfoPO>findTaskStorehouseByRange(@Param("longitude")float longitude,@Param("latitude")float latitude,@Param("range")float range,@Param("storehouseName")String storehouseName,@Param("type")String type);
本质:Still need to polish this. 底层逻辑:Still need to polish this.See you pretty soon. Reference
【时空序列预测】什么是时空序列问题?这类问题主要应用了哪些模型?主要应用在哪些领域?_mb62b92582e5a0a的技…
背景
使用mysql命令连接mysql服务器时,报ERROR 2002 (HY000): Cant connect to local Mysql server through socket /tmp/mysql.sock
排查
1、ps -ef|grep mysqld 查看mysqld的进程是否在,发现mysqld进程在;
2、查看/tmp/mysql.sock文件不…