|
@@ -7,17 +7,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
7
|
7
|
<resultMap type="CmcTopic" id="CmcTopicResult">
|
8
|
8
|
<result property="topicId" column="topic_id" />
|
9
|
9
|
<result property="topic" column="topic" />
|
|
10
|
+ <result property="agentId" column="agent_id" />
|
10
|
11
|
<result property="createTime" column="create_time" />
|
11
|
12
|
</resultMap>
|
12
|
13
|
|
13
|
14
|
<sql id="selectCmcTopicVo">
|
14
|
|
- select topic_id, topic, create_time from cmc_topic
|
|
15
|
+ select topic_id, topic, agent_id, create_time from cmc_topic
|
15
|
16
|
</sql>
|
16
|
17
|
|
17
|
18
|
<select id="selectCmcTopicList" parameterType="CmcTopic" resultMap="CmcTopicResult">
|
18
|
19
|
<include refid="selectCmcTopicVo"/>
|
19
|
20
|
<where>
|
20
|
21
|
<if test="topic != null and topic != ''"> and topic = #{topic}</if>
|
|
22
|
+ <if test="agentId != null "> and agent_id = #{agentId}</if>
|
21
|
23
|
</where>
|
22
|
24
|
order by create_time desc
|
23
|
25
|
</select>
|
|
@@ -32,11 +34,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
32
|
34
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
33
|
35
|
<if test="topicId != null">topic_id,</if>
|
34
|
36
|
<if test="topic != null">topic,</if>
|
|
37
|
+ <if test="agentId != null">agent_id,</if>
|
35
|
38
|
<if test="createTime != null">create_time,</if>
|
36
|
39
|
</trim>
|
37
|
40
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
38
|
41
|
<if test="topicId != null">#{topicId},</if>
|
39
|
42
|
<if test="topic != null">#{topic},</if>
|
|
43
|
+ <if test="agentId != null">#{agentId},</if>
|
40
|
44
|
<if test="createTime != null">#{createTime},</if>
|
41
|
45
|
</trim>
|
42
|
46
|
</insert>
|
|
@@ -45,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
45
|
49
|
update cmc_topic
|
46
|
50
|
<trim prefix="SET" suffixOverrides=",">
|
47
|
51
|
<if test="topic != null">topic = #{topic},</if>
|
|
52
|
+ <if test="agentId != null">agent_id = #{agentId},</if>
|
48
|
53
|
<if test="createTime != null">create_time = #{createTime},</if>
|
49
|
54
|
</trim>
|
50
|
55
|
where topic_id = #{topicId}
|