Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
HOTEL_SERVER
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
汪鑫
HOTEL_SERVER
Commits
50c5028b
Commit
50c5028b
authored
Jan 13, 2023
by
汪鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
旅馆一件事
parent
a723e7d6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
CommonController.java
...n/java/com/ihooyah/model/controller/CommonController.java
+12
-0
No files found.
hotel-polebuild-parent/polebuild-server-api/src/main/java/com/ihooyah/model/controller/CommonController.java
View file @
50c5028b
...
@@ -16,7 +16,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -16,7 +16,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
sun.misc.BASE64Encoder
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.List
;
@RestController
@RestController
...
@@ -67,4 +69,14 @@ public class CommonController extends BaseController {
...
@@ -67,4 +69,14 @@ public class CommonController extends BaseController {
public
RespInfo
<
List
<
OrgCodeVO
>>
getAreaCode
(){
public
RespInfo
<
List
<
OrgCodeVO
>>
getAreaCode
(){
return
RespInfo
.
mobiSuccess
(
hotelMaterialListingService
.
getAreaCode
());
return
RespInfo
.
mobiSuccess
(
hotelMaterialListingService
.
getAreaCode
());
}
}
@ApiOperation
(
"图片转base64"
)
@PostMapping
(
"imageToBase64"
)
public
RespInfo
<
String
>
imageToBase64
(
MultipartFile
file
)
throws
IOException
{
String
baseStr
=
null
;
BASE64Encoder
encoder
=
new
BASE64Encoder
();
baseStr
=
encoder
.
encode
(
file
.
getBytes
());
baseStr
=
baseStr
.
replaceAll
(
"\r\n"
,
""
);
return
RespInfo
.
mobiSuccess
(
baseStr
);
}
}
}
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