ArticleMapper.xml
2.62 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
<?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.yoho.unions.dal.IArticleDAO">
<resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.Article">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="article_title" property="articleTitle" jdbcType="VARCHAR" />
<result column="max_sort_id" property="maxSortId" jdbcType="INTEGER" />
<result column="min_sort_id" property="minSortId" jdbcType="INTEGER" />
<result column="author_id" property="authorId" jdbcType="INTEGER" />
<result column="cover_image" property="coverImage" jdbcType="VARCHAR" />
<result column="cover_image_type" property="coverImageType" jdbcType="TINYINT" />
<result column="url" property="url" jdbcType="VARCHAR" />
<result column="pc_url" property="pcUrl" jdbcType="VARCHAR" />
<result column="ads_img_size" property="adsImgSize" jdbcType="VARCHAR" />
<result column="article_type" property="articleType" jdbcType="TINYINT" />
<result column="article_summary" property="articleSummary" jdbcType="VARCHAR" />
<result column="article_gender" property="articleGender" jdbcType="CHAR" />
<result column="brand" property="brand" jdbcType="VARCHAR" />
<result column="tag" property="tag" jdbcType="VARCHAR" />
<result column="praise" property="praise" jdbcType="INTEGER" />
<result column="browse" property="browse" jdbcType="INTEGER" />
<result column="status" property="status" jdbcType="TINYINT" />
<result column="is_recommend" property="isRecommend" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="publish_time" property="publishTime" jdbcType="INTEGER" />
<result column="publish_state" property="publishState" jdbcType="TINYINT" />
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
<result column="app_type" property="appType" jdbcType="TINYINT" />
<result column="comment_id" property="commentId" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List">
id, article_title, max_sort_id, min_sort_id, author_id, cover_image, cover_image_type,
url, ads_img_size, article_type, article_summary, article_gender, brand, tag, praise,
browse, status,
is_recommend, create_time, publish_time, publish_state, update_time, app_type,pc_url,comment_id
</sql>
<sql id="Table_Name">
yh_guang.article
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
from article
where id = #{id,jdbcType=INTEGER}
</select>
</mapper>