Skip to content

Commit

Permalink
截图
Browse files Browse the repository at this point in the history
  • Loading branch information
xp541130126 committed Jul 13, 2017
1 parent a8a6ba4 commit c2e0873
Show file tree
Hide file tree
Showing 147 changed files with 2,860 additions and 1,277 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,838 changes: 690 additions & 1,148 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Blog.iml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<orderEntry type="module-library">
<library name="Maven: com.alibaba:jconsole:1.8.0">
<CLASSES>
<root url="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/jconsole.jar!/" />
<root url="jar:///Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/lib/jconsole.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
Expand All @@ -64,7 +64,7 @@
<orderEntry type="module-library">
<library name="Maven: com.alibaba:tools:1.8.0">
<CLASSES>
<root url="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/tools.jar!/" />
<root url="jar:///Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/lib/tools.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
Expand Down
7 changes: 1 addition & 6 deletions src/main/resources/mapper/BlogTypeMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
<insert id="addBlogType" parameterType="BlogType" keyProperty="id" useGeneratedKeys="true">
insert into db_blog.t_blogtype
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="typeName!=null and typeName!=''">
type_name,
</if>
<if test="orderNum!=null and orderNum!=''">
order_num,
</if>

</trim>
<trim prefix="values(" suffix=")" suffixOverrides=",">
<if test="typeName!=null and typeName!=''">
Expand Down
2 changes: 2 additions & 0 deletions src/main/webapp/admin/modifyBlog.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<script type="text/javascript">
var ue = UE.getEditor('editor');
ue.addListener("ready",function () {
//百度UE自定义ajax请求
UE.ajax.request("${blog}/admin/blog/get.do",{
method:"post",
async:true,
Expand All @@ -82,6 +83,7 @@
})
})
</script>

