移植为SpringBoot项目

This commit is contained in:
Yutousama 2020-01-10 17:59:09 +08:00
parent e2d5c10be1
commit 82278f1967
239 changed files with 640 additions and 910 deletions

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

35
.gitignore vendored
View File

@ -1,6 +1,31 @@
logs/
HELP.md
target/
.settings/
src/main/webapp/plugin/
src/main/webapp/mods/
jianr_v2.sql
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jianRMG_Service_v2</name>
<comment></comment>
<projects>
<project>a</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>

View File

@ -1,24 +0,0 @@
{
"ecmaVersion": 5,
"plugins": {
"guess-types": {
},
"outline": {
},
"angular1": {
},
"yui3": {
},
"aui1.5.x": {
}
},
"libs": [
"browser",
"jquery"
]
}

View File

@ -1,10 +0,0 @@
# 魔改宝盒服务端
#### 项目介绍
魔改宝盒v2的服务端
#### 软件架构
SSM+Redis
数据库采用MySQL
#### 测试

164
pom.xml
View File

@ -1,88 +1,74 @@
<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/maven-v4_0_0.xsd">
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.yutou</groupId>
<artifactId>jianRMG_Service_v2</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>jianRMG_Service_v2 Maven Webapp</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yutou.jianrmod</groupId>
<artifactId>servicer</artifactId>
<version>2.0.0-SNAPSHOT</version>
<name>servicer</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- J2EE -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.10.RELEASE</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.0.RELEASE</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>4.3.0.RELEASE</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>4.3.0.RELEASE</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.0.RELEASE</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<!-- mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.4</version>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.1</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.8.2</version>
</dependency>
<!-- dbcp -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<!-- mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
<scope>runtime</scope>
</dependency>
<!-- 文件上传 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
@ -113,11 +99,6 @@
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
</dependency>
<!-- 七牛云 -->
<dependency>
<groupId>com.qiniu</groupId>
@ -143,36 +124,31 @@
<scope>compile</scope>
</dependency>
<!-- 七牛云结束 -->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
</dependency>
<!-- log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.8.2</version>
</dependency>
</dependencies>
<build>
<finalName>jianrmod</finalName>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.12.RC2</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<httpConnector>
<port>8088</port>
</httpConnector>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,13 @@
package com.yutou;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ServicerApplication {
public static void main(String[] args) {
SpringApplication.run(ServicerApplication.class, args);
}
}

View File

@ -0,0 +1,116 @@
package com.yutou.controller.Web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
@Controller
public class MainView {
@RequestMapping("/home.html")
public String home(HttpServletRequest request) {
return "/home.html";
}
@RequestMapping("/html/permission.html")
public String permission(HttpServletRequest request) {
return "/html/permission.html";
}
@RequestMapping("/html/test.html")
public String test(HttpServletRequest request) {
return "/html/test.html";
}
@RequestMapping("/html/mymod.html")
public String mymod(HttpServletRequest request) {
return "/html/mymod.html";
}
@RequestMapping("/html/resetPassword.html")
public String resetPassword(HttpServletRequest request) {
return "/html/resetPassword.html";
}
@RequestMapping("/html/main.html")
public String main(HttpServletRequest request) {
return "/html/main.html";
}
@RequestMapping("/html/join.html")
public String join(HttpServletRequest request) {
return "/html/join.html";
}
@RequestMapping("/html/about.html")
public String about(HttpServletRequest request) {
return "/html/about.html";
}
@RequestMapping("/html/head.html")
public String head(HttpServletRequest request) {
return "/html/head.html";
}
@RequestMapping("/html/up.html")
public String up(HttpServletRequest request) {
return "/html/up.html";
}
@RequestMapping("/html/userData.html")
public String userData(HttpServletRequest request) {
return "/html/userData.html";
}
@RequestMapping("/html/upmod.html")
public String upmod(HttpServletRequest request) {
return "/html/upmod.html";
}
@RequestMapping("/user/icon/1/image.png")
public String image(HttpServletRequest request) {
return "/user/icon/1/image.png";
}
@RequestMapping("/apphtml/user.html")
public String user(HttpServletRequest request) {
return "/apphtml/user.html";
}
@RequestMapping("/admin/magbox/popularize.html")
public String popularize(HttpServletRequest request) {
return "/admin/magbox/popularize.html";
}
@RequestMapping("/admin/magbox/tools.html")
public String tools(HttpServletRequest request) {
return "/admin/magbox/tools.html";
}
@RequestMapping("/admin/magbox/Countdown.html")
public String Countdown(HttpServletRequest request) {
return "/admin/magbox/Countdown.html";
}
@RequestMapping("/admin/magbox/magic.html")
public String magic(HttpServletRequest request) {
return "/admin/magbox/magic.html";
}
@RequestMapping("/admin/magbox/Banner.html")
public String Banner(HttpServletRequest request) {
return "/admin/magbox/Banner.html";
}
@RequestMapping("/admin/system/userlist.html")
public String userlist(HttpServletRequest request) {
return "/admin/system/userlist.html";
}
@RequestMapping("/index.html")
public String index(HttpServletRequest request) {
return "/index.html";
}
}

