生成通用代码
This commit is contained in:
parent
1a7125a0ff
commit
4eb2d01e34
|
@ -0,0 +1,30 @@
|
|||
package com.zheng.cms.dao.mapper;
|
||||
|
||||
import com.zheng.cms.dao.model.CmsMenu;
|
||||
import com.zheng.cms.dao.model.CmsMenuExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface CmsMenuMapper {
|
||||
long countByExample(CmsMenuExample example);
|
||||
|
||||
int deleteByExample(CmsMenuExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer pageId);
|
||||
|
||||
int insert(CmsMenu record);
|
||||
|
||||
int insertSelective(CmsMenu record);
|
||||
|
||||
List<CmsMenu> selectByExample(CmsMenuExample example);
|
||||
|
||||
CmsMenu selectByPrimaryKey(Integer pageId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") CmsMenu record, @Param("example") CmsMenuExample example);
|
||||
|
||||
int updateByExample(@Param("record") CmsMenu record, @Param("example") CmsMenuExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(CmsMenu record);
|
||||
|
||||
int updateByPrimaryKey(CmsMenu record);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package com.zheng.cms.dao.mapper;
|
||||
|
||||
import com.zheng.cms.dao.model.CmsTopic;
|
||||
import com.zheng.cms.dao.model.CmsTopicExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface CmsTopicMapper {
|
||||
long countByExample(CmsTopicExample example);
|
||||
|
||||
int deleteByExample(CmsTopicExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer topicId);
|
||||
|
||||
int insert(CmsTopic record);
|
||||
|
||||
int insertSelective(CmsTopic record);
|
||||
|
||||
List<CmsTopic> selectByExample(CmsTopicExample example);
|
||||
|
||||
CmsTopic selectByPrimaryKey(Integer topicId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") CmsTopic record, @Param("example") CmsTopicExample example);
|
||||
|
||||
int updateByExample(@Param("record") CmsTopic record, @Param("example") CmsTopicExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(CmsTopic record);
|
||||
|
||||
int updateByPrimaryKey(CmsTopic record);
|
||||
}
|
|
@ -10,6 +10,13 @@ public class CmsArticle implements Serializable {
|
|||
*/
|
||||
private Integer articleId;
|
||||
|
||||
/**
|
||||
* 所属专题
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer topicId;
|
||||
|
||||
/**
|
||||
* 文章标题
|
||||
*
|
||||
|
@ -118,6 +125,14 @@ public class CmsArticle implements Serializable {
|
|||
this.articleId = articleId;
|
||||
}
|
||||
|
||||
public Integer getTopicId() {
|
||||
return topicId;
|
||||
}
|
||||
|
||||
public void setTopicId(Integer topicId) {
|
||||
this.topicId = topicId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
@ -237,6 +252,7 @@ public class CmsArticle implements Serializable {
|
|||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", articleId=").append(articleId);
|
||||
sb.append(", topicId=").append(topicId);
|
||||
sb.append(", title=").append(title);
|
||||
sb.append(", author=").append(author);
|
||||
sb.append(", fromurl=").append(fromurl);
|
||||
|
@ -268,6 +284,7 @@ public class CmsArticle implements Serializable {
|
|||
}
|
||||
CmsArticle other = (CmsArticle) that;
|
||||
return (this.getArticleId() == null ? other.getArticleId() == null : this.getArticleId().equals(other.getArticleId()))
|
||||
&& (this.getTopicId() == null ? other.getTopicId() == null : this.getTopicId().equals(other.getTopicId()))
|
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
|
||||
&& (this.getAuthor() == null ? other.getAuthor() == null : this.getAuthor().equals(other.getAuthor()))
|
||||
&& (this.getFromurl() == null ? other.getFromurl() == null : this.getFromurl().equals(other.getFromurl()))
|
||||
|
@ -289,6 +306,7 @@ public class CmsArticle implements Serializable {
|
|||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getArticleId() == null) ? 0 : getArticleId().hashCode());
|
||||
result = prime * result + ((getTopicId() == null) ? 0 : getTopicId().hashCode());
|
||||
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
|
||||
result = prime * result + ((getAuthor() == null) ? 0 : getAuthor().hashCode());
|
||||
result = prime * result + ((getFromurl() == null) ? 0 : getFromurl().hashCode());
|
||||
|
|
|
@ -187,6 +187,66 @@ public class CmsArticleExample implements Serializable {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdIsNull() {
|
||||
addCriterion("topic_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdIsNotNull() {
|
||||
addCriterion("topic_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdEqualTo(Integer value) {
|
||||
addCriterion("topic_id =", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdNotEqualTo(Integer value) {
|
||||
addCriterion("topic_id <>", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdGreaterThan(Integer value) {
|
||||
addCriterion("topic_id >", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("topic_id >=", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdLessThan(Integer value) {
|
||||
addCriterion("topic_id <", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("topic_id <=", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdIn(List<Integer> values) {
|
||||
addCriterion("topic_id in", values, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdNotIn(List<Integer> values) {
|
||||
addCriterion("topic_id not in", values, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("topic_id between", value1, value2, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("topic_id not between", value1, value2, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIsNull() {
|
||||
addCriterion("title is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -0,0 +1,146 @@
|
|||
package com.zheng.cms.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class CmsMenu implements Serializable {
|
||||
/**
|
||||
* 编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer pageId;
|
||||
|
||||
/**
|
||||
* 父菜单
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 链接
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 打开方式
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String target;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long orders;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getPageId() {
|
||||
return pageId;
|
||||
}
|
||||
|
||||
public void setPageId(Integer pageId) {
|
||||
this.pageId = pageId;
|
||||
}
|
||||
|
||||
public Integer getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(Integer pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public void setTarget(String target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
public Long getOrders() {
|
||||
return orders;
|
||||
}
|
||||
|
||||
public void setOrders(Long orders) {
|
||||
this.orders = orders;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", pageId=").append(pageId);
|
||||
sb.append(", pid=").append(pid);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", url=").append(url);
|
||||
sb.append(", target=").append(target);
|
||||
sb.append(", orders=").append(orders);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CmsMenu other = (CmsMenu) that;
|
||||
return (this.getPageId() == null ? other.getPageId() == null : this.getPageId().equals(other.getPageId()))
|
||||
&& (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()))
|
||||
&& (this.getTarget() == null ? other.getTarget() == null : this.getTarget().equals(other.getTarget()))
|
||||
&& (this.getOrders() == null ? other.getOrders() == null : this.getOrders().equals(other.getOrders()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getPageId() == null) ? 0 : getPageId().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());
|
||||
result = prime * result + ((getTarget() == null) ? 0 : getTarget().hashCode());
|
||||
result = prime * result + ((getOrders() == null) ? 0 : getOrders().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,613 @@
|
|||
package com.zheng.cms.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CmsMenuExample implements Serializable {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Integer offset;
|
||||
|
||||
public CmsMenuExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Integer offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Integer getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria implements Serializable {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andPageIdIsNull() {
|
||||
addCriterion("page_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdIsNotNull() {
|
||||
addCriterion("page_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdEqualTo(Integer value) {
|
||||
addCriterion("page_id =", value, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdNotEqualTo(Integer value) {
|
||||
addCriterion("page_id <>", value, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdGreaterThan(Integer value) {
|
||||
addCriterion("page_id >", value, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("page_id >=", value, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdLessThan(Integer value) {
|
||||
addCriterion("page_id <", value, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("page_id <=", value, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdIn(List<Integer> values) {
|
||||
addCriterion("page_id in", values, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdNotIn(List<Integer> values) {
|
||||
addCriterion("page_id not in", values, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("page_id between", value1, value2, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPageIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("page_id not between", value1, value2, "pageId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIsNull() {
|
||||
addCriterion("pid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIsNotNull() {
|
||||
addCriterion("pid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidEqualTo(Integer value) {
|
||||
addCriterion("pid =", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotEqualTo(Integer value) {
|
||||
addCriterion("pid <>", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidGreaterThan(Integer value) {
|
||||
addCriterion("pid >", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("pid >=", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidLessThan(Integer value) {
|
||||
addCriterion("pid <", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("pid <=", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIn(List<Integer> values) {
|
||||
addCriterion("pid in", values, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotIn(List<Integer> values) {
|
||||
addCriterion("pid not in", values, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("pid between", value1, value2, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("pid not between", value1, value2, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("name =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("name <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("name >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("name >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("name <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("name <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("name like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("name not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("name in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("name not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("name between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("name not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNull() {
|
||||
addCriterion("url is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNotNull() {
|
||||
addCriterion("url is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlEqualTo(String value) {
|
||||
addCriterion("url =", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotEqualTo(String value) {
|
||||
addCriterion("url <>", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThan(String value) {
|
||||
addCriterion("url >", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("url >=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThan(String value) {
|
||||
addCriterion("url <", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThanOrEqualTo(String value) {
|
||||
addCriterion("url <=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLike(String value) {
|
||||
addCriterion("url like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotLike(String value) {
|
||||
addCriterion("url not like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIn(List<String> values) {
|
||||
addCriterion("url in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotIn(List<String> values) {
|
||||
addCriterion("url not in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlBetween(String value1, String value2) {
|
||||
addCriterion("url between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotBetween(String value1, String value2) {
|
||||
addCriterion("url not between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetIsNull() {
|
||||
addCriterion("target is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetIsNotNull() {
|
||||
addCriterion("target is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetEqualTo(String value) {
|
||||
addCriterion("target =", value, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetNotEqualTo(String value) {
|
||||
addCriterion("target <>", value, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetGreaterThan(String value) {
|
||||
addCriterion("target >", value, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("target >=", value, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetLessThan(String value) {
|
||||
addCriterion("target <", value, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetLessThanOrEqualTo(String value) {
|
||||
addCriterion("target <=", value, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetLike(String value) {
|
||||
addCriterion("target like", value, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetNotLike(String value) {
|
||||
addCriterion("target not like", value, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetIn(List<String> values) {
|
||||
addCriterion("target in", values, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetNotIn(List<String> values) {
|
||||
addCriterion("target not in", values, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetBetween(String value1, String value2) {
|
||||
addCriterion("target between", value1, value2, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTargetNotBetween(String value1, String value2) {
|
||||
addCriterion("target not between", value1, value2, "target");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersIsNull() {
|
||||
addCriterion("orders is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersIsNotNull() {
|
||||
addCriterion("orders is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersEqualTo(Long value) {
|
||||
addCriterion("orders =", value, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersNotEqualTo(Long value) {
|
||||
addCriterion("orders <>", value, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersGreaterThan(Long value) {
|
||||
addCriterion("orders >", value, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("orders >=", value, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersLessThan(Long value) {
|
||||
addCriterion("orders <", value, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersLessThanOrEqualTo(Long value) {
|
||||
addCriterion("orders <=", value, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersIn(List<Long> values) {
|
||||
addCriterion("orders in", values, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersNotIn(List<Long> values) {
|
||||
addCriterion("orders not in", values, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersBetween(Long value1, Long value2) {
|
||||
addCriterion("orders between", value1, value2, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrdersNotBetween(Long value1, Long value2) {
|
||||
addCriterion("orders not between", value1, value2, "orders");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria implements Serializable {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion implements Serializable {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,20 +3,67 @@ package com.zheng.cms.dao.model;
|
|||
import java.io.Serializable;
|
||||
|
||||
public class CmsPage implements Serializable {
|
||||
/**
|
||||
* 编码
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer pageId;
|
||||
|
||||
/**
|
||||
* 父页面
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 别名
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String alias;
|
||||
|
||||
/**
|
||||
* 关键字
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String keywords;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long ctime;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long orders;
|
||||
|
||||
/**
|
||||
* 页面内容
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String content;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -37,6 +84,14 @@ public class CmsPage implements Serializable {
|
|||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getAlias() {
|
||||
return alias;
|
||||
}
|
||||
|
@ -93,6 +148,7 @@ public class CmsPage implements Serializable {
|
|||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", pageId=").append(pageId);
|
||||
sb.append(", pid=").append(pid);
|
||||
sb.append(", title=").append(title);
|
||||
sb.append(", alias=").append(alias);
|
||||
sb.append(", keywords=").append(keywords);
|
||||
sb.append(", description=").append(description);
|
||||
|
@ -117,6 +173,7 @@ public class CmsPage implements Serializable {
|
|||
CmsPage other = (CmsPage) that;
|
||||
return (this.getPageId() == null ? other.getPageId() == null : this.getPageId().equals(other.getPageId()))
|
||||
&& (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
|
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
|
||||
&& (this.getAlias() == null ? other.getAlias() == null : this.getAlias().equals(other.getAlias()))
|
||||
&& (this.getKeywords() == null ? other.getKeywords() == null : this.getKeywords().equals(other.getKeywords()))
|
||||
&& (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
|
||||
|
@ -131,6 +188,7 @@ public class CmsPage implements Serializable {
|
|||
int result = 1;
|
||||
result = prime * result + ((getPageId() == null) ? 0 : getPageId().hashCode());
|
||||
result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
|
||||
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
|
||||
result = prime * result + ((getAlias() == null) ? 0 : getAlias().hashCode());
|
||||
result = prime * result + ((getKeywords() == null) ? 0 : getKeywords().hashCode());
|
||||
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
|
||||
|
|
|
@ -247,6 +247,76 @@ public class CmsPageExample implements Serializable {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIsNull() {
|
||||
addCriterion("title is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIsNotNull() {
|
||||
addCriterion("title is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleEqualTo(String value) {
|
||||
addCriterion("title =", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotEqualTo(String value) {
|
||||
addCriterion("title <>", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleGreaterThan(String value) {
|
||||
addCriterion("title >", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("title >=", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleLessThan(String value) {
|
||||
addCriterion("title <", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleLessThanOrEqualTo(String value) {
|
||||
addCriterion("title <=", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleLike(String value) {
|
||||
addCriterion("title like", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotLike(String value) {
|
||||
addCriterion("title not like", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIn(List<String> values) {
|
||||
addCriterion("title in", values, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotIn(List<String> values) {
|
||||
addCriterion("title not in", values, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleBetween(String value1, String value2) {
|
||||
addCriterion("title between", value1, value2, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotBetween(String value1, String value2) {
|
||||
addCriterion("title not between", value1, value2, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAliasIsNull() {
|
||||
addCriterion("alias is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
package com.zheng.cms.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class CmsTopic implements Serializable {
|
||||
/**
|
||||
* 编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer topicId;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 链接
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long ctime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getTopicId() {
|
||||
return topicId;
|
||||
}
|
||||
|
||||
public void setTopicId(Integer topicId) {
|
||||
this.topicId = topicId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public Long getCtime() {
|
||||
return ctime;
|
||||
}
|
||||
|
||||
public void setCtime(Long ctime) {
|
||||
this.ctime = ctime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", topicId=").append(topicId);
|
||||
sb.append(", title=").append(title);
|
||||
sb.append(", description=").append(description);
|
||||
sb.append(", url=").append(url);
|
||||
sb.append(", ctime=").append(ctime);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CmsTopic other = (CmsTopic) that;
|
||||
return (this.getTopicId() == null ? other.getTopicId() == null : this.getTopicId().equals(other.getTopicId()))
|
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
|
||||
&& (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
|
||||
&& (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
|
||||
&& (this.getCtime() == null ? other.getCtime() == null : this.getCtime().equals(other.getCtime()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getTopicId() == null) ? 0 : getTopicId().hashCode());
|
||||
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
|
||||
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
|
||||
result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
|
||||
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,553 @@
|
|||
package com.zheng.cms.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CmsTopicExample implements Serializable {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Integer offset;
|
||||
|
||||
public CmsTopicExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Integer offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Integer getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria implements Serializable {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andTopicIdIsNull() {
|
||||
addCriterion("topic_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdIsNotNull() {
|
||||
addCriterion("topic_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdEqualTo(Integer value) {
|
||||
addCriterion("topic_id =", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdNotEqualTo(Integer value) {
|
||||
addCriterion("topic_id <>", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdGreaterThan(Integer value) {
|
||||
addCriterion("topic_id >", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("topic_id >=", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdLessThan(Integer value) {
|
||||
addCriterion("topic_id <", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("topic_id <=", value, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdIn(List<Integer> values) {
|
||||
addCriterion("topic_id in", values, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdNotIn(List<Integer> values) {
|
||||
addCriterion("topic_id not in", values, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("topic_id between", value1, value2, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTopicIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("topic_id not between", value1, value2, "topicId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIsNull() {
|
||||
addCriterion("title is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIsNotNull() {
|
||||
addCriterion("title is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleEqualTo(String value) {
|
||||
addCriterion("title =", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotEqualTo(String value) {
|
||||
addCriterion("title <>", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleGreaterThan(String value) {
|
||||
addCriterion("title >", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("title >=", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleLessThan(String value) {
|
||||
addCriterion("title <", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleLessThanOrEqualTo(String value) {
|
||||
addCriterion("title <=", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleLike(String value) {
|
||||
addCriterion("title like", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotLike(String value) {
|
||||
addCriterion("title not like", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIn(List<String> values) {
|
||||
addCriterion("title in", values, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotIn(List<String> values) {
|
||||
addCriterion("title not in", values, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleBetween(String value1, String value2) {
|
||||
addCriterion("title between", value1, value2, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotBetween(String value1, String value2) {
|
||||
addCriterion("title not between", value1, value2, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNull() {
|
||||
addCriterion("description is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNotNull() {
|
||||
addCriterion("description is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionEqualTo(String value) {
|
||||
addCriterion("description =", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotEqualTo(String value) {
|
||||
addCriterion("description <>", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThan(String value) {
|
||||
addCriterion("description >", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("description >=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThan(String value) {
|
||||
addCriterion("description <", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
||||
addCriterion("description <=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLike(String value) {
|
||||
addCriterion("description like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotLike(String value) {
|
||||
addCriterion("description not like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIn(List<String> values) {
|
||||
addCriterion("description in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotIn(List<String> values) {
|
||||
addCriterion("description not in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
||||
addCriterion("description between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
||||
addCriterion("description not between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNull() {
|
||||
addCriterion("url is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNotNull() {
|
||||
addCriterion("url is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlEqualTo(String value) {
|
||||
addCriterion("url =", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotEqualTo(String value) {
|
||||
addCriterion("url <>", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThan(String value) {
|
||||
addCriterion("url >", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("url >=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThan(String value) {
|
||||
addCriterion("url <", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThanOrEqualTo(String value) {
|
||||
addCriterion("url <=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLike(String value) {
|
||||
addCriterion("url like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotLike(String value) {
|
||||
addCriterion("url not like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIn(List<String> values) {
|
||||
addCriterion("url in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotIn(List<String> values) {
|
||||
addCriterion("url not in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlBetween(String value1, String value2) {
|
||||
addCriterion("url between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotBetween(String value1, String value2) {
|
||||
addCriterion("url not between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeIsNull() {
|
||||
addCriterion("ctime is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeIsNotNull() {
|
||||
addCriterion("ctime is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeEqualTo(Long value) {
|
||||
addCriterion("ctime =", value, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeNotEqualTo(Long value) {
|
||||
addCriterion("ctime <>", value, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeGreaterThan(Long value) {
|
||||
addCriterion("ctime >", value, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("ctime >=", value, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeLessThan(Long value) {
|
||||
addCriterion("ctime <", value, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("ctime <=", value, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeIn(List<Long> values) {
|
||||
addCriterion("ctime in", values, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeNotIn(List<Long> values) {
|
||||
addCriterion("ctime not in", values, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeBetween(Long value1, Long value2) {
|
||||
addCriterion("ctime between", value1, value2, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCtimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("ctime not between", value1, value2, "ctime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria implements Serializable {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion implements Serializable {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zheng.cms.rpc.api;
|
||||
|
||||
import com.zheng.cms.dao.model.CmsMenu;
|
||||
import com.zheng.cms.dao.model.CmsMenuExample;
|
||||
import com.zheng.common.base.BaseService;
|
||||
|
||||
/**
|
||||
* 菜单service接口
|
||||
* Created by shuzheng on 2017/3/18.
|
||||
*/
|
||||
public interface CmsMenuService extends BaseService<CmsMenu, CmsMenuExample> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.zheng.cms.rpc.api;
|
||||
|
||||
import com.zheng.cms.dao.mapper.CmsMenuMapper;
|
||||
import com.zheng.cms.dao.model.CmsMenu;
|
||||
import com.zheng.cms.dao.model.CmsMenuExample;
|
||||
import com.zheng.common.base.BaseServiceMock;
|
||||
|
||||
/**
|
||||
* 降级实现CmsMenuService接口
|
||||
* Created by shuzheng on 2017/3/18.
|
||||
*/
|
||||
public class CmsMenuServiceMock extends BaseServiceMock<CmsMenuMapper, CmsMenu, CmsMenuExample> implements CmsMenuService {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zheng.cms.rpc.api;
|
||||
|
||||
import com.zheng.cms.dao.model.CmsTopic;
|
||||
import com.zheng.cms.dao.model.CmsTopicExample;
|
||||
import com.zheng.common.base.BaseService;
|
||||
|
||||
/**
|
||||
* 专题service接口
|
||||
* Created by shuzheng on 2017/3/18.
|
||||
*/
|
||||
public interface CmsTopicService extends BaseService<CmsTopic, CmsTopicExample> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.zheng.cms.rpc.api;
|
||||
|
||||
import com.zheng.cms.dao.mapper.CmsTopicMapper;
|
||||
import com.zheng.cms.dao.model.CmsTopic;
|
||||
import com.zheng.cms.dao.model.CmsTopicExample;
|
||||
import com.zheng.common.base.BaseServiceMock;
|
||||
|
||||
/**
|
||||
* 降级实现CmsTopicService接口
|
||||
* Created by shuzheng on 2017/3/18.
|
||||
*/
|
||||
public class CmsTopicServiceMock extends BaseServiceMock<CmsTopicMapper, CmsTopic, CmsTopicExample> implements CmsTopicService {
|
||||
|
||||
}
|
|
@ -187,4 +187,190 @@
|
|||
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>
|
|
@ -1,6 +1,458 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zheng.cms.dao.mapper.CmsArticleMapper">
|
||||
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsArticle">
|
||||
<id column="article_id" jdbcType="INTEGER" property="articleId" />
|
||||
<result column="topic_id" jdbcType="INTEGER" property="topicId" />
|
||||
<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, topic_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, topic_id, title,
|
||||
author, fromurl, image,
|
||||
keywords, description, type,
|
||||
allowcomments, status, user_id,
|
||||
readnumber, ctime, orders,
|
||||
content)
|
||||
values (#{articleId,jdbcType=INTEGER}, #{topicId,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="topicId != null">
|
||||
topic_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="topicId != null">
|
||||
#{topicId,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.topicId != null">
|
||||
topic_id = #{record.topicId,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},
|
||||
topic_id = #{record.topicId,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},
|
||||
topic_id = #{record.topicId,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="topicId != null">
|
||||
topic_id = #{topicId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<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 topic_id = #{topicId,jdbcType=INTEGER},
|
||||
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 topic_id = #{topicId,jdbcType=INTEGER},
|
||||
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" />
|
||||
<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" />
|
||||
|
|
|
@ -187,4 +187,190 @@
|
|||
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>
|
|
@ -187,4 +187,190 @@
|
|||
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>
|
|
@ -296,4 +296,299 @@
|
|||
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>
|
|
@ -187,4 +187,190 @@
|
|||
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>
|
|
@ -329,4 +329,332 @@
|
|||
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>
|
|
@ -0,0 +1,235 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zheng.cms.dao.mapper.CmsMenuMapper">
|
||||
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsMenu">
|
||||
<id column="page_id" jdbcType="INTEGER" property="pageId" />
|
||||
<result column="pid" jdbcType="INTEGER" property="pid" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="url" jdbcType="VARCHAR" property="url" />
|
||||
<result column="target" jdbcType="VARCHAR" property="target" />
|
||||
<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">
|
||||
page_id, pid, name, url, target, orders
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsMenuExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from cms_menu
|
||||
<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_menu
|
||||
where page_id = #{pageId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from cms_menu
|
||||
where page_id = #{pageId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsMenuExample">
|
||||
delete from cms_menu
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsMenu">
|
||||
insert into cms_menu (page_id, pid, name,
|
||||
url, target, orders)
|
||||
values (#{pageId,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>
|
||||
<if test="pid != null">
|
||||
pid,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url,
|
||||
</if>
|
||||
<if test="target != null">
|
||||
target,
|
||||
</if>
|
||||
<if test="orders != null">
|
||||
orders,
|
||||
</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="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
#{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="target != null">
|
||||
#{target,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orders != null">
|
||||
#{orders,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsMenuExample" resultType="java.lang.Long">
|
||||
select count(*) from cms_menu
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update cms_menu
|
||||
<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.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.url != null">
|
||||
url = #{record.url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.target != null">
|
||||
target = #{record.target,jdbcType=VARCHAR},
|
||||
</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_menu
|
||||
set page_id = #{record.pageId,jdbcType=INTEGER},
|
||||
pid = #{record.pid,jdbcType=INTEGER},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
url = #{record.url,jdbcType=VARCHAR},
|
||||
target = #{record.target,jdbcType=VARCHAR},
|
||||
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.CmsMenu">
|
||||
update cms_menu
|
||||
<set>
|
||||
<if test="pid != null">
|
||||
pid = #{pid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="target != null">
|
||||
target = #{target,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orders != null">
|
||||
orders = #{orders,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where page_id = #{pageId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsMenu">
|
||||
update cms_menu
|
||||
set pid = #{pid,jdbcType=INTEGER},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
target = #{target,jdbcType=VARCHAR},
|
||||
orders = #{orders,jdbcType=BIGINT}
|
||||
where page_id = #{pageId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
||||
</mapper>
|
|
@ -1,6 +1,334 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zheng.cms.dao.mapper.CmsPageMapper">
|
||||
<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="title" jdbcType="VARCHAR" property="title" />
|
||||
<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, title, 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, title,
|
||||
alias, keywords, description,
|
||||
ctime, orders, content
|
||||
)
|
||||
values (#{pageId,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
|
||||
#{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="title != null">
|
||||
title,
|
||||
</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="title != null">
|
||||
#{title,jdbcType=VARCHAR},
|
||||
</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.title != null">
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
</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},
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
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},
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
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="title != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</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},
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
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},
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
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" />
|
||||
<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" />
|
||||
|
|
|
@ -187,4 +187,190 @@
|
|||
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>
|
|
@ -264,4 +264,267 @@
|
|||
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>
|
|
@ -0,0 +1,220 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zheng.cms.dao.mapper.CmsTopicMapper">
|
||||
<resultMap id="BaseResultMap" type="com.zheng.cms.dao.model.CmsTopic">
|
||||
<id column="topic_id" jdbcType="INTEGER" property="topicId" />
|
||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="url" jdbcType="VARCHAR" property="url" />
|
||||
<result column="ctime" jdbcType="BIGINT" property="ctime" />
|
||||
</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">
|
||||
topic_id, title, description, url, ctime
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.zheng.cms.dao.model.CmsTopicExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from cms_topic
|
||||
<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_topic
|
||||
where topic_id = #{topicId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from cms_topic
|
||||
where topic_id = #{topicId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.zheng.cms.dao.model.CmsTopicExample">
|
||||
delete from cms_topic
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.zheng.cms.dao.model.CmsTopic">
|
||||
insert into cms_topic (topic_id, title, description,
|
||||
url, ctime)
|
||||
values (#{topicId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||
#{url,jdbcType=VARCHAR}, #{ctime,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.zheng.cms.dao.model.CmsTopic">
|
||||
insert into cms_topic
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="topicId != null">
|
||||
topic_id,
|
||||
</if>
|
||||
<if test="title != null">
|
||||
title,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url,
|
||||
</if>
|
||||
<if test="ctime != null">
|
||||
ctime,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="topicId != null">
|
||||
#{topicId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="title != null">
|
||||
#{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
#{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ctime != null">
|
||||
#{ctime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.zheng.cms.dao.model.CmsTopicExample" resultType="java.lang.Long">
|
||||
select count(*) from cms_topic
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update cms_topic
|
||||
<set>
|
||||
<if test="record.topicId != null">
|
||||
topic_id = #{record.topicId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.title != null">
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.url != null">
|
||||
url = #{record.url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.ctime != null">
|
||||
ctime = #{record.ctime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update cms_topic
|
||||
set topic_id = #{record.topicId,jdbcType=INTEGER},
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
url = #{record.url,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.CmsTopic">
|
||||
update cms_topic
|
||||
<set>
|
||||
<if test="title != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ctime != null">
|
||||
ctime = #{ctime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where topic_id = #{topicId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.zheng.cms.dao.model.CmsTopic">
|
||||
update cms_topic
|
||||
set title = #{title,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
ctime = #{ctime,jdbcType=BIGINT}
|
||||
where topic_id = #{topicId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
||||
</mapper>
|
|
@ -293,4 +293,296 @@
|
|||
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>
|
|
@ -0,0 +1,25 @@
|
|||
package com.zheng.cms.rpc.service.impl;
|
||||
|
||||
import com.zheng.cms.dao.mapper.CmsMenuMapper;
|
||||
import com.zheng.cms.dao.model.CmsMenu;
|
||||
import com.zheng.cms.dao.model.CmsMenuExample;
|
||||
import com.zheng.cms.rpc.api.CmsMenuService;
|
||||
import com.zheng.common.annotation.BaseService;
|
||||
import com.zheng.common.base.BaseServiceImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 菜单service实现
|
||||
* Created by shuzheng on 2017/3/18.
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@BaseService
|
||||
public class CmsMenuServiceImpl extends BaseServiceImpl<CmsMenuMapper, CmsMenu, CmsMenuExample> implements CmsMenuService {
|
||||
|
||||
private static Logger _log = LoggerFactory.getLogger(CmsMenuServiceImpl.class);
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.zheng.cms.rpc.service.impl;
|
||||
|
||||
import com.zheng.cms.dao.mapper.CmsTopicMapper;
|
||||
import com.zheng.cms.dao.model.CmsTopic;
|
||||
import com.zheng.cms.dao.model.CmsTopicExample;
|
||||
import com.zheng.cms.rpc.api.CmsTopicService;
|
||||
import com.zheng.common.annotation.BaseService;
|
||||
import com.zheng.common.base.BaseServiceImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 专题service实现
|
||||
* Created by shuzheng on 2017/3/18.
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@BaseService
|
||||
public class CmsTopicServiceImpl extends BaseServiceImpl<CmsTopicMapper, CmsTopic, CmsTopicExample> implements CmsTopicService {
|
||||
|
||||
private static Logger _log = LoggerFactory.getLogger(CmsTopicServiceImpl.class);
|
||||
|
||||
}
|
Loading…
Reference in New Issue