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
9b2c7c04
Commit
9b2c7c04
authored
Jul 19, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
34751e3f
01ca486a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
12 deletions
+45
-12
WalletDetailAdminVo.java
...github/wxiaoqi/security/admin/vo/WalletDetailAdminVo.java
+2
-0
WalletPageVo.java
...va/com/github/wxiaoqi/security/admin/vo/WalletPageVo.java
+3
-0
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+14
-7
MyWalletCathBiz.java
...om/github/wxiaoqi/security/admin/biz/MyWalletCathBiz.java
+8
-1
MyWalletDetailBiz.java
.../github/wxiaoqi/security/admin/biz/MyWalletDetailBiz.java
+4
-1
MyWalletCathMapper.java
...hub/wxiaoqi/security/admin/mapper/MyWalletCathMapper.java
+2
-0
MyWalletCathMapper.xml
...ce-admin/src/main/resources/mapper/MyWalletCathMapper.xml
+8
-0
MyWalletDetailMapper.xml
...-admin/src/main/resources/mapper/MyWalletDetailMapper.xml
+3
-2
BannerBiz.java
...er/src/main/java/com/xxfc/platform/app/biz/BannerBiz.java
+1
-1
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/WalletDetailAdminVo.java
View file @
9b2c7c04
...
@@ -49,4 +49,6 @@ public class WalletDetailAdminVo {
...
@@ -49,4 +49,6 @@ public class WalletDetailAdminVo {
@ApiModelProperty
(
value
=
"操作时间"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"操作时间"
,
hidden
=
true
)
private
Long
crtTime
;
private
Long
crtTime
;
private
String
sourceName
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/WalletPageVo.java
View file @
9b2c7c04
...
@@ -30,6 +30,9 @@ public class WalletPageVo {
...
@@ -30,6 +30,9 @@ public class WalletPageVo {
@ApiModelProperty
(
value
=
"已提现金额"
)
@ApiModelProperty
(
value
=
"已提现金额"
)
private
BigDecimal
withdrawals
;
private
BigDecimal
withdrawals
;
@ApiModelProperty
(
"提现中的金额"
)
private
BigDecimal
withdrawaling
;
@ApiModelProperty
(
value
=
"总消费"
)
@ApiModelProperty
(
value
=
"总消费"
)
private
BigDecimal
totalConsumption
;
private
BigDecimal
totalConsumption
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
9b2c7c04
...
@@ -33,6 +33,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
...
@@ -33,6 +33,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
@Autowired
@Autowired
private
MyWalletDetailBiz
myWalletDetailBiz
;
private
MyWalletDetailBiz
myWalletDetailBiz
;
@Autowired
private
MyWalletCathBiz
myWalletCathBiz
;
public
AppletWalletVo
findMyWallet
(
Integer
userId
)
{
public
AppletWalletVo
findMyWallet
(
Integer
userId
)
{
AppletWalletVo
appletWalletVo
=
new
AppletWalletVo
();
AppletWalletVo
appletWalletVo
=
new
AppletWalletVo
();
...
@@ -56,6 +59,10 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
...
@@ -56,6 +59,10 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
return
walletPageVo
;
return
walletPageVo
;
}
}
List
<
Integer
>
userIds
=
wallets
.
stream
().
map
(
WalletListDTO:
:
getUserId
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
BigDecimal
>
userIdAndTotalConsumptionMap
=
myWalletDetailBiz
.
finduserIdAndPersonalTotalConsumptionMapByUserIds
(
userIds
);
Map
<
Integer
,
BigDecimal
>
userIdAndWithdrawalingMap
=
myWalletCathBiz
.
findUserIdAndWithdrawalingMapByUserIds
(
userIds
);
List
<
WalletPageVo
>
walletPageVos
=
new
ArrayList
<>();
List
<
WalletPageVo
>
walletPageVos
=
new
ArrayList
<>();
WalletPageVo
walletpg
;
WalletPageVo
walletpg
;
for
(
WalletListDTO
wallet
:
wallets
)
{
for
(
WalletListDTO
wallet
:
wallets
)
{
...
@@ -63,16 +70,16 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
...
@@ -63,16 +70,16 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
BeanUtils
.
copyProperties
(
wallet
,
walletpg
);
BeanUtils
.
copyProperties
(
wallet
,
walletpg
);
walletpg
.
setUsername
(
StringUtils
.
isEmpty
(
wallet
.
getRealname
())?
wallet
.
getNickname
():
wallet
.
getRealname
());
walletpg
.
setUsername
(
StringUtils
.
isEmpty
(
wallet
.
getRealname
())?
wallet
.
getNickname
():
wallet
.
getRealname
());
walletpg
.
setPhone
(
wallet
.
getUsername
());
walletpg
.
setPhone
(
wallet
.
getUsername
());
BigDecimal
totalConsumpution
=
userIdAndTotalConsumptionMap
==
null
?
new
BigDecimal
(
0
):
userIdAndTotalConsumptionMap
.
get
(
wallet
.
getUserId
())==
null
?
new
BigDecimal
(
0
):
userIdAndTotalConsumptionMap
.
get
(
wallet
.
getUserId
());
BigDecimal
withDrawaling
=
userIdAndWithdrawalingMap
==
null
?
new
BigDecimal
(
0
):
userIdAndWithdrawalingMap
.
get
(
wallet
.
getUserId
())==
null
?
new
BigDecimal
(
0
):
userIdAndWithdrawalingMap
.
get
(
wallet
.
getUserId
());
walletpg
.
setWithdrawaling
(
withDrawaling
);
walletpg
.
setTotalConsumption
(
totalConsumpution
);
walletPageVos
.
add
(
walletpg
);
walletPageVos
.
add
(
walletpg
);
}
}
List
<
Integer
>
userIds
=
wallets
.
stream
().
map
(
WalletListDTO:
:
getUserId
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
BigDecimal
>
userIdAndTotalConsumptionMap
=
myWalletDetailBiz
.
finduserIdAndPersonalTotalConsumptionMapByUserIds
(
userIds
);
Optional
.
ofNullable
(
userIdAndTotalConsumptionMap
).
ifPresent
(
x
->{
for
(
WalletPageVo
wtpg
:
walletPageVos
)
{
wtpg
.
setTotalConsumption
(
x
.
get
(
wtpg
.
getUserId
()));
}
});
walletPageVos
.
sort
(
Comparator
.
comparing
(
WalletPageVo:
:
getTotalAmount
).
reversed
());
walletPageVos
.
sort
(
Comparator
.
comparing
(
WalletPageVo:
:
getTotalAmount
).
reversed
());
walletPageVo
.
setPageNum
(
walletFindDTO
.
getPage
());
walletPageVo
.
setPageNum
(
walletFindDTO
.
getPage
());
walletPageVo
.
setPageSize
(
walletFindDTO
.
getLimit
());
walletPageVo
.
setPageSize
(
walletFindDTO
.
getLimit
());
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletCathBiz.java
View file @
9b2c7c04
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
com.github.wxiaoqi.security.admin.dto.PersonalConsumptionDTO
;
import
com.github.wxiaoqi.security.admin.dto.WalletCathFindDTO
;
import
com.github.wxiaoqi.security.admin.dto.WalletCathFindDTO
;
import
com.github.wxiaoqi.security.admin.dto.WalletCathListDTO
;
import
com.github.wxiaoqi.security.admin.dto.WalletCathListDTO
;
import
com.github.wxiaoqi.security.admin.entity.MyWalletCath
;
import
com.github.wxiaoqi.security.admin.entity.MyWalletCath
;
...
@@ -10,6 +11,7 @@ import com.github.wxiaoqi.security.admin.vo.WalletCathPageVo;
...
@@ -10,6 +11,7 @@ import com.github.wxiaoqi.security.admin.vo.WalletCathPageVo;
import
com.github.wxiaoqi.security.admin.vo.WalletCathVo
;
import
com.github.wxiaoqi.security.admin.vo.WalletCathVo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.google.common.collect.Maps
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -19,6 +21,7 @@ import tk.mybatis.mapper.entity.Example;
...
@@ -19,6 +21,7 @@ import tk.mybatis.mapper.entity.Example;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* @author libin
* @author libin
...
@@ -84,7 +87,6 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
...
@@ -84,7 +87,6 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
PageDataVO
<
WalletCathAdminVo
>
walletCathAdminVoPage
=
new
PageDataVO
<>();
PageDataVO
<
WalletCathAdminVo
>
walletCathAdminVoPage
=
new
PageDataVO
<>();
// List<WalletCathListDTO> walletCathListDTOS = mapper.selectByUserNameOrPhoneOrWithDrawSate(walletCathFindDTO.getUserName(), walletCathFindDTO.getPhone(), walletCathFindDTO.getState());
PageDataVO
<
WalletCathListDTO
>
walletCathListDTOPage
=
PageDataVO
.
pageInfo
(
walletCathFindDTO
.
getPage
(),
PageDataVO
<
WalletCathListDTO
>
walletCathListDTOPage
=
PageDataVO
.
pageInfo
(
walletCathFindDTO
.
getPage
(),
walletCathFindDTO
.
getLimit
(),
walletCathFindDTO
.
getLimit
(),
()
->
mapper
.
selectByUserNameOrPhoneOrWithDrawSate
(
walletCathFindDTO
.
getUsername
(),
walletCathFindDTO
.
getPhone
(),
walletCathFindDTO
.
getState
()));
()
->
mapper
.
selectByUserNameOrPhoneOrWithDrawSate
(
walletCathFindDTO
.
getUsername
(),
walletCathFindDTO
.
getPhone
(),
walletCathFindDTO
.
getState
()));
...
@@ -112,4 +114,9 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
...
@@ -112,4 +114,9 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
return
walletCathAdminVoPage
;
return
walletCathAdminVoPage
;
}
}
public
Map
<
Integer
,
BigDecimal
>
findUserIdAndWithdrawalingMapByUserIds
(
List
<
Integer
>
userIds
)
{
List
<
PersonalConsumptionDTO
>
personalConsumptions
=
mapper
.
findUserWithDrawingByUserIds
(
userIds
);
Map
<
Integer
,
BigDecimal
>
userIdAndPersonalConsumptionMap
=
personalConsumptions
.
stream
().
collect
(
Collectors
.
toMap
(
PersonalConsumptionDTO:
:
getUserId
,
PersonalConsumptionDTO:
:
getTotalConsumption
));
return
userIdAndPersonalConsumptionMap
;
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletDetailBiz.java
View file @
9b2c7c04
...
@@ -14,6 +14,7 @@ import org.apache.commons.collections.CollectionUtils;
...
@@ -14,6 +14,7 @@ import org.apache.commons.collections.CollectionUtils;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -73,13 +74,15 @@ public class MyWalletDetailBiz extends BaseBiz<MyWalletDetailMapper, MyWalletDet
...
@@ -73,13 +74,15 @@ public class MyWalletDetailBiz extends BaseBiz<MyWalletDetailMapper, MyWalletDet
return
pageDataVO
;
return
pageDataVO
;
}
}
List
<
WalletDetailAdminVo
>
walletDetailAdminVos
=
new
ArrayList
<>();
List
<
WalletDetailAdminVo
>
walletDetailAdminVos
=
new
ArrayList
<>();
WalletDetailAdminVo
walletDetailAdminVo
;
WalletDetailAdminVo
walletDetailAdminVo
;
for
(
WalletDetailListDTO
detailListDTO
:
detailListDTOS
)
{
for
(
WalletDetailListDTO
detailListDTO
:
detailListDTOS
)
{
walletDetailAdminVo
=
new
WalletDetailAdminVo
();
walletDetailAdminVo
=
new
WalletDetailAdminVo
();
BeanUtils
.
copyProperties
(
detailListDTO
,
walletDetailAdminVo
);
BeanUtils
.
copyProperties
(
detailListDTO
,
walletDetailAdminVo
);
walletDetailAdminVo
.
setUsername
(
StringUtils
.
isEmpty
(
detailListDTO
.
getRealname
())?
detailListDTO
.
getNickname
():
detailListDTO
.
getRealname
());
walletDetailAdminVos
.
add
(
walletDetailAdminVo
);
walletDetailAdminVos
.
add
(
walletDetailAdminVo
);
walletDetailAdminVo
.
setSourceName
(
StringUtils
.
isEmpty
(
detailListDTO
.
getTitle
())?
detailListDTO
.
getActivityName
():
detailListDTO
.
getTitle
());
}
}
pageDataVO
.
setPageNum
(
walletDetailFindDTO
.
getPage
());
pageDataVO
.
setPageNum
(
walletDetailFindDTO
.
getPage
());
pageDataVO
.
setPageSize
(
walletDetailFindDTO
.
getLimit
());
pageDataVO
.
setPageSize
(
walletDetailFindDTO
.
getLimit
());
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/MyWalletCathMapper.java
View file @
9b2c7c04
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
mapper
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
mapper
;
import
com.github.wxiaoqi.security.admin.dto.PersonalConsumptionDTO
;
import
com.github.wxiaoqi.security.admin.dto.WalletCathListDTO
;
import
com.github.wxiaoqi.security.admin.dto.WalletCathListDTO
;
import
com.github.wxiaoqi.security.admin.entity.MyWalletCath
;
import
com.github.wxiaoqi.security.admin.entity.MyWalletCath
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -20,4 +21,5 @@ public interface MyWalletCathMapper extends Mapper<MyWalletCath> {
...
@@ -20,4 +21,5 @@ public interface MyWalletCathMapper extends Mapper<MyWalletCath> {
@Param
(
"phone"
)
String
phone
,
@Param
(
"phone"
)
String
phone
,
@Param
(
"state"
)
Integer
state
);
@Param
(
"state"
)
Integer
state
);
List
<
PersonalConsumptionDTO
>
findUserWithDrawingByUserIds
(
@Param
(
"userIds"
)
List
<
Integer
>
userIds
);
}
}
ace-modules/ace-admin/src/main/resources/mapper/MyWalletCathMapper.xml
View file @
9b2c7c04
...
@@ -26,4 +26,12 @@
...
@@ -26,4 +26,12 @@
WHERE nickname =#{userName} OR realname =#{userName}
WHERE nickname =#{userName} OR realname =#{userName}
</if>
) AS `aud` ON aud.userid = aul.id
</if>
) AS `aud` ON aud.userid = aul.id
</select>
</select>
<select
id=
"findUserWithDrawingByUserIds"
resultType=
"com.github.wxiaoqi.security.admin.dto.PersonalConsumptionDTO"
>
select `user_id` AS `userId`,SUM(amount) AS `totalConsumption` from `my_wallet_cath` where `stauts`=0 AND `user_id` in
<foreach
collection=
"userIds"
item=
"userId"
open=
"("
close=
")"
separator=
","
>
#{userId}
</foreach>
GROUP BY `user_id`
</select>
</mapper>
</mapper>
\ No newline at end of file
ace-modules/ace-admin/src/main/resources/mapper/MyWalletDetailMapper.xml
View file @
9b2c7c04
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
wd.itype,
wd.itype,
wd.activity_id AS `activityId`,
wd.activity_id AS `activityId`,
wd.activity_name AS `activityName`,
wd.activity_name AS `activityName`,
aul.username,
wd.crt_time AS `crtTime`,
aul.username AS `phone`,
aud.nickname,
aud.nickname,
aud.realname,
aud.realname,
ausw.price,
ausw.price,
...
@@ -19,7 +20,7 @@
...
@@ -19,7 +20,7 @@
ausw.waiting,
ausw.waiting,
ausw.title
ausw.title
FROM
FROM
(select id,user_id,source,amount,cono,itype,activity_id,activity_name FROM `my_wallet_detail`
<if
test=
"sourceType != null"
>
(select id,user_id,source,amount,cono,itype,activity_id,activity_name
,`crt_time`
FROM `my_wallet_detail`
<if
test=
"sourceType != null"
>
WHERE `source`=#{sourceType}
WHERE `source`=#{sourceType}
</if>
) AS `wd`
</if>
) AS `wd`
LEFT JOIN (SELECT id,username FROM `app_user_login`
<if
test=
"phone != null and phone != ''"
>
LEFT JOIN (SELECT id,username FROM `app_user_login`
<if
test=
"phone != null and phone != ''"
>
...
...
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/BannerBiz.java
View file @
9b2c7c04
...
@@ -38,7 +38,7 @@ public class BannerBiz extends BaseBiz<BannerMapper,Banner> {
...
@@ -38,7 +38,7 @@ public class BannerBiz extends BaseBiz<BannerMapper,Banner> {
banners
.
forEach
(
banner
->
{
banners
.
forEach
(
banner
->
{
BannerVo
bannerVo
=
new
BannerVo
();
BannerVo
bannerVo
=
new
BannerVo
();
bannerVo
.
setCover
(
banner
.
getCover
());
bannerVo
.
setCover
(
banner
.
getCover
());
banner
.
setUrl
(
banner
.
getUrl
());
banner
Vo
.
setUrl
(
banner
.
getUrl
());
bannerVos
.
add
(
bannerVo
);
bannerVos
.
add
(
bannerVo
);
});
});
return
bannerVos
;
return
bannerVos
;
...
...
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