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
224e822d
Commit
224e822d
authored
Aug 31, 2021
by
吕伟康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
反诈Controller类
parent
3deb5d69
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
0 deletions
+79
-0
apply-net/src/main/java/com/winsun/controller/AntiFraudController.java
+79
-0
No files found.
apply-net/src/main/java/com/winsun/controller/AntiFraudController.java
0 → 100644
View file @
224e822d
package
com
.
winsun
.
controller
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.bean.AntiFraudNotice
;
import
com.winsun.mapper.AntiFraudNoticeMapper
;
import
com.winsun.utils.PicturesUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Date
;
/**
* 反诈通知公告
*/
@Slf4j
@RestController
@RequestMapping
(
"/antiFraud"
)
//
public
class
AntiFraudController
{
@Autowired
private
AntiFraudNoticeMapper
antiFraudNoticeMapper
;
private
static
String
PATH1
=
"AntiFraud1"
;
/**
* 学生反诈通告签字上传
*
* @param userName 用户名
* @param orderPhone 办理号码
* @param linkPhone 联系号码
* @param file1 签字图片
* @return
*/
@RequestMapping
(
value
=
"uploadSign"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
ResponseData
<
String
>
uploadStuCard
(
String
userName
,
String
orderPhone
,
String
linkPhone
,
String
file1
)
{
if
(
StringUtils
.
isBlank
(
userName
))
{
return
ResponseData
.
error
(
"请填写姓名"
);
}
if
(
StringUtils
.
isBlank
(
orderPhone
))
{
return
ResponseData
.
error
(
"请填写办理号码"
);
}
if
(
StringUtils
.
isBlank
(
linkPhone
))
{
return
ResponseData
.
error
(
"请填写联系号码"
);
}
Wrapper
<
AntiFraudNotice
>
wrapper
=
new
EntityWrapper
<>();
wrapper
.
eq
(
"order_phone"
,
orderPhone
);
wrapper
.
eq
(
"link_phone"
,
linkPhone
);
AntiFraudNotice
notice
=
new
AntiFraudNotice
();
notice
.
setUserName
(
userName
);
notice
.
setOrderPhone
(
orderPhone
);
notice
.
setLinkPhone
(
linkPhone
);
notice
.
setUploadDate
(
new
Date
());
if
(
StringUtils
.
isNotBlank
(
file1
))
{
String
file01
=
PicturesUtil
.
uploadPictures
(
file1
,
orderPhone
,
PATH1
);
notice
.
setOtherImgUrl1
(
file01
);
}
Integer
integer1
=
antiFraudNoticeMapper
.
update
(
notice
,
wrapper
);
if
(
integer1
==
1
)
{
return
ResponseData
.
success
(
"更新成功!"
);
}
else
{
notice
.
setIsFirstUpload
(
1
);
notice
.
setFirstUploadDate
(
new
Date
());
antiFraudNoticeMapper
.
insert
(
notice
);
return
ResponseData
.
success
(
"上传成功!"
);
}
}
}
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