ConversationCheckDetailMapper.xml
3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?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="cn.com.glsx.dj.mindworkplate.mapper.ConversationCheckDetailMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.ConversationCheckDetail">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="batch_id" jdbcType="INTEGER" property="batchId" />
<result column="first_classify" jdbcType="VARCHAR" property="firstClassify" />
<result column="second_classify" jdbcType="VARCHAR" property="secondClassify" />
<result column="score" jdbcType="DECIMAL" property="score" />
<result column="raw_score" jdbcType="DECIMAL" property="rawScore" />
<result column="hit_result" jdbcType="TINYINT" property="hitResult" />
<result column="hit_text" jdbcType="VARCHAR" property="hitText" />
<result column="suggestions" jdbcType="VARCHAR" property="suggestions" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="deleted_flag" jdbcType="CHAR" property="deletedFlag" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.com.glsx.dj.mindworkplate.model.ConversationCheckDetail">
<!--
WARNING - @mbg.generated
-->
<result column="hit_text" jdbcType="LONGVARCHAR" property="hitText" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, batch_id, first_classify, second_classify, score, raw_score, hit_result, hit_text, suggestions,
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<resultMap id="ccdDtoResult" type="cn.com.glsx.dj.mindworkplate.dto.ConversationCheckDetailDTO"
extends="BaseResultMap">
</resultMap>
<select id="page" parameterType="cn.com.glsx.dj.mindworkplate.dto.ConversationCheckDetailRequestDTO" resultMap="ccdDtoResult">
select * from inspection_conversation_check_detail ccd
<where>
ccd.deleted_flag = 'N'
<if test="batchId != null">
and ccd.batch_id = #{batchId}
</if>
<if test="batchIds != null and batchIds.size>0">
and ccd.batch_id in
<foreach close=")" collection="batchIds" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
<if test="firstClassify != null and firstClassify != ''">
and ccd.first_classify = #{firstClassify}
</if>
<if test="secondClassify != null and secondClassify != ''">
and ccd.second_classify = #{secondClassify}
</if>
<if test="hitResult != null">
and ccd.hit_result = #{hitResult}
</if>
<if test="qualityTestScoreBegin != null">
and ccd.score >= #{qualityTestScoreBegin}
</if>
<if test="qualityTestScoreEnd != null">
and ccd.score <= #{qualityTestScoreEnd}
</if>
</where>
</select>
<update id="deleteByBatchId">
update inspection_conversation_check_detail set deleted_flag='D', updated_date=now() where batch_id=#{batchId}
</update>
</mapper>