GuiderQrcodeMapper.xml
1.88 KB
<?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.customer.mapper.GuiderQrcodeMapper" >
<resultMap id="BaseResultMap" type="cn.runsa.crmapp.customer.entity.GuiderQrcode" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="GID_ID" property="gidId" jdbcType="VARCHAR" />
<result column="GZH_ID" property="gzhId" jdbcType="VARCHAR" />
<result column="QRCODE" property="qrcode" jdbcType="VARCHAR" />
<result column="VALID_TIME" property="validTime" jdbcType="TIMESTAMP" />
<result column="REC_TIME" property="recTime" jdbcType="TIMESTAMP" />
</resultMap>
<insert id="insert" parameterType="cn.runsa.crmapp.customer.entity.GuiderQrcode" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into crm_guider_qrcode (`GID_ID`, `GZH_ID`, `QRCODE`,
`VALID_TIME`, `REC_TIME`)
values (#{gidId,jdbcType=VARCHAR}, #{gzhId,jdbcType=VARCHAR}, #{qrcode,jdbcType=VARCHAR},
#{validTime,jdbcType=TIMESTAMP}, #{recTime,jdbcType=TIMESTAMP})
ON DUPLICATE KEY UPDATE `QRCODE` = #{qrcode,jdbcType=VARCHAR},
`VALID_TIME` = #{validTime,jdbcType=TIMESTAMP},`REC_TIME` = #{recTime,jdbcType=TIMESTAMP}
</insert>
<select id="selectMore" parameterType="String" resultMap="BaseResultMap">
select GID_ID,GZH_ID,QRCODE,VALID_TIME,REC_TIME from crm_guider_qrcode where GID_ID = #{gidId,jdbcType=VARCHAR}
</select>
<select id="getGzhBySiteId" parameterType="Integer" resultType="String">
select GZH_ID from crm_site_group_wxgzh where GRP_ID in(
select GRP_ID from crm_account_set_site where SIT_ID = #{siteId,jdbcType=INTEGER} group by GRP_ID)
</select>
</mapper>