Commit e9629e7a authored by Sun's avatar Sun
Browse files

no commit message

parent e4054436
@echo off
rem /**
rem */
echo.
echo [Ϣ] ļ
echo.
echo.
cd /d %~dp0
cd..
call mvn clean
cd bin
pause
\ No newline at end of file
@echo off
rem /**
rem */
echo.
echo [Ϣ] compileļ
echo.
cd /d %~dp0
cd..
call mvn compile
cd bin
pause
\ No newline at end of file
@echo off
rem /**
rem */
echo.
echo [Ϣ] ģwebappjeespring-web
echo.
pause
cd /d %~dp0
cd..
xcopy jeespring-cms\src\main\webapp\*.* jeespring-web\src\main\webapp /s /e /y
xcopy jeespring-company\src\main\webapp\*.* jeespring-web\src\main\webapp /s /e /y
cd bin
pause
\ No newline at end of file
@echo off
rem /**
rem */
echo.
echo [Ϣ] Eclipseļ
echo.
cd /d %~dp0
cd..
call mvn -Declipse.workspace=%cd% eclipse:eclipse
cd bin
pause
\ No newline at end of file
@echo off
rem /**
rem */
echo.
echo [info] del project info and target
echo.
cd ..\
if exist .\jeespring-web\target (
rmdir /s/q .\jeespring-web\target
echo [info] del .\jeespring-web\target
)
del .\jeespring-web\*.iml
if exist .\jeespring-mq\target (
rmdir /s/q .\jeespring-mq\target
echo [info] del .\jeespring-mq\target
)
del .\jeespring-mq\*.iml
if exist .\jeespring-framework\target (
rmdir /s/q .\jeespring-framework\target
echo [info] del .\jeespring-mq\target
)
del .\jeespring-framework\*.iml
if exist .\jeespring-company\target (
rmdir /s/q .\jeespring-company\target
echo [info] del .\jeespring-company\target
)
del .\jeespring-company\*.iml
if exist .\jeespring-cms\target (
rmdir /s/q .\jeespring-cms\target
echo [info] del .\jeespring-cms\target
)
del .\jeespring-cms\*.iml
if exist .\projectFilesBackup (
rmdir /s/q .\projectFilesBackup
echo [info] del .\projectFilesBackup
)
del jeespring.iml
del jeespring.ipr
del jeespring.iws
echo [info] deal end
pause
\ No newline at end of file
@echo off
rem /**
rem */
echo.
echo [Ϣ] Eclipseļ
echo.
cd /d %~dp0
cd..
call mvn idea:idea
cd bin
pause
\ No newline at end of file
@echo off
rem /**
rem */
echo.
echo [Ϣ] install
echo.
cd /d %~dp0
cd..
call mvn install -f pom-install.xml
cd bin
pause
\ No newline at end of file
@echo off
rem /**
rem */
echo.
echo [Ϣ] packageļ
echo.
cd /d %~dp0
cd..
call mvn package
cd bin
pause
\ No newline at end of file
@echo off
rem /**
rem */
echo.
echo [Ϣ] йļ
echo.
cd /d %~dp0
cd ../jeespring-web/target
java -jar jeespring-web-3.0.0.war
cd bin
pause
\ No newline at end of file
@echo off
rem /**
rem */
echo.
echo [Ϣ] packageļ
echo.
cd /d %~dp0
cd..
xcopy src\main\webapp\*.* ..\jeespring-web\src\main\webapp /s /e /y
cd bin
pause
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jeespring</groupId>
<artifactId>jeespring-cms</artifactId>
<name>jeespring-cms</name>
<description>jeespring-cms</description>
<version>1.0.0</version>
<packaging>jar</packaging>
<parent>
<groupId>com.jeespring</groupId>
<artifactId>jeespring</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>com.jeespring</groupId>
<artifactId>jeespring-framework</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
\ No newline at end of file
/**
* Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a>All rights reserved.
*/
package com.jeespring.modules.cms.dao;
import java.util.List;
import com.jeespring.common.persistence.InterfaceBaseDao;
import com.jeespring.common.persistence.annotation.MyBatisDao;
import com.jeespring.modules.cms.entity.Article;
import com.jeespring.modules.cms.entity.Category;
import org.apache.ibatis.annotations.Mapper;
/**
* 文章DAO接口
* @author JeeSpring
* @version 2013-8-23
*/
@Mapper
public interface ArticleDao extends InterfaceBaseDao<Article> {
public List<Article> findByIdIn(String[] ids);
// {
// return find("from Article where id in (:p1)", new Parameter(new Object[]{ids}));
// }
public int updateHitsAddOne(String id);
// {
// return update("update Article set hits=hits+1 where id = :p1", new Parameter(id));
// }
public int updateExpiredWeight(Article article);
public List<Category> findStats(Category category);
// {
// return update("update Article set weight=0 where weight > 0 and weightDate < current_timestamp()");
// }
}
/**
* Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a>All rights reserved.
*/
package com.jeespring.modules.cms.dao;
import com.jeespring.common.persistence.InterfaceBaseDao;
import com.jeespring.common.persistence.annotation.MyBatisDao;
import com.jeespring.modules.cms.entity.ArticleData;
import org.apache.ibatis.annotations.Mapper;
/**
* 文章DAO接口
* @author JeeSpring
* @version 2013-8-23
*/
@Mapper
public interface ArticleDataDao extends InterfaceBaseDao<ArticleData> {
}
/**
* Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a>All rights reserved.
*/
package com.jeespring.modules.cms.dao;
import java.util.List;
import java.util.Map;
import com.jeespring.common.persistence.TreeDao;
import com.jeespring.common.persistence.annotation.MyBatisDao;
import com.jeespring.modules.cms.entity.Category;
import org.apache.ibatis.annotations.Mapper;
/**
* 栏目DAO接口
* @author JeeSpring
* @version 2013-8-23
*/
@Mapper
public interface CategoryDao extends TreeDao<Category> {
public List<Category> findModule(Category category);
// public List<Category> findByParentIdsLike(Category category);
// {
// return find("from Category where parentIds like :p1", new Parameter(parentIds));
// }
public List<Category> findByModule(String module);
// {
// return find("from Category where delFlag=:p1 and (module='' or module=:p2) order by site.id, sort",
// new Parameter(Category.DEL_FLAG_NORMAL, module));
// }
public List<Category> findByParentId(String parentId, String isMenu);
// {
// return find("from Category where delFlag=:p1 and parent.id=:p2 and inMenu=:p3 order by site.id, sort",
// new Parameter(Category.DEL_FLAG_NORMAL, parentId, isMenu));
// }
public List<Category> findByParentIdAndSiteId(Category entity);
public List<Map<String, Object>> findStats(String sql);
// {
// return find("from Category where delFlag=:p1 and parent.id=:p2 and site.id=:p3 order by site.id, sort",
// new Parameter(Category.DEL_FLAG_NORMAL, parentId, siteId));
// }
//public List<Category> findByIdIn(String[] ids);
// {
// return find("from Category where id in (:p1)", new Parameter(new Object[]{ids}));
// }
//public List<Category> find(Category category);
// @Query("select distinct c from Category c, Role r, User u where c in elements (r.categoryList) and r in elements (u.roleList)" +
// " and c.delFlag='" + Category.DEL_FLAG_NORMAL + "' and r.delFlag='" + Role.DEL_FLAG_NORMAL +
// "' and u.delFlag='" + User.DEL_FLAG_NORMAL + "' and u.id=?1 or (c.user.id=?1 and c.delFlag='" + Category.DEL_FLAG_NORMAL +
// "') order by c.site.id, c.sort")
// public List<Category> findByUserId(Long userId);
}
/**
* Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a>All rights reserved.
*/
package com.jeespring.modules.cms.dao;
import com.jeespring.common.persistence.InterfaceBaseDao;
import com.jeespring.common.persistence.annotation.MyBatisDao;
import com.jeespring.modules.cms.entity.Comment;
import org.apache.ibatis.annotations.Mapper;
/**
* 评论DAO接口
* @author JeeSpring
* @version 2013-8-23
*/
@Mapper
public interface CommentDao extends InterfaceBaseDao<Comment> {
}
/**
* Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a>All rights reserved.
*/
package com.jeespring.modules.cms.dao;
import com.jeespring.common.persistence.InterfaceBaseDao;
import com.jeespring.common.persistence.annotation.MyBatisDao;
import com.jeespring.modules.cms.entity.Guestbook;
import org.apache.ibatis.annotations.Mapper;
/**
* 留言DAO接口
* @author JeeSpring
* @version 2013-8-23
*/
@Mapper
public interface GuestbookDao extends InterfaceBaseDao<Guestbook> {
}
/**
* Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a>All rights reserved.
*/
package com.jeespring.modules.cms.dao;
import java.util.List;
import com.jeespring.common.persistence.InterfaceBaseDao;
import com.jeespring.common.persistence.annotation.MyBatisDao;
import com.jeespring.modules.cms.entity.Link;
import org.apache.ibatis.annotations.Mapper;
/**
* 链接DAO接口
* @author JeeSpring
* @version 2013-8-23
*/
@Mapper
public interface LinkDao extends InterfaceBaseDao<Link> {
public List<Link> findByIdIn(String[] ids);
// {
// return find("front Like where id in (:p1)", new Parameter(new Object[]{ids}));
// }
public int updateExpiredWeight(Link link);
// {
// return update("update Link set weight=0 where weight > 0 and weightDate < current_timestamp()");
// }
// public List<Link> fjindListByEntity();
}
/**
* Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a>All rights reserved.
*/
package com.jeespring.modules.cms.dao;
import com.jeespring.common.persistence.InterfaceBaseDao;
import com.jeespring.common.persistence.annotation.MyBatisDao;
import com.jeespring.modules.cms.entity.Site;
import org.apache.ibatis.annotations.Mapper;
/**
* 站点DAO接口
* @author JeeSpring
* @version 2013-8-23
*/
@Mapper
public interface SiteDao extends InterfaceBaseDao<Site> {
}
/**
* Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a>All rights reserved.
*/
package com.jeespring.modules.cms.entity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;
import com.jeespring.modules.sys.entity.User;
import com.google.common.collect.Lists;
import com.jeespring.common.persistence.AbstractBaseEntity;
import com.jeespring.modules.cms.utils.CmsUtils;
/**
* 文章Entity
* @author JeeSpring
* @version 2013-05-15
*/
public class Article extends AbstractBaseEntity<Article> {
public static final String DEFAULT_TEMPLATE = "frontViewArticle";
private static final long serialVersionUID = 1L;
private Category category;// 分类编号
private String title; // 标题
private String link; // 外部链接
private String color; // 标题颜色(red:红色;green:绿色;blue:蓝色;yellow:黄色;orange:橙色)
private String image; // 文章图片
private String keywords;// 关键字
private String description;// 描述、摘要
private Integer weight; // 权重,越大越靠前
private Date weightDate;// 权重期限,超过期限,将weight设置为0
private Integer hits; // 点击数
private String posid; // 推荐位,多选(1:首页焦点图;2:栏目页文章推荐;)
private String customContentView; // 自定义内容视图
private String viewConfig; // 视图参数
private ArticleData articleData; //文章副表
private Date beginDate; // 开始时间
private Date endDate; // 结束时间
private User user;
public Article() {
super();
this.weight = 0;
this.hits = 0;
this.posid = "";
}
public Article(String id){
this();
this.id = id;
}
public Article(Category category){
this();
this.category = category;
}
public void prePersist(){
//TODO 后续处理,暂不知有何用处
//super.prePersist();
articleData.setId(this.id);
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Length(min=0, max=255)
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
@Length(min=0, max=50)
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
@Length(min=0, max=255)
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;//CmsUtils.formatImageSrcToDb(image);
}
@Length(min=0, max=255)
public String getKeywords() {
return keywords;
}
public void setKeywords(String keywords) {
this.keywords = keywords;
}
@Length(min=0, max=255)
public String getDescription() {
return description;
}
public Date getBeginDate() {
return beginDate;
}
public void setBeginDate(Date beginDate) {
this.beginDate = beginDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public void setDescription(String description) {
this.description = description;
}
@NotNull
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public Date getWeightDate() {
return weightDate;
}
public void setWeightDate(Date weightDate) {
this.weightDate = weightDate;
}
public Integer getHits() {
return hits;
}
public void setHits(Integer hits) {
this.hits = hits;
}
@Length(min=0, max=10)
public String getPosid() {
return posid;
}
public void setPosid(String posid) {
this.posid = posid;
}
public String getCustomContentView() {
return customContentView;
}
public void setCustomContentView(String customContentView) {
this.customContentView = customContentView;
}
public String getViewConfig() {
return viewConfig;
}
public void setViewConfig(String viewConfig) {
this.viewConfig = viewConfig;
}
public ArticleData getArticleData() {
return articleData;
}
public void setArticleData(ArticleData articleData) {
this.articleData = articleData;
}
public List<String> getPosidList() {
List<String> list = Lists.newArrayList();
if (posid != null){
for (String s : StringUtils.split(posid, ",")) {
list.add(s);
}
}
return list;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public void setPosidList(List<String> list) {
posid = ","+StringUtils.join(list, ",")+",";
}
public String getUrl() {
return CmsUtils.getUrlDynamic(this);
}
public String getImageSrc() {
return CmsUtils.formatImageSrcToWeb(this.image);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment