123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <?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.xinxin.topro.sysservice.dao.mysqlmapper.DicQuestionBankMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionBank" >
- <id column="DQB_ID" property="dqbId" jdbcType="INTEGER" />
- <result column="DQD_ID" property="dqdId" jdbcType="INTEGER" />
- <result column="DQB_Question" property="dqbQuestion" jdbcType="VARCHAR" />
- <result column="DQB_Type" property="dqbType" jdbcType="INTEGER" />
- <result column="DQB_Difficulty" property="dqbDifficulty" jdbcType="INTEGER" />
- <result column="DQB_Score" property="dqbScore" jdbcType="DOUBLE" />
- <result column="DQB_Remark" property="dqbRemark" jdbcType="VARCHAR" />
- <result column="DQB_PinyinCode" property="dqbPinyincode" jdbcType="VARCHAR" />
- <result column="DQB_WubiCode" property="dqbWubicode" jdbcType="VARCHAR" />
- <result column="DQB_OtherCode" property="dqbOthercode" jdbcType="VARCHAR" />
- <result column="DQB_Sort" property="dqbSort" jdbcType="INTEGER" />
- <result column="DQB_Operation_Time" property="dqbOperationTime" jdbcType="TIMESTAMP" />
- <result column="DQB_Operator" property="dqbOperator" jdbcType="VARCHAR" />
- <result column="DQB_IsDel" property="dqbIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- DQB_ID, DQD_ID, DQB_Question, DQB_Type, DQB_Difficulty, DQB_Score, DQB_Remark, DQB_PinyinCode,
- DQB_WubiCode, DQB_OtherCode, DQB_Sort, DQB_Operation_Time, DQB_Operator, DQB_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_question_bank
- where DQB_ID = #{dqbId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_question_bank
- where DQB_ID = #{dqbId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionBank" keyProperty="dqbId" keyColumn="DQB_ID" useGeneratedKeys="true">
- insert into dic_question_bank (DQB_ID, DQD_ID, DQB_Question,
- DQB_Type, DQB_Difficulty, DQB_Score,
- DQB_Remark, DQB_PinyinCode, DQB_WubiCode,
- DQB_OtherCode, DQB_Sort, DQB_Operation_Time,
- DQB_Operator, DQB_IsDel)
- values (#{dqbId,jdbcType=INTEGER}, #{dqdId,jdbcType=INTEGER}, #{dqbQuestion,jdbcType=VARCHAR},
- #{dqbType,jdbcType=INTEGER}, #{dqbDifficulty,jdbcType=INTEGER}, #{dqbScore,jdbcType=DOUBLE},
- #{dqbRemark,jdbcType=VARCHAR}, #{dqbPinyincode,jdbcType=VARCHAR}, #{dqbWubicode,jdbcType=VARCHAR},
- #{dqbOthercode,jdbcType=VARCHAR}, #{dqbSort,jdbcType=INTEGER}, now(),
- #{dqbOperator,jdbcType=VARCHAR}, #{dqbIsdel,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionBank" >
- insert into dic_question_bank
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dqbId != null" >
- DQB_ID,
- </if>
- <if test="dqdId != null" >
- DQD_ID,
- </if>
- <if test="dqbQuestion != null" >
- DQB_Question,
- </if>
- <if test="dqbType != null" >
- DQB_Type,
- </if>
- <if test="dqbDifficulty != null" >
- DQB_Difficulty,
- </if>
- <if test="dqbScore != null" >
- DQB_Score,
- </if>
- <if test="dqbRemark != null" >
- DQB_Remark,
- </if>
- <if test="dqbPinyincode != null" >
- DQB_PinyinCode,
- </if>
- <if test="dqbWubicode != null" >
- DQB_WubiCode,
- </if>
- <if test="dqbOthercode != null" >
- DQB_OtherCode,
- </if>
- <if test="dqbSort != null" >
- DQB_Sort,
- </if>
- <if test="dqbOperationTime != null" >
- DQB_Operation_Time,
- </if>
- <if test="dqbOperator != null" >
- DQB_Operator,
- </if>
- <if test="dqbIsdel != null" >
- DQB_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dqbId != null" >
- #{dqbId,jdbcType=INTEGER},
- </if>
- <if test="dqdId != null" >
- #{dqdId,jdbcType=INTEGER},
- </if>
- <if test="dqbQuestion != null" >
- #{dqbQuestion,jdbcType=VARCHAR},
- </if>
- <if test="dqbType != null" >
- #{dqbType,jdbcType=INTEGER},
- </if>
- <if test="dqbDifficulty != null" >
- #{dqbDifficulty,jdbcType=INTEGER},
- </if>
- <if test="dqbScore != null" >
- #{dqbScore,jdbcType=DOUBLE},
- </if>
- <if test="dqbRemark != null" >
- #{dqbRemark,jdbcType=VARCHAR},
- </if>
- <if test="dqbPinyincode != null" >
- #{dqbPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="dqbWubicode != null" >
- #{dqbWubicode,jdbcType=VARCHAR},
- </if>
- <if test="dqbOthercode != null" >
- #{dqbOthercode,jdbcType=VARCHAR},
- </if>
- <if test="dqbSort != null" >
- #{dqbSort,jdbcType=INTEGER},
- </if>
- <if test="dqbOperationTime != null" >
- #{dqbOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dqbOperator != null" >
- #{dqbOperator,jdbcType=VARCHAR},
- </if>
- <if test="dqbIsdel != null" >
- #{dqbIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionBank" >
- update dic_question_bank
- <set >
- <if test="dqdId != null" >
- DQD_ID = #{dqdId,jdbcType=INTEGER},
- </if>
- <if test="dqbQuestion != null" >
- DQB_Question = #{dqbQuestion,jdbcType=VARCHAR},
- </if>
- <if test="dqbType != null" >
- DQB_Type = #{dqbType,jdbcType=INTEGER},
- </if>
- <if test="dqbDifficulty != null" >
- DQB_Difficulty = #{dqbDifficulty,jdbcType=INTEGER},
- </if>
- <if test="dqbScore != null" >
- DQB_Score = #{dqbScore,jdbcType=DOUBLE},
- </if>
- <if test="dqbRemark != null" >
- DQB_Remark = #{dqbRemark,jdbcType=VARCHAR},
- </if>
- <if test="dqbPinyincode != null" >
- DQB_PinyinCode = #{dqbPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="dqbWubicode != null" >
- DQB_WubiCode = #{dqbWubicode,jdbcType=VARCHAR},
- </if>
- <if test="dqbOthercode != null" >
- DQB_OtherCode = #{dqbOthercode,jdbcType=VARCHAR},
- </if>
- <if test="dqbSort != null" >
- DQB_Sort = #{dqbSort,jdbcType=INTEGER},
- </if>
- <if test="dqbOperationTime != null" >
- DQB_Operation_Time = #{dqbOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dqbOperator != null" >
- DQB_Operator = #{dqbOperator,jdbcType=VARCHAR},
- </if>
- <if test="dqbIsdel != null" >
- DQB_IsDel = #{dqbIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where DQB_ID = #{dqbId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionBank" >
- update dic_question_bank
- set
- DQB_Question = #{dqbQuestion,jdbcType=VARCHAR},
- DQB_Type = #{dqbType,jdbcType=INTEGER},
- DQB_Difficulty = #{dqbDifficulty,jdbcType=INTEGER},
- DQB_Score = #{dqbScore,jdbcType=DOUBLE},
- DQB_Remark = #{dqbRemark,jdbcType=VARCHAR},
- DQB_PinyinCode = #{dqbPinyincode,jdbcType=VARCHAR},
- DQB_WubiCode = #{dqbWubicode,jdbcType=VARCHAR},
- DQB_OtherCode = #{dqbOthercode,jdbcType=VARCHAR},
- DQB_Sort = #{dqbSort,jdbcType=INTEGER},
- DQB_Operation_Time = now(),
- DQB_Operator = #{dqbOperator,jdbcType=VARCHAR}
- where DQB_ID = #{dqbId,jdbcType=INTEGER}
- </update>
- <select id="selectBankById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- SELECT
- <include refid="Base_Column_List" />
- FROM
- dic_question_bank
- WHERE
- DQD_ID = #{dqdId,jdbcType=INTEGER}
- and DQB_IsDel = 0
- order by DQB_Sort
- </select>
- <update id="updateDel" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionBank" >
- update dic_question_bank
- set
- DQB_IsDel = #{dqbIsdel,jdbcType=INTEGER},
- DQB_Operation_Time = now(),
- DQB_Operator = #{dqbOperator,jdbcType=VARCHAR}
- where DQB_ID = #{dqbId,jdbcType=INTEGER}
- </update>
- </mapper>
|