| | |
| | | <?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.ks.app.mapper.user.WXUserInfoMapper"> |
| | | <mapper namespace="com.ks.app.dao.user.WXUserInfoMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.ks.app.entity.user.WXUserInfo"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from lt_user_wx where id = #{id, jdbcType=BIGINT} |
| | | from mm_user_wx where id = #{id, jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from lt_user_wx where id = #{id,jdbcType=BIGINT} for update |
| | | from mm_user_wx where id = #{id,jdbcType=BIGINT} for update |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from |
| | | lt_user_wx where id = #{id,jdbcType=BIGINT} |
| | | mm_user_wx where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" |
| | | parameterType="com.ks.app.entity.user.WXUserInfo" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into |
| | | lt_user_wx |
| | | mm_user_wx |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | system, |
| | | nick_name, |
| | |
| | | <insert id="insertSelective" |
| | | parameterType="com.ks.app.entity.user.WXUserInfo" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into lt_user_wx |
| | | insert into mm_user_wx |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="system != null">system,</if> |
| | |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.ks.app.entity.user.WXUserInfo"> |
| | | update lt_user_wx |
| | | update mm_user_wx |
| | | <set> |
| | | <if test="id != null">id = #{id,jdbcType=BIGINT},</if> |
| | | <if test="system != null">system = #{system,jdbcType=VARCHAR},</if> |
| | |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" |
| | | parameterType="com.ks.app.entity.user.WXUserInfo"> |
| | | update lt_user_wx |
| | | update mm_user_wx |
| | | <set> |
| | | <if test="system != null">system = #{system,jdbcType=VARCHAR},</if> |
| | | <if test="nickName != null">nick_name = #{nickName,jdbcType=VARCHAR},</if> |
| | |
| | | |
| | | <sql id="listWhere"> |
| | | <if test="query.system!=null"> |
| | | |
| | | system=#{query.system} |
| | | and system=#{query.system} |
| | | </if> |
| | | |
| | | <if test="query.unionId!=null"> |
| | | union_id=#{query.unionId} |
| | | and union_id=#{query.unionId} |
| | | </if> |
| | | |
| | | </sql> |
| | | |
| | | <select id="list" |
| | | resultMap="BaseResultMap"> |
| | | SELECT * FROM lt_user_wx |
| | | SELECT * FROM mm_user_wx |
| | | <where> |
| | | <include refid="listWhere"> |
| | | </include> |
| | |
| | | |
| | | <select id="count" |
| | | resultType="java.lang.Long"> |
| | | SELECT count(*) FROM lt_user_wx |
| | | SELECT count(*) FROM mm_user_wx |
| | | <where> |
| | | <include refid="listWhere"> |
| | | </include> |