View File

@ -38,7 +38,8 @@ public class WebModController {
JSONObject json = new JSONObject();
List<TMod> list=new ArrayList<>();
try {
list = modService.getUserOfId(Integer.valueOf(RedisUtlis.get(request.getSession().getId())));
JSONObject user=new JSONObject(RedisUtlis.get(request.getSession().getId()));
list = modService.getUserOfId(user.getInt("id"));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();

View File

@ -6,17 +6,13 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.yutou.mybatis.dao.TModMapper;
@Controller
public class WebTestController {
@Resource
TModMapper modMapper;
@RequestMapping("/test.do")
@ResponseBody
public String Test(String type) {
return type;
}
}

View File

@ -193,11 +193,11 @@ public class WebUserController {
public String reset(String sign,HttpServletRequest request,HttpServletResponse response) {
try {
Tools.saveSession(request, "uuid", sign);
response.sendRedirect("/html/resetPassword.jsp");
response.sendRedirect("/html/resetPassword.html");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return "自动跳转失败,<a href='/html/resetPassword.jsp'>请点击这里手动跳转</a>";
return "自动跳转失败,<a href='/html/resetPassword.html'>请点击这里手动跳转</a>";
}
return "跳转中";
}

View File

@ -3,7 +3,7 @@ package com.yutou.enums;
public class UserPower {
public enum Power{
USER (0,"#"), //普通用户
UPLOAD(100,"upmod.jsp"), //上传者
UPLOAD(100,"upmod.html"), //上传者
U_Auditor(500,"#"), // 审核员
ADMIN (999,"#"); //管理员

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MAdConfig;
import com.yutou.mybatis.MAdConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MAdConfigMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MAdLog;
import com.yutou.mybatis.MAdLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MAdLogMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MAppHomeConfig;
import com.yutou.mybatis.MAppHomeConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MAppHomeConfigMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MAppHome;
import com.yutou.mybatis.MAppHomeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MAppHomeMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MAppLicense;
import com.yutou.mybatis.MAppLicenseExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MAppLicenseMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MAppMg;
import com.yutou.mybatis.MAppMgExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MAppMgMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MAppPlugs;
import com.yutou.mybatis.MAppPlugsExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MAppPlugsMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MAppTools;
import com.yutou.mybatis.MAppToolsExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MAppToolsMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MBanner;
import com.yutou.mybatis.MBannerExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MBannerMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.MGamePackname;
import com.yutou.mybatis.MGamePacknameExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MGamePacknameMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.SConfig;
import com.yutou.mybatis.SConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SConfigMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TFeedback;
import com.yutou.mybatis.TFeedbackExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TFeedbackMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TGameVersion;
import com.yutou.mybatis.TGameVersionExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TGameVersionMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TLines;
import com.yutou.mybatis.TLinesExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TLinesMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TMod;
import com.yutou.mybatis.TModExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TModMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TModcomment;
import com.yutou.mybatis.TModcommentExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TModcommentMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TModdownload;
import com.yutou.mybatis.TModdownloadExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TModdownloadMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TModfile;
import com.yutou.mybatis.TModfileExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TModfileMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TModfilePath;
import com.yutou.mybatis.TModfilePathExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TModfilePathMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TModpower;
import com.yutou.mybatis.TModpowerExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TModpowerMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TModrating;
import com.yutou.mybatis.TModratingExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TModratingMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TModtag;
import com.yutou.mybatis.TModtagExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TModtagMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.TModtype;
import com.yutou.mybatis.TModtypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TModtypeMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.UDevUser;
import com.yutou.mybatis.UDevUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UDevUserMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.UGroup;
import com.yutou.mybatis.UGroupExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UGroupMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.UUserGameData;
import com.yutou.mybatis.UUserGameDataExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UUserGameDataMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.UUsercollection;
import com.yutou.mybatis.UUsercollectionExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UUsercollectionMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.UUserdata;
import com.yutou.mybatis.UUserdataExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UUserdataMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.UUserkey;
import com.yutou.mybatis.UUserkeyExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UUserkeyMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.UUsermodscore;
import com.yutou.mybatis.UUsermodscoreExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UUsermodscoreMapper {
/**

View File

@ -3,8 +3,11 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.User;
import com.yutou.mybatis.UserExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UserMapper {
/**

View File

@ -3,8 +3,10 @@ package com.yutou.mybatis.dao;
import com.yutou.mybatis.ZsShipType;
import com.yutou.mybatis.ZsShipTypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ZsShipTypeMapper {
/**

View File

@ -6,5 +6,5 @@ import com.yutou.mybatis.MAdLog;
public interface AdService {
MAdConfig getAd(int type);
void addAdLog(MAdLog log);
int getUserAd(int type,int uid);
int getUserAd(int type, int uid);
}

View File

@ -6,7 +6,7 @@ import com.yutou.mybatis.MBanner;
public interface MBannerService {
int addBanner(MBanner banner);
int showBanner(int id,boolean show);
int showBanner(int id, boolean show);
int setBanner(MBanner banner);
List<MBanner> getBanner(boolean all);
}

View File

@ -23,13 +23,13 @@ public interface ModService {
* @param mid mod的id
* @return
*/
TMod getMod(int mid,int upower);
TMod getMod(int mid, int upower);
/**
* 搜索mod
* @param search 搜索关键词
* @return mod列表
*/
List<TMod> getMod(String search,int upower);
List<TMod> getMod(String search, int upower);
/**
* 获取mod的评论
* @param mid mod的id
@ -47,7 +47,7 @@ public interface ModService {
* @param mid mod的id #注意,下载地址是没有包含主URL的
* @return
*/
List<TModfile> getModFile(int mid,int uid);
List<TModfile> getModFile(int mid, int uid);
/**
* 获取mod应该安装到的路径
* @param mid mod的id
@ -65,7 +65,7 @@ public interface ModService {
* @param max 最大数
* @return
*/
List<TMod> getMods(int min,int max,int upower);
List<TMod> getMods(int min, int max, int upower);
/**
* 获取mod的权限
* @param mid mod的id
@ -77,7 +77,7 @@ public interface ModService {
* @param tid
* @return
*/
List<TMod> getTypeOfMod( int tid);
List<TMod> getTypeOfMod(int tid);
/**
* 获取所有舰娘类型的MOD
* @param tid
@ -96,7 +96,7 @@ public interface ModService {
* @param rmid
* @return
*/
List<TMod> getReMod(int mid,int rmid);
List<TMod> getReMod(int mid, int rmid);
List<TModtag> getModTag(int mid);
/**
@ -105,14 +105,14 @@ public interface ModService {
* @param mid mod id
* @return 0 error, 1 success, -1 user already Conllection
*/
int setConllection(String uid,String mid);
int setConllection(String uid, String mid);
/**
* 设置mod权限
* @param mid
* @param power
* @return
*/
int setModPower(int mid,int power);
int setModPower(int mid, int power);
/**
* 移动mod
* @param mid
@ -120,7 +120,7 @@ public interface ModService {
* @param mType
* @return
*/
int moveMod(int mid,String jType,String mType);
int moveMod(int mid, String jType, String mType);
/**
* 获取MOD类型和舰娘类型的信息
* @return

View File

@ -9,7 +9,7 @@ import com.yutou.mybatis.UGroup;
public interface PermissionService {
List<UGroup> getGroup();
UGroup getGroup(String title);
UGroup getGroup(int power,UGroup userGroup);
int benUser(int muid,int uid,Date time);
int unBenUser(int muid,int uid);
UGroup getGroup(int power, UGroup userGroup);
int benUser(int muid, int uid, Date time);
int unBenUser(int muid, int uid);
}

View File

@ -7,8 +7,8 @@ import com.yutou.mybatis.UDevUser;
public interface PlugsService {
List<MAppPlugs> getPlugs(int power);
MAppPlugs getPlug(int power,int id);
MAppPlugs getPlug(int power, int id);
boolean addPlug(MAppPlugs plug);
boolean removePlug(int id);
UDevUser checkPlugs(String appid,String md5,String fileName);
UDevUser checkPlugs(String appid, String md5, String fileName);
}

View File

@ -5,7 +5,7 @@ import java.util.List;
import com.yutou.mybatis.TFeedback;
public interface SystemService {
int addFeedBack(int uid,String context,String sysinfo);
int addFeedBack(int uid, String context, String sysinfo);
TFeedback getFeedback(int id);
List<TFeedback> getFeedback();
}

View File

@ -10,24 +10,24 @@ import com.yutou.mybatis.UUserdata;
import com.yutou.mybatis.User;
public interface UserService {
int login(String uname,String pass);
int reg(String uname,String name,String pass);
int login(String uname, String pass);
int reg(String uname, String name, String pass);
int userPower(int id);
int getUserId(String uname);
User getUser(int id);
List<User> searchUser(String type,String key);
List<User> searchUser(String type, String key);
UUserdata getUUserData(int id);
JSONObject getUserData(int id);
int updateUserData(UUserdata udata);
int updateUser(User user);
List<User> getUserList(int min,int max);
List<User> getUserList(int min, int max);
int addModCollect(int uid,int mid);
List<TMod> userCollectMod(int min,int max,int uid);
int addModCollect(int uid, int mid);
List<TMod> userCollectMod(int min, int max, int uid);
int removeCollectMod(int mid);
void addGameData(UUserGameData gameData);
void updateGameData(UUserGameData gameData);
List<UUserGameData> getGameData(int uid);
UUserGameData findGameData(int uid,String fileName);
UUserGameData findGameData(int uid, String fileName);
}

View File

@ -17,9 +17,11 @@ public class RedisUtlis {
// 写成静态代码块形式只加载一次节省资源
static {
Properties properties = PropertyUtil.loadProperties("jedis.properties");
host = properties.getProperty("redis.host");
port = Integer.valueOf(properties.getProperty("redis.port"));
//Properties properties = PropertyUtil.loadProperties("jedis.properties");
//host = properties.getProperty("redis.host");
//port = Integer.valueOf(properties.getProperty("redis.port"));
host="127.0.0.1";
port=6379;
}
public static boolean set(String key, String value) {

View File

@ -1,118 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybaE:\java\SQL\tis-generator-config_1_0.dtd">
<generatorConfiguration>
<classPathEntry location="F:\JavaLibs\mysql-connector-java-5.1.46-bin.jar" />
<context id="context1">
<property name="beginningDelimiter" value="`" />
<property name="endingDelimiter" value="`" />
<jdbcConnection
connectionURL="jdbc:mysql://127.0.0.1:3306/jianr_v2?useSSL=false&amp;useUnicode=true&amp;autoReconnect=true&amp;characterEncoding=UTF-8"
driverClass="com.mysql.jdbc.Driver" password="dashuyuxiaodidi233"
userId="jianrmod" />
<javaModelGenerator targetPackage="com.yutou.mybatis"
targetProject="jianRMG_Service_v2/src/main/java"/>
<sqlMapGenerator targetPackage="mapping"
targetProject="jianRMG_Service_v2/src/main/resources" />
<javaClientGenerator targetPackage="com.yutou.mybatis.dao"
targetProject="jianRMG_Service_v2/src/main/java" type="XMLMAPPER" />
<table tableName="s_config">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_mod">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
<columnOverride column="image" jdbcType="VARCHAR"/>
<columnOverride column="icon" jdbcType="VARCHAR"/>
<columnOverride column="info" jdbcType="VARCHAR"/>
</table>
<table tableName="t_modfile" >
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_lines" >
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
<columnOverride column="json" jdbcType="VARCHAR" />
</table>
<table tableName="t_modpower" >
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="u_usercollection">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_modcomment">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_modrating">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_feedback" >
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_modtag" >
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="user">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="u_usermodscore" >
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="u_userdata">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="u_userkey">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_modfile_path">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_moddownload">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_modtype">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="u_user_game_data">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="t_game_version">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="zs_ship_type">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="m_banner">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="m_app_mg">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="m_app_home">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="m_app_tools">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
<columnOverride column="parameter" jdbcType="VARCHAR" />
</table>
<table tableName="m_app_home_config">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="m_app_license">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
<columnOverride column="license" jdbcType="VARCHAR" />
</table>
<table tableName="u_dev_user">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="m_app_plugs">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="u_group">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="m_ad_config">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="m_ad_log">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
</context>
</generatorConfiguration>

View File

@ -1,9 +0,0 @@
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://127.0.0.1:3306/jianr_v2?useSSL=false&amp;useUnicode=true&amp;autoReconnect=true&amp;characterEncoding=UTF-8
username=jianrmod
password=dashuyuxiaodidi233
initialSize=0
maxActive=20
maxIdle=20
minIdle=1
maxWait=60000

View File

@ -1,9 +0,0 @@
# Redis settings
redis.host=127.0.0.1
redis.port=6379
redis.pass=
redis.timeout=10000
redis.maxIdle=300
redis.maxTotal=600
redis.maxWaitMillis=1000
redis.testOnBorrow=false

View File

@ -1,36 +0,0 @@
### \u8BBE\u7F6E###
log4j.rootLogger = DEBUG,D,E,I
log4j.appender.I = org.apache.log4j.DailyRollingFileAppender
log4j.appender.I.File =logs/info.log
log4j.appender.file.DatePattern=yyyy-MM-dd.log
log4j.appender.I.Append = true
log4j.appender.I.Threshold = INFO
log4j.appender.I.layout = org.apache.log4j.PatternLayout
log4j.appender.I.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
### \u8F93\u51FAERROR \u7EA7\u522B\u4EE5\u4E0A\u7684\u65E5\u5FD7\u5230=E://logs/error.log ###
log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
log4j.appender.E.File =logs/error.log
log4j.appender.E.Append = true
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
log4j.appender.D.File = logs/debug.log
log4j.appender.D.Append = true
log4j.appender.D.Threshold = DEBUG
log4j.appender.D.layout = org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
log4j.logger.com.ibatis=DEBUG
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
log4j.logger.java.sql.Connection=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG

View File

@ -1,4 +0,0 @@
该做的事情:
上回做好了根据mid当前MODid和remid被关联id来查询mod关联
所以:
应用到APP上

View File

@ -0,0 +1,10 @@
<configuration>
<typeAliases>
<typeAlias alias="Integer" type="java.lang.Integer" />
<typeAlias alias="Long" type="java.lang.Long" />
<typeAlias alias="HashMap" type="java.util.HashMap" />
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap" />
<typeAlias alias="ArrayList" type="java.util.ArrayList" />
<typeAlias alias="LinkedList" type="java.util.LinkedList" />
</typeAliases>
</configuration>

View File

@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
<!-- 自动扫描该包使SpringMVC认为包下用了@controller注解的类是控制器 -->
<context:component-scan base-package="com.yutou" />
<!-- 启动SpringMVC的注解功能完成请求和注解POJO的映射 -->
<bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
</bean>
<!-- 定义跳转的文件的前后缀 ,视图模式配置 -->
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!-- 这里的配置我的理解是自动给后面action的方法return的字符串加上前缀和后缀变成一个 可用的url地址 -->
<property name="prefix" value="/" />
<property name="suffix" value=".jsp" />
</bean>
<!-- 配置文件上传,如果没有使用文件上传可以不用配置,当然如果不配,那么配置文件中也不必引入上传组件包 -->
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- 默认编码 -->
<property name="defaultEncoding" value="utf-8" />
<!-- 文件大小最大值 -->
<property name="maxUploadSize" value="10485760000" />
<!-- 内存中的最大值 -->
<property name="maxInMemorySize" value="40960" />
</bean>
<bean id="exceptionResolver" class="com.yutou.utlis.ErrorException" />
<mvc:annotation-driven>
<mvc:message-converters>
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>text/html;charset=UTF-8</value>
</list>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
</beans>

View File

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
<!-- 自动扫描 -->
<context:component-scan base-package="com.yutou" />
<!-- 引入配置文件 -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:jdbc.properties" />
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="${driver}" />
<property name="url" value="${url}" />
<property name="username" value="${username}" />
<property name="password" value="${password}" />
<!-- 初始化连接大小 -->
<property name="initialSize" value="${initialSize}"></property>
<!-- 连接池最大数量 -->
<property name="maxActive" value="${maxActive}"></property>
<!-- 连接池最大空闲 -->
<property name="maxIdle" value="${maxIdle}"></property>
<!-- 连接池最小空闲 -->
<property name="minIdle" value="${minIdle}"></property>
<!-- 获取连接最大等待时间 -->
<property name="maxWait" value="${maxWait}"></property>
</bean>
<!-- spring和MyBatis完美整合不需要mybatis的配置映射文件 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<!-- 自动扫描mapping.xml文件 -->
<property name="mapperLocations" value="classpath*:mapping/*.xml"></property>
</bean>
<!-- DAO接口所在包名Spring会自动查找其下的类 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.yutou.mybatis.dao" />
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
</bean>
<!-- (事务管理)transaction manager, use JtaTransactionManager for global tx -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
</beans>

View File

@ -17,18 +17,18 @@ window.onload=function(){
case 104:
title="请登录";
content="还没登陆哦~";
url="/index.jsp"
url="/index.html"
break;
case 105:
title="没有访问权限";
content="您无法访问当前页面";
url="home.jsp"
url="home.html"
reload=true;
break;
default:
title="异常错误";
content="未知错误,请尝试重新登录";
url="/index.jsp"
url="/index.html"
break;
}
var layer = layui.layer;
@ -66,7 +66,7 @@ function logout(){
},
btn:['了解'],
btn1:function(){
window.location.replace("/index.jsp");
window.location.replace("/index.html");
}
})
});

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Some files were not shown because too many files have changed in this diff Show More