Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
01f42db2
Commit
01f42db2
authored
Nov 02, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单核销接口修改
parent
ad067d0a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
75 deletions
+75
-75
OrderViolationController.java
...om/xxfc/platform/order/rest/OrderViolationController.java
+75
-75
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderViolationController.java
View file @
01f42db2
...
...
@@ -38,6 +38,7 @@ public class OrderViolationController extends BaseController<OrderViolationBiz,
private
UserFeign
userFeign
;
@Autowired
OrderDepositRefundRecordBiz
orderDepositRefundRecordBiz
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
...
...
@@ -45,7 +46,7 @@ public class OrderViolationController extends BaseController<OrderViolationBiz,
private
Long
MAX_DRIVING_LICENSE_SIZE
=
1024
*
1024
*
50L
;
private
final
String
FILE_TYPE
=
"JPG"
;
private
final
String
FILE_TYPE
=
"JPG"
;
/**
* 保存违章记录
...
...
@@ -57,15 +58,15 @@ public class OrderViolationController extends BaseController<OrderViolationBiz,
@PostMapping
(
"/saveOrderViolation"
)
public
ObjectRestResponse
saveOrderViolation
(
@RequestBody
OrderViolation
orderViolation
,
HttpServletRequest
request
)
{
log
.
info
(
"保存违章记录:orderViolation = {}"
,
orderViolation
.
toString
());
UserDTO
userDTOD
=
getAdminUserInfo
();
if
(
orderViolation
.
getId
()==
null
)
{
UserDTO
userDTOD
=
getBusinessUserByAppUser
();
if
(
orderViolation
.
getId
()
==
null
)
{
orderViolation
.
setIsDel
(
0
);
orderViolation
.
setCrtHost
(
request
.
getRemoteHost
());
orderViolation
.
setCrtName
(
userDTOD
.
getName
());
orderViolation
.
setCrtUserId
(
userDTOD
.
getId
());
orderViolation
.
setCrtTime
(
new
BigInteger
(
String
.
valueOf
(
System
.
currentTimeMillis
())));
getBaseBiz
().
insertOrderViolation
(
orderViolation
);
}
else
{
}
else
{
orderViolation
.
setUpdHost
(
request
.
getRemoteHost
());
orderViolation
.
setUpdName
(
userDTOD
.
getName
());
orderViolation
.
setUpdUserId
(
userDTOD
.
getId
());
...
...
@@ -91,24 +92,23 @@ public class OrderViolationController extends BaseController<OrderViolationBiz,
if
(
orderViolations
.
size
()
>
1
)
{
throw
new
BaseException
(
"The database has multiple records"
);
}
OrderViolation
orderViolation
=
new
OrderViolation
();
orderViolation
=(
orderViolations
.
size
()==
0
)?
null
:
orderViolations
.
get
(
0
);
OrderViolation
orderViolation
=
new
OrderViolation
();
orderViolation
=
(
orderViolations
.
size
()
==
0
)
?
null
:
orderViolations
.
get
(
0
);
return
ObjectRestResponse
.
succ
(
orderViolation
);
}
@PostMapping
(
value
=
"/upload/violation"
)
public
ObjectRestResponse
uploadViolation
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
Assert
.
notNull
(
file
);
//文件类型
String
contentType
=
file
.
getContentType
();
if
(!
FILE_TYPE
.
equalsIgnoreCase
(
contentType
)||
"png"
.
equalsIgnoreCase
(
contentType
))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"Picture format error"
);
if
(!
FILE_TYPE
.
equalsIgnoreCase
(
contentType
)
||
"png"
.
equalsIgnoreCase
(
contentType
))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"Picture format error"
);
}
if
(
file
.
getSize
()
>
MAX_DRIVING_LICENSE_SIZE
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"Picture is too large"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"Picture is too large"
);
}
return
baseBiz
.
uploadViolation
(
file
);
}
...
...
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