123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?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.AutoGenRobotMapper" >
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.users.AutoGenRobot" >
- <id column="nick" property="nick" jdbcType="VARCHAR" />
- <result column="avatar" property="avatar" jdbcType="VARCHAR" />
- <result column="gender" property="gender" jdbcType="TINYINT" />
- <result column="is_used" property="isUsed" jdbcType="TINYINT" />
- </resultMap>
- <sql id="Base_Column_List" >
- nick, avatar, gender, is_used
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from auto_gen_robot
- where nick = #{nick,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from auto_gen_robot
- where nick = #{nick,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.users.AutoGenRobot" >
- insert into auto_gen_robot (nick, avatar, gender,
- is_used)
- values (#{nick,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT},
- #{isUsed,jdbcType=TINYINT})
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.AutoGenRobot" >
- insert into auto_gen_robot
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="nick != null" >
- nick,
- </if>
- <if test="avatar != null" >
- avatar,
- </if>
- <if test="gender != null" >
- gender,
- </if>
- <if test="isUsed != null" >
- is_used,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="nick != null" >
- #{nick,jdbcType=VARCHAR},
- </if>
- <if test="avatar != null" >
- #{avatar,jdbcType=VARCHAR},
- </if>
- <if test="gender != null" >
- #{gender,jdbcType=TINYINT},
- </if>
- <if test="isUsed != null" >
- #{isUsed,jdbcType=TINYINT},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.AutoGenRobot" >
- update auto_gen_robot
- <set >
- <if test="avatar != null" >
- avatar = #{avatar,jdbcType=VARCHAR},
- </if>
- <if test="gender != null" >
- gender = #{gender,jdbcType=TINYINT},
- </if>
- <if test="isUsed != null" >
- is_used = #{isUsed,jdbcType=TINYINT},
- </if>
- </set>
- where nick = #{nick,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.users.AutoGenRobot" >
- update auto_gen_robot
- set avatar = #{avatar,jdbcType=VARCHAR},
- gender = #{gender,jdbcType=TINYINT},
- is_used = #{isUsed,jdbcType=TINYINT}
- where nick = #{nick,jdbcType=VARCHAR}
- </update>
- <select id="selectRobotByList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from auto_gen_robot
- order by is_used desc
- </select>
- <select id="selectRobotByIsUse" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from auto_gen_robot
- where is_used = #{isUse}
- </select>
- </mapper>
|