swb
2024-07-05 74bf71f3ad49ed5fe67e942c88b68a9354b87972
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.moral.api.mapper.ManageCoordinateDetailMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.moral.api.entity.ManageCoordinateDetail">
        <id column="id" property="id" />
        <result column="coordinate_id" property="coordinateId" />
        <result column="longitude" property="longitude" />
        <result column="latitude" property="latitude" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="update_user_id" property="updateUserId" />
        <result column="updaye_user_name" property="updayeUserName" />
    </resultMap>
 
 
    <select id="selectCoordinate" resultType="com.moral.api.entity.ManageCoordinate">
        SELECT * FROM manage_coordinate WHERE  is_del =0
    </select>
 
    <select id="getCruiserInfo" resultType="com.moral.api.entity.CruiserDTO">
        select  DATE_FORMAT(`time`, #{dateFormat}) AS time,value ->>'$.flylat' as flyLat,value ->>'$.flylon' as flyLon
        from history_second_cruiser
        WHERE
        `time` <![CDATA[>=]]> #{startTime}
        AND `time` <![CDATA[<=]]> #{endTime}
        order by time
    </select>
 
    <select id="CompareTo" resultType="com.moral.api.entity.DustldDTO">
        SELECT
            mc.start_point as name ,
            md.longitude as flyLon,
            md.latitude as  flyLat
        FROM
            manage_coordinate AS mc
                LEFT JOIN manage_coordinate_detail AS md ON mc.coordinate_id = md.coordinate_id
        WHERE
            mc.is_del =0
          and mc.organization_id=#{orgId}
    </select>
 
</mapper>