Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
efd445b3
Commit
efd445b3
authored
May 19, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
626d79f7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
MallOrder.java
src/main/java/com/gogirl/domain/order/mall/MallOrder.java
+0
-1
Swagger2Config.java
...java/com/gogirl/infrastructure/config/Swagger2Config.java
+2
-1
FileController.java
src/main/java/com/gogirl/interfaces/user/FileController.java
+7
-0
No files found.
src/main/java/com/gogirl/domain/order/mall/MallOrder.java
View file @
efd445b3
...
...
@@ -78,7 +78,6 @@ public class MallOrder {
@ApiModelProperty
(
"付款客户"
)
private
Integer
paymentCustomerId
;
@ApiModelProperty
(
"订单类型"
)
@ApiModelProperty
(
"订单类型 1-默认类型"
)
private
Integer
type
;
...
...
src/main/java/com/gogirl/infrastructure/config/Swagger2Config.java
View file @
efd445b3
...
...
@@ -44,7 +44,8 @@ public class Swagger2Config {
tokenPar
.
name
(
"token"
)
.
description
(
"登陆凭证"
)
.
modelRef
(
new
ModelRef
(
"string"
))
.
parameterType
(
"header"
).
required
(
false
).
build
();
.
parameterType
(
"header"
).
required
(
false
)
.
parameterType
(
"sourceFrom"
).
required
(
true
).
build
();
pars
.
add
(
tokenPar
.
build
());
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
...
...
src/main/java/com/gogirl/interfaces/user/FileController.java
View file @
efd445b3
package
com
.
gogirl
.
interfaces
.
user
;
import
com.gogirl.infrastructure.common.base.JsonResult
;
import
com.gogirl.infrastructure.common.exception.RRException
;
import
com.gogirl.infrastructure.service.file.FileService
;
import
com.gogirl.infrastructure.util.Base64Utils
;
import
io.swagger.annotations.Api
;
...
...
@@ -24,6 +25,9 @@ public class FileController {
@ApiOperation
(
value
=
"图片上传"
)
@PostMapping
(
"/customer/xcx/upload"
)
public
JsonResult
<
String
>
upload
(
MultipartFile
multipartFile
)
throws
Exception
{
if
(
multipartFile
==
null
)
{
throw
new
RRException
(
"上传内容为空"
);
}
log
.
info
(
"图片上传"
);
String
imgUrl
=
fileService
.
saveImage
(
multipartFile
);
return
JsonResult
.
success
(
imgUrl
);
...
...
@@ -32,6 +36,9 @@ public class FileController {
@ApiOperation
(
value
=
"base64图片上传"
)
@PostMapping
(
"/customer/xcx/no_base64Upload"
)
public
JsonResult
<
String
>
base64Upload
(
@RequestBody
String
base64
)
throws
Exception
{
if
(
base64
==
null
)
{
throw
new
RRException
(
"上传内容为空"
);
}
log
.
info
(
"图片上传"
);
MultipartFile
multipartFile
=
Base64Utils
.
base64ToMultipart
(
base64
);
String
imgUrl
=
fileService
.
saveImage
(
multipartFile
);
...
...
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