pull/1/head
759675757@qq.com 2019-06-12 13:08:38 +08:00
parent 01a88e72d7
commit 0f2cfec518
11 changed files with 53 additions and 44 deletions

View File

@ -4,7 +4,8 @@
以此项目来进行骨架的生成 以此项目来进行骨架的生成
#### 软件架构 #### 软件架构
软件架构说明
单体项目生成骨架,具备基本功能,如:后台管理界面,权限认证。
#### 安装教程 #### 安装教程

View File

@ -65,8 +65,8 @@ public final class IdUtil {
private static long lastEpoch = 0; private static long lastEpoch = 0;
public static long nextId() { public static String nextId() {
return nextId(System.currentTimeMillis() / 1000); return String.valueOf(nextId(System.currentTimeMillis() / 1000));
} }
private static synchronized long nextId(long epochSecond) { private static synchronized long nextId(long epochSecond) {

View File

@ -10,7 +10,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -49,4 +51,5 @@ public class SysUserController {
sysUserService.add(sysUser, roles); sysUserService.add(sysUser, roles);
return ApiResponse.ok(); return ApiResponse.ok();
} }
} }

View File

@ -18,7 +18,7 @@ public class SysUser implements Serializable {
@Id @Id
@Column(name = "ID") @Column(name = "ID")
private Long id; private String id;
@Column(name = "NAME") @Column(name = "NAME")
private String name; private String name;
@Column(name = "USERNAME") @Column(name = "USERNAME")
@ -26,11 +26,11 @@ public class SysUser implements Serializable {
@Column(name = "PASSWORD") @Column(name = "PASSWORD")
private String password; private String password;
public Long getId() { public String getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(String id) {
this.id = id; this.id = id;
} }

View File

@ -9,6 +9,7 @@ import java.util.Map;
/** /**
* UserService * UserService
*
* @author songpeng * @author songpeng
* @date 2019/4/20. * @date 2019/4/20.
*/ */
@ -16,6 +17,7 @@ public interface SysUserService {
/** /**
* *
*
* @param pageRequest * @param pageRequest
* @return * @return
*/ */
@ -23,6 +25,7 @@ public interface SysUserService {
/** /**
* *
*
* @param paramMap * @param paramMap
* @return * @return
*/ */

View File

@ -76,4 +76,5 @@ public class SysUserServiceImpl implements SysUserService, UserDetailsService {
LOGGER.info("user insert id: {}", sysUser.getId()); LOGGER.info("user insert id: {}", sysUser.getId());
sysUserMapper.insertSelective(sysUser); sysUserMapper.insertSelective(sysUser);
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html xmlns:th="https://www.thymeleaf.org/">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html xmlns:th="https://www.thymeleaf.org/">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">

View File

@ -1,4 +1,3 @@
<html xmlns:th="http://www.thymeleaf.org">
<head th:fragment="header"> <head th:fragment="header">
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">

View File

@ -1,18 +1,18 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"> <html xmlns:th="https://www.thymeleaf.org/">
<html> <html>
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="client/blog/include::header"></head> <head th:include="client/blog/include::header"></head>
<body> <body>
<nav th:include="client/blog/include::nav" class="navbar navbar-default navbar-custom navbar-fixed-top"></nav> <nav th:include="client/blog/include::nav" class="navbar navbar-default navbar-custom navbar-fixed-top"></nav>
<header class="intro-header" <header class="intro-header"
style="background-image: url('/img/blog/home-bg.jpg')"> style="background-image: url('/img/blog/home-bg-old.jpg')">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="site-heading"> <div class="site-heading">
<h1>SongPeng Blog</h1> <h1>SongPeng Blog</h1>
<span class="subheading">宋鹏的博客</span> <span class="subheading">博客</span>
</div> </div>
</div> </div>
</div> </div>
@ -31,6 +31,7 @@
</div> </div>
</div> </div>
</div> </div>
<div id="allmap"></div>
</div> </div>
</body> </body>
<div th:include="client/blog/include::footer"></div> <div th:include="client/blog/include::footer"></div>
@ -45,6 +46,7 @@
function nextPage() { function nextPage() {
bindList(currentPage * limit) bindList(currentPage * limit)
} }
function bindList(offset) { function bindList(offset) {
$.ajax({ $.ajax({
url: 'blog/open/list?type=article&limit=10&offset=' + offset, url: 'blog/open/list?type=article&limit=10&offset=' + offset,