123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 |
- <?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.room.RoomMonitorViolationInfoMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.room.RoomMonitorViolationInfo" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="uid" property="uid" jdbcType="BIGINT" />
- <result column="room" property="room" jdbcType="BIGINT" />
- <result column="state" property="state" jdbcType="INTEGER" />
- <result column="request_id" property="requestId" jdbcType="VARCHAR" />
- <result column="score" property="score" jdbcType="INTEGER" />
- <result column="risk_level" property="riskLevel" jdbcType="VARCHAR" />
- <result column="audio_url" property="audioUrl" jdbcType="VARCHAR" />
- <result column="pre_audio_url" property="preAudioUrl" jdbcType="VARCHAR" />
- <result column="audio_endtime" property="audioEndtime" jdbcType="VARCHAR" />
- <result column="audio_starttime" property="audioStarttime" jdbcType="VARCHAR" />
- <result column="content" property="content" jdbcType="VARCHAR" />
- <result column="description" property="description" jdbcType="VARCHAR" />
- <result column="matched_detail" property="matchedDetail" jdbcType="VARCHAR" />
- <result column="matched_field" property="matchedField" jdbcType="VARCHAR" />
- <result column="matched_item" property="matchedItem" jdbcType="VARCHAR" />
- <result column="matched_list" property="matchedList" jdbcType="VARCHAR" />
- <result column="model" property="model" jdbcType="VARCHAR" />
- <result column="risk_type" property="riskType" jdbcType="INTEGER" />
- <result column="risk_type_desc" property="riskTypeDesc" jdbcType="VARCHAR" />
- <result column="user_id" property="userId" jdbcType="INTEGER" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="erban_no" property="erBanNo" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- r.id, r.uid, r.room, r.state, r.request_id, r.score, r.risk_level, r.audio_url, r.pre_audio_url, r.audio_endtime,
- r.audio_starttime, r.content, r.description, r.matched_detail, r.matched_field, r.matched_item,
- r.matched_list, r.model, r.risk_type, r.risk_type_desc, r.user_id, r.create_time
- </sql>
- <select id="listByQuery" resultMap="BaseResultMap" >
- select
- <include refid="Base_Column_List" />,u.erban_no,u.nick
- from room_monitor_violation_info r
- left join users u on r.uid=u.uid
- <where>
- <if test="uid != null ">
- and r.uid = #{uid}
- </if>
- <if test="state != null">
- and r.state = #{state}
- </if>
- <if test="erBanNo != null ">
- and u.erban_no = #{erBanNo}
- </if>
- <if test="beginDate != null and beginDate!='' ">
- and r.create_time >= #{beginDate}
- </if>
- <if test="endDate != null and endDate!='' ">
- and r.create_time <![CDATA[ <= ]]> #{endDate}
- </if>
- </where>
- order by r.create_time desc
- </select>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from room_monitor_violation_info r
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="selectByRequestId" resultMap="BaseResultMap" >
- select
- <include refid="Base_Column_List" />
- from room_monitor_violation_info r
- where request_id = #{requestId,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from room_monitor_violation_info
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.room.RoomMonitorViolationInfo" >
- <selectKey resultType="java.lang.Integer" keyProperty="id" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into room_monitor_violation_info (uid, room, state,
- request_id, score, risk_level,
- audio_url, pre_audio_url, audio_endtime,
- audio_starttime, content, description,
- matched_detail, matched_field, matched_item,
- matched_list, model, risk_type,
- risk_type_desc, user_id, create_time
- )
- values (#{uid,jdbcType=BIGINT}, #{room,jdbcType=BIGINT}, #{state,jdbcType=INTEGER},
- #{requestId,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER}, #{riskLevel,jdbcType=VARCHAR},
- #{audioUrl,jdbcType=VARCHAR}, #{preAudioUrl,jdbcType=VARCHAR}, #{audioEndtime,jdbcType=VARCHAR},
- #{audioStarttime,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
- #{matchedDetail,jdbcType=VARCHAR}, #{matchedField,jdbcType=VARCHAR}, #{matchedItem,jdbcType=VARCHAR},
- #{matchedList,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{riskType,jdbcType=INTEGER},
- #{riskTypeDesc,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.room.RoomMonitorViolationInfo" >
- <selectKey resultType="java.lang.Integer" keyProperty="id" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into room_monitor_violation_info
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- uid,
- </if>
- <if test="room != null" >
- room,
- </if>
- <if test="state != null" >
- state,
- </if>
- <if test="requestId != null" >
- request_id,
- </if>
- <if test="score != null" >
- score,
- </if>
- <if test="riskLevel != null" >
- risk_level,
- </if>
- <if test="audioUrl != null" >
- audio_url,
- </if>
- <if test="preAudioUrl != null" >
- pre_audio_url,
- </if>
- <if test="audioEndtime != null" >
- audio_endtime,
- </if>
- <if test="audioStarttime != null" >
- audio_starttime,
- </if>
- <if test="content != null" >
- content,
- </if>
- <if test="description != null" >
- description,
- </if>
- <if test="matchedDetail != null" >
- matched_detail,
- </if>
- <if test="matchedField != null" >
- matched_field,
- </if>
- <if test="matchedItem != null" >
- matched_item,
- </if>
- <if test="matchedList != null" >
- matched_list,
- </if>
- <if test="model != null" >
- model,
- </if>
- <if test="riskType != null" >
- risk_type,
- </if>
- <if test="riskTypeDesc != null" >
- risk_type_desc,
- </if>
- <if test="userId != null" >
- user_id,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- #{uid,jdbcType=BIGINT},
- </if>
- <if test="room != null" >
- #{room,jdbcType=BIGINT},
- </if>
- <if test="state != null" >
- #{state,jdbcType=INTEGER},
- </if>
- <if test="requestId != null" >
- #{requestId,jdbcType=VARCHAR},
- </if>
- <if test="score != null" >
- #{score,jdbcType=INTEGER},
- </if>
- <if test="riskLevel != null" >
- #{riskLevel,jdbcType=VARCHAR},
- </if>
- <if test="audioUrl != null" >
- #{audioUrl,jdbcType=VARCHAR},
- </if>
- <if test="preAudioUrl != null" >
- #{preAudioUrl,jdbcType=VARCHAR},
- </if>
- <if test="audioEndtime != null" >
- #{audioEndtime,jdbcType=VARCHAR},
- </if>
- <if test="audioStarttime != null" >
- #{audioStarttime,jdbcType=VARCHAR},
- </if>
- <if test="content != null" >
- #{content,jdbcType=VARCHAR},
- </if>
- <if test="description != null" >
- #{description,jdbcType=VARCHAR},
- </if>
- <if test="matchedDetail != null" >
- #{matchedDetail,jdbcType=VARCHAR},
- </if>
- <if test="matchedField != null" >
- #{matchedField,jdbcType=VARCHAR},
- </if>
- <if test="matchedItem != null" >
- #{matchedItem,jdbcType=VARCHAR},
- </if>
- <if test="matchedList != null" >
- #{matchedList,jdbcType=VARCHAR},
- </if>
- <if test="model != null" >
- #{model,jdbcType=VARCHAR},
- </if>
- <if test="riskType != null" >
- #{riskType,jdbcType=INTEGER},
- </if>
- <if test="riskTypeDesc != null" >
- #{riskTypeDesc,jdbcType=VARCHAR},
- </if>
- <if test="userId != null" >
- #{userId,jdbcType=INTEGER},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.room.RoomMonitorViolationInfo" >
- update room_monitor_violation_info
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=BIGINT},
- </if>
- <if test="room != null" >
- room = #{room,jdbcType=BIGINT},
- </if>
- <if test="state != null" >
- state = #{state,jdbcType=INTEGER},
- </if>
- <if test="requestId != null" >
- request_id = #{requestId,jdbcType=VARCHAR},
- </if>
- <if test="score != null" >
- score = #{score,jdbcType=INTEGER},
- </if>
- <if test="riskLevel != null" >
- risk_level = #{riskLevel,jdbcType=VARCHAR},
- </if>
- <if test="audioUrl != null" >
- audio_url = #{audioUrl,jdbcType=VARCHAR},
- </if>
- <if test="preAudioUrl != null" >
- pre_audio_url = #{preAudioUrl,jdbcType=VARCHAR},
- </if>
- <if test="audioEndtime != null" >
- audio_endtime = #{audioEndtime,jdbcType=VARCHAR},
- </if>
- <if test="audioStarttime != null" >
- audio_starttime = #{audioStarttime,jdbcType=VARCHAR},
- </if>
- <if test="content != null" >
- content = #{content,jdbcType=VARCHAR},
- </if>
- <if test="description != null" >
- description = #{description,jdbcType=VARCHAR},
- </if>
- <if test="matchedDetail != null" >
- matched_detail = #{matchedDetail,jdbcType=VARCHAR},
- </if>
- <if test="matchedField != null" >
- matched_field = #{matchedField,jdbcType=VARCHAR},
- </if>
- <if test="matchedItem != null" >
- matched_item = #{matchedItem,jdbcType=VARCHAR},
- </if>
- <if test="matchedList != null" >
- matched_list = #{matchedList,jdbcType=VARCHAR},
- </if>
- <if test="model != null" >
- model = #{model,jdbcType=VARCHAR},
- </if>
- <if test="riskType != null" >
- risk_type = #{riskType,jdbcType=INTEGER},
- </if>
- <if test="riskTypeDesc != null" >
- risk_type_desc = #{riskTypeDesc,jdbcType=VARCHAR},
- </if>
- <if test="userId != null" >
- user_id = #{userId,jdbcType=INTEGER},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="adminId != null" >
- admin_id = #{adminId,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.room.RoomMonitorViolationInfo" >
- update room_monitor_violation_info
- set uid = #{uid,jdbcType=BIGINT},
- room = #{room,jdbcType=BIGINT},
- state = #{state,jdbcType=INTEGER},
- request_id = #{requestId,jdbcType=VARCHAR},
- score = #{score,jdbcType=INTEGER},
- risk_level = #{riskLevel,jdbcType=VARCHAR},
- audio_url = #{audioUrl,jdbcType=VARCHAR},
- pre_audio_url = #{preAudioUrl,jdbcType=VARCHAR},
- audio_endtime = #{audioEndtime,jdbcType=VARCHAR},
- audio_starttime = #{audioStarttime,jdbcType=VARCHAR},
- content = #{content,jdbcType=VARCHAR},
- description = #{description,jdbcType=VARCHAR},
- matched_detail = #{matchedDetail,jdbcType=VARCHAR},
- matched_field = #{matchedField,jdbcType=VARCHAR},
- matched_item = #{matchedItem,jdbcType=VARCHAR},
- matched_list = #{matchedList,jdbcType=VARCHAR},
- model = #{model,jdbcType=VARCHAR},
- risk_type = #{riskType,jdbcType=INTEGER},
- risk_type_desc = #{riskTypeDesc,jdbcType=VARCHAR},
- user_id = #{userId,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|