nnnjjj123
2021-01-28 71b6b716361c52af290493d365a328fc1a3467e2
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
<?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.visitrecord.mapper.VisitrecordMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="visitrecordResultMap" type="org.springblade.modules.visitrecord.entity.Visitrecord">
        <id column="id" property="id"/>
        <result column="snumber" property="snumber"/>
        <result column="sname" property="sname"/>
        <result column="vistime" property="vistime"/>
        <result column="ynumber" property="ynumber"/>
        <result column="yname" property="yname"/>
        <result column="phone" property="phone"/>
        <result column="address" property="address"/>
        <result column="type" property="type"/>
        <result column="dj" property="dj"/>
        <result column="information" property="information"/>
        <result column="coordinate" property="coordinate"/>
        <result column="remark" property="remark"/>
    </resultMap>
 
 
    <select id="selectVisitrecordPage" resultMap="visitrecordResultMap">
        select * from sys_visitrecord where is_deleted = 0
    </select>
 
<!--拜访记录新增-->
    <insert id="s">
       INSERT INTO sys_visitrecord (snumber,sname,vistime,ynumber,yname,phone,address,type,dj,information,coordinate,remark)
       VALUES (#{snumber},#{sname},#{vistime},#{ynumber},#{yname},#{phone},#{address},#{type},#{dj},#{information},#{coordinate},#{remark})
    </insert>
 
 
<!--拜访记录修改-->
    <update id="updatet">
 update sys_visitrecord SET #{snumber},#{sname},#{vistime},#{ynumber},#{yname},#{phone},#{address},#{type},#{dj},#{information},#{coordinate},#{remark} where id=#{id}
</update>
 
    <!--拜访记录查看-->
    <select id="selectInfo" resultMap="visitrecordResultMap">
        select id,snumber,sname,vistime,ynumber,yname,phone,address,type,dj,information,ST_ASTEXT(coordinate) as coordinate,remark from sys_visitrecord where ynumber=#{number}
    </select>
</mapper>