Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
pseer
gxpt_ht
Commits
7aac8d48
Commit
7aac8d48
authored
Jan 10, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠卷日志只在核销劵的方法保存
parent
803b62b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
QPServiceImplAspect.java
...ain/java/share/framework/aspectj/QPServiceImplAspect.java
+18
-16
No files found.
share-framework/src/main/java/share/framework/aspectj/QPServiceImplAspect.java
View file @
7aac8d48
package
share
.
framework
.
aspectj
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -89,21 +90,22 @@ public class QPServiceImplAspect {
JSONObject
jsonObject
=
JSON
.
parseObject
(
params
);
//获得出参
String
outParams
=
JSON
.
toJSONString
(
result
);
// if(methodName.equals("consume"))
{
saveLog
(
couponLog
,
jsonObject
);
couponLog
.
setStatus
(
YesNoEnum
.
yes
.
getDisplay_3
());
couponLog
.
setMessage
(
outParams
);
couponLog
.
setCreateTime
(
new
Date
());
// 异步执行
CompletableFuture
.
supplyAsync
(()
->
{
int
i
=
couponLogService
.
insertCouponLog
(
couponLog
);
if
(
i
>
0
)
{
return
true
;
}
else
{
return
false
;
}
});
if
(
methodName
.
equals
(
"consume"
))
{
saveLog
(
couponLog
,
jsonObject
);
couponLog
.
setStatus
(
YesNoEnum
.
yes
.
getDisplay_3
());
couponLog
.
setMessage
(
outParams
);
couponLog
.
setCreateTime
(
new
Date
());
// 异步执行
CompletableFuture
.
supplyAsync
(()
->
{
int
i
=
couponLogService
.
insertCouponLog
(
couponLog
);
if
(
i
>
0
)
{
return
true
;
}
else
{
return
false
;
}
});
// }
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -127,7 +129,7 @@ public class QPServiceImplAspect {
String
params
=
argsArrayToString
(
paramNames
,
joinPoint
.
getArgs
());
//转JSON
JSONObject
jsonObject
=
JSON
.
parseObject
(
params
);
// if
(methodName.equals("consume")) {
if
(
methodName
.
equals
(
"consume"
))
{
saveLog
(
couponLog
,
jsonObject
);
couponLog
.
setStatus
(
YesNoEnum
.
no
.
getDisplay_3
());
couponLog
.
setNumber
(
tryCount
);
...
...
@@ -142,7 +144,7 @@ public class QPServiceImplAspect {
return
false
;
}
});
//
}
}
}
catch
(
Exception
e2
)
{
e2
.
printStackTrace
();
}
...
...
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