nnnjjj123
2021-01-06 3b67e70f41bac39d1d74d2039a2fb286a32a8d41
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
45
46
47
48
49
<?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="org.springblade.modules.routeIn.mapper.RouteinMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="routeinResultMap" type="org.springblade.modules.routeIn.entity.Routein">
        <id column="id" property="id"/>
        <result column="routeName" property="routeName"/>
        <result column="regionId" property="regionId"/>
        <result column="routeInfo" property="routeInfo"/>
        <result column="rTime" property="rTime"/>
        <result column="creatName" property="creatName"/>
        <result column="remarks" property="remarks"/>
    </resultMap>
 
    <resultMap id="routeinResultMaps" type="org.springblade.modules.routeIn.vo.RouteinVO">
        <id column="id" property="id"/>
        <result column="routeName" property="routeName"/>
        <result column="regionId" property="regionId"/>
        <result column="routeInfo" property="routeInfo"/>
        <result column="rTime" property="rTime"/>
        <result column="creatName" property="creatName"/>
        <result column="remarks" property="remarks"/>
    </resultMap>
 
 
    <select id="selectRouteinPage" resultMap="routeinResultMap">
        select * from sys_routein where is_deleted = 0
    </select>
 
 
    <insert id="insertlx" useGeneratedKeys="true" keyProperty="id" parameterType="org.springblade.modules.routeIn.entity.Routein">
    INSERT INTO sys_routein (routeName,regionId,routeInfo,rTime,creatName,remarks) VALUES (#{routeName},#{regionId},ST_GeomFromText(${routeInfo}),#{rTime},#{creatName},#{remarks});
</insert>
 
 
 
    <update id="updatelx">
        update sys_routein SET routeName=#{routeName},regionId=#{regionId},routeInfo=ST_GeomFromText(${a}),rTime=#{rTime},creatName=#{creatName},remarks=#{remarks} where id=#{id}
    </update>
 
    <select id="selectList" resultMap="routeinResultMaps">
        SELECT r.id,r.routeName,r.regionId,ST_ASTEXT ( r.routeInfo ) AS routeInfo,r.rTime,r.creatName,r.remarks,d.sname FROM sys_routein r  LEFT JOIN act_duty d on d.rid=r.id where 1=1
        <if test="routeName!=null and routeName!=''">
            and r.routeName  like '%${routeName}%'
        </if>
    </select>
 
</mapper>