c558c2c2c75926cd4bd8d9ece4a23e13d2ae8b50.svn-base
1.06 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
<?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.thinkgem.jeesite.modules.cms.dao.ArticleDataDao">
<sql id="cmsArticleDataColumns">
a.id AS "id",
a.content AS "content",
a.copyfrom AS "copyfrom",
a.relation AS "relation",
a.allow_comment AS "allow_comment"
</sql>
<sql id="cmsArticleDataJoins">
</sql>
<select id="get" resultType="ArticleData">
SELECT
<include refid="cmsArticleDataColumns"/>
FROM cms_article_data a
<include refid="cmsArticleDataJoins"/>
WHERE a.id = #{id}
</select>
<insert id="insert">
INSERT INTO cms_article_data(
id,
content,
copyfrom,
relation,
allow_comment
) VALUES (
#{id},
#{content},
#{copyfrom},
#{relation},
#{allowComment}
)
</insert>
<update id="update">
UPDATE cms_article_data SET
content = #{content},
copyfrom = #{copyfrom},
relation = #{relation},
allow_comment = #{allowComment}
WHERE id = #{id}
</update>
</mapper>