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
32238d09
Commit
32238d09
authored
Sep 20, 2024
by
YG8429
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权益金日志记录修改查询接口
parent
6ef50a1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
15 deletions
+26
-15
EquityFundLogServiceImpl.java
...a/share/system/service/impl/EquityFundLogServiceImpl.java
+12
-5
SharingActivitiesServiceImpl.java
...are/system/service/impl/SharingActivitiesServiceImpl.java
+13
-6
EquityFundLogMapper.xml
.../src/main/resources/mapper/system/EquityFundLogMapper.xml
+1
-4
No files found.
share-system/src/main/java/share/system/service/impl/EquityFundLogServiceImpl.java
View file @
32238d09
...
...
@@ -3,12 +3,14 @@ package share.system.service.impl;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
share.common.core.page.TableDataInfo
;
import
share.common.utils.DateUtils
;
...
...
@@ -131,7 +133,7 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
List
<
EquityFundLogVo
>
voList
=
new
ArrayList
<>();
List
<
EquityFundLog
>
activities
=(
List
<
EquityFundLog
>)
info
.
getRows
();
if
(
CollectionUtils
.
isEmpty
(
activities
))
return
info
;
List
<
Long
>
collect
=
activities
.
stream
().
map
(
EquityFundLog:
:
getNewUid
).
collect
(
Collectors
.
toList
());
List
<
Long
>
uids
=
activities
.
stream
().
map
(
EquityFundLog:
:
getUid
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
SConsumer
>
newSConsumer
=
new
LambdaQueryWrapper
<
SConsumer
>();
...
...
@@ -139,16 +141,16 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
newSConsumer
.
in
(
SConsumer:
:
getId
,
collect
);
uSConsumer
.
in
(
SConsumer:
:
getId
,
uids
);
if
(
StringUtils
.
isNotEmpty
(
equityFundLog
.
getNewNickName
())){
newSConsumer
.
eq
(
SConsumer:
:
getNickName
,
equityFundLog
.
getNewNickName
());
newSConsumer
.
like
(
SConsumer:
:
getNickName
,
equityFundLog
.
getNewNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
equityFundLog
.
getNewPhone
())){
newSConsumer
.
eq
(
SConsumer:
:
getPhone
,
equityFundLog
.
getNewPhone
());
newSConsumer
.
like
(
SConsumer:
:
getPhone
,
equityFundLog
.
getNewPhone
());
}
if
(
StringUtils
.
isNotEmpty
(
equityFundLog
.
getNickName
())){
uSConsumer
.
eq
(
SConsumer:
:
getNickName
,
equityFundLog
.
getNickName
());
uSConsumer
.
like
(
SConsumer:
:
getNickName
,
equityFundLog
.
getNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
equityFundLog
.
getPhone
())){
uSConsumer
.
eq
(
SConsumer:
:
getPhone
,
equityFundLog
.
getPhone
());
uSConsumer
.
like
(
SConsumer:
:
getPhone
,
equityFundLog
.
getPhone
());
}
Map
<
Long
,
SConsumer
>
newUserMap
=
sConsumerService
.
list
(
newSConsumer
)
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
...
...
@@ -157,6 +159,11 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
activities
.
stream
().
forEach
(
item
->{
EquityFundLogVo
vo
=
new
EquityFundLogVo
();
BeanUtils
.
copyProperties
(
item
,
vo
);
Set
<
Long
>
longs
=
userMap
.
keySet
();
Set
<
Long
>
longs1
=
newUserMap
.
keySet
();
if
(!(
longs
.
contains
(
item
.
getUid
())
&&
longs1
.
contains
(
item
.
getNewUid
()))){
return
;
}
SConsumer
newConsumer
=
newUserMap
.
get
(
item
.
getNewUid
());
SConsumer
uConsumer
=
userMap
.
get
(
item
.
getUid
());
if
(
ObjectUtil
.
isNotEmpty
(
newConsumer
)){
...
...
share-system/src/main/java/share/system/service/impl/SharingActivitiesServiceImpl.java
View file @
32238d09
...
...
@@ -8,6 +8,7 @@ import java.util.stream.Collectors;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.poi.hssf.record.DVALRecord
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.data.redis.core.RedisTemplate
;
...
...
@@ -144,26 +145,27 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
public
TableDataInfo
pageList
(
TableDataInfo
info
,
SharingActivitiesVo
sharingActivities
)
{
List
<
SharingActivitiesVo
>
voList
=
new
ArrayList
<>();
List
<
SharingActivities
>
activities
=(
List
<
SharingActivities
>)
info
.
getRows
();
if
(
CollectionUtils
.
isEmpty
(
activities
)){
return
info
;
}
List
<
Long
>
collect
=
activities
.
stream
().
map
(
SharingActivities:
:
getNewUid
).
collect
(
Collectors
.
toList
());
List
<
Long
>
uids
=
activities
.
stream
().
map
(
SharingActivities:
:
getUid
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
SConsumer
>
newSConsumer
=
new
LambdaQueryWrapper
<
SConsumer
>();
LambdaQueryWrapper
<
SConsumer
>
uSConsumer
=
new
LambdaQueryWrapper
<
SConsumer
>();
newSConsumer
.
in
(
SConsumer:
:
getId
,
collect
);
uSConsumer
.
in
(
SConsumer:
:
getId
,
uids
);
if
(
StringUtils
.
isNotEmpty
(
sharingActivities
.
getNewNickName
())){
newSConsumer
.
eq
(
SConsumer:
:
getNickName
,
sharingActivities
.
getNewNickName
());
newSConsumer
.
like
(
SConsumer:
:
getNickName
,
sharingActivities
.
getNewNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
sharingActivities
.
getNewPhone
())){
newSConsumer
.
eq
(
SConsumer:
:
getPhone
,
sharingActivities
.
getNewPhone
());
newSConsumer
.
like
(
SConsumer:
:
getPhone
,
sharingActivities
.
getNewPhone
());
}
if
(
StringUtils
.
isNotEmpty
(
sharingActivities
.
getNickName
())){
uSConsumer
.
eq
(
SConsumer:
:
getNickName
,
sharingActivities
.
getNickName
());
uSConsumer
.
like
(
SConsumer:
:
getNickName
,
sharingActivities
.
getNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
sharingActivities
.
getPhone
())){
uSConsumer
.
eq
(
SConsumer:
:
getPhone
,
sharingActivities
.
getPhone
());
uSConsumer
.
like
(
SConsumer:
:
getPhone
,
sharingActivities
.
getPhone
());
}
Map
<
Long
,
SConsumer
>
newUserMap
=
sConsumerService
.
list
(
newSConsumer
)
...
...
@@ -173,6 +175,11 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
activities
.
stream
().
forEach
(
item
->{
SharingActivitiesVo
vo
=
new
SharingActivitiesVo
();
BeanUtils
.
copyProperties
(
item
,
vo
);
Set
<
Long
>
longs
=
userMap
.
keySet
();
Set
<
Long
>
longs1
=
newUserMap
.
keySet
();
if
(!(
longs
.
contains
(
item
.
getUid
())
&&
longs1
.
contains
(
item
.
getNewUid
()))){
return
;
}
SConsumer
newConsumer
=
newUserMap
.
get
(
item
.
getNewUid
());
SConsumer
uConsumer
=
userMap
.
get
(
item
.
getUid
());
if
(
ObjectUtil
.
isNotEmpty
(
newConsumer
)){
...
...
share-system/src/main/resources/mapper/system/EquityFundLogMapper.xml
View file @
32238d09
...
...
@@ -21,14 +21,12 @@
</resultMap>
<sql
id=
"selectEquityFundLogVo"
>
-- select id, equity_fund_type, equity_fund, uid, new_uid, terminal_trace, out_trade_no, is_delete, create_by, create_time, update_by, update_time, remark, phone, account, nick_name, new_phone, new_account, new_nick_name, avatar, new_avatar from s_equity_fund_log
select id, equity_fund_type, equity_fund, uid, new_uid, terminal_trace, out_trade_no, is_delete, create_by, create_time, update_by, update_time, remark from s_equity_fund_log
</sql>
<select
id=
"selectEquityFundLogList"
parameterType=
"EquityFundLog"
resultMap=
"EquityFundLogResult"
>
<include
refid=
"selectEquityFundLogVo"
/>
<where>
where 1=1
<if
test=
"equityFundType != null and equityFundType != ''"
>
and equity_fund_type = #{equityFundType}
</if>
<if
test=
"equityFund != null "
>
and equity_fund = #{equityFund}
</if>
<if
test=
"uid != null "
>
and uid = #{uid}
</if>
...
...
@@ -36,7 +34,6 @@
<if
test=
"terminalTrace != null and terminalTrace != ''"
>
and terminal_trace = #{terminalTrace}
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
and out_trade_no = #{outTradeNo}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
</where>
order by create_time desc
</select>
...
...
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