就改了个名字?

main
lensfrex 3 years ago
parent 3c6e6f13a4
commit 5bac710287
Signed by: lensfrex
GPG Key ID: 0F69A0A2FBEE98A0
  1. 4
      README.md
  2. 45
      front-end/MaskDialogTest.html
  3. 4
      front-end/index.html
  4. 13
      front-end/js/events.js
  5. 2
      front-end/login.html
  6. 4
      pom.xml
  7. 4
      src/main/java/me/lensfrex/littlebusters/api/v1/utils/key/KeyManager.java
  8. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/beans/ProfileItem.java
  9. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/beans/requests/LoginRequestBody.java
  10. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/beans/requests/RegisterRequestBody.java
  11. 27
      src/main/java/me/lensfrex/trailblazer/api/v1/beans/responses/LoginResponseData.java
  12. 4
      src/main/java/me/lensfrex/trailblazer/api/v1/beans/responses/ProfileResponseData.java
  13. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/beans/responses/RegisterResponseData.java
  14. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/beans/responses/general/ErrorResponse.java
  15. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/beans/responses/general/ResponseBase.java
  16. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/beans/responses/general/ResponseCode.java
  17. 8
      src/main/java/me/lensfrex/trailblazer/api/v1/config/ConfigLoader.java
  18. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/config/GlobalConfig.java
  19. 8
      src/main/java/me/lensfrex/trailblazer/api/v1/dao/UserDao.java
  20. 4
      src/main/java/me/lensfrex/trailblazer/api/v1/dao/sql/KeyDaoInterface.java
  21. 4
      src/main/java/me/lensfrex/trailblazer/api/v1/dao/sql/UserDaoInterface.java
  22. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/exceptions/ConfigureFileInvalidException.java
  23. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/exceptions/RequestDataInvalidException.java
  24. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/exceptions/user/LoginInfoWrongException.java
  25. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/pojos/StoredKey.java
  26. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/pojos/UserInformation.java
  27. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/pojos/UserResult.java
  28. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/service/FeedBack.java
  29. 6
      src/main/java/me/lensfrex/trailblazer/api/v1/service/Index.java
  30. 23
      src/main/java/me/lensfrex/trailblazer/api/v1/service/login/Login.java
  31. 19
      src/main/java/me/lensfrex/trailblazer/api/v1/service/register/Register.java
  32. 4
      src/main/java/me/lensfrex/trailblazer/api/v1/service/token/TokenChecker.java
  33. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/service/token/TokenRefresher.java
  34. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/utils/IOUtil.java
  35. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/utils/InputChecker.java
  36. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/utils/Time.java
  37. 2
      src/main/java/me/lensfrex/trailblazer/api/v1/utils/database/MyBatisUtil.java
  38. 3
      src/main/java/me/lensfrex/trailblazer/api/v1/utils/jwt/JWTManager.java
  39. 4
      src/main/java/me/lensfrex/trailblazer/api/v1/utils/key/KeyManager.java
  40. 2
      src/main/resources/mappers/DatabaseInitSqlMapper.xml
  41. 10
      src/main/resources/mappers/KeySqlMapper.xml
  42. 6
      src/main/resources/mappers/UserSqlMapper.xml
  43. 2
      src/main/resources/me/lensfrex/trailblazer/DefaultConfig.conf
  44. 6
      src/main/webapp/WEB-INF/web.xml

@ -1,6 +1,6 @@
# LittleBusters
# Trailblazer
这个新项目叫做"LittleBusters",是一个前后端分离的一个网站整体。
这个新项目叫做"Trailblazer"(当初可不是这个名称),是一个前后端分离的一个网站整体。
但是具体还不知道这个网站系统要做什么,没有思路,正在制作的功能只有登录和注册这些东西,目前的未来方向是在线存储自己的音乐文件并且在上面”在线“收听。

