article-category-mapper.xml
811 Bytes
<?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.cjs.site.dao.info.ArticleCategoryDao">
<cache type="org.mybatis.caches.ehcache.EhcacheCache" />
<sql id="article_category_field">
id, name, parent_id, enable, create_at, create_by, update_at, update_by, url
</sql>
<select id="queryByName" parameterType="String" resultType="ArticleCategoryInfo">
select <include refid="article_category_field"/>
from article_category
where name = #{name}
</select>
<select id="queryByPid" parameterType="int" resultType="ArticleCategoryInfo">
select <include refid="article_category_field"/>
from article_category
where parent_id = #{parentId} and enable = 1
</select>
</mapper>