Commit ba18504a3934e52e4e69ec4d9e397a254921d24b
0 parents
项目初始化
Showing
16 changed files
with
849 additions
and
0 deletions
pom.xml
0 → 100644
| 1 | +++ a/pom.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 3 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 4 | + <modelVersion>4.0.0</modelVersion> | |
| 5 | + | |
| 6 | + <groupId>com.cnlive.shenhe</groupId> | |
| 7 | + <artifactId>cnlive_shenhe</artifactId> | |
| 8 | + <version>0.0.1-SNAPSHOT</version> | |
| 9 | + <packaging>jar</packaging> | |
| 10 | + | |
| 11 | + <name>cnlive_shenhe</name> | |
| 12 | + <description>Demo project for Spring Boot</description> | |
| 13 | + | |
| 14 | + <parent> | |
| 15 | + <groupId>org.springframework.boot</groupId> | |
| 16 | + <artifactId>spring-boot-starter-parent</artifactId> | |
| 17 | + <version>2.1.0.RELEASE</version> | |
| 18 | + <relativePath/> <!-- lookup parent from repository --> | |
| 19 | + </parent> | |
| 20 | + | |
| 21 | + <properties> | |
| 22 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
| 23 | + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |
| 24 | + <java.version>1.8</java.version> | |
| 25 | + </properties> | |
| 26 | + | |
| 27 | + <dependencies> | |
| 28 | + <dependency> | |
| 29 | + <groupId>mysql</groupId> | |
| 30 | + <artifactId>mysql-connector-java</artifactId> | |
| 31 | + </dependency> | |
| 32 | + <dependency> | |
| 33 | + <groupId>org.springframework.boot</groupId> | |
| 34 | + <artifactId>spring-boot-starter-test</artifactId> | |
| 35 | + <scope>test</scope> | |
| 36 | + </dependency> | |
| 37 | + <dependency> | |
| 38 | + <groupId>org.springframework.boot</groupId> | |
| 39 | + <artifactId>spring-boot-starter-data-jpa</artifactId> | |
| 40 | + <version>RELEASE</version> | |
| 41 | + <scope>compile</scope> | |
| 42 | + </dependency> | |
| 43 | + <dependency> | |
| 44 | + <groupId>org.springframework.boot</groupId> | |
| 45 | + <artifactId>spring-boot-starter-web</artifactId> | |
| 46 | + <exclusions> | |
| 47 | + <exclusion> | |
| 48 | + <groupId>org.springframework.boot</groupId> | |
| 49 | + <artifactId>spring-boot-starter-logging</artifactId> | |
| 50 | + </exclusion> | |
| 51 | + </exclusions> | |
| 52 | + </dependency> | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + <dependency> | |
| 57 | + <groupId>org.mybatis.spring.boot</groupId> | |
| 58 | + <artifactId>mybatis-spring-boot-starter</artifactId> | |
| 59 | + <version>1.3.2</version> | |
| 60 | + </dependency> | |
| 61 | + <dependency> | |
| 62 | + <groupId>tk.mybatis</groupId> | |
| 63 | + <artifactId>mapper-spring-boot-starter</artifactId> | |
| 64 | + <version>2.0.3</version> | |
| 65 | + </dependency> | |
| 66 | + <dependency> | |
| 67 | + <groupId>com.github.pagehelper</groupId> | |
| 68 | + <artifactId>pagehelper-spring-boot-starter</artifactId> | |
| 69 | + <version>1.2.3</version> | |
| 70 | + </dependency> | |
| 71 | + | |
| 72 | + <dependency> | |
| 73 | + <groupId>org.apache.tomcat.embed</groupId> | |
| 74 | + <artifactId>tomcat-embed-jasper</artifactId> | |
| 75 | + <scope>provided</scope> | |
| 76 | + </dependency> | |
| 77 | + </dependencies> | |
| 78 | + | |
| 79 | + <build> | |
| 80 | + <plugins> | |
| 81 | + <plugin> | |
| 82 | + <groupId>org.springframework.boot</groupId> | |
| 83 | + <artifactId>spring-boot-maven-plugin</artifactId> | |
| 84 | + </plugin> | |
| 85 | + | |
| 86 | + <!-- mybatis generator 自动生成代码插件 --> | |
| 87 | + <plugin> | |
| 88 | + <groupId>org.mybatis.generator</groupId> | |
| 89 | + <artifactId>mybatis-generator-maven-plugin</artifactId> | |
| 90 | + <version>1.3.5</version> | |
| 91 | + <configuration> | |
| 92 | + <configurationFile>${basedir}/src/main/resources/generatorConfig.xml</configurationFile> | |
| 93 | + <overwrite>true</overwrite> | |
| 94 | + <verbose>true</verbose> | |
| 95 | + </configuration> | |
| 96 | + <dependencies> | |
| 97 | + <dependency> | |
| 98 | + <groupId>mysql</groupId> | |
| 99 | + <artifactId>mysql-connector-java</artifactId> | |
| 100 | + <version>5.1.39</version> | |
| 101 | + </dependency> | |
| 102 | + <dependency> | |
| 103 | + <groupId>tk.mybatis</groupId> | |
| 104 | + <artifactId>mapper</artifactId> | |
| 105 | + <version>3.4.0</version> | |
| 106 | + </dependency> | |
| 107 | + </dependencies> | |
| 108 | + </plugin> | |
| 109 | + | |
| 110 | + </plugins> | |
| 111 | + </build> | |
| 112 | + | |
| 113 | + | |
| 114 | +</project> | ... | ... |
src/main/java/com/cnlive/shenhe/ShenheApplication.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/shenhe/ShenheApplication.java | |
| 1 | +package com.cnlive.shenhe; | |
| 2 | + | |
| 3 | +import org.springframework.boot.SpringApplication; | |
| 4 | +import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| 5 | +import org.springframework.boot.web.servlet.ServletComponentScan; | |
| 6 | +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; | |
| 7 | +import tk.mybatis.spring.annotation.MapperScan; | |
| 8 | + | |
| 9 | +@SpringBootApplication | |
| 10 | +@ServletComponentScan | |
| 11 | +@MapperScan(basePackages= {"com.cnlive.shenhe.mapper"}) | |
| 12 | +public class ShenheApplication extends SpringBootServletInitializer { | |
| 13 | + | |
| 14 | + public static void main(String[] args) { | |
| 15 | + SpringApplication.run(ShenheApplication.class, args); | |
| 16 | + } | |
| 17 | +} | ... | ... |
src/main/java/com/cnlive/shenhe/controller/UsersController.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/shenhe/controller/UsersController.java | |
| 1 | +package com.cnlive.shenhe.controller; | |
| 2 | + | |
| 3 | +import com.cnlive.shenhe.serviceImpl.UsersServiceImpl; | |
| 4 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 5 | +import org.springframework.stereotype.Controller; | |
| 6 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 7 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 8 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 9 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * @Auther: 周伟鹏 | |
| 13 | + * @Date: 2018/11/29 14:22 | |
| 14 | + * @Description: | |
| 15 | + */ | |
| 16 | +@Controller | |
| 17 | +@RequestMapping("/users") | |
| 18 | +public class UsersController { | |
| 19 | + | |
| 20 | + @Autowired | |
| 21 | + UsersServiceImpl usersService; | |
| 22 | + | |
| 23 | + @GetMapping(value = "/{id}") | |
| 24 | + @ResponseBody | |
| 25 | + public Object getTest(@PathVariable Integer id){ | |
| 26 | + return usersService.getAll(id); | |
| 27 | + } | |
| 28 | + | |
| 29 | + @GetMapping(value = "/index") | |
| 30 | + public String toTest(){ | |
| 31 | + return "/static/page/5.html"; | |
| 32 | + } | |
| 33 | +} | ... | ... |
src/main/java/com/cnlive/shenhe/entity/ShySites.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/shenhe/entity/ShySites.java | |
| 1 | +package com.cnlive.shenhe.entity; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | +import javax.persistence.*; | |
| 5 | + | |
| 6 | +@Table(name = "shy_sites") | |
| 7 | +public class ShySites { | |
| 8 | + @Id | |
| 9 | + private Integer id; | |
| 10 | + | |
| 11 | + /** | |
| 12 | + * 站点名称 | |
| 13 | + */ | |
| 14 | + private String name; | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 单位名称 | |
| 18 | + */ | |
| 19 | + private String company; | |
| 20 | + | |
| 21 | + private Date created_at; | |
| 22 | + | |
| 23 | + private Date updated_at; | |
| 24 | + | |
| 25 | + private Integer spid; | |
| 26 | + | |
| 27 | + private String appid; | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 免审业务 | |
| 31 | + */ | |
| 32 | + private String write_business; | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * @return id | |
| 36 | + */ | |
| 37 | + public Integer getId() { | |
| 38 | + return id; | |
| 39 | + } | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * @param id | |
| 43 | + */ | |
| 44 | + public void setId(Integer id) { | |
| 45 | + this.id = id; | |
| 46 | + } | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 获取站点名称 | |
| 50 | + * | |
| 51 | + * @return name - 站点名称 | |
| 52 | + */ | |
| 53 | + public String getName() { | |
| 54 | + return name; | |
| 55 | + } | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 设置站点名称 | |
| 59 | + * | |
| 60 | + * @param name 站点名称 | |
| 61 | + */ | |
| 62 | + public void setName(String name) { | |
| 63 | + this.name = name; | |
| 64 | + } | |
| 65 | + | |
| 66 | + /** | |
| 67 | + * 获取单位名称 | |
| 68 | + * | |
| 69 | + * @return company - 单位名称 | |
| 70 | + */ | |
| 71 | + public String getCompany() { | |
| 72 | + return company; | |
| 73 | + } | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * 设置单位名称 | |
| 77 | + * | |
| 78 | + * @param company 单位名称 | |
| 79 | + */ | |
| 80 | + public void setCompany(String company) { | |
| 81 | + this.company = company; | |
| 82 | + } | |
| 83 | + | |
| 84 | + /** | |
| 85 | + * @return created_at | |
| 86 | + */ | |
| 87 | + public Date getCreated_at() { | |
| 88 | + return created_at; | |
| 89 | + } | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * @param created_at | |
| 93 | + */ | |
| 94 | + public void setCreated_at(Date created_at) { | |
| 95 | + this.created_at = created_at; | |
| 96 | + } | |
| 97 | + | |
| 98 | + /** | |
| 99 | + * @return updated_at | |
| 100 | + */ | |
| 101 | + public Date getUpdated_at() { | |
| 102 | + return updated_at; | |
| 103 | + } | |
| 104 | + | |
| 105 | + /** | |
| 106 | + * @param updated_at | |
| 107 | + */ | |
| 108 | + public void setUpdated_at(Date updated_at) { | |
| 109 | + this.updated_at = updated_at; | |
| 110 | + } | |
| 111 | + | |
| 112 | + /** | |
| 113 | + * @return spid | |
| 114 | + */ | |
| 115 | + public Integer getSpid() { | |
| 116 | + return spid; | |
| 117 | + } | |
| 118 | + | |
| 119 | + /** | |
| 120 | + * @param spid | |
| 121 | + */ | |
| 122 | + public void setSpid(Integer spid) { | |
| 123 | + this.spid = spid; | |
| 124 | + } | |
| 125 | + | |
| 126 | + /** | |
| 127 | + * @return appid | |
| 128 | + */ | |
| 129 | + public String getAppid() { | |
| 130 | + return appid; | |
| 131 | + } | |
| 132 | + | |
| 133 | + /** | |
| 134 | + * @param appid | |
| 135 | + */ | |
| 136 | + public void setAppid(String appid) { | |
| 137 | + this.appid = appid; | |
| 138 | + } | |
| 139 | + | |
| 140 | + /** | |
| 141 | + * 获取免审业务 | |
| 142 | + * | |
| 143 | + * @return write_business - 免审业务 | |
| 144 | + */ | |
| 145 | + public String getWrite_business() { | |
| 146 | + return write_business; | |
| 147 | + } | |
| 148 | + | |
| 149 | + /** | |
| 150 | + * 设置免审业务 | |
| 151 | + * | |
| 152 | + * @param write_business 免审业务 | |
| 153 | + */ | |
| 154 | + public void setWrite_business(String write_business) { | |
| 155 | + this.write_business = write_business; | |
| 156 | + } | |
| 157 | +} | |
| 0 | 158 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/entity/ShyUsers.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/shenhe/entity/ShyUsers.java | |
| 1 | +package com.cnlive.shenhe.entity; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | +import javax.persistence.*; | |
| 5 | + | |
| 6 | +@Table(name = "shy_users") | |
| 7 | +public class ShyUsers { | |
| 8 | + @Id | |
| 9 | + private Integer id; | |
| 10 | + | |
| 11 | + /** | |
| 12 | + * 用户名-字母形式 | |
| 13 | + */ | |
| 14 | + private String username; | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 大网用户id | |
| 18 | + */ | |
| 19 | + private Integer sid; | |
| 20 | + | |
| 21 | + private String remember_token; | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 联系人 | |
| 25 | + */ | |
| 26 | + private String contacts; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 邮箱 | |
| 30 | + */ | |
| 31 | + private String email; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 是否主账号 | |
| 35 | + */ | |
| 36 | + private Boolean master; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 手机号 | |
| 40 | + */ | |
| 41 | + private String mobile; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 入驻SP_ID,0为超级管理员 | |
| 45 | + */ | |
| 46 | + private Integer sp_id; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 公司简称 | |
| 50 | + */ | |
| 51 | + private String company_brief; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 企业名称 | |
| 55 | + */ | |
| 56 | + private String company_name; | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 用户状态 | |
| 60 | + */ | |
| 61 | + private Boolean state; | |
| 62 | + | |
| 63 | + private Date created_at; | |
| 64 | + | |
| 65 | + private Date updated_at; | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * 接口最后一次更新时间 | |
| 69 | + */ | |
| 70 | + private String tm; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * @return id | |
| 74 | + */ | |
| 75 | + public Integer getId() { | |
| 76 | + return id; | |
| 77 | + } | |
| 78 | + | |
| 79 | + /** | |
| 80 | + * @param id | |
| 81 | + */ | |
| 82 | + public void setId(Integer id) { | |
| 83 | + this.id = id; | |
| 84 | + } | |
| 85 | + | |
| 86 | + /** | |
| 87 | + * 获取用户名-字母形式 | |
| 88 | + * | |
| 89 | + * @return username - 用户名-字母形式 | |
| 90 | + */ | |
| 91 | + public String getUsername() { | |
| 92 | + return username; | |
| 93 | + } | |
| 94 | + | |
| 95 | + /** | |
| 96 | + * 设置用户名-字母形式 | |
| 97 | + * | |
| 98 | + * @param username 用户名-字母形式 | |
| 99 | + */ | |
| 100 | + public void setUsername(String username) { | |
| 101 | + this.username = username; | |
| 102 | + } | |
| 103 | + | |
| 104 | + /** | |
| 105 | + * 获取大网用户id | |
| 106 | + * | |
| 107 | + * @return sid - 大网用户id | |
| 108 | + */ | |
| 109 | + public Integer getSid() { | |
| 110 | + return sid; | |
| 111 | + } | |
| 112 | + | |
| 113 | + /** | |
| 114 | + * 设置大网用户id | |
| 115 | + * | |
| 116 | + * @param sid 大网用户id | |
| 117 | + */ | |
| 118 | + public void setSid(Integer sid) { | |
| 119 | + this.sid = sid; | |
| 120 | + } | |
| 121 | + | |
| 122 | + /** | |
| 123 | + * @return remember_token | |
| 124 | + */ | |
| 125 | + public String getRemember_token() { | |
| 126 | + return remember_token; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /** | |
| 130 | + * @param remember_token | |
| 131 | + */ | |
| 132 | + public void setRemember_token(String remember_token) { | |
| 133 | + this.remember_token = remember_token; | |
| 134 | + } | |
| 135 | + | |
| 136 | + /** | |
| 137 | + * 获取联系人 | |
| 138 | + * | |
| 139 | + * @return contacts - 联系人 | |
| 140 | + */ | |
| 141 | + public String getContacts() { | |
| 142 | + return contacts; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /** | |
| 146 | + * 设置联系人 | |
| 147 | + * | |
| 148 | + * @param contacts 联系人 | |
| 149 | + */ | |
| 150 | + public void setContacts(String contacts) { | |
| 151 | + this.contacts = contacts; | |
| 152 | + } | |
| 153 | + | |
| 154 | + /** | |
| 155 | + * 获取邮箱 | |
| 156 | + * | |
| 157 | + * @return email - 邮箱 | |
| 158 | + */ | |
| 159 | + public String getEmail() { | |
| 160 | + return email; | |
| 161 | + } | |
| 162 | + | |
| 163 | + /** | |
| 164 | + * 设置邮箱 | |
| 165 | + * | |
| 166 | + * @param email 邮箱 | |
| 167 | + */ | |
| 168 | + public void setEmail(String email) { | |
| 169 | + this.email = email; | |
| 170 | + } | |
| 171 | + | |
| 172 | + /** | |
| 173 | + * 获取是否主账号 | |
| 174 | + * | |
| 175 | + * @return master - 是否主账号 | |
| 176 | + */ | |
| 177 | + public Boolean getMaster() { | |
| 178 | + return master; | |
| 179 | + } | |
| 180 | + | |
| 181 | + /** | |
| 182 | + * 设置是否主账号 | |
| 183 | + * | |
| 184 | + * @param master 是否主账号 | |
| 185 | + */ | |
| 186 | + public void setMaster(Boolean master) { | |
| 187 | + this.master = master; | |
| 188 | + } | |
| 189 | + | |
| 190 | + /** | |
| 191 | + * 获取手机号 | |
| 192 | + * | |
| 193 | + * @return mobile - 手机号 | |
| 194 | + */ | |
| 195 | + public String getMobile() { | |
| 196 | + return mobile; | |
| 197 | + } | |
| 198 | + | |
| 199 | + /** | |
| 200 | + * 设置手机号 | |
| 201 | + * | |
| 202 | + * @param mobile 手机号 | |
| 203 | + */ | |
| 204 | + public void setMobile(String mobile) { | |
| 205 | + this.mobile = mobile; | |
| 206 | + } | |
| 207 | + | |
| 208 | + /** | |
| 209 | + * 获取入驻SP_ID,0为超级管理员 | |
| 210 | + * | |
| 211 | + * @return sp_id - 入驻SP_ID,0为超级管理员 | |
| 212 | + */ | |
| 213 | + public Integer getSp_id() { | |
| 214 | + return sp_id; | |
| 215 | + } | |
| 216 | + | |
| 217 | + /** | |
| 218 | + * 设置入驻SP_ID,0为超级管理员 | |
| 219 | + * | |
| 220 | + * @param sp_id 入驻SP_ID,0为超级管理员 | |
| 221 | + */ | |
| 222 | + public void setSp_id(Integer sp_id) { | |
| 223 | + this.sp_id = sp_id; | |
| 224 | + } | |
| 225 | + | |
| 226 | + /** | |
| 227 | + * 获取公司简称 | |
| 228 | + * | |
| 229 | + * @return company_brief - 公司简称 | |
| 230 | + */ | |
| 231 | + public String getCompany_brief() { | |
| 232 | + return company_brief; | |
| 233 | + } | |
| 234 | + | |
| 235 | + /** | |
| 236 | + * 设置公司简称 | |
| 237 | + * | |
| 238 | + * @param company_brief 公司简称 | |
| 239 | + */ | |
| 240 | + public void setCompany_brief(String company_brief) { | |
| 241 | + this.company_brief = company_brief; | |
| 242 | + } | |
| 243 | + | |
| 244 | + /** | |
| 245 | + * 获取企业名称 | |
| 246 | + * | |
| 247 | + * @return company_name - 企业名称 | |
| 248 | + */ | |
| 249 | + public String getCompany_name() { | |
| 250 | + return company_name; | |
| 251 | + } | |
| 252 | + | |
| 253 | + /** | |
| 254 | + * 设置企业名称 | |
| 255 | + * | |
| 256 | + * @param company_name 企业名称 | |
| 257 | + */ | |
| 258 | + public void setCompany_name(String company_name) { | |
| 259 | + this.company_name = company_name; | |
| 260 | + } | |
| 261 | + | |
| 262 | + /** | |
| 263 | + * 获取用户状态 | |
| 264 | + * | |
| 265 | + * @return state - 用户状态 | |
| 266 | + */ | |
| 267 | + public Boolean getState() { | |
| 268 | + return state; | |
| 269 | + } | |
| 270 | + | |
| 271 | + /** | |
| 272 | + * 设置用户状态 | |
| 273 | + * | |
| 274 | + * @param state 用户状态 | |
| 275 | + */ | |
| 276 | + public void setState(Boolean state) { | |
| 277 | + this.state = state; | |
| 278 | + } | |
| 279 | + | |
| 280 | + /** | |
| 281 | + * @return created_at | |
| 282 | + */ | |
| 283 | + public Date getCreated_at() { | |
| 284 | + return created_at; | |
| 285 | + } | |
| 286 | + | |
| 287 | + /** | |
| 288 | + * @param created_at | |
| 289 | + */ | |
| 290 | + public void setCreated_at(Date created_at) { | |
| 291 | + this.created_at = created_at; | |
| 292 | + } | |
| 293 | + | |
| 294 | + /** | |
| 295 | + * @return updated_at | |
| 296 | + */ | |
| 297 | + public Date getUpdated_at() { | |
| 298 | + return updated_at; | |
| 299 | + } | |
| 300 | + | |
| 301 | + /** | |
| 302 | + * @param updated_at | |
| 303 | + */ | |
| 304 | + public void setUpdated_at(Date updated_at) { | |
| 305 | + this.updated_at = updated_at; | |
| 306 | + } | |
| 307 | + | |
| 308 | + /** | |
| 309 | + * 获取接口最后一次更新时间 | |
| 310 | + * | |
| 311 | + * @return tm - 接口最后一次更新时间 | |
| 312 | + */ | |
| 313 | + public String getTm() { | |
| 314 | + return tm; | |
| 315 | + } | |
| 316 | + | |
| 317 | + /** | |
| 318 | + * 设置接口最后一次更新时间 | |
| 319 | + * | |
| 320 | + * @param tm 接口最后一次更新时间 | |
| 321 | + */ | |
| 322 | + public void setTm(String tm) { | |
| 323 | + this.tm = tm; | |
| 324 | + } | |
| 325 | +} | |
| 0 | 326 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/intercept/LoginConfiguration.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/shenhe/intercept/LoginConfiguration.java | |
| 1 | +package com.cnlive.shenhe.intercept; | |
| 2 | + | |
| 3 | +import org.springframework.context.annotation.Configuration; | |
| 4 | +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; | |
| 5 | +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; | |
| 6 | +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * @Auther: 周伟鹏 | |
| 10 | + * @Date: 2018//29 16:18 | |
| 11 | + * @Description: | |
| 12 | + */ | |
| 13 | +@Configuration | |
| 14 | +public class LoginConfiguration implements WebMvcConfigurer { | |
| 15 | + @Override | |
| 16 | + public void addInterceptors(InterceptorRegistry registry) { | |
| 17 | + registry.addInterceptor(new LoginIntercept()).addPathPatterns("/**"); | |
| 18 | + } | |
| 19 | + @Override | |
| 20 | + public void addResourceHandlers(ResourceHandlerRegistry registry) { | |
| 21 | + registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); | |
| 22 | + } | |
| 23 | +} | ... | ... |
src/main/java/com/cnlive/shenhe/intercept/LoginIntercept.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/shenhe/intercept/LoginIntercept.java | |
| 1 | +package com.cnlive.shenhe.intercept; | |
| 2 | + | |
| 3 | +import org.springframework.stereotype.Component; | |
| 4 | +import org.springframework.web.servlet.HandlerInterceptor; | |
| 5 | + | |
| 6 | +import javax.servlet.http.HttpServletRequest; | |
| 7 | +import javax.servlet.http.HttpServletResponse; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * @Auther: 周伟鹏 | |
| 11 | + * @Date: 2018/11/29 15:52 | |
| 12 | + * @Description: | |
| 13 | + */ | |
| 14 | +//@Component | |
| 15 | +public class LoginIntercept implements HandlerInterceptor { | |
| 16 | + | |
| 17 | + @Override | |
| 18 | + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception { | |
| 19 | + System.out.println("uri="+request.getRequestURI()); | |
| 20 | + //登录不做拦截 | |
| 21 | + if(request.getRequestURI().equals("/userbg/login") || request.getRequestURI().equals("/user/login_view")) | |
| 22 | + { | |
| 23 | + return true; | |
| 24 | + } | |
| 25 | + //验证session是否存在 | |
| 26 | + Object obj = request.getSession().getAttribute("_session_user"); | |
| 27 | + /*if(obj == null) | |
| 28 | + { | |
| 29 | + response.sendRedirect("/user/login_view"); | |
| 30 | + return false; | |
| 31 | + }*/ | |
| 32 | + return true; | |
| 33 | + } | |
| 34 | + | |
| 35 | +} | ... | ... |
src/main/java/com/cnlive/shenhe/mapper/ShySitesMapper.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/shenhe/mapper/ShySitesMapper.java | |
| 1 | +package com.cnlive.shenhe.mapper; | |
| 2 | + | |
| 3 | +import com.cnlive.shenhe.entity.ShySites; | |
| 4 | +import tk.mybatis.mapper.common.Mapper; | |
| 5 | + | |
| 6 | +public interface ShySitesMapper extends Mapper<ShySites> { | |
| 7 | +} | |
| 0 | 8 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/mapper/ShyUsersMapper.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/shenhe/mapper/ShyUsersMapper.java | |
| 1 | +package com.cnlive.shenhe.mapper; | |
| 2 | + | |
| 3 | +import com.cnlive.shenhe.entity.ShyUsers; | |
| 4 | +import tk.mybatis.mapper.common.Mapper; | |
| 5 | + | |
| 6 | +public interface ShyUsersMapper extends Mapper<ShyUsers> { | |
| 7 | +} | |
| 0 | 8 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/UsersServiceImpl.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/shenhe/serviceImpl/UsersServiceImpl.java | |
| 1 | +package com.cnlive.shenhe.serviceImpl; | |
| 2 | + | |
| 3 | +import com.cnlive.shenhe.mapper.ShyUsersMapper; | |
| 4 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 5 | +import org.springframework.stereotype.Service; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * @Auther: 周伟鹏 | |
| 9 | + * @Date: 2018/11/29 14:23 | |
| 10 | + * @Description: | |
| 11 | + */ | |
| 12 | +@Service | |
| 13 | +public class UsersServiceImpl { | |
| 14 | + @Autowired | |
| 15 | + ShyUsersMapper shyUsersMapper; | |
| 16 | + | |
| 17 | + public Object getAll(Integer id){ | |
| 18 | + return shyUsersMapper.selectByPrimaryKey(id); | |
| 19 | + } | |
| 20 | +} | ... | ... |
src/main/resources/application.properties
0 → 100644
| 1 | +++ a/src/main/resources/application.properties | |
| 1 | +spring.datasource.url=jdbc:mysql://localhost:3307/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false | |
| 2 | +spring.datasource.username=root | |
| 3 | +spring.datasource.password=root | |
| 4 | +spring.datasource.driver-class-name=com.mysql.jdbc.Driver | |
| 5 | + | |
| 6 | +spring.jpa.properties.hibernate.hbm2ddl.auto=update | |
| 7 | +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect | |
| 8 | +spring.jpa.show-sql= true | |
| 9 | + | |
| 10 | + | |
| 11 | +mybatis.mapper-locations=classpath:mapping/*.xml | |
| 12 | +mybatis.type-aliases-package=com.cnlive.shenhe.entity | |
| 0 | 13 | \ No newline at end of file | ... | ... |
src/main/resources/generatorConfig.xml
0 → 100644
| 1 | +++ a/src/main/resources/generatorConfig.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | +<!DOCTYPE generatorConfiguration | |
| 3 | + PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" | |
| 4 | + "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"> | |
| 5 | +<!--根节点 --> | |
| 6 | +<generatorConfiguration> | |
| 7 | + <!-- 必须 指定生成一组对象的环境 --> | |
| 8 | + <context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat"> | |
| 9 | + <!--分隔符 --> | |
| 10 | + <property name="autoDelimitKeywords" value="true"/> | |
| 11 | + <property name="beginningDelimiter" value="`"/> | |
| 12 | + <property name="endingDelimiter" value="`"/> | |
| 13 | + | |
| 14 | + <!-- 通用mapper插件 --> | |
| 15 | + <plugin type="tk.mybatis.mapper.generator.MapperPlugin"> | |
| 16 | + <property name="mappers" value="tk.mybatis.mapper.common.Mapper"/> | |
| 17 | + </plugin> | |
| 18 | + <!-- 注释 规则--> | |
| 19 | + <commentGenerator> | |
| 20 | + <property name="suppressAllComments" value="false"/> | |
| 21 | + <property name="suppressDate" value="true"/> | |
| 22 | + </commentGenerator> | |
| 23 | + | |
| 24 | + | |
| 25 | + <jdbcConnection driverClass="com.mysql.jdbc.Driver" | |
| 26 | + connectionURL="jdbc:mysql://localhost:3307/new_shy??useUnicode=true&characterEncoding=utf8&characterSetResults=utf8" | |
| 27 | + userId="root" | |
| 28 | + password="root"> | |
| 29 | + </jdbcConnection> | |
| 30 | + | |
| 31 | + <javaModelGenerator targetPackage="com.cnlive.shenhe.entity" targetProject="src/main/java"/> | |
| 32 | + <sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources"/> | |
| 33 | + <javaClientGenerator targetPackage="com.cnlive.shenhe.mapper" targetProject="src/main/java" | |
| 34 | + type="XMLMAPPER"/> | |
| 35 | + <table schema="" tableName="%" domainObjectName=""> | |
| 36 | + <property name="useActualColumnNames" value="true" /> | |
| 37 | + </table> | |
| 38 | + </context> | |
| 39 | +</generatorConfiguration> | |
| 0 | 40 | \ No newline at end of file | ... | ... |
src/main/resources/mapper/ShySitesMapper.xml
0 → 100644
| 1 | +++ a/src/main/resources/mapper/ShySitesMapper.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.cnlive.shenhe.mapper.ShySitesMapper"> | |
| 4 | + <resultMap id="BaseResultMap" type="com.cnlive.shenhe.entity.ShySites"> | |
| 5 | + <!-- | |
| 6 | + WARNING - @mbg.generated | |
| 7 | + --> | |
| 8 | + <id column="id" jdbcType="INTEGER" property="id" /> | |
| 9 | + <result column="name" jdbcType="VARCHAR" property="name" /> | |
| 10 | + <result column="company" jdbcType="VARCHAR" property="company" /> | |
| 11 | + <result column="created_at" jdbcType="TIMESTAMP" property="created_at" /> | |
| 12 | + <result column="updated_at" jdbcType="TIMESTAMP" property="updated_at" /> | |
| 13 | + <result column="spid" jdbcType="INTEGER" property="spid" /> | |
| 14 | + <result column="appid" jdbcType="VARCHAR" property="appid" /> | |
| 15 | + <result column="write_business" jdbcType="VARCHAR" property="write_business" /> | |
| 16 | + </resultMap> | |
| 17 | +</mapper> | |
| 0 | 18 | \ No newline at end of file | ... | ... |
src/main/resources/mapper/ShyUsersMapper.xml
0 → 100644
| 1 | +++ a/src/main/resources/mapper/ShyUsersMapper.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.cnlive.shenhe.mapper.ShyUsersMapper"> | |
| 4 | + <resultMap id="BaseResultMap" type="com.cnlive.shenhe.entity.ShyUsers"> | |
| 5 | + <!-- | |
| 6 | + WARNING - @mbg.generated | |
| 7 | + --> | |
| 8 | + <id column="id" jdbcType="INTEGER" property="id" /> | |
| 9 | + <result column="username" jdbcType="VARCHAR" property="username" /> | |
| 10 | + <result column="sid" jdbcType="INTEGER" property="sid" /> | |
| 11 | + <result column="remember_token" jdbcType="VARCHAR" property="remember_token" /> | |
| 12 | + <result column="contacts" jdbcType="VARCHAR" property="contacts" /> | |
| 13 | + <result column="email" jdbcType="VARCHAR" property="email" /> | |
| 14 | + <result column="master" jdbcType="BIT" property="master" /> | |
| 15 | + <result column="mobile" jdbcType="VARCHAR" property="mobile" /> | |
| 16 | + <result column="sp_id" jdbcType="INTEGER" property="sp_id" /> | |
| 17 | + <result column="company_brief" jdbcType="VARCHAR" property="company_brief" /> | |
| 18 | + <result column="company_name" jdbcType="VARCHAR" property="company_name" /> | |
| 19 | + <result column="state" jdbcType="BIT" property="state" /> | |
| 20 | + <result column="created_at" jdbcType="TIMESTAMP" property="created_at" /> | |
| 21 | + <result column="updated_at" jdbcType="TIMESTAMP" property="updated_at" /> | |
| 22 | + <result column="tm" jdbcType="VARCHAR" property="tm" /> | |
| 23 | + </resultMap> | |
| 24 | +</mapper> | |
| 0 | 25 | \ No newline at end of file | ... | ... |
src/main/resources/static/img/1.jpg
0 → 100644
6.88 KB
src/main/resources/static/page/5.html
0 → 100644
| 1 | +++ a/src/main/resources/static/page/5.html | |
| 1 | +<!DOCTYPE html><meta charset=UTF-8><title>国新APP —— 国务院新闻办公室新媒体客户端</title><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=assets/css/app.min.css><div id=wrapper><div class="container-fluid banner-box"><div class=banner-image><div class="hidden-sm hidden-md hidden-lg" style=background:#3b62bf;height:250px></div><div class="hidden-md hidden-lg" style=background:#3b62bf;height:0px></div><img src=assets/images/gxb/banner.png alt=""></div><div class="container banner-content"><div class=row><div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"><div id=phoneCarousel class="carousel slide" data-ride=carousel><ol class=carousel-indicators><li data-target=#phoneCarousel data-slide-to=0 class=active><li data-target=#phoneCarousel data-slide-to=1><li data-target=#phoneCarousel data-slide-to=2></ol><div class="col-xs-12 ol-xs-offset-1 hidden-sm hidden-md hidden-lg button-xs-show"><div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 banner-title" style=margin-bottom:20px><img class="img-responsive margin-center" src=assets/images/gxb/banner_title.png alt=""></div><div class="col-xs-6 ol-xs-offset-1 col-sm-4 col-md-4 col-lg-4 banner-download-item" style=text-align:center><a href="https://itunes.apple.com/cn/app/guo-xin-fa-bu/id963024530?mt=8"><img style=width:80% src=assets/images/gxb/iphone_download.png alt=""></a></div><div class="col-xs-6 ol-xs-offset-1 col-sm-4 col-md-4 col-lg-4 banner-download-item" style=text-align:center><a href="http://resweb.cnliveimg.com/apk/GXFB_20180905.apk"><img style=width:80% src=assets/images/gxb/android_download.png alt=""></a></div></div><div class=carousel-inner><div class="item active"><img class="img-responsive margin-center" src=assets/images/gxb/phone1.png alt=""></div><div class=item><img class="img-responsive margin-center" src=assets/images/gxb/phone2.png alt=""></div><div class=item><img class="img-responsive margin-center" src=assets/images/gxb/phone3.png alt=""></div></div></div></div><div class="col-xs-8 col-sm-8 col-md-8 col-lg-8"><div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 banner-title"><img class=img-responsive src=assets/images/gxb/banner_title.png alt=""></div><div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 banner-download-item"><a href="https://itunes.apple.com/cn/app/guo-xin-fa-bu/id963024530?mt=8"><img style=width:80% src=assets/images/gxb/iphone_download.png alt=""></a></div><div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 banner-download-item"><a href="http://resweb.cnliveimg.com/apk/GXFB_20180905.apk"><img style=width:80% src=assets/images/gxb/android_download.png alt=""></a></div></div></div></div></div><script type=text/javascript src=assets/js/app.min.js charset=utf-8></script><!--[if lt IE 9]> | |
| 2 | + <script type="text/javascript" src="assets/plugins/html5shiv/html5shiv.js" charset="utf-8"></script> | |
| 3 | + <script type="text/javascript" src="assets/plugins/respond/respond.js" charset="utf-8"></script> | |
| 4 | + <![endif]--></div> | ... | ... |