<?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.pmsGlobal.daoMp.MpOpenIdMapper">
|
|
<resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoMp.MpOpenId">
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
<result property="openId" column="open_id" jdbcType="VARCHAR"/>
|
<result property="sessionKey" column="session_key" jdbcType="VARCHAR"/>
|
<result property="nickName" column="nick_name" jdbcType="VARCHAR"/>
|
<result property="headImgUrl" column="head_img_url" jdbcType="VARCHAR"/>
|
<result property="phone" column="phone" jdbcType="VARCHAR"/>
|
<result property="gender" column="gender" jdbcType="VARCHAR"/>
|
<result property="province" column="province" jdbcType="VARCHAR"/>
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
id,open_id,session_key,
|
nick_name,head_img_url,phone,
|
gender,province,create_time
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from mp_open_id
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<select id="getInfoByOpenId" parameterType="java.lang.String" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from mp_open_id
|
where open_id = #{open_id,jdbcType=VARCHAR}
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
delete from mp_open_id
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoMp.MpOpenId" useGeneratedKeys="true">
|
insert into mp_open_id
|
( id,open_id,session_key
|
,nick_name,head_img_url,phone
|
,gender,province,create_time
|
)
|
values (#{id,jdbcType=BIGINT},#{openId,jdbcType=VARCHAR},#{sessionKey,jdbcType=VARCHAR}
|
,#{nickName,jdbcType=VARCHAR},#{headImgUrl,jdbcType=VARCHAR},#{phone,jdbcType=VARCHAR}
|
,#{gender,jdbcType=VARCHAR},#{province,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP}
|
)
|
</insert>
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoMp.MpOpenId" useGeneratedKeys="true">
|
insert into mp_open_id
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="openId != null">open_id,</if>
|
<if test="sessionKey != null">session_key,</if>
|
<if test="nickName != null">nick_name,</if>
|
<if test="headImgUrl != null">head_img_url,</if>
|
<if test="phone != null">phone,</if>
|
<if test="gender != null">gender,</if>
|
<if test="province != null">province,</if>
|
<if test="createTime != null">create_time,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="openId != null">#{openId,jdbcType=VARCHAR},</if>
|
<if test="sessionKey != null">#{sessionKey,jdbcType=VARCHAR},</if>
|
<if test="nickName != null">#{nickName,jdbcType=VARCHAR},</if>
|
<if test="headImgUrl != null">#{headImgUrl,jdbcType=VARCHAR},</if>
|
<if test="phone != null">#{phone,jdbcType=VARCHAR},</if>
|
<if test="gender != null">#{gender,jdbcType=VARCHAR},</if>
|
<if test="province != null">#{province,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoMp.MpOpenId">
|
update mp_open_id
|
<set>
|
<if test="openId != null">
|
open_id = #{openId,jdbcType=VARCHAR},
|
</if>
|
<if test="sessionKey != null">
|
session_key = #{sessionKey,jdbcType=VARCHAR},
|
</if>
|
<if test="nickName != null">
|
nick_name = #{nickName,jdbcType=VARCHAR},
|
</if>
|
<if test="headImgUrl != null">
|
head_img_url = #{headImgUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="phone != null">
|
phone = #{phone,jdbcType=VARCHAR},
|
</if>
|
<if test="gender != null">
|
gender = #{gender,jdbcType=VARCHAR},
|
</if>
|
<if test="province != null">
|
province = #{province,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoMp.MpOpenId">
|
update mp_open_id
|
set
|
open_id = #{openId,jdbcType=VARCHAR},
|
session_key = #{sessionKey,jdbcType=VARCHAR},
|
nick_name = #{nickName,jdbcType=VARCHAR},
|
head_img_url = #{headImgUrl,jdbcType=VARCHAR},
|
phone = #{phone,jdbcType=VARCHAR},
|
gender = #{gender,jdbcType=VARCHAR},
|
province = #{province,jdbcType=VARCHAR},
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|