| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?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.ydtech.modules.admin.dao.SysQRCodeRelationMapper">
- <resultMap id="sysQRCodeRelationMap" type="com.ydtech.modules.admin.model.SysQRCodeRelation">
- <id column="id" jdbcType="INTEGER" property="id"/>
- <result column="api_type" jdbcType="INTEGER" property="apiType"/>
- <result column="ins_company_id" jdbcType="VARCHAR" property="insCompanyId"/>
- <result column="ins_company_name" jdbcType="VARCHAR" property="insCompanyName"/>
- <result column="qr_code_type" jdbcType="INTEGER" property="qrCodeType"/>
- <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="last_update_by" jdbcType="VARCHAR" property="lastUpdateBy"/>
- <result column="last_update_time" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
- </resultMap>
- <sql id="Base_Column_List">
- id, api_type, ins_company_id, ins_company_name, qr_code_type,create_by,create_time,last_update_by,last_update_time
- </sql>
- <insert id="insert" parameterType="com.ydtech.modules.admin.model.SysQRCodeRelation">
- insert into sys_qr_code_relation(api_type, ins_company_id, ins_company_name, qr_code_type,create_by,create_time,
- last_update_by,last_update_time)
- values (#{apiType},#{insCompanyId},#{insCompanyName},#{qrCodeType},#{createBy},current_timestamp,
- #{lastUpdateBy},current_timestamp)
- </insert>
- <update id="updateById" parameterType="com.ydtech.modules.admin.model.SysQRCodeRelation">
- update sys_qr_code_relation set api_type = #{et.apiType},ins_company_id = #{et.insCompanyId},
- ins_company_name = #{et.insCompanyName},qr_code_type = #{et.qrCodeType},
- last_update_by = #{et.lastUpdateBy}, last_update_time = current_timestamp
- where id = #{et.id}
- </update>
- <select id="selectByMap" resultMap="sysQRCodeRelationMap">
- select <include refid="Base_Column_List"/> from sys_qr_code_relation
- <where>
- <if test="cm.apiType != null ">
- and api_type = #{cm.apiType}
- </if>
- <if test="cm.insCompanyId != null ">
- and ins_company_id = #{cm.insCompanyId}
- </if>
- <if test="cm.insCompanyName != null ">
- and ins_company_name = #{cm.insCompanyName}
- </if>
- <if test="cm.qrCodeType != null ">
- and qr_code_type = #{cm.qrCodeType}
- </if>
- </where>
- </select>
- <delete id="deleteById">
- delete from sys_qr_code_relation where id = #{id}
- </delete>
- <select id="getQRCodeType" resultType="java.lang.Integer">
- select qr_code_type
- from sys_qr_code_relation
- where api_type = #{apiType} and ins_company_id = #{insCompanyId} and ins_company_name = #{insCompanyName}
- </select>
- </mapper>
|