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
1d3a64da
Commit
1d3a64da
authored
Apr 29, 2019
by
youjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
股权信息添加图片
parent
654ba2a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
BranchCompanyStockService.java
...aravan/caravan/vehicle/biz/BranchCompanyStockService.java
+15
-0
BranchCompanyStockInfo.java
...aravan/caravan/vehicle/entity/BranchCompanyStockInfo.java
+1
-1
BranchCompanyStockController.java
...an/caravan/vehicle/rest/BranchCompanyStockController.java
+7
-0
No files found.
vehicle/src/main/java/com/xinxincaravan/caravan/vehicle/biz/BranchCompanyStockService.java
View file @
1d3a64da
...
@@ -24,11 +24,16 @@ import org.springframework.beans.BeanUtils;
...
@@ -24,11 +24,16 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -213,4 +218,14 @@ public class BranchCompanyStockService {
...
@@ -213,4 +218,14 @@ public class BranchCompanyStockService {
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
new
File
(
filePath
));
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
new
File
(
filePath
));
return
RestResponse
.
suc
(
realFileRelPath
);
return
RestResponse
.
suc
(
realFileRelPath
);
}
}
public
ResponseEntity
<
byte
[]>
downloadCompanyPic
(
String
realFileRelPath
)
throws
IOException
{
String
filePath
=
baseUploadPath
+
realFileRelPath
;
File
file
=
new
File
(
filePath
);
//新建一个文件
HttpHeaders
headers
=
new
HttpHeaders
();
//http头信息
String
downloadFileName
=
new
String
(
file
.
getName
());
//设置编码
headers
.
setContentDispositionFormData
(
"attachment"
,
downloadFileName
);
headers
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM
);
return
new
ResponseEntity
<
byte
[]>(
FileUtils
.
readFileToByteArray
(
file
),
headers
,
HttpStatus
.
CREATED
);
}
}
}
vehicle/src/main/java/com/xinxincaravan/caravan/vehicle/entity/BranchCompanyStockInfo.java
View file @
1d3a64da
...
@@ -38,6 +38,6 @@ public class BranchCompanyStockInfo {
...
@@ -38,6 +38,6 @@ public class BranchCompanyStockInfo {
private
Integer
addrCity
;
private
Integer
addrCity
;
private
Integer
state
;
private
Integer
state
;
private
Integer
companyPic
;
private
String
companyPic
;
}
}
\ No newline at end of file
vehicle/src/main/java/com/xinxincaravan/caravan/vehicle/rest/BranchCompanyStockController.java
View file @
1d3a64da
...
@@ -10,6 +10,7 @@ import com.xinxincaravan.caravan.vehicle.vo.BranchCompanyStockApplyVo;
...
@@ -10,6 +10,7 @@ import com.xinxincaravan.caravan.vehicle.vo.BranchCompanyStockApplyVo;
import
com.xinxincaravan.caravan.vehicle.vo.BranchCompanyStockInfoVo
;
import
com.xinxincaravan.caravan.vehicle.vo.BranchCompanyStockInfoVo
;
import
com.xinxincaravan.caravan.vehicle.vo.BranchCompanyStockSearchVo
;
import
com.xinxincaravan.caravan.vehicle.vo.BranchCompanyStockSearchVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -111,6 +112,12 @@ public class BranchCompanyStockController {
...
@@ -111,6 +112,12 @@ public class BranchCompanyStockController {
return
branchCompanyStockService
.
uploadCompanyPic
(
file
);
return
branchCompanyStockService
.
uploadCompanyPic
(
file
);
}
}
@IgnoreUserToken
@RequestMapping
(
value
=
"/download/companyPic"
,
method
=
RequestMethod
.
GET
)
public
ResponseEntity
<
byte
[]>
downloadDrivingLicense
(
@RequestParam
(
"realFileRelPath"
)
String
realFileRelPath
)
throws
Exception
{
return
branchCompanyStockService
.
downloadCompanyPic
(
realFileRelPath
);
}
/**
/**
* 申请购买
* 申请购买
* @param applyVo
* @param applyVo
...
...
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