<?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.nova.sankuai.infra.mapper.UnionloginRelayMapper">
|
<resultMap id="BaseResultMap" type="com.nova.sankuai.domain.entity.UnionloginRelay">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
-->
|
<id column="id" jdbcType="INTEGER" property="id" />
|
<result column="channel_code_pattern" jdbcType="VARCHAR" property="channelCodePattern" />
|
<result column="app_id" jdbcType="VARCHAR" property="appId" />
|
<result column="app_id_out" jdbcType="VARCHAR" property="appIdOut" />
|
<result column="dist_url" jdbcType="VARCHAR" property="distUrl" />
|
<result column="public_key" jdbcType="VARCHAR" property="publicKey" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="enable" jdbcType="INTEGER" property="enable" />
|
</resultMap>
|
<sql id="Base_Column_List">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
-->
|
id, channel_code_pattern, app_id, app_id_out, dist_url, public_key, create_time,
|
update_time, enable
|
</sql>
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
-->
|
select
|
<include refid="Base_Column_List" />
|
from unionlogin_relay
|
where id = #{id,jdbcType=INTEGER}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
-->
|
delete from unionlogin_relay
|
where id = #{id,jdbcType=INTEGER}
|
</delete>
|
<insert id="insert" parameterType="com.nova.sankuai.domain.entity.UnionloginRelay">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
-->
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
SELECT LAST_INSERT_ID()
|
</selectKey>
|
insert into unionlogin_relay (channel_code_pattern, app_id, app_id_out,
|
dist_url, public_key, create_time,
|
update_time, enable)
|
values (#{channelCodePattern,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, #{appIdOut,jdbcType=VARCHAR},
|
#{distUrl,jdbcType=VARCHAR}, #{publicKey,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
#{updateTime,jdbcType=TIMESTAMP}, #{enable})
|
</insert>
|
<insert id="insertSelective" parameterType="com.nova.sankuai.domain.entity.UnionloginRelay">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
-->
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
SELECT LAST_INSERT_ID()
|
</selectKey>
|
insert into unionlogin_relay
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="channelCodePattern != null">
|
channel_code_pattern,
|
</if>
|
<if test="appId != null">
|
app_id,
|
</if>
|
<if test="appIdOut != null">
|
app_id_out,
|
</if>
|
<if test="distUrl != null">
|
dist_url,
|
</if>
|
<if test="publicKey != null">
|
public_key,
|
</if>
|
<if test="createTime != null">
|
create_time,
|
</if>
|
<if test="updateTime != null">
|
update_time,
|
</if>
|
<if test="enable != null">
|
enable,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="channelCodePattern != null">
|
#{channelCodePattern,jdbcType=VARCHAR},
|
</if>
|
<if test="appId != null">
|
#{appId,jdbcType=VARCHAR},
|
</if>
|
<if test="appIdOut != null">
|
#{appIdOut,jdbcType=VARCHAR},
|
</if>
|
<if test="distUrl != null">
|
#{distUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="publicKey != null">
|
#{publicKey,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null">
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="enable != null">
|
#{enable},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.nova.sankuai.domain.entity.UnionloginRelay">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
-->
|
update unionlogin_relay
|
<set>
|
<if test="channelCodePattern != null">
|
channel_code_pattern = #{channelCodePattern,jdbcType=VARCHAR},
|
</if>
|
<if test="appId != null">
|
app_id = #{appId,jdbcType=VARCHAR},
|
</if>
|
<if test="appIdOut != null">
|
app_id_out = #{appIdOut,jdbcType=VARCHAR},
|
</if>
|
<if test="distUrl != null">
|
dist_url = #{distUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="publicKey != null">
|
public_key = #{publicKey,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null">
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="enable != null">
|
enable = #{enable},
|
</if>
|
</set>
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.nova.sankuai.domain.entity.UnionloginRelay">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
-->
|
update unionlogin_relay
|
set channel_code_pattern = #{channelCodePattern,jdbcType=VARCHAR},
|
app_id = #{appId,jdbcType=VARCHAR},
|
app_id_out = #{appIdOut,jdbcType=VARCHAR},
|
dist_url = #{distUrl,jdbcType=VARCHAR},
|
public_key = #{publicKey,jdbcType=VARCHAR},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
enable = #{enable}
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
<select id="selectByAppId" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from unionlogin_relay
|
where app_id = #{appId}
|
</select>
|
</mapper>
|