Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
aserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
15所TongWeb
aserver
Commits
f2dc0023
Commit
f2dc0023
authored
Nov 30, 2020
by
李德才
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入开启SN校验的控制
parent
8f02eae0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
SnController.java
...ain/java/com/archser/aserver/controller/SnController.java
+13
-7
config-pro.properties
src/main/resources/config-pro.properties
+3
-0
No files found.
src/main/java/com/archser/aserver/controller/SnController.java
View file @
f2dc0023
...
@@ -6,6 +6,7 @@ import com.jfinal.aop.Clear;
...
@@ -6,6 +6,7 @@ import com.jfinal.aop.Clear;
import
com.jfinal.aop.Inject
;
import
com.jfinal.aop.Inject
;
import
com.jfinal.core.Controller
;
import
com.jfinal.core.Controller
;
import
com.jfinal.core.paragetter.Para
;
import
com.jfinal.core.paragetter.Para
;
import
com.jfinal.kit.PropKit
;
import
com.jfinal.kit.Ret
;
import
com.jfinal.kit.Ret
;
import
com.registration.util.SnUtil
;
import
com.registration.util.SnUtil
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -24,7 +25,7 @@ public class SnController extends Controller {
...
@@ -24,7 +25,7 @@ public class SnController extends Controller {
stringStringMap
=
SnUtil
.
verifyValid
(
snValue
.
getOrganName
(),
snValue
.
getUniqueCode
(),
snCode
);
stringStringMap
=
SnUtil
.
verifyValid
(
snValue
.
getOrganName
(),
snValue
.
getUniqueCode
(),
snCode
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
renderJson
(
Ret
.
fail
(
"msg"
,
"请填写正确的注册码"
));
renderJson
(
Ret
.
fail
(
"msg"
,
"请填写正确的注册码"
));
return
;
return
;
}
}
// SN码不符合要求,返回验证提示信息
// SN码不符合要求,返回验证提示信息
...
@@ -46,13 +47,18 @@ public class SnController extends Controller {
...
@@ -46,13 +47,18 @@ public class SnController extends Controller {
*/
*/
@Clear
@Clear
public
void
snVerify
()
{
public
void
snVerify
()
{
try
{
if
(
PropKit
.
getBoolean
(
"checkSn"
))
{
Map
<
String
,
String
>
stringStringMap
=
snService
.
snVerify
();
try
{
renderJson
(
stringStringMap
);
Map
<
String
,
String
>
stringStringMap
=
snService
.
snVerify
();
}
catch
(
Exception
e
)
{
renderJson
(
stringStringMap
);
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
renderJson
(
Ret
.
fail
(
"msg"
,
e
.
getMessage
()));
e
.
printStackTrace
();
renderJson
(
Ret
.
fail
(
"msg"
,
e
.
getMessage
()));
}
}
else
{
renderJson
(
Ret
.
ok
());
}
}
}
}
...
...
src/main/resources/config-pro.properties
View file @
f2dc0023
...
@@ -13,6 +13,9 @@ engineDevMode=true
...
@@ -13,6 +13,9 @@ engineDevMode=true
## 是否同步Redis中的数据
## 是否同步Redis中的数据
updateRedis
=
false
updateRedis
=
false
## 是否开启SN码校验
checkSn
=
false
authUrl
=
http://125.77.26.133:7001/auth/token
authUrl
=
http://125.77.26.133:7001/auth/token
userInfoUrl
=
http://125.77.26.133:7001/api/info/user_info
userInfoUrl
=
http://125.77.26.133:7001/api/info/user_info
redirect_uri
=
http://192.168.31.17:8080/
redirect_uri
=
http://192.168.31.17:8080/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment