生成通用代码

This commit is contained in:
shuzheng 2017-03-18 18:52:16 +08:00
parent c712e0813f
commit 18a7414b11
15 changed files with 49 additions and 2901 deletions

View File

@ -10,7 +10,7 @@ public interface CmsMenuMapper {
int deleteByExample(CmsMenuExample example);
int deleteByPrimaryKey(Integer pageId);
int deleteByPrimaryKey(Integer menuId);
int insert(CmsMenu record);
@ -18,7 +18,7 @@ public interface CmsMenuMapper {
List<CmsMenu> selectByExample(CmsMenuExample example);
CmsMenu selectByPrimaryKey(Integer pageId);
CmsMenu selectByPrimaryKey(Integer menuId);
int updateByExampleSelective(@Param("record") CmsMenu record, @Param("example") CmsMenuExample example);

View File

@ -8,7 +8,7 @@ public class CmsMenu implements Serializable {
*
* @mbg.generated
*/
private Integer pageId;
private Integer menuId;
/**
* 父菜单
@ -47,12 +47,12 @@ public class CmsMenu implements Serializable {
private static final long serialVersionUID = 1L;
public Integer getPageId() {
return pageId;
public Integer getMenuId() {
return menuId;
}
public void setPageId(Integer pageId) {
this.pageId = pageId;
public void setMenuId(Integer menuId) {
this.menuId = menuId;
}
public Integer getPid() {
@ -101,7 +101,7 @@ public class CmsMenu implements Serializable {
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", pageId=").append(pageId);
sb.append(", menuId=").append(menuId);
sb.append(", pid=").append(pid);
sb.append(", name=").append(name);
sb.append(", url=").append(url);
@ -123,7 +123,7 @@ public class CmsMenu implements Serializable {
return false;
}
CmsMenu other = (CmsMenu) that;
return (this.getPageId() == null ? other.getPageId() == null : this.getPageId().equals(other.getPageId()))
return (this.getMenuId() == null ? other.getMenuId() == null : this.getMenuId().equals(other.getMenuId()))
&& (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
@ -135,7 +135,7 @@ public class CmsMenu implements Serializable {
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getPageId() == null) ? 0 : getPageId().hashCode());
result = prime * result + ((getMenuId() == null) ? 0 : getMenuId().hashCode());
result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());

View File

@ -127,63 +127,63 @@ public class CmsMenuExample implements Serializable {
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andPageIdIsNull() {
addCriterion("page_id is null");
public Criteria andMenuIdIsNull() {
addCriterion("menu_id is null");
return (Criteria) this;
}
public Criteria andPageIdIsNotNull() {
addCriterion("page_id is not null");
public Criteria andMenuIdIsNotNull() {
addCriterion("menu_id is not null");
return (Criteria) this;
}
public Criteria andPageIdEqualTo(Integer value) {
addCriterion("page_id =", value, "pageId");
public Criteria andMenuIdEqualTo(Integer value) {
addCriterion("menu_id =", value, "menuId");
return (Criteria) this;
}
public Criteria andPageIdNotEqualTo(Integer value) {
addCriterion("page_id <>", value, "pageId");
public Criteria andMenuIdNotEqualTo(Integer value) {
addCriterion("menu_id <>", value, "menuId");
return (Criteria) this;
}
public Criteria andPageIdGreaterThan(Integer value) {
addCriterion("page_id >", value, "pageId");
public Criteria andMenuIdGreaterThan(Integer value) {
addCriterion("menu_id >", value, "menuId");
return (Criteria) this;
}
public Criteria andPageIdGreaterThanOrEqualTo(Integer value) {
addCriterion("page_id >=", value, "pageId");
public Criteria andMenuIdGreaterThanOrEqualTo(Integer value) {
addCriterion("menu_id >=", value, "menuId");
return (Criteria) this;
}
public Criteria andPageIdLessThan(Integer value) {
addCriterion("page_id <", value, "pageId");
public Criteria andMenuIdLessThan(Integer value) {
addCriterion("menu_id <", value, "menuId");
return (Criteria) this;
}
public Criteria andPageIdLessThanOrEqualTo(Integer value) {
addCriterion("page_id <=", value, "pageId");
public Criteria andMenuIdLessThanOrEqualTo(Integer value) {
addCriterion("menu_id <=", value, "menuId");
return (Criteria) this;
}
public Criteria andPageIdIn(List<Integer> values) {
addCriterion("page_id in", values, "pageId");
public Criteria andMenuIdIn(List<Integer> values) {
addCriterion("menu_id in", values, "menuId");
return (Criteria) this;
}
public Criteria andPageIdNotIn(List<Integer> values) {
addCriterion("page_id not in", values, "pageId");
public Criteria andMenuIdNotIn(List<Integer> values) {
addCriterion("menu_id not in", values, "menuId");
return (Criteria) this;
}
public Criteria andPageIdBetween(Integer value1, Integer value2) {
addCriterion("page_id between", value1, value2, "pageId");
public Criteria andMenuIdBetween(Integer value1, Integer value2) {
addCriterion("menu_id between", value1, value2, "menuId");
return (Criteria) this;
}
public Criteria andPageIdNotBetween(Integer value1, Integer value2) {
addCriterion("page_id not between", value1, value2, "pageId");
public Criteria andMenuIdNotBetween(Integer value1, Integer value2) {
addCriterion("menu_id not between", value1, value2, "menuId");
return (Criteria) this;
}

View File

@ -187,190 +187,4 @@
where article_category_id = #{articleCategoryId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsArticleCategory">
<id column="article_category_id" jdbcType="INTEGER" property="articleCategoryId" />
<result column="article_id" jdbcType="INTEGER" property="articleId" />
<result column="category_id" jdbcType="INTEGER" property="categoryId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
article_category_id, article_id, category_id
</sql>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsArticleCategoryExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_article_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from cms_article_category
where article_category_id = #{articleCategoryId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_article_category
where article_category_id = #{articleCategoryId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsArticleCategoryExample">
delete from cms_article_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsArticleCategory">
insert into cms_article_category (article_category_id, article_id, category_id
)
values (#{articleCategoryId,jdbcType=INTEGER}, #{articleId,jdbcType=INTEGER}, #{categoryId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsArticleCategory">
insert into cms_article_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="articleCategoryId != null">
article_category_id,
</if>
<if test="articleId != null">
article_id,
</if>
<if test="categoryId != null">
category_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="articleCategoryId != null">
#{articleCategoryId,jdbcType=INTEGER},
</if>
<if test="articleId != null">
#{articleId,jdbcType=INTEGER},
</if>
<if test="categoryId != null">
#{categoryId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsArticleCategoryExample" resultType="java.lang.Long">
select count(*) from cms_article_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_article_category
<set>
<if test="record.articleCategoryId != null">
article_category_id = #{record.articleCategoryId,jdbcType=INTEGER},
</if>
<if test="record.articleId != null">
article_id = #{record.articleId,jdbcType=INTEGER},
</if>
<if test="record.categoryId != null">
category_id = #{record.categoryId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_article_category
set article_category_id = #{record.articleCategoryId,jdbcType=INTEGER},
article_id = #{record.articleId,jdbcType=INTEGER},
category_id = #{record.categoryId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsArticleCategory">
update cms_article_category
<set>
<if test="articleId != null">
article_id = #{articleId,jdbcType=INTEGER},
</if>
<if test="categoryId != null">
category_id = #{categoryId,jdbcType=INTEGER},
</if>
</set>
where article_category_id = #{articleCategoryId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsArticleCategory">
update cms_article_category
set article_id = #{articleId,jdbcType=INTEGER},
category_id = #{categoryId,jdbcType=INTEGER}
where article_category_id = #{articleCategoryId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -453,439 +453,4 @@
where article_id = #{articleId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsArticle">
<id column="article_id" jdbcType="INTEGER" property="articleId" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="author" jdbcType="VARCHAR" property="author" />
<result column="fromurl" jdbcType="VARCHAR" property="fromurl" />
<result column="image" jdbcType="VARCHAR" property="image" />
<result column="keywords" jdbcType="VARCHAR" property="keywords" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="allowcomments" jdbcType="TINYINT" property="allowcomments" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="readnumber" jdbcType="INTEGER" property="readnumber" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
<result column="orders" jdbcType="BIGINT" property="orders" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.cms.dao.model.CmsArticle">
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
article_id, title, author, fromurl, image, keywords, description, type, allowcomments,
status, user_id, readnumber, ctime, orders
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.zheng.cms.dao.model.CmsArticleExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from cms_article
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsArticleExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_article
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from cms_article
where article_id = #{articleId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_article
where article_id = #{articleId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsArticleExample">
delete from cms_article
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsArticle">
insert into cms_article (article_id, title, author,
fromurl, image, keywords,
description, type, allowcomments,
status, user_id, readnumber,
ctime, orders, content
)
values (#{articleId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
#{fromurl,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, #{allowcomments,jdbcType=TINYINT},
#{status,jdbcType=TINYINT}, #{userId,jdbcType=INTEGER}, #{readnumber,jdbcType=INTEGER},
#{ctime,jdbcType=BIGINT}, #{orders,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsArticle">
insert into cms_article
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="articleId != null">
article_id,
</if>
<if test="title != null">
title,
</if>
<if test="author != null">
author,
</if>
<if test="fromurl != null">
fromurl,
</if>
<if test="image != null">
image,
</if>
<if test="keywords != null">
keywords,
</if>
<if test="description != null">
description,
</if>
<if test="type != null">
type,
</if>
<if test="allowcomments != null">
allowcomments,
</if>
<if test="status != null">
status,
</if>
<if test="userId != null">
user_id,
</if>
<if test="readnumber != null">
readnumber,
</if>
<if test="ctime != null">
ctime,
</if>
<if test="orders != null">
orders,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="articleId != null">
#{articleId,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="author != null">
#{author,jdbcType=VARCHAR},
</if>
<if test="fromurl != null">
#{fromurl,jdbcType=VARCHAR},
</if>
<if test="image != null">
#{image,jdbcType=VARCHAR},
</if>
<if test="keywords != null">
#{keywords,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="allowcomments != null">
#{allowcomments,jdbcType=TINYINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="readnumber != null">
#{readnumber,jdbcType=INTEGER},
</if>
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null">
#{orders,jdbcType=BIGINT},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsArticleExample" resultType="java.lang.Long">
select count(*) from cms_article
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_article
<set>
<if test="record.articleId != null">
article_id = #{record.articleId,jdbcType=INTEGER},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.author != null">
author = #{record.author,jdbcType=VARCHAR},
</if>
<if test="record.fromurl != null">
fromurl = #{record.fromurl,jdbcType=VARCHAR},
</if>
<if test="record.image != null">
image = #{record.image,jdbcType=VARCHAR},
</if>
<if test="record.keywords != null">
keywords = #{record.keywords,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.allowcomments != null">
allowcomments = #{record.allowcomments,jdbcType=TINYINT},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.readnumber != null">
readnumber = #{record.readnumber,jdbcType=INTEGER},
</if>
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
<if test="record.orders != null">
orders = #{record.orders,jdbcType=BIGINT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update cms_article
set article_id = #{record.articleId,jdbcType=INTEGER},
title = #{record.title,jdbcType=VARCHAR},
author = #{record.author,jdbcType=VARCHAR},
fromurl = #{record.fromurl,jdbcType=VARCHAR},
image = #{record.image,jdbcType=VARCHAR},
keywords = #{record.keywords,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
type = #{record.type,jdbcType=TINYINT},
allowcomments = #{record.allowcomments,jdbcType=TINYINT},
status = #{record.status,jdbcType=TINYINT},
user_id = #{record.userId,jdbcType=INTEGER},
readnumber = #{record.readnumber,jdbcType=INTEGER},
ctime = #{record.ctime,jdbcType=BIGINT},
orders = #{record.orders,jdbcType=BIGINT},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_article
set article_id = #{record.articleId,jdbcType=INTEGER},
title = #{record.title,jdbcType=VARCHAR},
author = #{record.author,jdbcType=VARCHAR},
fromurl = #{record.fromurl,jdbcType=VARCHAR},
image = #{record.image,jdbcType=VARCHAR},
keywords = #{record.keywords,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
type = #{record.type,jdbcType=TINYINT},
allowcomments = #{record.allowcomments,jdbcType=TINYINT},
status = #{record.status,jdbcType=TINYINT},
user_id = #{record.userId,jdbcType=INTEGER},
readnumber = #{record.readnumber,jdbcType=INTEGER},
ctime = #{record.ctime,jdbcType=BIGINT},
orders = #{record.orders,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsArticle">
update cms_article
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="author != null">
author = #{author,jdbcType=VARCHAR},
</if>
<if test="fromurl != null">
fromurl = #{fromurl,jdbcType=VARCHAR},
</if>
<if test="image != null">
image = #{image,jdbcType=VARCHAR},
</if>
<if test="keywords != null">
keywords = #{keywords,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="allowcomments != null">
allowcomments = #{allowcomments,jdbcType=TINYINT},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="readnumber != null">
readnumber = #{readnumber,jdbcType=INTEGER},
</if>
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null">
orders = #{orders,jdbcType=BIGINT},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where article_id = #{articleId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zheng.cms.dao.model.CmsArticle">
update cms_article
set title = #{title,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
fromurl = #{fromurl,jdbcType=VARCHAR},
image = #{image,jdbcType=VARCHAR},
keywords = #{keywords,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
allowcomments = #{allowcomments,jdbcType=TINYINT},
status = #{status,jdbcType=TINYINT},
user_id = #{userId,jdbcType=INTEGER},
readnumber = #{readnumber,jdbcType=INTEGER},
ctime = #{ctime,jdbcType=BIGINT},
orders = #{orders,jdbcType=BIGINT},
content = #{content,jdbcType=LONGVARCHAR}
where article_id = #{articleId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsArticle">
update cms_article
set title = #{title,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
fromurl = #{fromurl,jdbcType=VARCHAR},
image = #{image,jdbcType=VARCHAR},
keywords = #{keywords,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
allowcomments = #{allowcomments,jdbcType=TINYINT},
status = #{status,jdbcType=TINYINT},
user_id = #{userId,jdbcType=INTEGER},
readnumber = #{readnumber,jdbcType=INTEGER},
ctime = #{ctime,jdbcType=BIGINT},
orders = #{orders,jdbcType=BIGINT}
where article_id = #{articleId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -187,190 +187,4 @@
where article_tag_id = #{articleTagId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsArticleTag">
<id column="article_tag_id" jdbcType="INTEGER" property="articleTagId" />
<result column="article_id" jdbcType="INTEGER" property="articleId" />
<result column="tag_id" jdbcType="INTEGER" property="tagId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
article_tag_id, article_id, tag_id
</sql>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsArticleTagExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_article_tag
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from cms_article_tag
where article_tag_id = #{articleTagId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_article_tag
where article_tag_id = #{articleTagId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsArticleTagExample">
delete from cms_article_tag
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsArticleTag">
insert into cms_article_tag (article_tag_id, article_id, tag_id
)
values (#{articleTagId,jdbcType=INTEGER}, #{articleId,jdbcType=INTEGER}, #{tagId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsArticleTag">
insert into cms_article_tag
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="articleTagId != null">
article_tag_id,
</if>
<if test="articleId != null">
article_id,
</if>
<if test="tagId != null">
tag_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="articleTagId != null">
#{articleTagId,jdbcType=INTEGER},
</if>
<if test="articleId != null">
#{articleId,jdbcType=INTEGER},
</if>
<if test="tagId != null">
#{tagId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsArticleTagExample" resultType="java.lang.Long">
select count(*) from cms_article_tag
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_article_tag
<set>
<if test="record.articleTagId != null">
article_tag_id = #{record.articleTagId,jdbcType=INTEGER},
</if>
<if test="record.articleId != null">
article_id = #{record.articleId,jdbcType=INTEGER},
</if>
<if test="record.tagId != null">
tag_id = #{record.tagId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_article_tag
set article_tag_id = #{record.articleTagId,jdbcType=INTEGER},
article_id = #{record.articleId,jdbcType=INTEGER},
tag_id = #{record.tagId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsArticleTag">
update cms_article_tag
<set>
<if test="articleId != null">
article_id = #{articleId,jdbcType=INTEGER},
</if>
<if test="tagId != null">
tag_id = #{tagId,jdbcType=INTEGER},
</if>
</set>
where article_tag_id = #{articleTagId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsArticleTag">
update cms_article_tag
set article_id = #{articleId,jdbcType=INTEGER},
tag_id = #{tagId,jdbcType=INTEGER}
where article_tag_id = #{articleTagId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -187,190 +187,4 @@
where book_id = #{bookId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsBook">
<id column="book_id" jdbcType="INTEGER" property="bookId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="name" jdbcType="VARCHAR" property="name" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
book_id, user_id, name
</sql>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsBookExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_book
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from cms_book
where book_id = #{bookId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_book
where book_id = #{bookId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsBookExample">
delete from cms_book
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsBook">
insert into cms_book (book_id, user_id, name
)
values (#{bookId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsBook">
insert into cms_book
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="bookId != null">
book_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="name != null">
name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="bookId != null">
#{bookId,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsBookExample" resultType="java.lang.Long">
select count(*) from cms_book
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_book
<set>
<if test="record.bookId != null">
book_id = #{record.bookId,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_book
set book_id = #{record.bookId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsBook">
update cms_book
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
</set>
where book_id = #{bookId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsBook">
update cms_book
set user_id = #{userId,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR}
where book_id = #{bookId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -296,299 +296,4 @@
where category_id = #{categoryId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsCategory">
<id column="category_id" jdbcType="INTEGER" property="categoryId" />
<result column="pid" jdbcType="INTEGER" property="pid" />
<result column="level" jdbcType="TINYINT" property="level" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="alias" jdbcType="VARCHAR" property="alias" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
<result column="orders" jdbcType="BIGINT" property="orders" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
category_id, pid, level, name, description, icon, type, alias, ctime, orders
</sql>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsCategoryExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from cms_category
where category_id = #{categoryId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_category
where category_id = #{categoryId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsCategoryExample">
delete from cms_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsCategory">
insert into cms_category (category_id, pid, level,
name, description, icon,
type, alias, ctime,
orders)
values (#{categoryId,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{level,jdbcType=TINYINT},
#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR},
#{type,jdbcType=TINYINT}, #{alias,jdbcType=VARCHAR}, #{ctime,jdbcType=BIGINT},
#{orders,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsCategory">
insert into cms_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="categoryId != null">
category_id,
</if>
<if test="pid != null">
pid,
</if>
<if test="level != null">
level,
</if>
<if test="name != null">
name,
</if>
<if test="description != null">
description,
</if>
<if test="icon != null">
icon,
</if>
<if test="type != null">
type,
</if>
<if test="alias != null">
alias,
</if>
<if test="ctime != null">
ctime,
</if>
<if test="orders != null">
orders,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="categoryId != null">
#{categoryId,jdbcType=INTEGER},
</if>
<if test="pid != null">
#{pid,jdbcType=INTEGER},
</if>
<if test="level != null">
#{level,jdbcType=TINYINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="alias != null">
#{alias,jdbcType=VARCHAR},
</if>
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null">
#{orders,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsCategoryExample" resultType="java.lang.Long">
select count(*) from cms_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_category
<set>
<if test="record.categoryId != null">
category_id = #{record.categoryId,jdbcType=INTEGER},
</if>
<if test="record.pid != null">
pid = #{record.pid,jdbcType=INTEGER},
</if>
<if test="record.level != null">
level = #{record.level,jdbcType=TINYINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.icon != null">
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.alias != null">
alias = #{record.alias,jdbcType=VARCHAR},
</if>
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
<if test="record.orders != null">
orders = #{record.orders,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_category
set category_id = #{record.categoryId,jdbcType=INTEGER},
pid = #{record.pid,jdbcType=INTEGER},
level = #{record.level,jdbcType=TINYINT},
name = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
type = #{record.type,jdbcType=TINYINT},
alias = #{record.alias,jdbcType=VARCHAR},
ctime = #{record.ctime,jdbcType=BIGINT},
orders = #{record.orders,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsCategory">
update cms_category
<set>
<if test="pid != null">
pid = #{pid,jdbcType=INTEGER},
</if>
<if test="level != null">
level = #{level,jdbcType=TINYINT},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="alias != null">
alias = #{alias,jdbcType=VARCHAR},
</if>
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null">
orders = #{orders,jdbcType=BIGINT},
</if>
</set>
where category_id = #{categoryId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsCategory">
update cms_category
set pid = #{pid,jdbcType=INTEGER},
level = #{level,jdbcType=TINYINT},
name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
alias = #{alias,jdbcType=VARCHAR},
ctime = #{ctime,jdbcType=BIGINT},
orders = #{orders,jdbcType=BIGINT}
where category_id = #{categoryId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -187,190 +187,4 @@
where category_tag_id = #{categoryTagId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsCategoryTag">
<id column="category_tag_id" jdbcType="INTEGER" property="categoryTagId" />
<result column="category_id" jdbcType="INTEGER" property="categoryId" />
<result column="tag_id" jdbcType="INTEGER" property="tagId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
category_tag_id, category_id, tag_id
</sql>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsCategoryTagExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_category_tag
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from cms_category_tag
where category_tag_id = #{categoryTagId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_category_tag
where category_tag_id = #{categoryTagId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsCategoryTagExample">
delete from cms_category_tag
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsCategoryTag">
insert into cms_category_tag (category_tag_id, category_id, tag_id
)
values (#{categoryTagId,jdbcType=INTEGER}, #{categoryId,jdbcType=INTEGER}, #{tagId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsCategoryTag">
insert into cms_category_tag
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="categoryTagId != null">
category_tag_id,
</if>
<if test="categoryId != null">
category_id,
</if>
<if test="tagId != null">
tag_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="categoryTagId != null">
#{categoryTagId,jdbcType=INTEGER},
</if>
<if test="categoryId != null">
#{categoryId,jdbcType=INTEGER},
</if>
<if test="tagId != null">
#{tagId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsCategoryTagExample" resultType="java.lang.Long">
select count(*) from cms_category_tag
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_category_tag
<set>
<if test="record.categoryTagId != null">
category_tag_id = #{record.categoryTagId,jdbcType=INTEGER},
</if>
<if test="record.categoryId != null">
category_id = #{record.categoryId,jdbcType=INTEGER},
</if>
<if test="record.tagId != null">
tag_id = #{record.tagId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_category_tag
set category_tag_id = #{record.categoryTagId,jdbcType=INTEGER},
category_id = #{record.categoryId,jdbcType=INTEGER},
tag_id = #{record.tagId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsCategoryTag">
update cms_category_tag
<set>
<if test="categoryId != null">
category_id = #{categoryId,jdbcType=INTEGER},
</if>
<if test="tagId != null">
tag_id = #{tagId,jdbcType=INTEGER},
</if>
</set>
where category_tag_id = #{categoryTagId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsCategoryTag">
update cms_category_tag
set category_id = #{categoryId,jdbcType=INTEGER},
tag_id = #{tagId,jdbcType=INTEGER}
where category_tag_id = #{categoryTagId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -329,332 +329,4 @@
where comment_id = #{commentId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsComment">
<id column="comment_id" jdbcType="INTEGER" property="commentId" />
<result column="pid" jdbcType="INTEGER" property="pid" />
<result column="article_id" jdbcType="INTEGER" property="articleId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="ip" jdbcType="VARCHAR" property="ip" />
<result column="agent" jdbcType="VARCHAR" property="agent" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.cms.dao.model.CmsComment">
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
comment_id, pid, article_id, user_id, status, ip, agent, ctime
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.zheng.cms.dao.model.CmsCommentExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from cms_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsCommentExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from cms_comment
where comment_id = #{commentId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_comment
where comment_id = #{commentId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsCommentExample">
delete from cms_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsComment">
insert into cms_comment (comment_id, pid, article_id,
user_id, status, ip,
agent, ctime, content
)
values (#{commentId,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{articleId,jdbcType=INTEGER},
#{userId,jdbcType=INTEGER}, #{status,jdbcType=TINYINT}, #{ip,jdbcType=VARCHAR},
#{agent,jdbcType=VARCHAR}, #{ctime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsComment">
insert into cms_comment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="commentId != null">
comment_id,
</if>
<if test="pid != null">
pid,
</if>
<if test="articleId != null">
article_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="status != null">
status,
</if>
<if test="ip != null">
ip,
</if>
<if test="agent != null">
agent,
</if>
<if test="ctime != null">
ctime,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="commentId != null">
#{commentId,jdbcType=INTEGER},
</if>
<if test="pid != null">
#{pid,jdbcType=INTEGER},
</if>
<if test="articleId != null">
#{articleId,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</if>
<if test="agent != null">
#{agent,jdbcType=VARCHAR},
</if>
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsCommentExample" resultType="java.lang.Long">
select count(*) from cms_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_comment
<set>
<if test="record.commentId != null">
comment_id = #{record.commentId,jdbcType=INTEGER},
</if>
<if test="record.pid != null">
pid = #{record.pid,jdbcType=INTEGER},
</if>
<if test="record.articleId != null">
article_id = #{record.articleId,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.ip != null">
ip = #{record.ip,jdbcType=VARCHAR},
</if>
<if test="record.agent != null">
agent = #{record.agent,jdbcType=VARCHAR},
</if>
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update cms_comment
set comment_id = #{record.commentId,jdbcType=INTEGER},
pid = #{record.pid,jdbcType=INTEGER},
article_id = #{record.articleId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
status = #{record.status,jdbcType=TINYINT},
ip = #{record.ip,jdbcType=VARCHAR},
agent = #{record.agent,jdbcType=VARCHAR},
ctime = #{record.ctime,jdbcType=BIGINT},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_comment
set comment_id = #{record.commentId,jdbcType=INTEGER},
pid = #{record.pid,jdbcType=INTEGER},
article_id = #{record.articleId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
status = #{record.status,jdbcType=TINYINT},
ip = #{record.ip,jdbcType=VARCHAR},
agent = #{record.agent,jdbcType=VARCHAR},
ctime = #{record.ctime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsComment">
update cms_comment
<set>
<if test="pid != null">
pid = #{pid,jdbcType=INTEGER},
</if>
<if test="articleId != null">
article_id = #{articleId,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="ip != null">
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="agent != null">
agent = #{agent,jdbcType=VARCHAR},
</if>
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where comment_id = #{commentId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zheng.cms.dao.model.CmsComment">
update cms_comment
set pid = #{pid,jdbcType=INTEGER},
article_id = #{articleId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
status = #{status,jdbcType=TINYINT},
ip = #{ip,jdbcType=VARCHAR},
agent = #{agent,jdbcType=VARCHAR},
ctime = #{ctime,jdbcType=BIGINT},
content = #{content,jdbcType=LONGVARCHAR}
where comment_id = #{commentId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsComment">
update cms_comment
set pid = #{pid,jdbcType=INTEGER},
article_id = #{articleId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
status = #{status,jdbcType=TINYINT},
ip = #{ip,jdbcType=VARCHAR},
agent = #{agent,jdbcType=VARCHAR},
ctime = #{ctime,jdbcType=BIGINT}
where comment_id = #{commentId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zheng.cms.dao.mapper.CmsMenuMapper">
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsMenu">
<id column="page_id" jdbcType="INTEGER" property="pageId" />
<id column="menu_id" jdbcType="INTEGER" property="menuId" />
<result column="pid" jdbcType="INTEGER" property="pid" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="url" jdbcType="VARCHAR" property="url" />
@ -68,7 +68,7 @@
</where>
</sql>
<sql id="Base_Column_List">
page_id, pid, name, url, target, orders
menu_id, pid, name, url, target, orders
</sql>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsMenuExample" resultMap="BaseResultMap">
select
@ -96,11 +96,11 @@
select
<include refid="Base_Column_List" />
from cms_menu
where page_id = #{pageId,jdbcType=INTEGER}
where menu_id = #{menuId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_menu
where page_id = #{pageId,jdbcType=INTEGER}
where menu_id = #{menuId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsMenuExample">
delete from cms_menu
@ -109,16 +109,16 @@
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsMenu">
insert into cms_menu (page_id, pid, name,
insert into cms_menu (menu_id, pid, name,
url, target, orders)
values (#{pageId,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
values (#{menuId,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{url,jdbcType=VARCHAR}, #{target,jdbcType=VARCHAR}, #{orders,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsMenu">
insert into cms_menu
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pageId != null">
page_id,
<if test="menuId != null">
menu_id,
</if>
<if test="pid != null">
pid,
@ -137,8 +137,8 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pageId != null">
#{pageId,jdbcType=INTEGER},
<if test="menuId != null">
#{menuId,jdbcType=INTEGER},
</if>
<if test="pid != null">
#{pid,jdbcType=INTEGER},
@ -166,8 +166,8 @@
<update id="updateByExampleSelective" parameterType="map">
update cms_menu
<set>
<if test="record.pageId != null">
page_id = #{record.pageId,jdbcType=INTEGER},
<if test="record.menuId != null">
menu_id = #{record.menuId,jdbcType=INTEGER},
</if>
<if test="record.pid != null">
pid = #{record.pid,jdbcType=INTEGER},
@ -191,7 +191,7 @@
</update>
<update id="updateByExample" parameterType="map">
update cms_menu
set page_id = #{record.pageId,jdbcType=INTEGER},
set menu_id = #{record.menuId,jdbcType=INTEGER},
pid = #{record.pid,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
url = #{record.url,jdbcType=VARCHAR},
@ -220,7 +220,7 @@
orders = #{orders,jdbcType=BIGINT},
</if>
</set>
where page_id = #{pageId,jdbcType=INTEGER}
where menu_id = #{menuId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsMenu">
update cms_menu
@ -229,7 +229,7 @@
url = #{url,jdbcType=VARCHAR},
target = #{target,jdbcType=VARCHAR},
orders = #{orders,jdbcType=BIGINT}
where page_id = #{pageId,jdbcType=INTEGER}
where menu_id = #{menuId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -329,313 +329,4 @@
where page_id = #{pageId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsPage">
<id column="page_id" jdbcType="INTEGER" property="pageId" />
<result column="pid" jdbcType="INTEGER" property="pid" />
<result column="alias" jdbcType="VARCHAR" property="alias" />
<result column="keywords" jdbcType="VARCHAR" property="keywords" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
<result column="orders" jdbcType="BIGINT" property="orders" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.cms.dao.model.CmsPage">
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
page_id, pid, alias, keywords, description, ctime, orders
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.zheng.cms.dao.model.CmsPageExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from cms_page
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsPageExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_page
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from cms_page
where page_id = #{pageId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_page
where page_id = #{pageId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsPageExample">
delete from cms_page
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsPage">
insert into cms_page (page_id, pid, alias,
keywords, description, ctime,
orders, content)
values (#{pageId,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{alias,jdbcType=VARCHAR},
#{keywords,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{ctime,jdbcType=BIGINT},
#{orders,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsPage">
insert into cms_page
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pageId != null">
page_id,
</if>
<if test="pid != null">
pid,
</if>
<if test="alias != null">
alias,
</if>
<if test="keywords != null">
keywords,
</if>
<if test="description != null">
description,
</if>
<if test="ctime != null">
ctime,
</if>
<if test="orders != null">
orders,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pageId != null">
#{pageId,jdbcType=INTEGER},
</if>
<if test="pid != null">
#{pid,jdbcType=INTEGER},
</if>
<if test="alias != null">
#{alias,jdbcType=VARCHAR},
</if>
<if test="keywords != null">
#{keywords,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null">
#{orders,jdbcType=BIGINT},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsPageExample" resultType="java.lang.Long">
select count(*) from cms_page
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_page
<set>
<if test="record.pageId != null">
page_id = #{record.pageId,jdbcType=INTEGER},
</if>
<if test="record.pid != null">
pid = #{record.pid,jdbcType=INTEGER},
</if>
<if test="record.alias != null">
alias = #{record.alias,jdbcType=VARCHAR},
</if>
<if test="record.keywords != null">
keywords = #{record.keywords,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
<if test="record.orders != null">
orders = #{record.orders,jdbcType=BIGINT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update cms_page
set page_id = #{record.pageId,jdbcType=INTEGER},
pid = #{record.pid,jdbcType=INTEGER},
alias = #{record.alias,jdbcType=VARCHAR},
keywords = #{record.keywords,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
ctime = #{record.ctime,jdbcType=BIGINT},
orders = #{record.orders,jdbcType=BIGINT},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_page
set page_id = #{record.pageId,jdbcType=INTEGER},
pid = #{record.pid,jdbcType=INTEGER},
alias = #{record.alias,jdbcType=VARCHAR},
keywords = #{record.keywords,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
ctime = #{record.ctime,jdbcType=BIGINT},
orders = #{record.orders,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsPage">
update cms_page
<set>
<if test="pid != null">
pid = #{pid,jdbcType=INTEGER},
</if>
<if test="alias != null">
alias = #{alias,jdbcType=VARCHAR},
</if>
<if test="keywords != null">
keywords = #{keywords,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null">
orders = #{orders,jdbcType=BIGINT},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where page_id = #{pageId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zheng.cms.dao.model.CmsPage">
update cms_page
set pid = #{pid,jdbcType=INTEGER},
alias = #{alias,jdbcType=VARCHAR},
keywords = #{keywords,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
ctime = #{ctime,jdbcType=BIGINT},
orders = #{orders,jdbcType=BIGINT},
content = #{content,jdbcType=LONGVARCHAR}
where page_id = #{pageId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsPage">
update cms_page
set pid = #{pid,jdbcType=INTEGER},
alias = #{alias,jdbcType=VARCHAR},
keywords = #{keywords,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
ctime = #{ctime,jdbcType=BIGINT},
orders = #{orders,jdbcType=BIGINT}
where page_id = #{pageId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -187,190 +187,4 @@
where setting_id = #{settingId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsSetting">
<id column="setting_id" jdbcType="INTEGER" property="settingId" />
<result column="setting_key" jdbcType="VARCHAR" property="settingKey" />
<result column="setting_value" jdbcType="VARCHAR" property="settingValue" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
setting_id, setting_key, setting_value
</sql>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsSettingExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_setting
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from cms_setting
where setting_id = #{settingId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_setting
where setting_id = #{settingId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsSettingExample">
delete from cms_setting
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsSetting">
insert into cms_setting (setting_id, setting_key, setting_value
)
values (#{settingId,jdbcType=INTEGER}, #{settingKey,jdbcType=VARCHAR}, #{settingValue,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsSetting">
insert into cms_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="settingId != null">
setting_id,
</if>
<if test="settingKey != null">
setting_key,
</if>
<if test="settingValue != null">
setting_value,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="settingId != null">
#{settingId,jdbcType=INTEGER},
</if>
<if test="settingKey != null">
#{settingKey,jdbcType=VARCHAR},
</if>
<if test="settingValue != null">
#{settingValue,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsSettingExample" resultType="java.lang.Long">
select count(*) from cms_setting
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_setting
<set>
<if test="record.settingId != null">
setting_id = #{record.settingId,jdbcType=INTEGER},
</if>
<if test="record.settingKey != null">
setting_key = #{record.settingKey,jdbcType=VARCHAR},
</if>
<if test="record.settingValue != null">
setting_value = #{record.settingValue,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_setting
set setting_id = #{record.settingId,jdbcType=INTEGER},
setting_key = #{record.settingKey,jdbcType=VARCHAR},
setting_value = #{record.settingValue,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsSetting">
update cms_setting
<set>
<if test="settingKey != null">
setting_key = #{settingKey,jdbcType=VARCHAR},
</if>
<if test="settingValue != null">
setting_value = #{settingValue,jdbcType=VARCHAR},
</if>
</set>
where setting_id = #{settingId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsSetting">
update cms_setting
set setting_key = #{settingKey,jdbcType=VARCHAR},
setting_value = #{settingValue,jdbcType=VARCHAR}
where setting_id = #{settingId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -264,267 +264,4 @@
where tag_id = #{tagId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsTag">
<id column="tag_id" jdbcType="INTEGER" property="tagId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="alias" jdbcType="VARCHAR" property="alias" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
<result column="orders" jdbcType="BIGINT" property="orders" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
tag_id, name, description, icon, type, alias, ctime, orders
</sql>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsTagExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_tag
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from cms_tag
where tag_id = #{tagId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_tag
where tag_id = #{tagId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsTagExample">
delete from cms_tag
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsTag">
insert into cms_tag (tag_id, name, description,
icon, type, alias,
ctime, orders)
values (#{tagId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{icon,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, #{alias,jdbcType=VARCHAR},
#{ctime,jdbcType=BIGINT}, #{orders,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsTag">
insert into cms_tag
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tagId != null">
tag_id,
</if>
<if test="name != null">
name,
</if>
<if test="description != null">
description,
</if>
<if test="icon != null">
icon,
</if>
<if test="type != null">
type,
</if>
<if test="alias != null">
alias,
</if>
<if test="ctime != null">
ctime,
</if>
<if test="orders != null">
orders,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tagId != null">
#{tagId,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="alias != null">
#{alias,jdbcType=VARCHAR},
</if>
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null">
#{orders,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsTagExample" resultType="java.lang.Long">
select count(*) from cms_tag
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_tag
<set>
<if test="record.tagId != null">
tag_id = #{record.tagId,jdbcType=INTEGER},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.icon != null">
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.alias != null">
alias = #{record.alias,jdbcType=VARCHAR},
</if>
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
<if test="record.orders != null">
orders = #{record.orders,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_tag
set tag_id = #{record.tagId,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
type = #{record.type,jdbcType=TINYINT},
alias = #{record.alias,jdbcType=VARCHAR},
ctime = #{record.ctime,jdbcType=BIGINT},
orders = #{record.orders,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsTag">
update cms_tag
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="alias != null">
alias = #{alias,jdbcType=VARCHAR},
</if>
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null">
orders = #{orders,jdbcType=BIGINT},
</if>
</set>
where tag_id = #{tagId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsTag">
update cms_tag
set name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
alias = #{alias,jdbcType=VARCHAR},
ctime = #{ctime,jdbcType=BIGINT},
orders = #{orders,jdbcType=BIGINT}
where tag_id = #{tagId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -293,296 +293,4 @@
where user_id = #{userId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsUser">
<id column="user_id" jdbcType="INTEGER" property="userId" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="nickname" jdbcType="VARCHAR" property="nickname" />
<result column="sex" jdbcType="INTEGER" property="sex" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.cms.dao.model.CmsUser">
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
user_id, username, password, nickname, sex, ctime
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.zheng.cms.dao.model.CmsUserExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from cms_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from cms_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from cms_user
where user_id = #{userId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from cms_user
where user_id = #{userId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsUserExample">
delete from cms_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsUser">
insert into cms_user (user_id, username, password,
nickname, sex, ctime,
content)
values (#{userId,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{nickname,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER}, #{ctime,jdbcType=BIGINT},
#{content,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsUser">
insert into cms_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="username != null">
username,
</if>
<if test="password != null">
password,
</if>
<if test="nickname != null">
nickname,
</if>
<if test="sex != null">
sex,
</if>
<if test="ctime != null">
ctime,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
#{nickname,jdbcType=VARCHAR},
</if>
<if test="sex != null">
#{sex,jdbcType=INTEGER},
</if>
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsUserExample" resultType="java.lang.Long">
select count(*) from cms_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cms_user
<set>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.password != null">
password = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.nickname != null">
nickname = #{record.nickname,jdbcType=VARCHAR},
</if>
<if test="record.sex != null">
sex = #{record.sex,jdbcType=INTEGER},
</if>
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update cms_user
set user_id = #{record.userId,jdbcType=INTEGER},
username = #{record.username,jdbcType=VARCHAR},
password = #{record.password,jdbcType=VARCHAR},
nickname = #{record.nickname,jdbcType=VARCHAR},
sex = #{record.sex,jdbcType=INTEGER},
ctime = #{record.ctime,jdbcType=BIGINT},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update cms_user
set user_id = #{record.userId,jdbcType=INTEGER},
username = #{record.username,jdbcType=VARCHAR},
password = #{record.password,jdbcType=VARCHAR},
nickname = #{record.nickname,jdbcType=VARCHAR},
sex = #{record.sex,jdbcType=INTEGER},
ctime = #{record.ctime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.dao.model.CmsUser">
update cms_user
<set>
<if test="username != null">
username = #{username,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
nickname = #{nickname,jdbcType=VARCHAR},
</if>
<if test="sex != null">
sex = #{sex,jdbcType=INTEGER},
</if>
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where user_id = #{userId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zheng.cms.dao.model.CmsUser">
update cms_user
set username = #{username,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
sex = #{sex,jdbcType=INTEGER},
ctime = #{ctime,jdbcType=BIGINT},
content = #{content,jdbcType=LONGVARCHAR}
where user_id = #{userId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsUser">
update cms_user
set username = #{username,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
sex = #{sex,jdbcType=INTEGER},
ctime = #{ctime,jdbcType=BIGINT}
where user_id = #{userId,jdbcType=INTEGER}
</update>
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>