<script type="text/javascript">
function submitData() {
var title = $("#title").val();
Expand Down
13 changes: 12 additions & 1 deletion src/main/webapp/admin/writeBlog.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,31 @@
var ue = UE.getEditor('editor');
</script>
<script type="text/javascript">
/**
* 发布博客
*/
function submitData() {
//获取博客标题
var title = $("#title").val();
//获取博客类别id
var blogTypeId = $("#blogTypeId").combobox("getValue");
//获取博客内容 带标记
var content = UE.getEditor('editor').getContent();
//截取博客前155字符 作为博客简介
var summary = UE.getEditor('editor').getContentTxt().substr(0, 155);
//博客关键词
var keyWord = $("#keyWord").val();
//获取博客内容 不带标签 纯文本
var contentNoTag = UE.getEditor('editor').getContentTxt();
//校验
if (title == null || title == '') {
$.messager.alert("系统提示", "请输入标题!");
} else if (blogTypeId == null || blogTypeId == '') {
$.messager.alert("系统提示", "请选择博客类型!");
} else if (content == null || content == '') {
$.messager.alert("系统提示", "请编辑博客内容!");
} else {
//ajax请求 请求后台写博客接口
$.post("${blog}/admin/blog/save.do",
{
'title' : title,
Expand All @@ -101,6 +111,7 @@
}, "json");
}
}
//清空功能
function clearValues() {
$("#title").val("");
$("#blogTypeId").combobox("setValue", "");
Expand Down
Binary file added src/main/webapp/static/luceneIndex/_1.cfe
Binary file not shown.
Binary file added src/main/webapp/static/luceneIndex/_1.cfs
Binary file not shown.
Binary file added src/main/webapp/static/luceneIndex/_1.si
Binary file not shown.
Binary file removed src/main/webapp/static/luceneIndex/segments_1
Binary file not shown.
Binary file added src/main/webapp/static/luceneIndex/segments_2
Binary file not shown.
Binary file added target/Blog.war
Binary file not shown.
5 changes: 5 additions & 0 deletions target/Blog/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Manifest-Version: 1.0
Built-By: xp
Created-By: IntelliJ IDEA
Build-Jdk: 1.7.0_71

67 changes: 67 additions & 0 deletions target/Blog/WEB-INF/classes/generatorConfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration>
<!-- 引入配置文件 -->
<properties resource="jdbc.properties"/>

<!-- 指定数据连接驱动jar地址 -->
<classPathEntry location="E:\maven\repository\mysql\mysql-connector-java\5.1.41\mysql-connector-java-5.1.41.jar" />

<!-- 一个数据库一个context -->
<context id="infoGuardian">
<!-- 注释 -->
<commentGenerator >
<property name="suppressAllComments" value="false"/><!-- 是否取消注释 -->
<property name="suppressDate" value="true" /> <!-- 是否生成注释代时间戳-->
</commentGenerator>

<!-- jdbc连接 -->
<jdbcConnection driverClass="${driver}"
connectionURL="${url}" userId="${user}"
password="${password}" />

<!-- 类型转换 -->
<javaTypeResolver>
<!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>

<!-- 生成实体类地址 -->
<javaModelGenerator targetPackage="com.rq"
targetProject="${project}" >
<!-- 是否在当前路径下新加一层schema,eg:fase路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
<property name="enableSubPackages" value="false"/>
<!-- 是否针对string类型的字段在set的时候进行trim调用 -->
<property name="trimStrings" value="true"/>
</javaModelGenerator>

<!-- 生成mapxml文件 -->
<sqlMapGenerator targetPackage="com.rq"
targetProject="${project}" >
<!-- 是否在当前路径下新加一层schema,eg:fase路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
<property name="enableSubPackages" value="false" />
</sqlMapGenerator>

<!-- 生成mapxml对应client,也就是接口dao -->
<javaClientGenerator targetPackage="com.rq"
targetProject="${project}" type="XMLMAPPER" >
<!-- 是否在当前路径下新加一层schema,eg:fase路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
<property name="enableSubPackages" value="false" />
</javaClientGenerator>

<!-- 配置表信息 -->
<table schema="ordinms" tableName="myfriend"
domainObjectName="MyFriend" enableCountByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
enableUpdateByExample="false">
<!-- schema即为数据库名 tableName为对应的数据库表 domainObjectName是要生成的实体类 enable*ByExample
是否生成 example类 -->

<!-- 忽略列,不生成bean 字段 -->
<ignoreColumn column="FRED" />
<!-- 指定列的java数据类型 -->
<columnOverride column="LONG_VARCHAR_FIELD" jdbcType="VARCHAR" />
</table>

</context>
</generatorConfiguration>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions target/Blog/WEB-INF/classes/mapper/BlogTypeMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
<insert id="addBlogType" parameterType="BlogType" keyProperty="id" useGeneratedKeys="true">
insert into db_blog.t_blogtype
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="typeName!=null and typeName!=''">
type_name,
</if>
<if test="orderNum!=null and orderNum!=''">
order_num,
</if>

</trim>
<trim prefix="values(" suffix=")" suffixOverrides=",">
<if test="typeName!=null and typeName!=''">
Expand Down
69 changes: 69 additions & 0 deletions target/Blog/WEB-INF/classes/mapper/CommentDao.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?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="ssm.blog.dao.CommentDao">
<resultMap id="CommentResultMap" type="Comment">
<id property="id" column="id"/>
<result property="userIp" column="user_ip"/>
<result property="content" column="content"/>
<result property="commentDate" column="comment_date"/>
<result property="state" column="state"/>
<association property="blog" column="blog_id" select="ssm.blog.dao.BlogDao.getById"/>
</resultMap>

<select id="listByPage" parameterType="java.util.Map" resultMap="CommentResultMap">
SELECT * from t_comment
<where>
<if test="blogId!=null">
and blog_id=#{blogId}
</if>
<if test="state!=null">
and state=#{state}
</if>
</where>
ORDER BY comment_date DESC
<if test="start!=null and pageSize!=null">
limit #{start},#{end}
</if>
</select>

<select id="getById" parameterType="java.lang.Integer" resultMap="CommentResultMap">
select * from t_comment
where id=#{id}
</select>

<select id="getTotal" parameterType="java.util.Map" resultType="java.lang.Long">
SELECT count(*) from t_comment
<where>
<if test="state != null">
state = #{state}
</if>
</where>
</select>

<insert id="saveComment">
insert into t_comment VALUES (null,#{userIp},#{content},now(),0,#{blog.id})
</insert>

<delete id="deleteComment" parameterType="java.lang.Integer">
DELETE FROM t_comment
where id=#{id}
</delete>

<update id="updateComment" parameterType="Comment">
update t_comment
<set>
<if test="state != null">
state = #{state}
</if>
</set>
where id=#{id}
</update>
<select id="queryByBlogId" resultMap="CommentResultMap" parameterType="java.lang.Integer">
SELECT * FROM t_comment
where blog_id=#{blogId}
</select>
<delete id="deleteCommentByBlogId" parameterType="java.lang.Integer" >
delete from t_comment
where blog_id=#{blogId}
</delete>
</mapper>
43 changes: 43 additions & 0 deletions target/Blog/WEB-INF/classes/mapper/LinkDao.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?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="ssm.blog.dao.LinkDao">
<resultMap id="LinkResultMap" type="Link">
<id property="id" column="id"/>
<result property="linkName" column="link_name"/>
<result property="linkUrl" column="link_url"/>
<result property="orderNum" column="order_num"/>
</resultMap>

<select id="getTotalData" resultMap="LinkResultMap">
SELECT * from t_link ORDER BY order_num
</select>
<select id="listByPage" resultMap="LinkResultMap">
SELECT * FROM t_link ORDER BY order_num
LIMIT #{start},#{end}
</select>
<select id="getTotalCount" resultType="java.lang.Long">
SELECT count(*) FROM t_link
</select>
<insert id="addLink" parameterType="Link">
insert INTO t_link VALUES (null,#{linkName},#{linkUrl},#{orderNum})
</insert>
<delete id="deleteLink" parameterType="Integer">
delete from t_link where id=#{id}
</delete>

<update id="updateLink" parameterType="Link">
update t_link
<set>
<if test="linkName!=null and linkName!=''">
link_name=#{linkName},
</if>
<if test="linkUrl!=null and linkUrl!=''">
link_url=#{linkUrl},
</if>
<if test="orderNum!=null">
order_num=#{orderNum},
</if>
</set>
where id=#{id}
</update>
</mapper>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit c2e0873

Please sign in to comment.