zhubaomin
2025-04-11 a1744d0bf7f0ad8ac861d672cffd7c710dac4e7e
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?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.dy.pipIrrGlobal.daoSe.SeClientTempMapper">
  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeClientTemp">
    <!--@mbg.generated-->
    <!--@Table se_client_temp-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="town" jdbcType="VARCHAR" property="town" />
    <result column="village" jdbcType="VARCHAR" property="village" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="idCard" jdbcType="VARCHAR" property="idcard" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="address" jdbcType="VARCHAR" property="address" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, town, village, `name`, idCard, phone, address
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select 
    <include refid="Base_Column_List" />
    from se_client_temp
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--@mbg.generated-->
    delete from se_client_temp
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into se_client_temp (town, village, `name`, 
      idCard, phone, address
      )
    values (#{town,jdbcType=VARCHAR}, #{village,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
      #{idcard,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into se_client_temp
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="town != null">
        town,
      </if>
      <if test="village != null">
        village,
      </if>
      <if test="name != null">
        `name`,
      </if>
      <if test="idcard != null">
        idCard,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="address != null">
        address,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="town != null">
        #{town,jdbcType=VARCHAR},
      </if>
      <if test="village != null">
        #{village,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="idcard != null">
        #{idcard,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp">
    <!--@mbg.generated-->
    update se_client_temp
    <set>
      <if test="town != null">
        town = #{town,jdbcType=VARCHAR},
      </if>
      <if test="village != null">
        village = #{village,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="idcard != null">
        idCard = #{idcard,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp">
    <!--@mbg.generated-->
    update se_client_temp
    set town = #{town,jdbcType=VARCHAR},
      village = #{village,jdbcType=VARCHAR},
      `name` = #{name,jdbcType=VARCHAR},
      idCard = #{idcard,jdbcType=VARCHAR},
      phone = #{phone,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
 
  <!--根据镇名获取农户-->
  <select id="getClientsByTownName" resultType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp">
    SELECT * FROM se_client_temp WHERE town = #{townName}
  </select>
</mapper>