@ -1,45 +0,0 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>欢迎 - LittleBusters</title>
<link rel="stylesheet" type="text/css" href="css\welcomepage.css">
<script src="js/welcomepage_message.js"></script>
<!--[if IE]><script>alert("别用IE浏览器啦,快换一个吧!");</script><![endif]-->
</head>
<!-- 前端不擅长,逻辑做的很简单,见谅 ( ̄﹏ ̄;)-->
<body lang="ZH-CN">
<div id="content">
<div id="background"></div>
<div id="dialogMask" onclick="closeDialog()"></div>
<div class="login-box">
<div class="login-box-title">登录/注册</div>
<div class="input-field-group">
<div class="input-field">
<input id="username" type="text" autocomplete="username" placeholder="用户名/UID">
</div>
<div class="input-field">
<input id="passwd" type="password" autocomplete="current-password" placeholder="密码">
</div>
</div>
<div class="operator-box">
<button class="big-button" type="submit" id="login-botton" onclick="checkInputCorrect()">登录</button>
<div class="rl-layout-box">
<a class="small-link" onclick="forgotPasswd()">不记得密码了?</a>
<a class="small-link">没有账号?注册一个!</a>
</div>
</div>
</div>
</div>
</body>
</html>

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>欢迎 - LittleBusters</title>
<title>欢迎 - Trailblazer</title>
<link rel="stylesheet" type="text/css" href="css\welcomepage.css">
@ -35,8 +35,8 @@
<div class="input-field">
<input id="passwd" type="password" autocomplete="current-password" placeholder="密码">
</div>
<div id="errMsgBox"></div>
</div>
<div id="errMsgBox"></div>
<div class="operator-box">
<div class="botton-box">
<button class="big-button" type="submit" id="register-botton">注册</button>

