Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
c5b3f90b
Commit
c5b3f90b
authored
May 07, 2019
by
songxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加错题本相关的配置
parent
5af88616
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
125 deletions
+140
-125
public_system.properties
...n-config/src/main/resources.prod/public_system.properties
+5
-2
public_system.properties
...on-config/src/main/resources.uat/public_system.properties
+5
-2
ParamLogAspect.java
...in/java/com/pcloud/common/core/aspect/ParamLogAspect.java
+72
-72
TranscodeFromEnum.java
.../java/com/pcloud/common/core/enums/TranscodeFromEnum.java
+58
-48
OssUtils.java
...rc/main/java/com/pcloud/common/utils/aliyun/OssUtils.java
+0
-1
No files found.
pcloud-common-config/src/main/resources.prod/public_system.properties
View file @
c5b3f90b
...
@@ -94,4 +94,7 @@ product.parentTutor.proLabelId = 7461
...
@@ -94,4 +94,7 @@ product.parentTutor.proLabelId = 7461
book.group.qrcode.domain
=
https://qrcode.5rs.me
book.group.qrcode.domain
=
https://qrcode.5rs.me
ownAgentIds
=
2,1362
ownAgentIds
=
2,1362
\ No newline at end of file
## \u9519\u9898\u672C\u73AF\u5883\u57DF\u540D
papercut.domain
=
papercut.5rs.me
\ No newline at end of file
pcloud-common-config/src/main/resources.uat/public_system.properties
View file @
c5b3f90b
...
@@ -95,4 +95,7 @@ product.parentTutor.proLabelId = 812
...
@@ -95,4 +95,7 @@ product.parentTutor.proLabelId = 812
book.group.qrcode.domain
=
https://qrcode.raysyun.com
book.group.qrcode.domain
=
https://qrcode.raysyun.com
ownAgentIds
=
12829
ownAgentIds
=
12829
\ No newline at end of file
## \u9519\u9898\u672C\u73AF\u5883\u57DF\u540D
papercut.domain
=
papercut.raysyun.com
\ No newline at end of file
pcloud-common-core/src/main/java/com/pcloud/common/core/aspect/ParamLogAspect.java
View file @
c5b3f90b
/**
/**
*
*
*/
*/
package
com
.
pcloud
.
common
.
core
.
aspect
;
package
com
.
pcloud
.
common
.
core
.
aspect
;
...
@@ -20,7 +20,6 @@ import com.alibaba.fastjson.JSON;
...
@@ -20,7 +20,6 @@ import com.alibaba.fastjson.JSON;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
/**
/**
*
* @author:songx
* @author:songx
* @date:2018年4月26日,下午2:32:36
* @date:2018年4月26日,下午2:32:36
*/
*/
...
@@ -28,79 +27,80 @@ import com.pcloud.common.utils.string.StringUtil;
...
@@ -28,79 +27,80 @@ import com.pcloud.common.utils.string.StringUtil;
@Configuration
@Configuration
public
class
ParamLogAspect
{
public
class
ParamLogAspect
{
/**
/**
*
*
*/
*/
private
final
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
""
);
private
final
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
""
);
@Pointcut
(
"execution(* com.pcloud..*(..))"
)
@Pointcut
(
"execution(* com.pcloud..*(..))"
)
public
void
bizPoint
()
{
public
void
bizPoint
()
{
}
}
/**
/**
* 方法执行前以后执行
* 方法执行前以后执行
*
*
* @param joinPoint
* @param joinPoint
*/
*/
@Before
(
"bizPoint()"
)
@Before
(
"bizPoint()"
)
public
void
doBefore
(
JoinPoint
joinPoint
)
{
public
void
doBefore
(
JoinPoint
joinPoint
)
{
ParamLog
paramLog
=
checkAnnotation
(
joinPoint
);
ParamLog
paramLog
=
checkAnnotation
(
joinPoint
);
if
(
paramLog
==
null
)
{
if
(
paramLog
==
null
)
{
return
;
return
;
}
}
Signature
signature
=
joinPoint
.
getSignature
();
Signature
signature
=
joinPoint
.
getSignature
();
String
methodName
=
signature
.
getName
();
String
methodName
=
signature
.
getName
();
String
description
=
paramLog
.
description
();
String
description
=
paramLog
.
description
();
description
=
StringUtil
.
isEmpty
(
description
)
?
paramLog
.
value
()
:
description
;
description
=
StringUtil
.
isEmpty
(
description
)
?
paramLog
.
value
()
:
description
;
StringBuffer
msg
=
new
StringBuffer
(
signature
.
getDeclaringTypeName
()).
append
(
" 【"
+
methodName
+
" before】"
);
StringBuffer
msg
=
new
StringBuffer
(
signature
.
getDeclaringTypeName
()).
append
(
" 【"
+
methodName
+
" before】"
);
if
(!
StringUtil
.
isEmpty
(
description
))
{
if
(!
StringUtil
.
isEmpty
(
description
))
{
msg
.
append
(
description
);
msg
.
append
(
description
);
}
}
if
(!
paramLog
.
isBefore
())
{
if
(!
paramLog
.
isBefore
())
{
LOGGER
.
info
(
msg
.
toString
());
LOGGER
.
info
(
msg
.
toString
());
}
else
{
}
else
{
String
argsJson
=
JSON
.
toJSONString
(
joinPoint
.
getArgs
());
String
argsJson
=
JSON
.
toJSONString
(
joinPoint
.
getArgs
());
LOGGER
.
info
(
msg
.
append
(
",[Args]="
).
append
(
argsJson
).
toString
());
LOGGER
.
info
(
msg
.
append
(
",[Args]="
).
append
(
argsJson
).
toString
());
}
}
}
}
/**
/**
* 方法执行完以后执行
* 方法执行完以后执行
*
*
* @param object
* @param joinPoint
*/
* @param result
@AfterReturning
(
pointcut
=
"bizPoint()"
,
returning
=
"result"
)
*/
public
void
doAfterReturn
(
JoinPoint
joinPoint
,
Object
result
)
{
@AfterReturning
(
pointcut
=
"bizPoint()"
,
returning
=
"result"
)
ParamLog
paramLog
=
checkAnnotation
(
joinPoint
);
public
void
doAfterReturn
(
JoinPoint
joinPoint
,
Object
result
)
{
if
(
paramLog
==
null
)
{
ParamLog
paramLog
=
checkAnnotation
(
joinPoint
);
return
;
if
(
paramLog
==
null
)
{
}
return
;
Signature
signature
=
joinPoint
.
getSignature
();
}
String
methodName
=
signature
.
getName
();
Signature
signature
=
joinPoint
.
getSignature
();
String
description
=
paramLog
.
description
();
String
methodName
=
signature
.
getName
();
description
=
StringUtil
.
isEmpty
(
description
)
?
paramLog
.
value
()
:
description
;
String
description
=
paramLog
.
description
();
StringBuffer
msg
=
new
StringBuffer
(
signature
.
getDeclaringTypeName
())
description
=
StringUtil
.
isEmpty
(
description
)
?
paramLog
.
value
()
:
description
;
.
append
(
" 【"
+
methodName
+
" afterReturn】"
);
StringBuffer
msg
=
new
StringBuffer
(
signature
.
getDeclaringTypeName
())
if
(!
StringUtil
.
isEmpty
(
description
))
{
.
append
(
" 【"
+
methodName
+
" afterReturn】"
);
msg
.
append
(
description
);
if
(!
StringUtil
.
isEmpty
(
description
))
{
}
msg
.
append
(
description
);
if
(!
paramLog
.
isAfterReturn
())
{
}
LOGGER
.
info
(
msg
.
toString
());
if
(!
paramLog
.
isAfterReturn
())
{
}
else
{
LOGGER
.
info
(
msg
.
toString
());
String
resultJson
=
JSON
.
toJSONString
(
result
);
}
else
{
LOGGER
.
info
(
msg
.
append
(
",[result]="
).
append
(
resultJson
).
toString
());
String
resultJson
=
JSON
.
toJSONString
(
result
);
}
LOGGER
.
info
(
msg
.
append
(
",[result]="
).
append
(
resultJson
).
toString
());
}
}
}
private
static
ParamLog
checkAnnotation
(
JoinPoint
joinPoint
)
{
private
static
ParamLog
checkAnnotation
(
JoinPoint
joinPoint
)
{
// 获取方法签名
// 获取方法签名
MethodSignature
signature
=
(
MethodSignature
)
joinPoint
.
getSignature
();
MethodSignature
signature
=
(
MethodSignature
)
joinPoint
.
getSignature
();
// java reflect相关类,通过反射得到注解
// java reflect相关类,通过反射得到注解
Method
method
=
signature
.
getMethod
();
Method
method
=
signature
.
getMethod
();
if
(!
method
.
isAnnotationPresent
(
ParamLog
.
class
))
{
if
(!
method
.
isAnnotationPresent
(
ParamLog
.
class
))
{
return
null
;
return
null
;
}
}
return
method
.
getAnnotation
(
ParamLog
.
class
);
return
method
.
getAnnotation
(
ParamLog
.
class
);
}
}
}
}
pcloud-common-core/src/main/java/com/pcloud/common/core/enums/TranscodeFromEnum.java
View file @
c5b3f90b
...
@@ -9,62 +9,72 @@ package com.pcloud.common.core.enums;
...
@@ -9,62 +9,72 @@ package com.pcloud.common.core.enums;
*/
*/
public
enum
TranscodeFromEnum
{
public
enum
TranscodeFromEnum
{
/**
/**
* 内容中心,office
* 内容中心,office
*/
*/
CONTENT_OFFICE
(
"CONTENT_OFFICE"
),
CONTENT_OFFICE
(
"CONTENT_OFFICE"
),
/**
/**
* 内容中心,PDF
* 内容中心,PDF
*/
*/
CONTENT_PDF
(
"CONTENT_PDF"
),
CONTENT_PDF
(
"CONTENT_PDF"
),
/**
/**
* 内容中心,好文PDF
* 内容中心,好文PDF
*/
*/
CONTENT_ARTICLE_PDF
(
"CONTENT_ARTICLE_PDF"
),
CONTENT_ARTICLE_PDF
(
"CONTENT_ARTICLE_PDF"
),
/**
/**
* 圈子应用
* 圈子应用
*/
*/
GROUPAPP_PDF_OR_OFFICE
(
"GROUPAPP_PDF_OR_OFFICE"
),
GROUPAPP_PDF_OR_OFFICE
(
"GROUPAPP_PDF_OR_OFFICE"
),
/**
/**
* 帮助中心
* 帮助中心
*/
*/
HELPCENTER_PDF
(
"HELPCENTER_PDF"
),
HELPCENTER_PDF
(
"HELPCENTER_PDF"
),
/**
/**
* 直播
* 直播
*/
*/
LIVE_PPT
(
"LIVE_PPT"
),
LIVE_PPT
(
"LIVE_PPT"
),
/**
/**
* 直播
* 直播
*/
*/
LIVE_HOMEWORD
(
"LIVE_HOMEWORD"
),
LIVE_HOMEWORD
(
"LIVE_HOMEWORD"
),
/**
/**
* 音频
* 音频
*/
*/
AUDIOAPP_PDF
(
"AUDIOAPP_PDF"
),
AUDIOAPP_PDF
(
"AUDIOAPP_PDF"
),
/**
/**
* 文件管理中心
* 文件管理中心
*/
*/
CONVERT_PDF
(
"CONVERT_PDF"
);
CONVERT_PDF
(
"CONVERT_PDF"
),
/**
/**
* 值
* 错题本-题目
*/
*/
public
final
String
code
;
NOTE_SUBJECT
(
"NOTE_SUBJECT"
),
/**
/**
* 构造
* 错题本-答案
*
*/
* @param code
NOTE_ANSWER
(
"NOTE_ANSWER"
);
*/
private
TranscodeFromEnum
(
String
code
)
{
/**
this
.
code
=
code
;
* 值
}
*/
public
final
String
code
;
/**
* 构造
*
* @param code
*/
private
TranscodeFromEnum
(
String
code
)
{
this
.
code
=
code
;
}
}
}
pcloud-common/src/main/java/com/pcloud/common/utils/aliyun/OssUtils.java
View file @
c5b3f90b
...
@@ -1693,7 +1693,6 @@ public class OssUtils {
...
@@ -1693,7 +1693,6 @@ public class OssUtils {
style
.
append
(
",image_"
+
new
String
(
Base64
.
encodeBase64URLSafe
(
watermarkImageUrl
.
getBytes
())));
style
.
append
(
",image_"
+
new
String
(
Base64
.
encodeBase64URLSafe
(
watermarkImageUrl
.
getBytes
())));
// 水印颜色,位置,偏移量
// 水印颜色,位置,偏移量
style
.
append
(
",g_nw,x_20,y_10"
);
style
.
append
(
",g_nw,x_20,y_10"
);
System
.
out
.
println
(
style
.
toString
());
String
result
=
imageWatermarkHandle
(
fileUrl
,
style
.
toString
());
String
result
=
imageWatermarkHandle
(
fileUrl
,
style
.
toString
());
LOGGER
.
info
(
"【aliOSS】图片增加水印(图片),<END>.[result]="
+
result
);
LOGGER
.
info
(
"【aliOSS】图片增加水印(图片),<END>.[result]="
+
result
);
return
result
;
return
result
;
...
...
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