ExtractRecordMapper.xml
3.36 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
<?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.bs.reception.mapper.ExtractRecordMapper">
<resultMap type="com.bs.reception.entity.script.ExtractRecord" id="ExtractRecordResult">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="scene" column="scene" jdbcType="INTEGER"/>
<result property="sourceId" column="source_id" jdbcType="INTEGER"/>
<result property="classCode" column="class_code" jdbcType="VARCHAR"/>
<result property="excellentFlag" column="excellent_flag" jdbcType="INTEGER"/>
<result property="labelCode" column="label_code" jdbcType="VARCHAR"/>
<result property="sceneLabelCode" column="scene_label_code" jdbcType="VARCHAR"/>
<result property="scriptTime" column="script_time" jdbcType="TIMESTAMP"/>
<result property="checkPushStatus" column="check_push_status" jdbcType="INTEGER"/>
<result property="checkStatus" column="check_status" jdbcType="INTEGER"/>
<result property="inputTime" column="input_time" jdbcType="TIMESTAMP"/>
<result property="pushStatus" column="push_status" jdbcType="INTEGER"/>
<result property="pushTime" column="push_time" jdbcType="TIMESTAMP"/>
<result property="timeStamp" column="time_stamp" jdbcType="VARCHAR"/>
<result property="sourceContent" column="source_content" jdbcType="LONGVARCHAR"/>
<result property="polishContent" column="polish_content" jdbcType="LONGVARCHAR"/>
<result property="subLabel" column="sub_label" jdbcType="VARCHAR"/>
<result property="createdBy" column="created_by" jdbcType="VARCHAR"/>
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
<result property="updatedBy" column="updated_by" jdbcType="VARCHAR"/>
<result property="updatedTime" column="updated_time" jdbcType="TIMESTAMP"/>
<result property="delFlag" column="del_flag" jdbcType="CHAR"/>
</resultMap>
<sql id="selectExtractRecordVo">
select id,
scene,
source_id,
class_code,
excellent_flag,
label_code,
scene_label_code,
script_time,
check_push_status,
check_status,
input_time,
push_status,
push_time,
time_stamp,
source_content,
polish_content,
sub_label,
created_by,
created_time,
updated_by,
updated_time,
del_flag
from script_extract_record
</sql>
<select id="getSuggestionLabel" resultType="com.bs.reception.model.script.LabelInfoResponse">
<foreach collection="labelRequest.tagList" item="item" separator="union all">
(select t1.scene_label_name as labelName, t2.polish_content as suggestion, t2.id as labelId
from script_extract_config_scene_label t1
inner join script_extract_record t2 on t1.scene_label_code = t2.scene_label_code and t2.del_flag = 'N'
where t1.del_flag = 'N' and t1.scene_label_name = #{item}
order by t2.created_time desc
limit #{labelRequest.tagResponseCount})
</foreach>
</select>
</mapper>