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
ed01f730
Commit
ed01f730
authored
Jul 22, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
5e019d3e
203575c9
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
60 additions
and
52 deletions
+60
-52
application.yml
ace-gate/src/main/resources/application.yml
+10
-0
AppFormat.java
...com/github/wxiaoqi/security/admin/constant/AppFormat.java
+1
-1
AppUserManageDTO.java
...m/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
+4
-4
AppUserManageBiz.java
...m/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
+1
-1
BaseUserMemberBiz.java
.../github/wxiaoqi/security/admin/biz/BaseUserMemberBiz.java
+2
-2
AppUserDetailMapper.xml
...e-admin/src/main/resources/mapper/AppUserDetailMapper.xml
+1
-4
AppVersionBiz.java
...rc/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
+2
-4
AppVersionController.java
...java/com/xxfc/platform/app/rest/AppVersionController.java
+37
-34
application.yml
xx-app/xx-app-server/src/main/resources/application.yml
+1
-1
application.yml
...al/xx-universal-server/src/main/resources/application.yml
+1
-1
No files found.
ace-gate/src/main/resources/application.yml
View file @
ed01f730
...
@@ -88,6 +88,16 @@ auth:
...
@@ -88,6 +88,16 @@ auth:
token-header
:
x-client-token
token-header
:
x-client-token
id
:
ace-gate
#不填则默认读取spring.application.name
id
:
ace-gate
#不填则默认读取spring.application.name
secret
:
123456
secret
:
123456
servlet
:
multipart
:
# 启用上传处理,默认是true
enabled
:
true
# 当上传文件达到20MB的时候进行磁盘写入
file-size-threshold
:
20MB
# 设置最大的请求文件的大小
max-request-size
:
50MB
# 设置单个文件的最大长度
max-file-size
:
50MB
#
#
#
#
#ribbon:
#ribbon:
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/constant/AppFormat.java
View file @
ed01f730
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -6,7 +6,7 @@ import java.util.List;
import
java.util.Set
;
import
java.util.Set
;
public
class
AppFormat
{
public
class
AppFormat
{
private
static
final
String
[]
format
=
{
"
ipa"
,
"apk"
,
"
pxl"
};
private
static
final
String
[]
format
=
{
"
.ipa"
,
".apk"
,
".
pxl"
};
private
static
final
Set
formatSet
=
new
HashSet
(
Arrays
.
asList
(
format
));
private
static
final
Set
formatSet
=
new
HashSet
(
Arrays
.
asList
(
format
));
public
static
Set
<
String
>
getFormatSet
()
{
public
static
Set
<
String
>
getFormatSet
()
{
return
formatSet
;
return
formatSet
;
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
View file @
ed01f730
...
@@ -52,10 +52,10 @@ public class AppUserManageDTO {
...
@@ -52,10 +52,10 @@ public class AppUserManageDTO {
*/
*/
private
Integer
source
;
private
Integer
source
;
/**
//
/**
* 接收前台时间范围
//
* 接收前台时间范围
*/
//
*/
private
String
[]
registrationDate
;
//
private String[] registrationDate;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
View file @
ed01f730
...
@@ -57,7 +57,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
...
@@ -57,7 +57,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUserManage
(
appUserManageDTO
);
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUserManage
(
appUserManageDTO
);
PageInfo
<
AppUserManageVo
>
pageInfo
=
PageInfo
.
of
(
appUserManageVos
);
PageInfo
<
AppUserManageVo
>
pageInfo
=
PageInfo
.
of
(
appUserManageVos
);
if
(
pageInfo
.
getList
()==
null
||
pageInfo
.
getList
().
size
()==
0
)
{
if
(
pageInfo
.
getList
()==
null
||
pageInfo
.
getList
().
size
()==
0
)
{
return
null
;
return
pageInfo
;
}
}
List
<
Integer
>
Citys
=
pageInfo
.
getList
().
parallelStream
().
map
(
AppUserManageVo:
:
getCityCode
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
Citys
=
pageInfo
.
getList
().
parallelStream
().
map
(
AppUserManageVo:
:
getCityCode
).
collect
(
Collectors
.
toList
());
HashSet
<
Integer
>
set
=
new
HashSet
<>();
HashSet
<
Integer
>
set
=
new
HashSet
<>();
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/BaseUserMemberBiz.java
View file @
ed01f730
...
@@ -235,9 +235,9 @@ public class BaseUserMemberBiz extends BaseBiz<BaseUserMemberMapper,BaseUserMemb
...
@@ -235,9 +235,9 @@ public class BaseUserMemberBiz extends BaseBiz<BaseUserMemberMapper,BaseUserMemb
}
else
if
(
baseUserMembers
.
size
()==
1
){
}
else
if
(
baseUserMembers
.
size
()==
1
){
if
(
baseUserMemberVO
.
getMemberLevel
()
==
null
||
baseUserMember
.
getValidTime
()
==
null
){
if
(
baseUserMemberVO
.
getMemberLevel
()
==
null
||
baseUserMember
.
getValidTime
()
==
null
){
baseUserMember
.
setIsDel
(
1
);
baseUserMember
.
setTotalNumber
(
0
);
baseUserMember
.
setRentFreeDays
(
0
);
}
else
{
}
else
{
baseUserMember
.
setIsDel
(
0
);
}
}
baseUserMember
.
setUpdTime
(
System
.
currentTimeMillis
());
baseUserMember
.
setUpdTime
(
System
.
currentTimeMillis
());
baseUserMember
.
setBuyCount
(
baseUserMembers
.
get
(
0
).
getBuyCount
()+
1
);
baseUserMember
.
setBuyCount
(
baseUserMembers
.
get
(
0
).
getBuyCount
()+
1
);
...
...
ace-modules/ace-admin/src/main/resources/mapper/AppUserDetailMapper.xml
View file @
ed01f730
...
@@ -95,8 +95,7 @@
...
@@ -95,8 +95,7 @@
) m
) m
on
on
l.id = m.user_id
l.id = m.user_id
and m.is_del=0
where 1=1
<if
test=
"mobile !=null"
>
<if
test=
"mobile !=null"
>
and l.username like CONCAT('%',#{mobile},'%')
and l.username like CONCAT('%',#{mobile},'%')
</if>
</if>
...
@@ -115,8 +114,6 @@
...
@@ -115,8 +114,6 @@
<if
test=
"source !=null"
>
<if
test=
"source !=null"
>
and d.source = #{source}
and d.source = #{source}
</if>
</if>
order by l.id ASC
order by l.id ASC
</select>
</select>
...
...
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
View file @
ed01f730
...
@@ -100,16 +100,14 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
...
@@ -100,16 +100,14 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
public
ObjectRestResponse
uploadDrivingLicense
(
MultipartFile
file
)
throws
IOException
{
public
ObjectRestResponse
uploadDrivingLicense
(
MultipartFile
file
)
throws
IOException
{
DateTime
now
=
DateTime
.
now
();
DateTime
now
=
DateTime
.
now
();
String
dirPathToday
=
File
.
separator
+
now
.
toString
(
DEFAULT_DATE_TIME_FORMATTER
);
String
dirPathToday
=
File
.
separator
+
now
.
toString
(
DEFAULT_DATE_TIME_FORMATTER
);
String
redisNoKey
=
RedisKey
.
UPLOAD_FILE_NO_PREFIX
+
now
.
toString
(
DEFAULT_DATE_TIME_FORMATTER
);
//
String redisNoKey = RedisKey.UPLOAD_FILE_NO_PREFIX + now.toString(DEFAULT_DATE_TIME_FORMATTER);
// Long no = redisTemplate.opsForValue().increment(redisNoKey);
// Long no = redisTemplate.opsForValue().increment(redisNoKey);
// if(no.equals(1L)){
// if(no.equals(1L)){
// redisTemplate.expire(redisNoKey,1, TimeUnit.DAYS);
// redisTemplate.expire(redisNoKey,1, TimeUnit.DAYS);
// }
// }
String
fileName
=
file
.
getOriginalFilename
();
String
fileName
=
file
.
getOriginalFilename
();
String
realFileRelPath
=
dirPathToday
+
File
.
separator
+
fileName
.
substring
(
fileName
.
lastIndexOf
(
"/"
));
String
realFileRelPath
=
dirPathToday
+
File
.
separator
+
fileName
;
String
filePath
=
uploadPath
+
realFileRelPath
;
String
filePath
=
uploadPath
+
realFileRelPath
;
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
new
File
(
filePath
));
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
new
File
(
filePath
));
return
ObjectRestResponse
.
succ
(
filePath
);
return
ObjectRestResponse
.
succ
(
filePath
);
}
}
...
...
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/AppVersionController.java
View file @
ed01f730
...
@@ -33,83 +33,87 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -33,83 +33,87 @@ import org.springframework.web.multipart.MultipartFile;
import
java.io.File
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
"version"
)
@RequestMapping
(
"version"
)
@IgnoreClientToken
@IgnoreClientToken
@Slf4j
@Slf4j
public
class
AppVersionController
extends
BaseController
<
AppVersionBiz
,
AppVersion
>
{
public
class
AppVersionController
extends
BaseController
<
AppVersionBiz
,
AppVersion
>
{
//最大上传500MB
/**
private
Long
MAX_DRIVING_LICENSE_SIZE
=
1024
*
1024
*
500L
;
* 最大上传500MB
private
int
id
;
*/
private
Long
MAX_DRIVING_LICENSE_SIZE
=
1024
*
1024
*
500L
;
@ApiModelProperty
(
"app自动更新"
)
@ApiModelProperty
(
"app自动更新"
)
@RequestMapping
(
value
=
"/app/unauth/info"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/unauth/info"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
@IgnoreUserToken
public
ObjectRestResponse
info
(
public
ObjectRestResponse
info
(
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"version"
,
defaultValue
=
""
)
String
version
,
@RequestParam
(
value
=
"version"
,
defaultValue
=
""
)
String
version
,
@RequestParam
(
value
=
"isH5"
,
defaultValue
=
"0"
)
Integer
isH5
@RequestParam
(
value
=
"isH5"
,
defaultValue
=
"0"
)
Integer
isH5
){
)
{
ObjectRestResponse
restResponse
=
null
;
ObjectRestResponse
restResponse
=
null
;
if
(
isH5
!=
null
&&
isH5
==
1
)
{
if
(
isH5
!=
null
&&
isH5
==
1
)
{
restResponse
=
baseBiz
.
getVersionH5
(
type
);
restResponse
=
baseBiz
.
getVersionH5
(
type
);
}
else
{
}
else
{
restResponse
=
baseBiz
.
getVersion
(
version
,
type
);
restResponse
=
baseBiz
.
getVersion
(
version
,
type
);
}
}
return
restResponse
;
return
restResponse
;
}
}
@Override
@Override
@ApiOperation
(
"添加"
)
@ApiOperation
(
"添加"
)
@RequestMapping
(
value
=
"/background/add"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/background/add"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
AppVersion
>
add
(
@RequestBody
AppVersion
appVersion
){
public
ObjectRestResponse
<
AppVersion
>
add
(
@RequestBody
AppVersion
appVersion
)
{
baseBiz
.
insertAppVersion
(
appVersion
);
baseBiz
.
insertAppVersion
(
appVersion
);
return
new
ObjectRestResponse
<
AppVersion
>();
return
new
ObjectRestResponse
<
AppVersion
>();
}
}
@ApiOperation
(
"查询一条"
)
@ApiOperation
(
"查询一条"
)
@RequestMapping
(
value
=
"/background/getAppVersion/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/background/getAppVersion/{id}"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
AppVersion
>
getAppVersion
(
@PathVariable
Integer
id
){
public
ObjectRestResponse
<
AppVersion
>
getAppVersion
(
@PathVariable
Integer
id
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
get
(
id
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
get
(
id
));
}
}
@ApiOperation
(
"查询所有"
)
@ApiOperation
(
"查询所有"
)
@RequestMapping
(
value
=
"/background/getAppVersions"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/background/getAppVersions"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
PageInfo
<
AppVersion
>>
getAppVersions
(
@RequestBody
appVersionQuery
query
){
public
ObjectRestResponse
<
PageInfo
<
AppVersion
>>
getAppVersions
(
@RequestBody
appVersionQuery
query
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
getAll
(
query
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
getAll
(
query
));
}
}
@Override
@Override
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
@RequestMapping
(
value
=
"/background/update"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/background/update"
,
method
=
RequestMethod
.
PUT
)
public
ObjectRestResponse
<
AppVersion
>
update
(
@RequestBody
AppVersion
appVersion
){
public
ObjectRestResponse
<
AppVersion
>
update
(
@RequestBody
AppVersion
appVersion
)
{
baseBiz
.
updateAppVersionById
(
appVersion
);
baseBiz
.
updateAppVersionById
(
appVersion
);
return
new
ObjectRestResponse
<
AppVersion
>();
return
new
ObjectRestResponse
<
AppVersion
>();
}
}
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@DeleteMapping
(
value
=
"/background/remove/{id}"
)
@DeleteMapping
(
value
=
"/background/remove/{id}"
)
public
ObjectRestResponse
<
AppVersion
>
remove
(
@PathVariable
Integer
id
){
public
ObjectRestResponse
<
AppVersion
>
remove
(
@PathVariable
Integer
id
)
{
baseBiz
.
remove
(
id
);
baseBiz
.
remove
(
id
);
return
new
ObjectRestResponse
<
AppVersion
>();
return
new
ObjectRestResponse
<
AppVersion
>();
}
}
@PostMapping
(
value
=
"/upload/installationPackage"
)
@PostMapping
(
value
=
"/upload/installationPackage"
)
@ApiOperation
(
value
=
"上传app安装包"
)
@ApiOperation
(
value
=
"上传app安装包"
)
public
ObjectRestResponse
uploadInstallationPackage
(
@RequestParam
(
"file"
)
MultipartFile
file
)
public
ObjectRestResponse
uploadInstallationPackage
(
@RequestParam
MultipartFile
file
)
throws
Exception
{
throws
Exception
{
Assert
.
notNull
(
file
);
//文件类型
//文件类型
String
contentType
=
file
.
getContentType
();
String
contentType
=
file
.
getContentType
();
log
.
debug
(
"contentType"
+
contentType
);
String
name
=
file
.
getOriginalFilename
();
//判断上传的文件格式
String
content
=
name
.
substring
(
name
.
lastIndexOf
(
"."
));
if
(!
judgeFormat
(
contentType
)||
file
.
getSize
()
>
MAX_DRIVING_LICENSE_SIZE
)
{
System
.
out
.
println
(
"file.getSize()"
+
file
.
getSize
());
System
.
out
.
println
(
"content"
+
content
);
System
.
out
.
println
(
"contentType"
+
contentType
);
//判断上传的文件格式
if
(!
judgeFormat
(
content
)
||
file
.
getSize
()
>
MAX_DRIVING_LICENSE_SIZE
)
{
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
...
@@ -117,8 +121,6 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
...
@@ -117,8 +121,6 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
}
}
@IgnoreUserToken
@IgnoreUserToken
@GetMapping
(
value
=
"/download/installationPackage/{realFileRelPath}"
)
//匹配的是href中的download请求
@GetMapping
(
value
=
"/download/installationPackage/{realFileRelPath}"
)
//匹配的是href中的download请求
@ApiOperation
(
value
=
"下载app安装包"
)
@ApiOperation
(
value
=
"下载app安装包"
)
...
@@ -128,11 +130,12 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
...
@@ -128,11 +130,12 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
/**
/**
* 判断上传的文件格式
* 判断上传的文件格式
*
* @param contentType
* @param contentType
* @return
* @return
*/
*/
private
boolean
judgeFormat
(
String
contentType
){
private
boolean
judgeFormat
(
String
contentType
)
{
if
(
AppFormat
.
getFormatSet
().
size
()
==
0
)
{
if
(
AppFormat
.
getFormatSet
().
size
()
==
0
)
{
return
true
;
return
true
;
}
}
for
(
String
format
:
AppFormat
.
getFormatSet
())
{
for
(
String
format
:
AppFormat
.
getFormatSet
())
{
...
...
xx-app/xx-app-server/src/main/resources/application.yml
View file @
ed01f730
...
@@ -2,7 +2,7 @@ servlet:
...
@@ -2,7 +2,7 @@ servlet:
multipart
:
multipart
:
# 启用上传处理,默认是true
# 启用上传处理,默认是true
enabled
:
true
enabled
:
true
# 当上传文件达到
1
MB的时候进行磁盘写入
# 当上传文件达到
20
MB的时候进行磁盘写入
file-size-threshold
:
20MB
file-size-threshold
:
20MB
# 设置最大的请求文件的大小
# 设置最大的请求文件的大小
max-request-size
:
50MB
max-request-size
:
50MB
...
...
xx-universal/xx-universal-server/src/main/resources/application.yml
View file @
ed01f730
...
@@ -9,7 +9,7 @@ servlet:
...
@@ -9,7 +9,7 @@ servlet:
multipart
:
multipart
:
# 启用上传处理,默认是true
# 启用上传处理,默认是true
enabled
:
true
enabled
:
true
# 当上传文件达到
1
MB的时候进行磁盘写入
# 当上传文件达到
20
MB的时候进行磁盘写入
file-size-threshold
:
20MB
file-size-threshold
:
20MB
# 设置最大的请求文件的大小
# 设置最大的请求文件的大小
max-request-size
:
50MB
max-request-size
:
50MB
...
...
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