表结构调整.
This commit is contained in:
+1
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
package fun.asgc.neutrino.proxy.server.base.rest;
|
||||
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.constant.ExceptionConstant;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Copyright (c) 2022 aoshiguchen
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package fun.asgc.neutrino.proxy.server.base.rest.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 启用状态枚举
|
||||
* @author: aoshiguchen
|
||||
* @date: 2022/8/5
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum EnableStatusEnum {
|
||||
ENABLE(1, "启用"),
|
||||
DISABLE(2, "禁用");
|
||||
|
||||
private Integer status;
|
||||
private String desc;
|
||||
}
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package fun.asgc.neutrino.proxy.server.base.rest;
|
||||
package fun.asgc.neutrino.proxy.server.base.rest.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
+1
@@ -28,6 +28,7 @@ import fun.asgc.neutrino.core.web.context.HttpRequestWrapper;
|
||||
import fun.asgc.neutrino.core.web.context.HttpResponseWrapper;
|
||||
import fun.asgc.neutrino.core.web.interceptor.HandlerInterceptor;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.*;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.constant.ExceptionConstant;
|
||||
import fun.asgc.neutrino.proxy.server.dal.entity.UserDO;
|
||||
import fun.asgc.neutrino.proxy.server.service.UserService;
|
||||
import fun.asgc.neutrino.proxy.server.util.HttpUtil;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ package fun.asgc.neutrino.proxy.server.base.rest.interceptor;
|
||||
import fun.asgc.neutrino.core.web.context.HttpRequestWrapper;
|
||||
import fun.asgc.neutrino.core.web.context.HttpResponseWrapper;
|
||||
import fun.asgc.neutrino.core.web.interceptor.RestControllerExceptionHandler;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.ExceptionConstant;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.constant.ExceptionConstant;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.ResponseBody;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.ServiceException;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ package fun.asgc.neutrino.proxy.server.service;
|
||||
import fun.asgc.neutrino.core.annotation.Autowired;
|
||||
import fun.asgc.neutrino.core.annotation.Component;
|
||||
import fun.asgc.neutrino.core.util.DateUtil;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.ExceptionConstant;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.constant.ExceptionConstant;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.ServiceException;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
||||
import fun.asgc.neutrino.proxy.server.controller.req.LoginReq;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
package fun.asgc.neutrino.proxy.server.util;
|
||||
|
||||
import fun.asgc.neutrino.core.util.StringUtil;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.ExceptionConstant;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.constant.ExceptionConstant;
|
||||
import fun.asgc.neutrino.proxy.server.base.rest.ServiceException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ CREATE TABLE IF NOT EXISTS `user` (
|
||||
`name` varchar(50) NOT NULL,
|
||||
`login_name` varchar(50) NOT NULL,
|
||||
`login_password` varchar(255) NOT NULL,
|
||||
`enable` INTEGER(2) NOT NULL,
|
||||
`create_time` INTEGER(20) NOT NULL,
|
||||
`update_time` INTEGER(20) NOT NULL
|
||||
);
|
||||
@@ -15,6 +16,7 @@ CREATE TABLE IF NOT EXISTS `license` (
|
||||
`key` varchar(100) NOT NULL,
|
||||
`user_id` INTEGER NOT NULL,
|
||||
`is_online` INTEGER(2) NOT NULL,
|
||||
`enable` INTEGER(2) NOT NULL,
|
||||
`create_time` INTEGER(20) NOT NULL,
|
||||
`update_time` INTEGER(20) NOT NULL
|
||||
);
|
||||
@@ -46,6 +48,8 @@ CREATE TABLE IF NOT EXISTS `user_login_record` (
|
||||
`ip` varchar(50) NOT NULL,
|
||||
`token` varchar(50) NOT NULL,
|
||||
`type` INTEGER(2) NOT NULL,
|
||||
`enable` INTEGER(2) NOT NULL,
|
||||
`update_time` INTEGER(20) NOT NULL,
|
||||
`create_time` INTEGER(20) NOT NULL
|
||||
);
|
||||
|
||||
@@ -57,7 +61,7 @@ CREATE TABLE IF NOT EXISTS `port_mapping` (
|
||||
`client_ip` varchar(20) NOT NULL,
|
||||
`client_port` INTEGER NOT NULL,
|
||||
`is_online` INTEGER(2) NOT NULL,
|
||||
`enable` INTEGER NOT NULL,
|
||||
`enable` INTEGER(2) NOT NULL,
|
||||
`create_time` INTEGER(20) NOT NULL,
|
||||
`update_time` INTEGER(20) NOT NULL
|
||||
);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#用户表
|
||||
insert into `user`(`id`, `name`,`login_name`,`login_password`,`create_time`, `update_time`) values
|
||||
(1, '管理员', 'admin', 'e10adc3949ba59abbe56e057f20f883e', datetime('now', 'localtime'), datetime('now', 'localtime'));
|
||||
insert into `user`(`id`, `name`,`login_name`,`login_password`,`enable`,`create_time`, `update_time`) values
|
||||
(1, '管理员', 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, datetime('now', 'localtime'), datetime('now', 'localtime'));
|
||||
|
||||
Reference in New Issue
Block a user