123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <?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.inpnurseservice.mysqlmapper.DicAssessmentPropMapper">
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentProp">
- <id column="DAP_ID" property="dapId" jdbcType="INTEGER" />
- <result column="DA_ID" property="daId" jdbcType="INTEGER" />
- <result column="DAP_Level_Code" property="dapLevelCode" jdbcType="VARCHAR" />
- <result column="DAP_Level_Name" property="dapLevelName" jdbcType="VARCHAR" />
- <result column="DAP_Color" property="dapColor" jdbcType="VARCHAR" />
- <result column="DAP_Min_Score" property="dapMinScore" jdbcType="DOUBLE" />
- <result column="DAP_Max_Score" property="dapMaxScore" jdbcType="DOUBLE" />
- <result column="DAP_IsDel" property="dapIsdel" jdbcType="INTEGER" />
- <result column="DAP_Operation_Time" property="dapOperationTime" jdbcType="TIMESTAMP" />
- <result column="DAP_Operator" property="dapOperator" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- DAP_ID, DA_ID, DAP_Level_Code, DAP_Level_Name, DAP_Color, DAP_Min_Score, DAP_Max_Score,
- DAP_IsDel, DAP_Operation_Time, DAP_Operator
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_assessment_prop
- where DAP_ID = #{dapId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_assessment_prop
- where DAP_ID = #{dapId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentProp" >
- insert into dic_assessment_prop (DAP_ID, DA_ID, DAP_Level_Code,
- DAP_Level_Name, DAP_Color, DAP_Min_Score,
- DAP_Max_Score, DAP_IsDel, DAP_Operation_Time,
- DAP_Operator)
- values (#{dapId,jdbcType=INTEGER}, #{daId,jdbcType=INTEGER}, #{dapLevelCode,jdbcType=VARCHAR},
- #{dapLevelName,jdbcType=VARCHAR}, #{dapColor,jdbcType=VARCHAR}, #{dapMinScore,jdbcType=DOUBLE},
- #{dapMaxScore,jdbcType=DOUBLE}, #{dapIsdel,jdbcType=INTEGER}, #{dapOperationTime,jdbcType=TIMESTAMP},
- #{dapOperator,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentProp" >
- insert into dic_assessment_prop
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dapId != null" >
- DAP_ID,
- </if>
- <if test="daId != null" >
- DA_ID,
- </if>
- <if test="dapLevelCode != null" >
- DAP_Level_Code,
- </if>
- <if test="dapLevelName != null" >
- DAP_Level_Name,
- </if>
- <if test="dapColor != null" >
- DAP_Color,
- </if>
- <if test="dapMinScore != null" >
- DAP_Min_Score,
- </if>
- <if test="dapMaxScore != null" >
- DAP_Max_Score,
- </if>
- <if test="dapIsdel != null" >
- DAP_IsDel,
- </if>
- <if test="dapOperationTime != null" >
- DAP_Operation_Time,
- </if>
- <if test="dapOperator != null" >
- DAP_Operator,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dapId != null" >
- #{dapId,jdbcType=INTEGER},
- </if>
- <if test="daId != null" >
- #{daId,jdbcType=INTEGER},
- </if>
- <if test="dapLevelCode != null" >
- #{dapLevelCode,jdbcType=VARCHAR},
- </if>
- <if test="dapLevelName != null" >
- #{dapLevelName,jdbcType=VARCHAR},
- </if>
- <if test="dapColor != null" >
- #{dapColor,jdbcType=VARCHAR},
- </if>
- <if test="dapMinScore != null" >
- #{dapMinScore,jdbcType=DOUBLE},
- </if>
- <if test="dapMaxScore != null" >
- #{dapMaxScore,jdbcType=DOUBLE},
- </if>
- <if test="dapIsdel != null" >
- #{dapIsdel,jdbcType=INTEGER},
- </if>
- <if test="dapOperationTime != null" >
- #{dapOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dapOperator != null" >
- #{dapOperator,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentProp" >
- update dic_assessment_prop
- <set >
- <if test="daId != null" >
- DA_ID = #{daId,jdbcType=INTEGER},
- </if>
- <if test="dapLevelCode != null" >
- DAP_Level_Code = #{dapLevelCode,jdbcType=VARCHAR},
- </if>
- <if test="dapLevelName != null" >
- DAP_Level_Name = #{dapLevelName,jdbcType=VARCHAR},
- </if>
- <if test="dapColor != null" >
- DAP_Color = #{dapColor,jdbcType=VARCHAR},
- </if>
- <if test="dapMinScore != null" >
- DAP_Min_Score = #{dapMinScore,jdbcType=DOUBLE},
- </if>
- <if test="dapMaxScore != null" >
- DAP_Max_Score = #{dapMaxScore,jdbcType=DOUBLE},
- </if>
- <if test="dapIsdel != null" >
- DAP_IsDel = #{dapIsdel,jdbcType=INTEGER},
- </if>
- <if test="dapOperationTime != null" >
- DAP_Operation_Time = #{dapOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dapOperator != null" >
- DAP_Operator = #{dapOperator,jdbcType=VARCHAR},
- </if>
- </set>
- where DAP_ID = #{dapId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentProp" >
- update dic_assessment_prop
- set DA_ID = #{daId,jdbcType=INTEGER},
- DAP_Level_Code = #{dapLevelCode,jdbcType=VARCHAR},
- DAP_Level_Name = #{dapLevelName,jdbcType=VARCHAR},
- DAP_Color = #{dapColor,jdbcType=VARCHAR},
- DAP_Min_Score = #{dapMinScore,jdbcType=DOUBLE},
- DAP_Max_Score = #{dapMaxScore,jdbcType=DOUBLE},
- DAP_IsDel = #{dapIsdel,jdbcType=INTEGER},
- DAP_Operation_Time = #{dapOperationTime,jdbcType=TIMESTAMP},
- DAP_Operator = #{dapOperator,jdbcType=VARCHAR}
- where DAP_ID = #{dapId,jdbcType=INTEGER}
- </update>
- <update id="batchDeleteDicAssessmentProp">
- UPDATE dic_assessment_prop
- SET DAP_IsDel = -1,
- DAP_Operation_Time = #{date,jdbcType=TIMESTAMP},
- DAP_Operator = #{dapOperator,jdbcType=VARCHAR}
- WHERE
- DAP_ID IN
- <foreach collection="idList" separator="," open="(" close=")" item="item">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- <select id="getDicAssessmentPropListByDaId" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM
- dic_assessment_prop
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAP_IsDel = 0
- </select>
- <select id="getDicAssessmentPropIdListByDaId" resultType="java.lang.Integer">
- SELECT
- DAP_ID
- FROM
- dic_assessment_prop
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAP_IsDel = 0
- </select>
- <select id="getDicAssessmentPropByCodes" resultMap="BaseResultMap">
- SELECT dap.* FROM dic_assessment da
- INNER JOIN dic_assessment_prop dap ON da.DA_ID = dap.DA_ID
- WHERE da.DA_Code IN
- <foreach collection="daCodes" separator="," open="(" close=")" item="item">
- #{item,jdbcType=VARCHAR}
- </foreach>
- </select>
- </mapper>
|