123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <?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.pubservice.mysqlmapper.ConsultationUserMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.pubservice.mysqlModel.ConsultationUser" >
- <id column="DCU_ID" property="dcuId" jdbcType="INTEGER" />
- <result column="DCT_ID" property="dctId" jdbcType="INTEGER" />
- <result column="DCU_User" property="dcuUser" jdbcType="VARCHAR" />
- <result column="DCU_Recordor" property="dcuRecordor" jdbcType="VARCHAR" />
- <result column="DCU_Record_Time" property="dcuRecordTime" jdbcType="TIMESTAMP" />
- <result column="DCU_IsDel" property="dcuIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- DCU_ID, DCT_ID, DCU_User, DCU_Recordor, DCU_Record_Time, DCU_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_consulation_user
- where DCU_IsDel = 0 and DCU_ID = #{dcuId,jdbcType=INTEGER}
- </select>
- <select id="selectByUserName" resultType="java.lang.String">
- SELECT du.DCU_User FROM `dic_consultation_team` dt
- LEFT JOIN dic_consulation_user du on dt.DCT_ID = du.DCT_ID
- where dt.DCT_Name like concat('%',#{name},'%') and dt.DCT_IsDel = 0 and du.DCU_IsDel = 0
- and (dt.HI_ID = 0 or dt.HI_ID = #{hiId,jdbcType=INTEGER})
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_consulation_user
- where DCU_ID = #{dcuId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.pubservice.mysqlModel.ConsultationUser" >
- insert into dic_consulation_user (DCU_ID, DCT_ID, DCU_User,
- DCU_Recordor, DCU_Record_Time, DCU_IsDel
- )
- values (#{dcuId,jdbcType=INTEGER}, #{dctId,jdbcType=INTEGER}, #{dcuUser,jdbcType=VARCHAR},
- #{dcuRecordor,jdbcType=VARCHAR}, #{dcuRecordTime,jdbcType=TIMESTAMP}, #{dcuIsdel,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.ConsultationUser" >
- insert into dic_consulation_user
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dcuId != null" >
- DCU_ID,
- </if>
- <if test="dctId != null" >
- DCT_ID,
- </if>
- <if test="dcuUser != null" >
- DCU_User,
- </if>
- <if test="dcuRecordor != null" >
- DCU_Recordor,
- </if>
- <if test="dcuRecordTime != null" >
- DCU_Record_Time,
- </if>
- <if test="dcuIsdel != null" >
- DCU_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dcuId != null" >
- #{dcuId,jdbcType=INTEGER},
- </if>
- <if test="dctId != null" >
- #{dctId,jdbcType=INTEGER},
- </if>
- <if test="dcuUser != null" >
- #{dcuUser,jdbcType=VARCHAR},
- </if>
- <if test="dcuRecordor != null" >
- #{dcuRecordor,jdbcType=VARCHAR},
- </if>
- <if test="dcuRecordTime != null" >
- #{dcuRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dcuIsdel != null" >
- #{dcuIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.ConsultationUser" >
- update dic_consulation_user
- <set >
- <if test="dctId != null" >
- DCT_ID = #{dctId,jdbcType=INTEGER},
- </if>
- <if test="dcuUser != null" >
- DCU_User = #{dcuUser,jdbcType=VARCHAR},
- </if>
- <if test="dcuRecordor != null" >
- DCU_Recordor = #{dcuRecordor,jdbcType=VARCHAR},
- </if>
- <if test="dcuRecordTime != null" >
- DCU_Record_Time = #{dcuRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dcuIsdel != null" >
- DCU_IsDel = #{dcuIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where DCU_ID = #{dcuId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.pubservice.mysqlModel.ConsultationUser" >
- update dic_consulation_user
- set DCT_ID = #{dctId,jdbcType=INTEGER},
- DCU_User = #{dcuUser,jdbcType=VARCHAR},
- DCU_Recordor = #{dcuRecordor,jdbcType=VARCHAR},
- DCU_Record_Time = #{dcuRecordTime,jdbcType=TIMESTAMP},
- DCU_IsDel = #{dcuIsdel,jdbcType=INTEGER}
- where DCU_ID = #{dcuId,jdbcType=INTEGER}
- </update>
- </mapper>
|