AccountGzhMapper.xml
1.67 KB
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
<?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="cn.runsa.crmapp.common.mapper.AccountGzhMapper">
<resultMap id="BaseResultMap" type="cn.runsa.crmapp.common.entity.AccountGzh">
<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. -->
<result column="ACT_ID" property="actId" jdbcType="BIGINT" />
<result column="GZH_ID" property="gzhId" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="cn.runsa.crmapp.common.entity.AccountGzh">
<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. -->
insert into crm_account_set_wxgzh (`ACT_ID`, `GZH_ID`)
values (#{actId,jdbcType=BIGINT}, #{gzhId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="cn.runsa.crmapp.common.entity.AccountGzh">
<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. -->
insert into crm_account_set_wxgzh
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="actId != null">
`ACT_ID`,
</if>
<if test="gzhId != null">
`GZH_ID`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="actId != null">
#{actId,jdbcType=BIGINT},
</if>
<if test="gzhId != null">
#{gzhId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="selectByGzh" resultMap="BaseResultMap">
SELECT g.`ACT_ID`,w.`GZH_ID` FROM crm_site_group g INNER JOIN crm_site_group_wxgzh w ON g.`GRP_ID` = w.`GRP_ID` WHERE w.`GZH_ID` = #{0} LIMIT 0,1
</select>
</mapper>