@ -1,5 +1,7 @@
function login() {
var operationStatus = "login";
function login() {
clearMessage();
username = $("#username").val();
password = $("#passwd").val();
@ -13,6 +15,10 @@ function login() {
"password": encPassword
};
sendLogin(postData);
}
function sendLogin(postData) {
$.ajax({
url: "/api/v1/login",
type: "post",
@ -47,6 +53,7 @@ function login() {
}
function register() {
clearMessage();
username = $("#username").val();
password = $("#passwd").val();
@ -91,4 +98,8 @@ function register() {
showMessage("注册时发生错误:" + status + " " + msg.status);
}
})
}
function jumpToFillInformation() {
}

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>欢迎 - LittleBusters</title>
<title>欢迎 - Trailblazer</title>
<link rel="stylesheet" type="text/css" href="css\welcomepage.css">

@ -5,9 +5,9 @@
<modelVersion>4.0.0</modelVersion>
<groupId>me.lensfrex</groupId>
<artifactId>LittleBusters</artifactId>
<artifactId>Trailblazer</artifactId>
<version>0.0.1-dev</version>
<name>LittleBusters</name>
<name>Trailblazer</name>
<packaging>war</packaging>
<properties>

@ -1,4 +0,0 @@
package me.lensfrex.littlebusters.api.v1.utils.key;
public class KeyManager {
}

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.beans;
package me.lensfrex.trailblazer.api.v1.beans;
public class ProfileItem {
private String itemName;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.beans.requests;
package me.lensfrex.trailblazer.api.v1.beans.requests;
import com.google.gson.annotations.SerializedName;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.beans.requests;
package me.lensfrex.trailblazer.api.v1.beans.requests;
import com.google.gson.annotations.SerializedName;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.beans.responses;
package me.lensfrex.trailblazer.api.v1.beans.responses;
import com.google.gson.annotations.SerializedName;
@ -13,25 +13,28 @@ public class LoginResponseData {
private String uuid;
private int account_status;
/**
* 用户本次登录得到的token
*/
@SerializedName("access_token")
private String accessToken;
/**
* 用户此次得到的token的过期时间
*/
@SerializedName("expired_at")
private long expiredAt;
public LoginResponseData(long uid, String uuid, String accessToken, long expiredAt) {
public LoginResponseData(long uid, String uuid, int account_status, String accessToken, long expiredAt) {
this.uid = uid;
this.uuid = uuid;
this.account_status = account_status;
this.accessToken = accessToken;
this.expiredAt = expiredAt;
}
/**
* 用户此次得到的token的过期时间
*/
@SerializedName("expired_at")
private long expiredAt;
public long getUid() {
return uid;
}
@ -63,4 +66,12 @@ public class LoginResponseData {
public void setExpiredAt(long expiredAt) {
this.expiredAt = expiredAt;
}
public int getAccount_status() {
return account_status;
}
public void setAccount_status(int account_status) {
this.account_status = account_status;
}
}

@ -1,6 +1,6 @@
package me.lensfrex.littlebusters.api.v1.beans.responses;
package me.lensfrex.trailblazer.api.v1.beans.responses;
import me.lensfrex.littlebusters.api.v1.beans.ProfileItem;
import me.lensfrex.trailblazer.api.v1.beans.ProfileItem;
import java.util.ArrayList;
import java.util.List;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.beans.responses;
package me.lensfrex.trailblazer.api.v1.beans.responses;
import com.google.gson.annotations.SerializedName;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.beans.responses.general;
package me.lensfrex.trailblazer.api.v1.beans.responses.general;
/**
* 错误响应类

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.beans.responses.general;
package me.lensfrex.trailblazer.api.v1.beans.responses.general;
import com.google.gson.annotations.SerializedName;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.beans.responses.general;
package me.lensfrex.trailblazer.api.v1.beans.responses.general;
public class ResponseCode {
public final static int SERVER_ERROR = -1;

@ -1,7 +1,7 @@
package me.lensfrex.littlebusters.api.v1.config;
package me.lensfrex.trailblazer.api.v1.config;
import me.lensfrex.littlebusters.api.v1.exceptions.ConfigureFileInvalidException;
import me.lensfrex.littlebusters.api.v1.utils.IOUtil;
import me.lensfrex.trailblazer.api.v1.exceptions.ConfigureFileInvalidException;
import me.lensfrex.trailblazer.api.v1.utils.IOUtil;
import java.io.*;
import java.nio.charset.StandardCharsets;
@ -28,7 +28,7 @@ public class ConfigLoader {
globalConfigFile.getParentFile().mkdirs();
globalConfigFile.createNewFile();
InputStream defaultConfigInoutStream = getClass().getResourceAsStream("me/lensfrex/littlebusters/DefaultConfig.conf");
InputStream defaultConfigInoutStream = getClass().getResourceAsStream("me/lensfrex/trailblazer/DefaultConfig.conf");
if (defaultConfigInoutStream == null) {
throw new NullPointerException("Can't find the default config file in program.");
}

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.config;
package me.lensfrex.trailblazer.api.v1.config;
import java.util.Properties;

@ -1,8 +1,8 @@
package me.lensfrex.littlebusters.api.v1.dao;
package me.lensfrex.trailblazer.api.v1.dao;
import me.lensfrex.littlebusters.api.v1.dao.sql.UserDaoInterface;
import me.lensfrex.littlebusters.api.v1.pojos.UserInformation;
import me.lensfrex.littlebusters.api.v1.utils.database.MyBatisUtil;
import me.lensfrex.trailblazer.api.v1.dao.sql.UserDaoInterface;
import me.lensfrex.trailblazer.api.v1.pojos.UserInformation;
import me.lensfrex.trailblazer.api.v1.utils.database.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;
public class UserDao {

@ -1,6 +1,6 @@
package me.lensfrex.littlebusters.api.v1.dao.sql;
package me.lensfrex.trailblazer.api.v1.dao.sql;
import me.lensfrex.littlebusters.api.v1.pojos.StoredKey;
import me.lensfrex.trailblazer.api.v1.pojos.StoredKey;
public interface KeyDaoInterface {
StoredKey getKeyContentByKeyName(String keyName);

@ -1,6 +1,6 @@
package me.lensfrex.littlebusters.api.v1.dao.sql;
package me.lensfrex.trailblazer.api.v1.dao.sql;
import me.lensfrex.littlebusters.api.v1.pojos.UserInformation;
import me.lensfrex.trailblazer.api.v1.pojos.UserInformation;
import org.apache.ibatis.annotations.Param;
public interface UserDaoInterface {

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.exceptions;
package me.lensfrex.trailblazer.api.v1.exceptions;
public class ConfigureFileInvalidException extends Exception {
public ConfigureFileInvalidException() {

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.exceptions;
package me.lensfrex.trailblazer.api.v1.exceptions;
public class RequestDataInvalidException extends Exception {
public RequestDataInvalidException(String message) {

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.exceptions.user;
package me.lensfrex.trailblazer.api.v1.exceptions.user;
public class LoginInfoWrongException extends Exception {
public LoginInfoWrongException(String message) {

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.pojos;
package me.lensfrex.trailblazer.api.v1.pojos;
public class StoredKey {
public String keyContent;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.pojos;
package me.lensfrex.trailblazer.api.v1.pojos;
public class UserInformation {
public long uid;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.pojos;
package me.lensfrex.trailblazer.api.v1.pojos;
public class UserResult {
public final int uid;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.service;
package me.lensfrex.trailblazer.api.v1.service;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.service;
package me.lensfrex.trailblazer.api.v1.service;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
@ -10,7 +10,7 @@ public class Index {
@GET
@Produces(MediaType.TEXT_HTML)
public String index() {
return "Here is the API root of LittleBusters.</br>\n" +
"To use the API currently, please see the LittleBusters RESTFul API document.";
return "Here is the API root of Trailblazer.</br>\n" +
"To use the API currently, please see the Trailblazer RESTFul API document.";
}
}

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.service.login;
package me.lensfrex.trailblazer.api.v1.service.login;
import com.google.gson.Gson;
import com.google.gson.JsonParseException;
@ -6,16 +6,16 @@ import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import me.lensfrex.littlebusters.api.v1.beans.requests.LoginRequestBody;
import me.lensfrex.littlebusters.api.v1.beans.responses.LoginResponseData;
import me.lensfrex.littlebusters.api.v1.beans.responses.general.ErrorResponse;
import me.lensfrex.littlebusters.api.v1.beans.responses.general.ResponseBase;
import me.lensfrex.littlebusters.api.v1.beans.responses.general.ResponseCode;
import me.lensfrex.littlebusters.api.v1.exceptions.user.LoginInfoWrongException;
import me.lensfrex.littlebusters.api.v1.pojos.UserInformation;
import me.lensfrex.littlebusters.api.v1.utils.InputChecker;
import me.lensfrex.littlebusters.api.v1.dao.UserDao;
import me.lensfrex.littlebusters.api.v1.utils.jwt.JWTManager;
import me.lensfrex.trailblazer.api.v1.beans.requests.LoginRequestBody;
import me.lensfrex.trailblazer.api.v1.beans.responses.LoginResponseData;
import me.lensfrex.trailblazer.api.v1.beans.responses.general.ErrorResponse;
import me.lensfrex.trailblazer.api.v1.beans.responses.general.ResponseBase;
import me.lensfrex.trailblazer.api.v1.beans.responses.general.ResponseCode;
import me.lensfrex.trailblazer.api.v1.exceptions.user.LoginInfoWrongException;
import me.lensfrex.trailblazer.api.v1.pojos.UserInformation;
import me.lensfrex.trailblazer.api.v1.utils.InputChecker;
import me.lensfrex.trailblazer.api.v1.dao.UserDao;
import me.lensfrex.trailblazer.api.v1.utils.jwt.JWTManager;
import org.mindrot.jbcrypt.BCrypt;
import java.time.Instant;
@ -56,6 +56,7 @@ public class Login {
LoginResponseData loginResponseData = new LoginResponseData(
userDatabaseInformation.uid,
userDatabaseInformation.uuid,
userDatabaseInformation.accountStatus,
userToken,
expireDate.getTime());

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.service.register;
package me.lensfrex.trailblazer.api.v1.service.register;
import com.google.gson.Gson;
import com.google.gson.JsonParseException;
@ -6,18 +6,17 @@ import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import me.lensfrex.littlebusters.api.v1.beans.requests.RegisterRequestBody;
import me.lensfrex.littlebusters.api.v1.beans.responses.general.ResponseCode;
import me.lensfrex.littlebusters.api.v1.beans.responses.RegisterResponseData;
import me.lensfrex.littlebusters.api.v1.beans.responses.general.ResponseBase;
import me.lensfrex.littlebusters.api.v1.dao.UserDao;
import me.lensfrex.littlebusters.api.v1.exceptions.RequestDataInvalidException;
import me.lensfrex.littlebusters.api.v1.utils.InputChecker;
import me.lensfrex.littlebusters.api.v1.utils.jwt.JWTManager;
import me.lensfrex.trailblazer.api.v1.beans.requests.RegisterRequestBody;
import me.lensfrex.trailblazer.api.v1.beans.responses.general.ResponseCode;
import me.lensfrex.trailblazer.api.v1.beans.responses.RegisterResponseData;
import me.lensfrex.trailblazer.api.v1.beans.responses.general.ResponseBase;
import me.lensfrex.trailblazer.api.v1.dao.UserDao;
import me.lensfrex.trailblazer.api.v1.exceptions.RequestDataInvalidException;
import me.lensfrex.trailblazer.api.v1.utils.InputChecker;
import me.lensfrex.trailblazer.api.v1.utils.jwt.JWTManager;
import org.mindrot.jbcrypt.BCrypt;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.Date;
import java.util.UUID;

@ -1,10 +1,10 @@
package me.lensfrex.littlebusters.api.v1.service.token;
package me.lensfrex.trailblazer.api.v1.service.token;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import me.lensfrex.littlebusters.api.v1.utils.jwt.JWTManager;
import me.lensfrex.trailblazer.api.v1.utils.jwt.JWTManager;
@Path("/token")
public class TokenChecker {

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.service.token;
package me.lensfrex.trailblazer.api.v1.service.token;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.utils;
package me.lensfrex.trailblazer.api.v1.utils;
import java.io.ByteArrayOutputStream;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.utils;
package me.lensfrex.trailblazer.api.v1.utils;
public class InputChecker {

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.utils;
package me.lensfrex.trailblazer.api.v1.utils;
import java.time.LocalDateTime;

@ -1,4 +1,4 @@
package me.lensfrex.littlebusters.api.v1.utils.database;
package me.lensfrex.trailblazer.api.v1.utils.database;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;

@ -1,10 +1,9 @@
package me.lensfrex.littlebusters.api.v1.utils.jwt;
package me.lensfrex.trailblazer.api.v1.utils.jwt;
import io.jsonwebtoken.*;
import io.jsonwebtoken.security.Keys;
import java.security.Key;
import java.time.LocalDate;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@ -0,0 +1,4 @@
package me.lensfrex.trailblazer.api.v1.utils.key;
public class KeyManager {
}

@ -4,7 +4,7 @@
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.lensfrex.littlebusters.api.v1.dao.sql.KeyDaoInterface">
<mapper namespace="me.lensfrex.trailblazer.api.v1.dao.sql.KeyDaoInterface">
<sql id="createDatabaseTables">
CREATE TABLE `account_basic` (
`uid` int(18) unsigned unique NOT NULL AUTO_INCREMENT COMMENT '用户id,1起,给人看的',

@ -4,16 +4,16 @@
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.lensfrex.littlebusters.api.v1.dao.sql.KeyDaoInterface">
<select id="getKeyContentByKeyName" resultType="me.lensfrex.littlebusters.api.v1.pojos.StoredKey"
<mapper namespace="me.lensfrex.trailblazer.api.v1.dao.sql.KeyDaoInterface">
<select id="getKeyContentByKeyName" resultType="me.lensfrex.trailblazer.api.v1.pojos.StoredKey"
parameterType="java.lang.String">
select key_content as keyContent, key_name as keyName, key_type as keyType
from `LittleBusters`.`keys`
from `Trailblazer`.`keys`
where key_name = #{keyName};
</select>
<insert id="addKeyIntoDatabase" parameterType="me.lensfrex.littlebusters.api.v1.pojos.StoredKey">
insert into `LittleBusters`.`keys` (`key_content`, `key_name`, `key_type`)
<insert id="addKeyIntoDatabase" parameterType="me.lensfrex.trailblazer.api.v1.pojos.StoredKey">
insert into `Trailblazer`.`keys` (`key_content`, `key_name`, `key_type`)
values (#{keyContent}, #{keyName}, #{keyType});
</insert>
</mapper>

@ -4,8 +4,8 @@
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.lensfrex.littlebusters.api.v1.dao.sql.UserDaoInterface">
<select id="getBasicInfoByUserName" resultType="me.lensfrex.littlebusters.api.v1.pojos.UserInformation" parameterType="java.lang.String">
<mapper namespace="me.lensfrex.trailblazer.api.v1.dao.sql.UserDaoInterface">
<select id="getBasicInfoByUserName" resultType="me.lensfrex.trailblazer.api.v1.pojos.UserInformation" parameterType="java.lang.String">
select uid, uuid, passwd as password, deleted, account_status as accountStstus
from `account_basic`
where user_name = #{userName}
@ -16,7 +16,7 @@
</select>
<insert id="addRegisterInfoIntoDb" useGeneratedKeys="true" keyProperty="uid">
insert into `LittleBusters`.`account_basic` (`uuid`, `user_name`, `passwd`)
insert into `Trailblazer`.`account_basic` (`uuid`, `user_name`, `passwd`)
values (#{uuid}, #{userName}, #{password})
<selectKey keyProperty="uid" order="AFTER" resultType="int">

@ -1,6 +1,6 @@
# 数据库的类型,目前仅支持mysql和mariadb两种sql服务器
database.dbType = "mariadb"
database.url = "jdbc:mariadb://localhost:3386/LittleBusters?characterEncoding=utf-8"
database.url = "jdbc:mariadb://localhost:3386/Trailblazer?characterEncoding=utf-8"
database.userName = "root"
database.password = "321654mid"

@ -5,12 +5,12 @@
version="4.0">
<servlet>
<servlet-name>LittleBustersApiV1</servlet-name>
<servlet-name>TrailblazerApiV1</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>me.lensfrex.littlebusters</param-value>
<param-value>me.lensfrex.trailblazer</param-value>
</init-param>
<init-param>
@ -20,7 +20,7 @@
</servlet>
<servlet-mapping>
<servlet-name>LittleBustersApiV1</servlet-name>
<servlet-name>TrailblazerApiV1</servlet-name>
<url-pattern>/api/v1/*</url-pattern>
</servlet-mapping>

Loading…
Cancel
Save