123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?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.juxiao.xchat.module.xbd.mapper.users.UsersCharmMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.users.UsersCharm" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="uid" property="uid" jdbcType="INTEGER" />
- <result column="charm" property="charm" jdbcType="INTEGER" />
- <result column="admin_id" property="adminId" jdbcType="INTEGER" />
- <result column="create_time" property="createTime" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, uid, charm, admin_id, create_time
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from users_charm
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="selectUsersCharmByPage" resultType="com.juxiao.xchat.module.xbd.vo.UsersCharmVO">
- select id, uid, charm, admin_id as adminId, create_time as createTime
- from users_charm
- where 1 = 1
- <if test="erBanNo != null">
- and uid = #{erBanNo}
- </if>
- <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
- and create_time between #{startTime} and #{endTime}
- </if>
- order by create_time desc
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.users.UsersCharm" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
- insert into users_charm (id, uid, charm,
- admin_id, create_time)
- values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{charm,jdbcType=INTEGER},
- #{adminId,jdbcType=INTEGER}, #{createTime,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.UsersCharm" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
- insert into users_charm
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="uid != null" >
- uid,
- </if>
- <if test="charm != null" >
- charm,
- </if>
- <if test="adminId != null" >
- admin_id,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=INTEGER},
- </if>
- <if test="uid != null" >
- #{uid,jdbcType=INTEGER},
- </if>
- <if test="charm != null" >
- #{charm,jdbcType=INTEGER},
- </if>
- <if test="adminId != null" >
- #{adminId,jdbcType=INTEGER},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.UsersCharm" >
- update users_charm
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=INTEGER},
- </if>
- <if test="charm != null" >
- charm = #{charm,jdbcType=INTEGER},
- </if>
- <if test="adminId != null" >
- admin_id = #{adminId,jdbcType=INTEGER},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.users.UsersCharm" >
- update users_charm
- set uid = #{uid,jdbcType=INTEGER},
- charm = #{charm,jdbcType=INTEGER},
- admin_id = #{adminId,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from users_charm
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <select id="selectByUid" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from users_charm
- where uid = #{uid}
- </select>
- </mapper>
|