Merge branch 'develop'

This commit is contained in:
Sola
2016-05-14 13:36:53 +08:00
80 changed files with 1601 additions and 407 deletions

165
LICENSE Normal file
View File

@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

28
README.md Normal file
View File

@@ -0,0 +1,28 @@
#WechatTicketSystem
WechatTicketSystem is a basic ticket system for network maintaining, based on Wechat.
##Build
### Requirements
- [Apache Maven](https://maven.apache.org/) (latest version recommended)
### Steps
1. Clone the git repository `git clone https://github.com/ZSCNetSupportDept/WechatTicketSystem.git`
2. Change dir to project root (where the `pom.xml` is)
3. Build with Maven `mvn clean package`
4. The out file will be in `target/` folder
##Contributing
###Code Style
The code style configuration is [here](http://stash.sola.love/projects/PSS/repos/ide_configuration/browse/intellij%20idea/Code_Style_Use_Tab.xml).
In Intellij IDEA, you can import the configuration by Settings-\>Editor-\>Code Style-\>Manage(at right side)-\>Import..
###Pull Request
Please notice that the pull requests should compare with `develop` branch instead of `master`,
submit pull requests to `master` branch will be ignored.
##TroubleShooting
- Before you report a bug, please [search the issue tracker](https://github.com/ZSCNetSupportDept/WechatTicketSystem/issues) to see if someone has already reported the problem.
- If the issue doesnt already exist, [create a new issue](https://github.com/ZSCNetSupportDept/WechatTicketSystem/issues/new).
- Please provide as much information as possible with the issue report, we like to know the version of FYoung4j that you are using, as well as your Operating System and JVM version.
- If you need to paste code, or include a stack trace use Markdown `` ``` `` escapes before and after your text.
##License
WechatTicketSystem is distributed under the GNU Lesser General Public License v3.0 (LGPLv3).

View File

@@ -5,7 +5,7 @@
<name>WechatTicketSystem</name> <name>WechatTicketSystem</name>
<groupId>love.sola.netsupport</groupId> <groupId>love.sola.netsupport</groupId>
<artifactId>WechatTicketSystem</artifactId> <artifactId>WechatTicketSystem</artifactId>
<version>2.0</version> <version>2.1-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>
<properties> <properties>

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport; package love.sola.netsupport;
import javax.servlet.ServletException; import javax.servlet.ServletException;
@@ -9,10 +26,7 @@ import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2014/8/4.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@WebServlet(name = "Index", urlPatterns = "/index", loadOnStartup = 1) @WebServlet(name = "Index", urlPatterns = "/index", loadOnStartup = 1)
public class Index extends HttpServlet { public class Index extends HttpServlet {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api; package love.sola.netsupport.api;
import love.sola.netsupport.enums.Access; import love.sola.netsupport.enums.Access;
@@ -7,10 +24,7 @@ import love.sola.netsupport.wechat.Command;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2016/2/27.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public abstract class API { public abstract class API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api; package love.sola.netsupport.api;
import com.google.gson.Gson; import com.google.gson.Gson;
@@ -24,10 +41,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2016/2/27.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@WebServlet(name = "APIRouter", urlPatterns = "/api/*", loadOnStartup = 11) @WebServlet(name = "APIRouter", urlPatterns = "/api/*", loadOnStartup = 11)
public class APIRouter extends HttpServlet { public class APIRouter extends HttpServlet {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api; package love.sola.netsupport.api;
import love.sola.netsupport.enums.Access; import love.sola.netsupport.enums.Access;
@@ -9,10 +26,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/21.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class CheckSession extends API { public class CheckSession extends API {

View File

@@ -1,12 +1,26 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api; package love.sola.netsupport.api;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/5.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Error { public class Error {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api; package love.sola.netsupport.api;
import com.google.gson.Gson; import com.google.gson.Gson;
@@ -23,10 +40,7 @@ import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/12.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@WebServlet(name = "Login", urlPatterns = "/api/admin/login", loadOnStartup = 12) @WebServlet(name = "Login", urlPatterns = "/api/admin/login", loadOnStartup = 12)

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.manager; package love.sola.netsupport.api.manager;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -11,10 +28,7 @@ import love.sola.netsupport.wechat.Command;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2014/8/20.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class GetUser extends API { public class GetUser extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.manager; package love.sola.netsupport.api.manager;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -18,10 +35,7 @@ import org.hibernate.Session;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/22.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TicketPush extends API { public class TicketPush extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.root; package love.sola.netsupport.api.root;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -10,10 +27,7 @@ import javax.servlet.http.HttpServletRequest;
import java.util.Set; import java.util.Set;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/15.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class DashBoard extends API { public class DashBoard extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.root; package love.sola.netsupport.api.root;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -10,10 +27,7 @@ import love.sola.netsupport.wechat.Command;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/15.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class FlushCache extends API { public class FlushCache extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.root; package love.sola.netsupport.api.root;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -13,10 +30,7 @@ import org.hibernate.Session;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/20.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class SetPassword extends API { public class SetPassword extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.stuff; package love.sola.netsupport.api.stuff;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -18,10 +35,7 @@ import java.util.Calendar;
import java.util.Date; import java.util.Date;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/18.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TicketLog extends API { public class TicketLog extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.stuff; package love.sola.netsupport.api.stuff;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -11,10 +28,7 @@ import love.sola.netsupport.wechat.Command;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/13.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TicketLookup extends API { public class TicketLookup extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.stuff; package love.sola.netsupport.api.stuff;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -10,10 +27,7 @@ import love.sola.netsupport.wechat.Command;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/18.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TicketTrack extends API { public class TicketTrack extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.stuff; package love.sola.netsupport.api.stuff;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -16,10 +33,7 @@ import javax.servlet.http.HttpServletRequest;
import java.util.Date; import java.util.Date;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/13.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TicketUpdate extends API { public class TicketUpdate extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.user; package love.sola.netsupport.api.user;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -16,10 +33,7 @@ import javax.servlet.http.HttpServletRequest;
import static love.sola.netsupport.util.Checker.*; import static love.sola.netsupport.util.Checker.*;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/15.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class ProfileModify extends API { public class ProfileModify extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.user; package love.sola.netsupport.api.user;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -24,10 +41,7 @@ import java.sql.SQLException;
import static love.sola.netsupport.util.Checker.*; import static love.sola.netsupport.util.Checker.*;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/29.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Register extends API { public class Register extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.user; package love.sola.netsupport.api.user;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -16,10 +33,7 @@ import org.hibernate.criterion.Restrictions;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/4.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TicketQuery extends API { public class TicketQuery extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.api.user; package love.sola.netsupport.api.user;
import love.sola.netsupport.api.API; import love.sola.netsupport.api.API;
@@ -16,10 +33,7 @@ import org.hibernate.Session;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/6.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TicketSubmit extends API { public class TicketSubmit extends API {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.auth; package love.sola.netsupport.auth;
import love.sola.netsupport.session.WechatSession; import love.sola.netsupport.session.WechatSession;
@@ -18,10 +35,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2014/8/20.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@WebServlet(name = "OAuth2", urlPatterns = "/oauth2/callback", loadOnStartup = 21, asyncSupported = true) @WebServlet(name = "OAuth2", urlPatterns = "/oauth2/callback", loadOnStartup = 21, asyncSupported = true)
public class OAuth2 extends HttpServlet { public class OAuth2 extends HttpServlet {
@@ -30,6 +44,7 @@ public class OAuth2 extends HttpServlet {
/** /**
* for {@link love.sola.netsupport.wechat.WxMpServlet#registerCommands} * for {@link love.sola.netsupport.wechat.WxMpServlet#registerCommands}
*
* @param state the state key from open platform callback. * @param state the state key from open platform callback.
* @param handler handler * @param handler handler
*/ */

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.auth; package love.sola.netsupport.auth;
import love.sola.netsupport.session.WxSession; import love.sola.netsupport.session.WxSession;
@@ -6,10 +23,7 @@ import javax.servlet.AsyncContext;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2016/3/26.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public interface OAuth2Handler { public interface OAuth2Handler {

View File

@@ -1,5 +1,23 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.config; package love.sola.netsupport.config;
import lombok.Data;
import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.Yaml;
import java.io.InputStream; import java.io.InputStream;
@@ -8,26 +26,31 @@ import java.util.Map;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/29.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Cortana { public class Cortana {
public static List<Compiled> entries; public static List<Compiled> entries;
public static void load() { public static void load() {
InputStream in = Lang.class.getClassLoader().getResourceAsStream("cortana.yml"); InputStream in = Lang.class.getClassLoader().getResourceAsStream("cortana.yml");
Map<String, Object> root = (Map<String, Object>) new Yaml().load(in); RawConfig root = new Yaml().loadAs(in, RawConfig.class);
} }
static class Compiled {
public static class Compiled {
Pattern[] patterns; Pattern[] patterns;
String[] replies; String[] replies;
} }
@Data
public static class Rule {
String[] regexp;
String[] replies;
}
@Data
public static class RawConfig {
Map<String, Rule> rules;
}
} }

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.config; package love.sola.netsupport.config;
import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.Yaml;
@@ -8,10 +25,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/30.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Lang { public class Lang {

View File

@@ -1,13 +1,27 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.config; package love.sola.netsupport.config;
import lombok.ToString; import lombok.ToString;
import love.sola.netsupport.sql.TableConfig; import love.sola.netsupport.sql.TableConfig;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/23.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@ToString @ToString
public class Settings { public class Settings {
@@ -35,6 +49,8 @@ public class Settings {
public int User_Wechat_Cache_Expire_Time; public int User_Wechat_Cache_Expire_Time;
//No arg constructor for Yaml.loadAs //No arg constructor for Yaml.loadAs
public Settings() { I = this; } public Settings() {
I = this;
}
} }

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.config; package love.sola.netsupport.config;
import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.XStream;
@@ -8,6 +25,9 @@ import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage;
import java.io.InputStream; import java.io.InputStream;
/**
* @author chanjarster
*/
@XStreamAlias("wechat-config") @XStreamAlias("wechat-config")
@ToString @ToString
public class WxMpXmlInMemoryConfigStorage extends WxMpInMemoryConfigStorage { public class WxMpXmlInMemoryConfigStorage extends WxMpInMemoryConfigStorage {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.enums; package love.sola.netsupport.enums;
import java.lang.reflect.Field; import java.lang.reflect.Field;
@@ -7,10 +24,7 @@ import java.util.Map;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/6.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Access { public class Access {

View File

@@ -1,10 +1,24 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.enums; package love.sola.netsupport.enums;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/14.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Attribute { public class Attribute {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.enums; package love.sola.netsupport.enums;
import java.lang.reflect.Field; import java.lang.reflect.Field;
@@ -5,10 +22,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/30.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Block { public class Block {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.enums; package love.sola.netsupport.enums;
import java.util.HashMap; import java.util.HashMap;
@@ -6,18 +23,14 @@ import java.util.Map;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2014/8/20.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public enum ISP { public enum ISP {
TELECOM(1, "^1[3|4|5|7|8][0-9]{9}$"), TELECOM(1, "^1[3|4|5|7|8][0-9]{9}$"),
UNICOM(2, "ZSZJLAN[0-9]{10}@16900\\.gd"), UNICOM(2, "ZSZJLAN[0-9]{10}@16900\\.gd"),
CHINAMOBILE(3, "^1[3|4|5|7|8][0-9]{9}@139\\.gd$"), CHINAMOBILE(3, "^1[3|4|5|7|8][0-9]{9}@139\\.gd$"),
OTHER(4, ".*"), OTHER(4, ".*"),;
;
private static final Map<String, ISP> NAME_MAP = new HashMap<>(); private static final Map<String, ISP> NAME_MAP = new HashMap<>();
private static final Map<Integer, ISP> ID_MAP = new HashMap<>(); private static final Map<Integer, ISP> ID_MAP = new HashMap<>();
@@ -55,6 +68,8 @@ public enum ISP {
} }
@Override @Override
public String toString() { return name; } public String toString() {
return name;
}
} }

View File

@@ -1,8 +1,28 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.enums; package love.sola.netsupport.enums;
import javax.persistence.AttributeConverter; import javax.persistence.AttributeConverter;
import javax.persistence.Converter; import javax.persistence.Converter;
/**
* @author Sola {@literal <dev@sola.love>}
*/
@Converter @Converter
public class ISPConverter implements AttributeConverter<ISP, Integer> { public class ISPConverter implements AttributeConverter<ISP, Integer> {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.enums; package love.sola.netsupport.enums;
import java.lang.reflect.Field; import java.lang.reflect.Field;
@@ -7,10 +24,7 @@ import java.util.Map;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/6.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Status { public class Status {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.pojo; package love.sola.netsupport.pojo;
import com.google.gson.annotations.Expose; import com.google.gson.annotations.Expose;
@@ -12,10 +29,7 @@ import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/6.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@Data @Data

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.pojo; package love.sola.netsupport.pojo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@@ -11,10 +28,7 @@ import javax.persistence.*;
import java.util.Date; import java.util.Date;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/2.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@Data @Data
@AllArgsConstructor @AllArgsConstructor

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.pojo; package love.sola.netsupport.pojo;
import com.google.gson.annotations.Expose; import com.google.gson.annotations.Expose;
@@ -10,10 +27,7 @@ import love.sola.netsupport.enums.ISPConverter;
import javax.persistence.*; import javax.persistence.*;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2014/8/20.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@Data @Data
@AllArgsConstructor @AllArgsConstructor

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
/* /*
* Copyright 2002-2015 the original author or authors. * Copyright 2002-2015 the original author or authors.
* *
@@ -26,7 +43,7 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
/** /**
* @author Sola * @author Sola {@literal <dev@sola.love>}
*/ */
@EqualsAndHashCode(of = "id") @EqualsAndHashCode(of = "id")
public final class MapSession implements WxSession, Serializable { public final class MapSession implements WxSession, Serializable {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
/* /*
* Copyright 2002-2015 the original author or authors. * Copyright 2002-2015 the original author or authors.
* *
@@ -26,7 +43,7 @@ import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** /**
* @author Sola * @author Sola {@literal <dev@sola.love>}
*/ */
public class MapSessionRepository { public class MapSessionRepository {

View File

@@ -1,13 +1,27 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.session; package love.sola.netsupport.session;
import java.util.Collection; import java.util.Collection;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/14.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class WechatSession { public class WechatSession {

View File

@@ -1,9 +1,26 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.session; package love.sola.netsupport.session;
import java.util.Set; import java.util.Set;
/** /**
* @author Sola * @author Sola {@literal <dev@sola.love>}
*/ */
public interface WxSession { public interface WxSession {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.sql; package love.sola.netsupport.sql;
import com.google.gson.*; import com.google.gson.*;
@@ -25,10 +42,7 @@ import java.io.IOException;
import java.util.Date; import java.util.Date;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2014/8/20.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class SQLCore { public class SQLCore {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.sql; package love.sola.netsupport.sql;
import love.sola.netsupport.config.Settings; import love.sola.netsupport.config.Settings;
@@ -5,10 +22,7 @@ import love.sola.netsupport.config.Settings;
import java.sql.*; import java.sql.*;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/10.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TableConfig extends SQLCore { public class TableConfig extends SQLCore {
@@ -21,7 +35,8 @@ public class TableConfig extends SQLCore{
if (rs.next()) { if (rs.next()) {
return gson.fromJson(rs.getString("data"), Settings.class); return gson.fromJson(rs.getString("data"), Settings.class);
} }
} catch (SQLException e) { } } catch (SQLException e) {
}
return null; return null;
} }

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.sql; package love.sola.netsupport.sql;
import love.sola.netsupport.pojo.Operator; import love.sola.netsupport.pojo.Operator;
@@ -6,10 +23,7 @@ import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions; import org.hibernate.criterion.Restrictions;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/12.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TableOperator extends SQLCore { public class TableOperator extends SQLCore {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.sql; package love.sola.netsupport.sql;
import love.sola.netsupport.enums.Status; import love.sola.netsupport.enums.Status;
@@ -13,10 +30,7 @@ import org.hibernate.envers.query.AuditEntity;
import java.util.List; import java.util.List;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/6.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class TableTicket extends SQLCore { public class TableTicket extends SQLCore {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.sql; package love.sola.netsupport.sql;
import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheBuilder;
@@ -12,10 +29,7 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/10.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@SuppressWarnings("Duplicates") @SuppressWarnings("Duplicates")
public class TableUser extends SQLCore { public class TableUser extends SQLCore {

View File

@@ -1,13 +1,27 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.util; package love.sola.netsupport.util;
import love.sola.netsupport.enums.Block; import love.sola.netsupport.enums.Block;
import love.sola.netsupport.enums.ISP; import love.sola.netsupport.enums.ISP;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/12.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Checker { public class Checker {
@@ -35,7 +49,8 @@ public class Checker {
if (!phone.matches(PHONE_NUMBER_REGEX)) return -1; if (!phone.matches(PHONE_NUMBER_REGEX)) return -1;
try { try {
return Long.parseLong(phone); return Long.parseLong(phone);
} catch (NumberFormatException ignored) { } } catch (NumberFormatException ignored) {
}
return -1; return -1;
} }
@@ -43,7 +58,8 @@ public class Checker {
if (isp == null) return null; if (isp == null) return null;
try { try {
return ISP.fromId(Integer.parseInt(isp)); return ISP.fromId(Integer.parseInt(isp));
} catch (NumberFormatException ignored) { } } catch (NumberFormatException ignored) {
}
return null; return null;
} }
@@ -62,7 +78,8 @@ public class Checker {
return b; return b;
else else
return -1; return -1;
} catch (NumberFormatException ignored) { } } catch (NumberFormatException ignored) {
}
return -1; return -1;
} }
@@ -75,7 +92,8 @@ public class Checker {
return i; return i;
else else
return -1; return -1;
} catch (NumberFormatException ignored) { } } catch (NumberFormatException ignored) {
}
return -1; return -1;
} }

View File

@@ -1,12 +1,26 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.util; package love.sola.netsupport.util;
import org.mindrot.jbcrypt.BCrypt; import org.mindrot.jbcrypt.BCrypt;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/6.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Crypto { public class Crypto {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.util; package love.sola.netsupport.util;
import love.sola.netsupport.enums.Status; import love.sola.netsupport.enums.Status;
@@ -8,10 +25,7 @@ import java.text.SimpleDateFormat;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/11.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class ParseUtil { public class ParseUtil {
@@ -22,9 +36,11 @@ public class ParseUtil {
.append(lang("Ticket_Info_Id")).append(t.getId()).append("\n") .append(lang("Ticket_Info_Id")).append(t.getId()).append("\n")
.append(lang("Ticket_Info_Desc")).append(t.getDescription()).append("\n") .append(lang("Ticket_Info_Desc")).append(t.getDescription()).append("\n")
.append(lang("Ticket_Info_Submit_Time")).append(dateFormat.format(t.getSubmitTime())).append("\n"); .append(lang("Ticket_Info_Submit_Time")).append(dateFormat.format(t.getSubmitTime())).append("\n");
if (t.getOperator() != null) sb.append(lang("Ticket_Info_Operator")).append(t.getOperator().getId()).append("\n"); if (t.getOperator() != null)
sb.append(lang("Ticket_Info_Operator")).append(t.getOperator().getId()).append("\n");
if (t.getRemark() != null) sb.append(lang("Ticket_Info_Remark")).append(t.getRemark()).append("\n"); if (t.getRemark() != null) sb.append(lang("Ticket_Info_Remark")).append(t.getRemark()).append("\n");
if (t.getUpdateTime() != null) sb.append(lang("Ticket_Info_Update_Time")).append(dateFormat.format(t.getUpdateTime())).append("\n"); if (t.getUpdateTime() != null)
sb.append(lang("Ticket_Info_Update_Time")).append(dateFormat.format(t.getUpdateTime())).append("\n");
sb.append(lang("Ticket_Info_Status")).append(Status.getLocalized(t.getStatus())); sb.append(lang("Ticket_Info_Status")).append(Status.getLocalized(t.getStatus()));
return sb.toString(); return sb.toString();
} }

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.util; package love.sola.netsupport.util;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
@@ -8,6 +25,9 @@ import java.security.Key;
import java.security.KeyPair; import java.security.KeyPair;
import java.security.KeyPairGenerator; import java.security.KeyPairGenerator;
/**
* @author Sola {@literal <dev@sola.love>}
*/
public class RSAUtil { public class RSAUtil {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.util; package love.sola.netsupport.util;
import com.google.common.net.UrlEscapers; import com.google.common.net.UrlEscapers;
@@ -8,10 +25,7 @@ import java.io.IOException;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/6.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class Redirect { public class Redirect {
@@ -101,8 +115,7 @@ public class Redirect {
WARN("weui_icon_warn"), WARN("weui_icon_warn"),
WARN_SAFE("weui_icon_safe_warn"), WARN_SAFE("weui_icon_safe_warn"),
DOWNLOAD("weui_icon_download"), DOWNLOAD("weui_icon_download"),
CANCEL("weui_icon_cancel"), CANCEL("weui_icon_cancel"),;
;
private String value; private String value;

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat; package love.sola.netsupport.wechat;
import love.sola.netsupport.wechat.handler.*; import love.sola.netsupport.wechat.handler.*;
@@ -11,10 +28,7 @@ import java.util.Map;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/26.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public enum Command { public enum Command {
@@ -24,8 +38,7 @@ public enum Command {
CANCEL(3, CancelHandler.class), CANCEL(3, CancelHandler.class),
PROFILE(4, ProfileHandler.class), PROFILE(4, ProfileHandler.class),
LOGIN(10, LoginHandler.class), LOGIN(10, LoginHandler.class),
OPERATOR_INFO(11, OperatorInfoHandler.class), OPERATOR_INFO(11, OperatorInfoHandler.class),;
;
private static final Map<Integer, Command> ID_MAP = new HashMap<>(); private static final Map<Integer, Command> ID_MAP = new HashMap<>();

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat; package love.sola.netsupport.wechat;
import love.sola.netsupport.auth.OAuth2; import love.sola.netsupport.auth.OAuth2;
@@ -24,10 +41,7 @@ import java.io.IOException;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/2.
* Don't modify this source without my agreement
* ***********************************************
*/ */
@WebServlet(name = "WxMpServlet", urlPatterns = "/wechat", loadOnStartup = 99) @WebServlet(name = "WxMpServlet", urlPatterns = "/wechat", loadOnStartup = 99)
public class WxMpServlet extends HttpServlet { public class WxMpServlet extends HttpServlet {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler; package love.sola.netsupport.wechat.handler;
import me.chanjar.weixin.common.exception.WxErrorException; import me.chanjar.weixin.common.exception.WxErrorException;
@@ -10,10 +27,7 @@ import me.chanjar.weixin.mp.bean.WxMpXmlOutMessage;
import java.util.Map; import java.util.Map;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/29.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class AutoReplyHandler implements WxMpMessageHandler { public class AutoReplyHandler implements WxMpMessageHandler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler; package love.sola.netsupport.wechat.handler;
import love.sola.netsupport.enums.Status; import love.sola.netsupport.enums.Status;
@@ -24,10 +41,7 @@ import java.util.Map;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/11.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class CancelHandler implements WxMpMessageHandler { public class CancelHandler implements WxMpMessageHandler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler; package love.sola.netsupport.wechat.handler;
import love.sola.netsupport.auth.OAuth2Handler; import love.sola.netsupport.auth.OAuth2Handler;
@@ -24,10 +41,7 @@ import static love.sola.netsupport.config.Lang.format;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/15.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class ProfileHandler implements WxMpMessageHandler, OAuth2Handler { public class ProfileHandler implements WxMpMessageHandler, OAuth2Handler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler; package love.sola.netsupport.wechat.handler;
import love.sola.netsupport.enums.Attribute; import love.sola.netsupport.enums.Attribute;
@@ -24,10 +41,7 @@ import static love.sola.netsupport.config.Lang.format;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/8.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class QueryHandler implements WxMpMessageHandler { public class QueryHandler implements WxMpMessageHandler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler; package love.sola.netsupport.wechat.handler;
import love.sola.netsupport.enums.Attribute; import love.sola.netsupport.enums.Attribute;
@@ -19,10 +36,7 @@ import java.util.Map;
import static love.sola.netsupport.config.Lang.format; import static love.sola.netsupport.config.Lang.format;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/4.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class RegisterHandler implements WxMpMessageHandler { public class RegisterHandler implements WxMpMessageHandler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler; package love.sola.netsupport.wechat.handler;
import love.sola.netsupport.enums.Attribute; import love.sola.netsupport.enums.Attribute;
@@ -22,10 +39,7 @@ import static love.sola.netsupport.config.Lang.format;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/9.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class SubmitHandler implements WxMpMessageHandler { public class SubmitHandler implements WxMpMessageHandler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler; package love.sola.netsupport.wechat.handler;
import love.sola.netsupport.api.user.Register; import love.sola.netsupport.api.user.Register;
@@ -22,10 +39,7 @@ import java.util.Map;
import static love.sola.netsupport.config.Lang.format; import static love.sola.netsupport.config.Lang.format;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/25.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class SubscribeHandler implements WxMpMessageHandler { public class SubscribeHandler implements WxMpMessageHandler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler.admin; package love.sola.netsupport.wechat.handler.admin;
import love.sola.netsupport.auth.OAuth2Handler; import love.sola.netsupport.auth.OAuth2Handler;
@@ -25,10 +42,7 @@ import static love.sola.netsupport.config.Lang.format;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/12.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class LoginHandler implements WxMpMessageHandler, OAuth2Handler { public class LoginHandler implements WxMpMessageHandler, OAuth2Handler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler.admin; package love.sola.netsupport.wechat.handler.admin;
import love.sola.netsupport.pojo.Operator; import love.sola.netsupport.pojo.Operator;
@@ -16,10 +33,7 @@ import static love.sola.netsupport.config.Lang.format;
import static love.sola.netsupport.config.Lang.lang; import static love.sola.netsupport.config.Lang.lang;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/28.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class OperatorInfoHandler implements WxMpMessageHandler { public class OperatorInfoHandler implements WxMpMessageHandler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.handler.admin; package love.sola.netsupport.wechat.handler.admin;
import love.sola.netsupport.sql.SQLCore; import love.sola.netsupport.sql.SQLCore;
@@ -18,10 +35,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/26.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class SignHandler implements WxMpMessageHandler { public class SignHandler implements WxMpMessageHandler {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.matcher; package love.sola.netsupport.wechat.matcher;
import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheBuilder;
@@ -10,10 +27,7 @@ import me.chanjar.weixin.mp.bean.WxMpXmlMessage;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/4.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class CheckSpamMatcher implements WxMpMessageMatcher { public class CheckSpamMatcher implements WxMpMessageMatcher {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.matcher; package love.sola.netsupport.wechat.matcher;
import love.sola.netsupport.wechat.Command; import love.sola.netsupport.wechat.Command;
@@ -8,10 +25,7 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/26.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class CommandMatcher implements WxMpMessageMatcher { public class CommandMatcher implements WxMpMessageMatcher {

View File

@@ -1,3 +1,20 @@
/*
* This file is part of WechatTicketSystem.
*
* WechatTicketSystem is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WechatTicketSystem is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with WechatTicketSystem. If not, see <http://www.gnu.org/licenses/>.
*/
package love.sola.netsupport.wechat.matcher; package love.sola.netsupport.wechat.matcher;
import love.sola.netsupport.sql.TableUser; import love.sola.netsupport.sql.TableUser;
@@ -5,10 +22,7 @@ import me.chanjar.weixin.mp.api.WxMpMessageMatcher;
import me.chanjar.weixin.mp.bean.WxMpXmlMessage; import me.chanjar.weixin.mp.bean.WxMpXmlMessage;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/11/26.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class RegisterMatcher implements WxMpMessageMatcher { public class RegisterMatcher implements WxMpMessageMatcher {

View File

@@ -25,6 +25,21 @@
} }
] ]
}, },
{
"name": "工具箱",
"sub_button": [
{
"type": "view",
"name": "电信宽带查余额",
"url": "http://util.sola.love/yue.html"
},
{
"type": "view",
"name": "四六级成绩查询",
"url": "http://util.sola.love/cet.html"
}
]
},
{ {
"name": "OP", "name": "OP",
"sub_button": [ "sub_button": [
@@ -37,6 +52,11 @@
"type": "view", "type": "view",
"name": "后台登录", "name": "后台登录",
"url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb7a8b799e494b053&redirect_uri=http%3a%2f%2fwcs.sola.love%2foauth2%2fcallback&response_type=code&scope=snsapi_base&state=LOGIN#wechat_redirect" "url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb7a8b799e494b053&redirect_uri=http%3a%2f%2fwcs.sola.love%2foauth2%2fcallback&response_type=code&scope=snsapi_base&state=LOGIN#wechat_redirect"
},
{
"type": "view",
"name": "网维留言板",
"url": "http://wcs.sola.love/oauth2/go"
} }
] ]
} }

View File

@@ -24,6 +24,46 @@
"url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb7a8b799e494b053&redirect_uri=http%3a%2f%2fwcs.sola.love%2foauth2%2fcallback&response_type=code&scope=snsapi_base&state=PROFILE#wechat_redirect" "url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb7a8b799e494b053&redirect_uri=http%3a%2f%2fwcs.sola.love%2foauth2%2fcallback&response_type=code&scope=snsapi_base&state=PROFILE#wechat_redirect"
} }
] ]
},
{
"name": "工具箱",
"sub_button": [
{
"type": "view",
"name": "电信宽带查余额",
"url": "http://util.sola.love/yue.html"
},
{
"type": "view",
"name": "四六级成绩查询",
"url": "http://util.sola.love/cet.html"
}
]
},
{
"name": "关于网维",
"sub_button": [
{
"type": "view",
"name": "网维留言板",
"url": "http://wcs.sola.love/oauth2/go"
},
{
"type": "view",
"name": "关于报修系统",
"url": "http://topaz.sinaapp.com/nm/v2/"
},
{
"type": "view",
"name": "联系我们",
"url": "http://topaz.sinaapp.com/nm/v2/404.html"
},
{
"type": "view",
"name": "关于网维",
"url": "http://topaz.sinaapp.com/nm/v2/404.html"
}
]
} }
] ]
} }

View File

@@ -16,7 +16,8 @@
limitations under the License. limitations under the License.
--> -->
<!-- The contents of this file will be loaded for each web application --> <!-- The contents of this file will be loaded for each web application -->
<Context swallowOutput="false" antiResourceLocking="true"> <!-- Don't swallowOutput for debugging, true for logging(production) -->
<Context antiResourceLocking="true">
<!-- Default set of monitored resources --> <!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource> <WatchedResource>WEB-INF/web.xml</WatchedResource>

View File

@@ -6,10 +6,7 @@ import org.reflections.Reflections;
import java.util.Set; import java.util.Set;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2016/3/26.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class ReflectionTest { public class ReflectionTest {

View File

@@ -0,0 +1,15 @@
package love.sola.netsupport.config;
import org.junit.Test;
/**
* @author Sola {@literal <dev@sola.love>}
*/
public class CortanaTest {
@Test
public void load() throws Exception {
Cortana.load();
}
}

View File

@@ -3,10 +3,7 @@ package love.sola.netsupport.config;
import org.junit.Test; import org.junit.Test;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2016/3/26.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class ReflectionTest { public class ReflectionTest {

View File

@@ -3,10 +3,7 @@ package love.sola.netsupport.enums;
import org.junit.Test; import org.junit.Test;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/6.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class ReflectionTest { public class ReflectionTest {

View File

@@ -10,10 +10,7 @@ import java.security.spec.InvalidKeySpecException;
import java.security.spec.X509EncodedKeySpec; import java.security.spec.X509EncodedKeySpec;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/6.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class EncryptTest { public class EncryptTest {

View File

@@ -7,10 +7,7 @@ import org.junit.Test;
import java.util.Date; import java.util.Date;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2015/12/2.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class GsonTest { public class GsonTest {

View File

@@ -9,10 +9,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
/** /**
* *********************************************** * @author Sola {@literal <dev@sola.love>}
* Created by Sola on 2016/3/26.
* Don't modify this source without my agreement
* ***********************************************
*/ */
public class URLEncodeTest { public class URLEncodeTest {

View File

@@ -0,0 +1,16 @@
rules:
rule1:
regexp:
- 'single test'
replies:
- 'single test'
rule2:
regexp: ['inline test', 'inline test']
replies: ['inline test', 'inline test']
rule3:
regexp:
- 'multi line test'
- 'multi line test'
replies:
- 'multi line test'
- 'multi line test'