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
7adb9148
Commit
7adb9148
authored
Oct 14, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-walletdetail'
parents
ee8a11f8
0cbaea6c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
7 deletions
+80
-7
WalletDetailTypeEnum.java
...wxiaoqi/security/admin/constant/WalletDetailTypeEnum.java
+63
-0
BaseUserMemberLevel.java
...ub/wxiaoqi/security/admin/entity/BaseUserMemberLevel.java
+1
-1
WalletDetailPageVo.java
.../github/wxiaoqi/security/admin/vo/WalletDetailPageVo.java
+3
-0
MyWalletDetailBiz.java
.../github/wxiaoqi/security/admin/biz/MyWalletDetailBiz.java
+13
-6
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/constant/WalletDetailTypeEnum.java
0 → 100644
View file @
7adb9148
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
constant
;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/10/12 14:27
*/
public
enum
WalletDetailTypeEnum
{
/**
* 活动
*/
ACTIVITY
(
0
,
"活动奖励金"
),
/**
* 佣金
*/
COMMISSION
(
1
,
"佣金"
),
/**
* 会员充值
*/
MEMBER
(
2
,
"会员充值"
),
/**
* 提现
*/
WITHDRAW
(
10
,
"提现"
),
/**
* 转账
*/
TRANSFER
(
11
,
"转账"
),
/**
* 购买
*/
BUY
(
12
,
"购买"
),
/**
* 手续费
*/
SERVICE_CHARGE
(
13
,
"手续费"
);
private
Integer
code
;
private
String
desc
;
WalletDetailTypeEnum
(
Integer
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/BaseUserMemberLevel.java
View file @
7adb9148
...
...
@@ -75,6 +75,6 @@ public class BaseUserMemberLevel implements Serializable {
@Column
(
name
=
"number"
)
@ApiModelProperty
(
value
=
"赠送免费天数"
)
private
Integer
number
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/WalletDetailPageVo.java
View file @
7adb9148
...
...
@@ -47,4 +47,7 @@ public class WalletDetailPageVo {
@ApiModelProperty
(
value
=
"操作时间"
,
hidden
=
true
)
private
Long
crtTime
;
@ApiModelProperty
(
"描述"
)
private
String
desc
;
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletDetailBiz.java
View file @
7adb9148
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
com.github.wxiaoqi.security.admin.constant.WalletDetailTypeEnum
;
import
com.github.wxiaoqi.security.admin.dto.PersonalConsumptionDTO
;
import
com.github.wxiaoqi.security.admin.dto.WalletDetailFindDTO
;
import
com.github.wxiaoqi.security.admin.dto.WalletDetailListDTO
;
...
...
@@ -12,17 +13,15 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import
lombok.Data
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
tk.mybatis.mapper.entity.Example
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -35,7 +34,9 @@ import java.util.stream.Collectors;
@Transactional
@Service
@Data
public
class
MyWalletDetailBiz
extends
BaseBiz
<
MyWalletDetailMapper
,
MyWalletDetail
>
{
public
class
MyWalletDetailBiz
extends
BaseBiz
<
MyWalletDetailMapper
,
MyWalletDetail
>
implements
InitializingBean
{
private
Map
<
Integer
,
WalletDetailTypeEnum
>
typeEnumMap
;
public
PageDataVO
<
WalletDetailPageVo
>
findWalletDetailPage
(
Integer
userId
,
Integer
pageNo
,
Integer
pageSize
){
...
...
@@ -56,6 +57,7 @@ public class MyWalletDetailBiz extends BaseBiz<MyWalletDetailMapper, MyWalletDet
for
(
MyWalletDetail
walletDetailPage
:
walletDetails
)
{
walletDetail
=
new
WalletDetailPageVo
();
BeanUtils
.
copyProperties
(
walletDetailPage
,
walletDetail
);
walletDetail
.
setDesc
(
typeEnumMap
.
get
(
walletDetail
.
getSource
()).
getDesc
());
walletDetailPageVoList
.
add
(
walletDetail
);
}
walletDetailPageVo
.
setTotalPage
(
walletDetailPageVoPageDataVO
.
getTotalPage
());
...
...
@@ -101,4 +103,9 @@ public class MyWalletDetailBiz extends BaseBiz<MyWalletDetailMapper, MyWalletDet
Map
<
Integer
,
BigDecimal
>
userIdAndPersonalConsumptionMap
=
personalConsumptions
.
stream
().
collect
(
Collectors
.
toMap
(
PersonalConsumptionDTO:
:
getUserId
,
PersonalConsumptionDTO:
:
getTotalConsumption
));
return
userIdAndPersonalConsumptionMap
;
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
typeEnumMap
=
EnumSet
.
allOf
(
WalletDetailTypeEnum
.
class
).
stream
().
collect
(
Collectors
.
toMap
(
WalletDetailTypeEnum:
:
getCode
,
Function
.
identity
()));
}
}
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