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
a14ec468
Commit
a14ec468
authored
Apr 08, 2021
by
罗承锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片上传稽核修改
parent
c2427f20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
0 deletions
+95
-0
apply-net/src/main/java/com/winsun/controller/codeManagerController.java
+79
-0
service-manager/src/main/java/com/winsun/controller/StudentCardVerifyController.java
+16
-0
No files found.
apply-net/src/main/java/com/winsun/controller/codeManagerController.java
View file @
a14ec468
...
@@ -10,6 +10,7 @@ import com.winsun.constant.OrderStatus;
...
@@ -10,6 +10,7 @@ import com.winsun.constant.OrderStatus;
import
com.winsun.mapper.*
;
import
com.winsun.mapper.*
;
import
com.winsun.smsUtils.SendSmsAndMail
;
import
com.winsun.smsUtils.SendSmsAndMail
;
import
com.winsun.utils.MyBatisPlusUpdateUtils
;
import
com.winsun.utils.MyBatisPlusUpdateUtils
;
import
com.winsun.utils.PicturesUtil
;
import
com.winsun.utils.RandomUtil
;
import
com.winsun.utils.RandomUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -58,8 +60,16 @@ public class codeManagerController {
...
@@ -58,8 +60,16 @@ public class codeManagerController {
private
UniversityInfoMapper
universityInfoMapper
;
private
UniversityInfoMapper
universityInfoMapper
;
@Autowired
@Autowired
private
StudentCardMapper
studentCardMapper
;
@Autowired
private
SysUserMapper
sysUserMapper
;
private
SysUserMapper
sysUserMapper
;
private
static
String
PATH1
=
"StudentCard1"
;
private
static
String
PATH2
=
"StudentCard2"
;
private
static
String
PATH3
=
"StudentCard3"
;
private
static
String
PATH4
=
"StudentCard4"
;
/**
/**
* 解锁用户
* 解锁用户
* @param userId
* @param userId
...
@@ -401,4 +411,73 @@ public class codeManagerController {
...
@@ -401,4 +411,73 @@ public class codeManagerController {
}
}
return
ResponseData
.
success
();
return
ResponseData
.
success
();
}
}
/**
* 学生证证件照上传
* @param idCard
* @param userName
* @param orderPhone
* @param linkPhone
* @param file1
* @param file2
* @param file3
* @param file4
* @return
*/
@RequestMapping
(
value
=
"uploadCard"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
ResponseData
<
String
>
uploadStuCard
(
String
userName
,
String
orderPhone
,
String
linkPhone
,
String
idCard
,
String
file1
,
String
file2
,
String
file3
,
String
file4
)
{
if
(
StringUtils
.
isNotBlank
(
userName
))
{
return
ResponseData
.
error
(
"请填写姓名"
);
}
if
(
StringUtils
.
isBlank
(
orderPhone
))
{
return
ResponseData
.
error
(
"请填写订单号码"
);
}
if
(
StringUtils
.
isBlank
(
linkPhone
))
{
return
ResponseData
.
error
(
"请填写联系号码"
);
}
if
(
StringUtils
.
isBlank
(
idCard
))
{
return
ResponseData
.
error
(
"请填写身份证号码"
);
}
Wrapper
<
StudentCard
>
wrapper
=
new
EntityWrapper
<>();
wrapper
.
eq
(
"order_phone"
,
orderPhone
);
wrapper
.
eq
(
"id_card"
,
idCard
);
StudentCard
student
=
new
StudentCard
();
student
.
setUserName
(
userName
);
student
.
setOrderPhone
(
orderPhone
);
student
.
setLinkPhone
(
linkPhone
);
student
.
setIdCard
(
idCard
);
student
.
setUploadDate
(
new
Date
());
if
(
StringUtils
.
isNotBlank
(
file1
)){
String
file01
=
PicturesUtil
.
uploadPictures
(
file1
,
""
,
PATH1
);
student
.
setStudentCardUrl
(
file01
);
}
if
(
StringUtils
.
isNotBlank
(
file2
)){
String
file02
=
PicturesUtil
.
uploadPictures
(
file2
,
""
,
PATH2
);
student
.
setOtherImgUrl1
(
file02
);
}
if
(
StringUtils
.
isNotBlank
(
file3
)){
String
file03
=
PicturesUtil
.
uploadPictures
(
file3
,
""
,
PATH3
);
student
.
setOtherImgUrl2
(
file03
);
}
if
(
StringUtils
.
isNotBlank
(
file4
)){
String
file04
=
PicturesUtil
.
uploadPictures
(
file4
,
""
,
PATH4
);
student
.
setOtherImgUrl3
(
file04
);
}
Integer
integer1
=
studentCardMapper
.
update
(
student
,
wrapper
);
if
(
integer1
==
1
){
return
ResponseData
.
success
(
"更新成功!"
);
}
else
{
student
.
setIsFirstUpload
(
1
);
student
.
setFirstUploadDate
(
new
Date
());
studentCardMapper
.
insert
(
student
);
return
ResponseData
.
success
(
"上传成功!"
);
}
}
}
}
service-manager/src/main/java/com/winsun/controller/StudentCardVerifyController.java
View file @
a14ec468
...
@@ -127,6 +127,22 @@ public class StudentCardVerifyController extends BaseController {
...
@@ -127,6 +127,22 @@ public class StudentCardVerifyController extends BaseController {
public
ResponseData
<
String
>
uploadStuCard
(
String
userName
,
String
orderPhone
,
String
linkPhone
,
public
ResponseData
<
String
>
uploadStuCard
(
String
userName
,
String
orderPhone
,
String
linkPhone
,
String
idCard
,
String
file1
,
String
file2
,
String
file3
,
String
file4
)
{
String
idCard
,
String
file1
,
String
file2
,
String
file3
,
String
file4
)
{
if
(
StringUtils
.
isNotBlank
(
userName
))
{
return
ResponseData
.
error
(
"请填写姓名"
);
}
if
(
StringUtils
.
isBlank
(
orderPhone
))
{
return
ResponseData
.
error
(
"请填写订单号码"
);
}
if
(
StringUtils
.
isBlank
(
linkPhone
))
{
return
ResponseData
.
error
(
"请填写联系号码"
);
}
if
(
StringUtils
.
isBlank
(
idCard
))
{
return
ResponseData
.
error
(
"请填写身份证号码"
);
}
Wrapper
<
StudentCard
>
wrapper
=
new
EntityWrapper
<>();
Wrapper
<
StudentCard
>
wrapper
=
new
EntityWrapper
<>();
wrapper
.
eq
(
"order_phone"
,
orderPhone
);
wrapper
.
eq
(
"order_phone"
,
orderPhone
);
wrapper
.
eq
(
"id_card"
,
idCard
);
wrapper
.
eq
(
"id_card"
,
idCard
);
...
...
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