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
485d1cf5
Commit
485d1cf5
authored
Nov 12, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分公司删除bug
parent
ed515b7a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
0 deletions
+71
-0
pom.xml
ace-common/pom.xml
+4
-0
AcceptFilter.java
...m/github/wxiaoqi/security/common/filter/AcceptFilter.java
+15
-0
MailServiceImpl.java
...hub/wxiaoqi/security/common/log/Impl/MailServiceImpl.java
+32
-0
SystemConfig.java
...ub/wxiaoqi/security/common/util/process/SystemConfig.java
+8
-0
systemconfig.properties
...mon/src/main/resources/properties/systemconfig.properties
+9
-0
OrderDepositRefundRecordBiz.java
.../xxfc/platform/order/biz/OrderDepositRefundRecordBiz.java
+3
-0
No files found.
ace-common/pom.xml
View file @
485d1cf5
...
...
@@ -38,6 +38,10 @@
<artifactId>
spring-cloud-sleuth-zipkin
</artifactId>
<version>
2.1.0.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-mail
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-sentinel
</artifactId>
...
...
ace-common/src/main/java/com/github/wxiaoqi/security/common/filter/AcceptFilter.java
View file @
485d1cf5
...
...
@@ -3,11 +3,26 @@ package com.github.wxiaoqi.security.common.filter;
import
ch.qos.logback.classic.spi.ILoggingEvent
;
import
ch.qos.logback.core.filter.Filter
;
import
ch.qos.logback.core.spi.FilterReply
;
import
com.github.wxiaoqi.security.common.log.Impl.MailServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
@Slf4j
public
class
AcceptFilter
extends
Filter
<
ILoggingEvent
>
{
@Autowired
MailServiceImpl
mailService
;
@Override
public
FilterReply
decide
(
ILoggingEvent
event
)
{
if
(
event
.
getLoggerName
().
startsWith
(
"com.xxfc.platform"
)
||
event
.
getLoggerName
().
startsWith
(
"com.github.wxiaoqi"
)
||
event
.
getLoggerName
().
contains
(
"Exception"
))
{
if
(
event
.
getLoggerName
().
contains
(
"Exception"
)
||
event
.
getLoggerName
().
contains
(
"ERROR"
))
{
//邮件日志
try
{
mailService
.
sendSimpleMail
(
"jiaoruizhen@126.com"
,
"服务器异常"
,
event
.
getLoggerName
()
+
":"
+
event
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
"发送异常邮件失败,异常信息: {}"
,
e
);
}
}
return
FilterReply
.
ACCEPT
;
}
else
{
return
FilterReply
.
DENY
;
...
...
ace-common/src/main/java/com/github/wxiaoqi/security/common/log/Impl/MailServiceImpl.java
0 → 100644
View file @
485d1cf5
package
com
.
github
.
wxiaoqi
.
security
.
common
.
log
.
Impl
;
import
com.github.wxiaoqi.security.common.util.process.SystemConfig
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.mail.SimpleMailMessage
;
import
org.springframework.mail.javamail.JavaMailSender
;
import
org.springframework.stereotype.Service
;
@Service
@Slf4j
public
class
MailServiceImpl
{
@Autowired
private
JavaMailSender
mailSender
;
public
void
sendSimpleMail
(
String
to
,
String
subject
,
String
content
)
{
SimpleMailMessage
message
=
new
SimpleMailMessage
();
message
.
setFrom
(
SystemConfig
.
EMAILADDRESS
);
message
.
setTo
(
to
);
message
.
setSubject
(
subject
);
message
.
setText
(
content
);
try
{
mailSender
.
send
(
message
);
log
.
info
(
"简单邮件已经发送。"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"发送简单邮件时发生异常!"
,
e
);
}
}
}
\ No newline at end of file
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/process/SystemConfig.java
View file @
485d1cf5
...
...
@@ -92,4 +92,12 @@ public class SystemConfig {
public
static
final
String
ALIPAY
=
"alipay"
;
public
static
final
String
WXPAY
=
"wxpay"
;
/**
* 邮件服务配置
*/
public
static
String
EMAILADDRESS
=
SystemProperty
.
getConfig
(
"mail.fromMail.addr"
);
}
ace-common/src/main/resources/properties/systemconfig.properties
View file @
485d1cf5
...
...
@@ -21,6 +21,15 @@ SIGNNAME=滴房车
WINXIN_AppID
=
wx425608b69a34736f
WINXIN_PARTNER_KEY
=
xxfcXXDfangche74upyuns3AD4334533
WINXIN_PARTNER
=
1539689201
#邮件配置
mail.fromMail.addr
=
1367272022@qq.com
spring.mail.host
=
smtp.qq.com
spring.mail.password
=
ykfopfvlfpbyhccc // 授权密码,非登录密码
spring.mail.properties.smtp.auth
=
true
spring.mail.properties.smtp.timeout
=
25000
spring.mail.username
=
1367272022@qq.com
#ios
APP_ID_IOS
=
wx3f51779d49171d63
APP_PARTNER_IOS
=
1492557632
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderDepositRefundRecordBiz.java
View file @
485d1cf5
...
...
@@ -51,11 +51,13 @@ public class OrderDepositRefundRecordBiz extends BaseBiz<DepositRefundRecordMapp
*/
@Transactional
public
void
saveNormalRecord
(
DepositRefundRecord
depositRefundRecord
)
{
log
.
info
(
"正常还车,添加押金记录: depositRefundRecord = {}"
,
depositRefundRecord
.
toString
());
depositRefundRecord
.
setStatus
(
DepositRefundStatus
.
INITIATEREFUND
.
getCode
());
depositRefundRecord
.
setIscomplete
(
true
);
insertSelectiveRe
(
depositRefundRecord
);
depositRefundRecord
.
setStatus
(
DepositRefundStatus
.
REFUNDARRIVAL
.
getCode
());
depositRefundRecord
.
setIscomplete
(
false
);
depositRefundRecord
.
setRestAmount
(
depositRefundRecord
.
getTotalAmount
().
subtract
(
depositRefundRecord
.
getAmount
()));
insertSelectiveRe
(
depositRefundRecord
);
depositRefundRecord
.
setStatus
(
DepositRefundStatus
.
VIOLATIONARRIVAL
.
getCode
());
depositRefundRecord
.
setRestAmount
(
getAmount
());
...
...
@@ -68,6 +70,7 @@ public class OrderDepositRefundRecordBiz extends BaseBiz<DepositRefundRecordMapp
*/
@Transactional
public
void
saveFixLossRecord
(
DepositRefundRecord
depositRefundRecord
)
{
log
.
info
(
"定损还车,添加押金记录: depositRefundRecord = {}"
,
depositRefundRecord
.
toString
());
depositRefundRecord
.
setStatus
(
DepositRefundStatus
.
FIXLOSS
.
getCode
());
depositRefundRecord
.
setIscomplete
(
true
);
insertSelectiveRe
(
depositRefundRecord
);
...
...
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