<?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>