Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center
Commits
5a7c4c44
Commit
5a7c4c44
authored
Mar 03, 2020
by
黄森林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app开发
parent
d687f0fa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
26 deletions
+18
-26
apply-net/src/main/java/com/winsun/controller/PackageNewClothes.java
+18
-25
apply-net/src/main/java/com/winsun/controller/PackageUpgradeController.java
+0
-1
No files found.
apply-net/src/main/java/com/winsun/controller/PackageNewClothes.java
View file @
5a7c4c44
...
@@ -74,31 +74,6 @@ public class PackageNewClothes {
...
@@ -74,31 +74,6 @@ public class PackageNewClothes {
return
ResponseData
.
success
(
packageMapper
.
selectById
(
packageId
));
return
ResponseData
.
success
(
packageMapper
.
selectById
(
packageId
));
}
}
/**
* 身份证验证
*
* @param iDCard
* @return
*/
@RequestMapping
(
value
=
"iDCard"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
iDCard
(
@RequestParam
(
"iDCard"
)
String
iDCard
)
{
if
(!
IDCardUtil
.
IDCardValidate
(
iDCard
))
{
return
ResponseData
.
error
(
"身份证输入错误!"
);
}
Integer
i
=
Integer
.
parseInt
(
iDCard
.
substring
(
6
,
10
));
DateFormat
yyyyMMdd
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
Date
date
=
new
Date
();
Integer
format
=
Integer
.
parseInt
(
yyyyMMdd
.
format
(
date
.
getTime
()));
Integer
time16
=
Integer
.
parseInt
(
String
.
valueOf
(
i
+
16
)
+
iDCard
.
substring
(
10
,
14
));
Integer
time25
=
Integer
.
parseInt
(
String
.
valueOf
(
i
+
25
)
+
iDCard
.
substring
(
10
,
14
));
if
(
format
<
time16
)
{
return
ResponseData
.
error
(
"根据工信部要求,未满16周岁的用户,应由法定代理人代为办理线上入网,如有疑问请联系客服,谢谢。"
);
}
if
(
format
>
time25
)
{
return
ResponseData
.
error
(
"您已满25周岁,不符合办理条件,如有疑问请联系客服,谢谢。"
);
}
return
ResponseData
.
success
(
"身份证输入正确。"
);
}
/**
/**
* 新开手机卡 预制卡
* 新开手机卡 预制卡
...
@@ -213,6 +188,24 @@ public class PackageNewClothes {
...
@@ -213,6 +188,24 @@ public class PackageNewClothes {
if
(
contactNumber
.
length
()
!=
11
)
{
if
(
contactNumber
.
length
()
!=
11
)
{
return
ResponseData
.
error
(
"联系号码有误,请重新输入"
);
return
ResponseData
.
error
(
"联系号码有误,请重新输入"
);
}
}
/**
* 身份证验证
*/
if
(!
IDCardUtil
.
IDCardValidate
(
idCard
))
{
return
ResponseData
.
error
(
"身份证输入错误!"
);
}
Integer
i
=
Integer
.
parseInt
(
idCard
.
substring
(
6
,
10
));
DateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
Date
timeDate
=
new
Date
();
Integer
age
=
Integer
.
parseInt
(
dateFormat
.
format
(
timeDate
.
getTime
()));
Integer
time16
=
Integer
.
parseInt
(
String
.
valueOf
(
i
+
16
)
+
idCard
.
substring
(
10
,
14
));
Integer
time25
=
Integer
.
parseInt
(
String
.
valueOf
(
i
+
25
)
+
idCard
.
substring
(
10
,
14
));
if
(
age
<
time16
)
{
return
ResponseData
.
error
(
"根据工信部要求,未满16周岁的用户,应由法定代理人代为办理线上入网,如有疑问请联系客服,谢谢。"
);
}
if
(
age
>
time25
)
{
return
ResponseData
.
error
(
"您已满25周岁,不符合办理条件,如有疑问请联系客服,谢谢。"
);
}
Calendar
instance
=
Calendar
.
getInstance
();
Calendar
instance
=
Calendar
.
getInstance
();
instance
.
add
(
Calendar
.
DATE
,
-
94
);
instance
.
add
(
Calendar
.
DATE
,
-
94
);
Date
time
=
instance
.
getTime
();
Date
time
=
instance
.
getTime
();
...
...
apply-net/src/main/java/com/winsun/controller/PackageUpgradeController.java
View file @
5a7c4c44
...
@@ -209,7 +209,6 @@ public class PackageUpgradeController extends BaseController {
...
@@ -209,7 +209,6 @@ public class PackageUpgradeController extends BaseController {
,
@RequestParam
(
value
=
"mark"
,
required
=
false
)
String
mark
,
@RequestParam
(
value
=
"addRess"
,
required
=
false
)
String
addRess
,
@RequestParam
(
value
=
"mark"
,
required
=
false
)
String
mark
,
@RequestParam
(
value
=
"addRess"
,
required
=
false
)
String
addRess
,
@RequestParam
(
value
=
"servId"
)
String
servId
,
@RequestParam
(
value
=
"custName"
,
required
=
false
)
String
custName
,
@RequestParam
(
value
=
"servId"
)
String
servId
,
@RequestParam
(
value
=
"custName"
,
required
=
false
)
String
custName
,
@RequestParam
(
value
=
"userSchool"
,
required
=
false
)
String
userSchool
)
{
,
@RequestParam
(
value
=
"userSchool"
,
required
=
false
)
String
userSchool
)
{
if
(
contactNumber
.
length
()
!=
11
)
{
if
(
contactNumber
.
length
()
!=
11
)
{
return
ResponseData
.
error
(
"联系号码有误,请重新输入"
);
return
ResponseData
.
error
(
"联系号码有误,请重新输入"
);
}
}
...
...
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