forked from YuKongEr/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xp541130126
committed
Jul 13, 2017
1 parent
a8a6ba4
commit c2e0873
Showing
147 changed files
with
2,860 additions
and
1,277 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 added
BIN
+2.95 KB
target/Blog/WEB-INF/classes/ssm/blog/controller/CommentController.class
Binary file not shown.
Binary file added
BIN
+4.36 KB
target/Blog/WEB-INF/classes/ssm/blog/controller/IndexController.class
Binary file not shown.
Binary file added
BIN
+4.69 KB
target/Blog/WEB-INF/classes/ssm/blog/controller/admin/BlogAdminController.class
Binary file not shown.
Binary file added
BIN
+3.86 KB
target/Blog/WEB-INF/classes/ssm/blog/controller/admin/BlogTypeAdminController.class
Binary file not shown.
Binary file added
BIN
+3.75 KB
target/Blog/WEB-INF/classes/ssm/blog/controller/admin/BloggerAdminController.class
Binary file not shown.
Binary file added
BIN
+4.16 KB
target/Blog/WEB-INF/classes/ssm/blog/controller/admin/CommentAdminController.class
Binary file not shown.
Binary file added
BIN
+3.5 KB
target/Blog/WEB-INF/classes/ssm/blog/controller/admin/LinkAdminController.class
Binary file not shown.
Binary file added
BIN
+766 Bytes
target/Blog/WEB-INF/classes/ssm/blog/controller/admin/MainAdminController.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+4 Bytes
(100%)
target/Blog/WEB-INF/classes/ssm/blog/listener/InitBloggerData.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.78 KB
target/Blog/WEB-INF/classes/ssm/blog/service/impl/CommentServiceImpl.class
Binary file not shown.
Binary file added
BIN
+2.01 KB
target/Blog/WEB-INF/classes/ssm/blog/service/impl/LinkServiceImpl.class
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.
Oops, something went wrong.