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
2c274363
Commit
2c274363
authored
Jun 05, 2020
by
彭祥礼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片上传路径修改
parent
0a122fca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
14 deletions
+24
-14
common/src/main/java/com/winsun/utils/PicturesUtil.java
+19
-12
service-manager/src/main/java/com/winsun/controller/OrderController.java
+5
-2
No files found.
common/src/main/java/com/winsun/utils/PicturesUtil.java
View file @
2c274363
...
...
@@ -7,9 +7,8 @@ import org.apache.commons.lang3.StringUtils;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Base64
;
import
java.util.
Date
;
import
java.util.
Calendar
;
/**
* 二维码海报工具类
...
...
@@ -24,31 +23,39 @@ public class PicturesUtil {
* <p>
* 前端传来图片必须为jpeg格式
* @param file 图片base64字符串
* @param pa
th 图片上一级
文件夹名
* @param pa
rtner 用户ID做为
文件夹名
* @param pathType 图片上一级文件夹名
* @param
* @return
*/
public
static
String
uploadPictures
(
String
file
,
String
pa
th
,
String
pathType
){
if
(
StringUtils
.
isBlank
(
pa
th
)){
pa
th
=
"temp"
;
public
static
String
uploadPictures
(
String
file
,
String
pa
rtner
,
String
pathType
){
if
(
StringUtils
.
isBlank
(
pa
rtner
)){
pa
rtner
=
"temp"
;
}
Date
date
=
new
Date
();
SimpleDateFormat
yyMMdd
=
new
SimpleDateFormat
(
"yyMMdd"
);
String
h
=
yyMMdd
.
format
(
date
.
getTime
());
Calendar
now
=
Calendar
.
getInstance
();
Integer
yyyy
=
now
.
get
(
Calendar
.
YEAR
);
Integer
MM
=
(
now
.
get
(
Calendar
.
MONTH
)
+
1
);
Integer
DD
=
now
.
get
(
Calendar
.
DAY_OF_MONTH
);
String
yymmdd
=
yyyy
+
"/"
+
MM
+
"/"
+
DD
;
/*System.out.println("年: " + now.get(Calendar.YEAR));
System.out.println("月: " + (now.get(Calendar.MONTH) + 1) + "");
System.out.println("日: " + now.get(Calendar.DAY_OF_MONTH));
System.out.println("时: " + now.get(Calendar.HOUR_OF_DAY));
System.out.println("分: " + now.get(Calendar.MINUTE));*/
//blog.csdn.net/kookob/java/article/details/6885383
String
filePath
=
null
;
String
[]
multipartFiles
=
new
String
[]{
file
};
for
(
int
i
=
0
;
i
<
multipartFiles
.
length
;
i
++)
{
if
(!
multipartFiles
[
i
].
isEmpty
())
{
String
base64Data
=
multipartFiles
[
i
].
split
(
","
)[
1
];
String
houzhui
=
multipartFiles
[
i
].
split
(
","
)[
0
].
split
(
"/"
)[
1
].
split
(
";"
)[
0
];
String
filePath1
=
FilePath
.
PATH
.
getValue
()+
pathType
+
"/"
+
h
+
"/"
+
path
;
String
filePath1
=
FilePath
.
PATH
.
getValue
()+
pathType
+
"/"
+
partner
+
"/"
+
yymmdd
;
File
dir
=
new
File
(
filePath1
);
if
(!
dir
.
exists
())
{
dir
.
mkdirs
();
}
//enclosure/images/idCard/
200525/temp/1590395528186
.jpeg
filePath
=
FilePath
.
PATH
.
getValue
()+
pathType
+
"/"
+
h
+
"/"
+
path
+
"/"
+
date
.
getTime
()
+
"."
+
houzhui
;
//enclosure/images/idCard/
temp/年/月/日/name
.jpeg
filePath
=
FilePath
.
PATH
.
getValue
()+
pathType
+
"/"
+
partner
+
"/"
+
yymmdd
+
"."
+
houzhui
;
//byte[] bytes = Base64.getUrlDecoder().decode(base64Data);
//byte[] bytes =new BASE64Decoder().decodeBuffer(base64Data);
...
...
service-manager/src/main/java/com/winsun/controller/OrderController.java
View file @
2c274363
...
...
@@ -175,7 +175,8 @@ public class OrderController extends BaseController {
*/
@Permission
(
menuname
=
"查询订单信息"
,
value
=
"list"
,
method
=
RequestMethod
.
POST
)
//@RequestMapping(value="list", method = RequestMethod.POST)
public
ResponseData
<
Page
<
Order
>>
listOrder
(
@RequestParam
(
name
=
"createTimeStart"
,
required
=
false
)
String
createTimeStart
,
public
ResponseData
<
Page
<
Order
>>
listOrder
(
@RequestParam
(
name
=
"createTimeStart"
,
required
=
false
)
String
createTimeStart
,
@RequestParam
(
name
=
"createTimeEnd"
,
required
=
false
)
String
createTimeEnd
,
@RequestParam
(
name
=
"successTimeStart"
,
required
=
false
)
String
successTimeStart
,
@RequestParam
(
name
=
"successTimeEnd"
,
required
=
false
)
String
successTimeEnd
,
@RequestParam
(
"userType"
)
String
userType
,
@RequestParam
(
name
=
"orderNumber"
,
required
=
false
)
String
orderNumber
,
@RequestParam
(
name
=
"kapin"
,
required
=
false
)
String
kapin
,
...
...
@@ -210,7 +211,8 @@ public class OrderController extends BaseController {
}
@Permission
(
menuname
=
"导出订单"
,
value
=
"download"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
downloadOrderView
(
@RequestParam
(
name
=
"createTimeStart"
,
required
=
false
)
String
createTimeStart
,
public
ResponseData
<
String
>
downloadOrderView
(
@RequestParam
(
name
=
"createTimeStart"
,
required
=
false
)
String
createTimeStart
,
@RequestParam
(
name
=
"createTimeEnd"
,
required
=
false
)
String
createTimeEnd
,
@RequestParam
(
name
=
"successTimeStart"
,
required
=
false
)
String
successTimeStart
,
@RequestParam
(
name
=
"successTimeEnd"
,
required
=
false
)
String
successTimeEnd
,
@RequestParam
(
"userType"
)
String
userType
,
@RequestParam
(
name
=
"orderNumber"
,
required
=
false
)
String
orderNumber
,
@RequestParam
(
name
=
"kapin"
,
required
=
false
)
String
kapin
,
...
...
@@ -218,6 +220,7 @@ public class OrderController extends BaseController {
@RequestParam
(
name
=
"hehuorenSchool"
,
required
=
false
)
String
hehuorenSchool
,
@RequestParam
(
name
=
"hehuorenName"
,
required
=
false
)
String
hehuorenName
,
@RequestParam
(
name
=
"orderStatus"
,
required
=
false
)
String
orderStatus
,
@RequestParam
(
name
=
"customerName"
,
required
=
false
)
String
customerName
)
{
String
dateFormat
=
"YYYY-MM-DD"
;
if
(
StringUtils
.
isNotBlank
(
createTimeStart
)
&&
StringUtils
.
isNotBlank
(
createTimeEnd
))
{
createTimeStart
=
createTimeStart
.
substring
(
0
,
dateFormat
.
length
())
+
" 00:00:00"
;
...
...
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