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
c3e3f9fe
Commit
c3e3f9fe
authored
Oct 14, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_activity' into dev
parents
72c0b05f
e3305c4f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
9 deletions
+59
-9
SystemConfig.java
...ub/wxiaoqi/security/common/util/process/SystemConfig.java
+2
-1
systemconfig.properties
...mon/src/main/resources/properties/systemconfig.properties
+2
-0
ActivityBiz.java
...c/main/java/com/xxfc/platform/summit/biz/ActivityBiz.java
+16
-1
UserBiz.java
...r/src/main/java/com/xxfc/platform/summit/biz/UserBiz.java
+1
-1
ActivityController.java
...m/xxfc/platform/summit/controller/ActivityController.java
+34
-1
UploadZipServiceImpl.java
...platform/universal/service/impl/UploadZipServiceImpl.java
+4
-5
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/process/SystemConfig.java
View file @
c3e3f9fe
...
@@ -9,7 +9,8 @@ public class SystemConfig {
...
@@ -9,7 +9,8 @@ public class SystemConfig {
public
static
final
String
XXMP_URL
=
SystemProperty
.
getConfig
(
"XXMP_URL"
);
public
static
final
String
XXMP_URL
=
SystemProperty
.
getConfig
(
"XXMP_URL"
);
// 视频url
// 视频url
public
static
final
String
VIDEO_URL
=
SystemProperty
.
getConfig
(
"VIDEO_URL"
);
public
static
final
String
VIDEO_URL
=
SystemProperty
.
getConfig
(
"VIDEO_URL"
);
// token到期时间
public
static
final
String
RENOVATE
=
SystemProperty
.
getConfig
(
"RENOVATE"
)
;
// token到期时间
// token到期时间
// token到期时间
public
static
Integer
TOKENOVERTIME
=
Integer
.
valueOf
(
SystemProperty
.
getConfig
(
"TOKEN_OVER_TIME"
));
public
static
Integer
TOKENOVERTIME
=
Integer
.
valueOf
(
SystemProperty
.
getConfig
(
"TOKEN_OVER_TIME"
));
// redis缓存时间
// redis缓存时间
...
...
ace-common/src/main/resources/properties/systemconfig.properties
View file @
c3e3f9fe
#\u9879\u76EEurl
#\u9879\u76EEurl
XXMP_URL
=
/image
XXMP_URL
=
/image
#\u538B\u7F29\u5305\u89E3\u538B\u540E\u4FDD\u5B58\u7684\u8DEF\u5F84
RENOVATE
=
/renovate
#\u89C6\u9891\u4FDD\u5B58\u6587\u4EF6
#\u89C6\u9891\u4FDD\u5B58\u6587\u4EF6
VIDEO_URL
=
/video
VIDEO_URL
=
/video
#token\u5230\u671F\u65F6\u95F4
#token\u5230\u671F\u65F6\u95F4
...
...
xx-summit/xx-summit-server/src/main/java/com/xxfc/platform/summit/biz/ActivityBiz.java
View file @
c3e3f9fe
...
@@ -40,7 +40,7 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> {
...
@@ -40,7 +40,7 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> {
*/
*/
private
Integer
PUBLISHED
=
1
;
private
Integer
PUBLISHED
=
1
;
public
Object
getList
(
ActivityQuery
query
)
{
public
PageInfo
<
Activity
>
getList
(
ActivityQuery
query
)
{
// Example exa = new Example(Activity.class);
// Example exa = new Example(Activity.class);
// Example.Criteria criteria = exa.createCriteria();
// Example.Criteria criteria = exa.createCriteria();
...
@@ -137,4 +137,19 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> {
...
@@ -137,4 +137,19 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> {
params
.
put
(
"id"
,
id
);
params
.
put
(
"id"
,
id
);
return
params
;
return
params
;
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
remove
(
Integer
id
)
{
try
{
Activity
activity
=
new
Activity
();
activity
.
setId
(
id
);
activity
.
setIsDel
(
1
);
updateSelectiveById
(
activity
);
return
true
;
}
catch
(
Exception
e
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
e
.
printStackTrace
();
return
false
;
}
}
}
}
xx-summit/xx-summit-server/src/main/java/com/xxfc/platform/summit/biz/UserBiz.java
View file @
c3e3f9fe
...
@@ -97,7 +97,7 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
...
@@ -97,7 +97,7 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
log
.
info
(
"----code为空---"
);
log
.
info
(
"----code为空---"
);
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"code为空"
));
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"code为空"
));
}
}
String
openid
=
"oXDd91
N8Rwijd3gscAND9TO77a2I
"
;
String
openid
=
"oXDd91
MppH9i5F7xzPwigiMj--5w
"
;
/*String access_token = null;
/*String access_token = null;
try {
try {
JSONObject jsonData = weixinService.getAccessToken(code);
JSONObject jsonData = weixinService.getAccessToken(code);
...
...
xx-summit/xx-summit-server/src/main/java/com/xxfc/platform/summit/controller/ActivityController.java
View file @
c3e3f9fe
package
com
.
xxfc
.
platform
.
summit
.
controller
;
package
com
.
xxfc
.
platform
.
summit
.
controller
;
import
com.alibaba.druid.sql.visitor.functions.If
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.summit.biz.ActivityBiz
;
import
com.xxfc.platform.summit.biz.ActivityBiz
;
...
@@ -9,6 +11,8 @@ import io.swagger.annotations.Api;
...
@@ -9,6 +11,8 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
/**
* @author Administrator
* @author Administrator
*/
*/
...
@@ -21,7 +25,27 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> {
...
@@ -21,7 +25,27 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> {
@PostMapping
(
"/app/unauth/list"
)
@PostMapping
(
"/app/unauth/list"
)
@ApiOperation
(
value
=
"峰会列表"
,
notes
=
"峰会列表"
)
@ApiOperation
(
value
=
"峰会列表"
,
notes
=
"峰会列表"
)
public
ObjectRestResponse
getList
(
@RequestBody
ActivityQuery
query
){
public
ObjectRestResponse
getList
(
@RequestBody
ActivityQuery
query
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
getList
(
query
));
PageInfo
<
Activity
>
info
=
baseBiz
.
getList
(
query
);
List
<
Activity
>
list
=
info
.
getList
();
if
(
query
.
getType
()==
1
)
{
for
(
Activity
activity
:
list
)
{
if
(
activity
.
getStatus
()==
0
){
long
millis
=
System
.
currentTimeMillis
();
Long
startTime
=
activity
.
getStartTime
();
Long
endTime
=
activity
.
getEndTime
();
if
(
millis
<
startTime
)
{
activity
.
setStatus
(
1
);
}
if
(
millis
>=
startTime
&&
millis
<=
endTime
){
activity
.
setStatus
(
2
);
}
if
(
millis
>
endTime
){
activity
.
setStatus
(
3
);
}
}
}
}
return
ObjectRestResponse
.
succ
(
info
);
}
}
@Override
@Override
...
@@ -44,4 +68,13 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> {
...
@@ -44,4 +68,13 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> {
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
@PutMapping
(
"/remove/id"
)
@ApiOperation
(
value
=
"删除"
,
notes
=
"删除"
)
public
ObjectRestResponse
remove
(
@PathVariable
Integer
id
){
if
(
baseBiz
.
remove
(
id
))
{
return
ObjectRestResponse
.
succ
();
}
return
ObjectRestResponse
.
createDefaultFail
();
}
}
}
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/impl/UploadZipServiceImpl.java
View file @
c3e3f9fe
...
@@ -61,7 +61,7 @@ public class UploadZipServiceImpl implements UploadZipService {
...
@@ -61,7 +61,7 @@ public class UploadZipServiceImpl implements UploadZipService {
log
.
error
(
"zip file save to "
+
uploadPath
+
" error"
,
e
.
getMessage
(),
e
);
log
.
error
(
"zip file save to "
+
uploadPath
+
" error"
,
e
.
getMessage
(),
e
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"保存压缩文件到:"
+
uploadPath
+
" 失败!"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"保存压缩文件到:"
+
uploadPath
+
" 失败!"
);
}
}
//zip压缩包解压
//zip压缩包解压
return
unPackZip
(
file
,
prefix
);
return
unPackZip
(
file
,
prefix
);
}
}
...
@@ -77,7 +77,7 @@ public class UploadZipServiceImpl implements UploadZipService {
...
@@ -77,7 +77,7 @@ public class UploadZipServiceImpl implements UploadZipService {
while
(
entries
.
hasMoreElements
())
{
while
(
entries
.
hasMoreElements
())
{
ZipEntry
entry
=
entries
.
nextElement
();
ZipEntry
entry
=
entries
.
nextElement
();
if
(
entry
.
isDirectory
()
&&
index
++
==
0
)
{
if
(
entry
.
isDirectory
()
&&
index
++
==
0
)
{
File
dir
=
new
File
(
uploadPath
+
dirPathToday
);
File
dir
=
new
File
(
uploadPath
+
File
.
separator
+
dirPathToday
);
dir
.
mkdir
();
dir
.
mkdir
();
}
else
if
(!
entry
.
isDirectory
())
{
}
else
if
(!
entry
.
isDirectory
())
{
...
@@ -89,12 +89,11 @@ public class UploadZipServiceImpl implements UploadZipService {
...
@@ -89,12 +89,11 @@ public class UploadZipServiceImpl implements UploadZipService {
String
format
=
name
.
substring
(
name
.
lastIndexOf
(
"."
));
String
format
=
name
.
substring
(
name
.
lastIndexOf
(
"."
));
if
(
PHOTO_FORMAT
.
contains
(
format
))
{
if
(
PHOTO_FORMAT
.
contains
(
format
))
{
String
realFileRelPath
=
dirPathToday
+
File
.
separator
+
no
+
format
;
String
realFileRelPath
=
dirPathToday
+
File
.
separator
+
no
+
format
;
File
targetFile
=
new
File
(
uploadPath
+
realFileRelPath
);
File
targetFile
=
new
File
(
uploadPath
+
File
.
separator
+
realFileRelPath
);
FileUtils
.
copyInputStreamToFile
(
zipFile
.
getInputStream
(
entry
),
targetFile
);
FileUtils
.
copyInputStreamToFile
(
zipFile
.
getInputStream
(
entry
),
targetFile
);
realFileRelPath
=
xx_url
+
SystemConfig
.
XXMP_URL
+
realFileRelPath
;
realFileRelPath
=
xx_url
+
SystemConfig
.
RENOVATE
+
File
.
separator
+
realFileRelPath
;
result
.
append
(
realFileRelPath
+
","
);
result
.
append
(
realFileRelPath
+
","
);
}
}
}
}
}
}
result
.
substring
(
0
,
result
.
length
()-
1
);
result
.
substring
(
0
,
result
.
length
()-
1
);
...
...
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