Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
Project
Project
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
licc
data-server
Commits
b9749a7d
Commit
b9749a7d
authored
Mar 03, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
钱包接口,提现记录接口实现
parent
d9bae3fc
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
341 additions
and
36 deletions
+341
-36
LastAccountMapper.java
.../src/main/java/cn/wisenergy/mapper/LastAccountMapper.java
+18
-0
TradeRecordMapper.java
.../src/main/java/cn/wisenergy/mapper/TradeRecordMapper.java
+20
-1
LastAccountMapper.xml
...gy-mapper/src/main/resources/mapper/LastAccountMapper.xml
+71
-0
TradeRecordMapper.xml
...gy-mapper/src/main/resources/mapper/TradeRecordMapper.xml
+35
-2
LastMonthAccount.java
...rc/main/java/cn/wisenergy/model/app/LastMonthAccount.java
+79
-0
WithdrawalAmountVo.java
...c/main/java/cn/wisenergy/model/vo/WithdrawalAmountVo.java
+9
-2
WithdrawalRecordVo.java
...c/main/java/cn/wisenergy/model/vo/WithdrawalRecordVo.java
+42
-0
WalletService.java
...src/main/java/cn/wisenergy/service/app/WalletService.java
+10
-4
WalletServiceImpl.java
...java/cn/wisenergy/service/app/impl/WalletServiceImpl.java
+40
-23
WalletController.java
.../wisenergy/web/admin/controller/app/WalletController.java
+17
-4
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/LastAccountMapper.java
0 → 100644
View file @
b9749a7d
package
cn
.
wisenergy
.
mapper
;
import
cn.wisenergy.model.app.AccountInfo
;
import
cn.wisenergy.model.app.LastMonthAccount
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
public
interface
LastAccountMapper
extends
BaseMapper
<
LastMonthAccount
>
{
/**
* 通过userId 和 yearMonth获取账户信息
*
* @param userId 用户id
* @param yearMonth 年月
* @return 账户信息
*/
LastMonthAccount
getByUserIdAndTime
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"yearMonth"
)
String
yearMonth
);
}
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/TradeRecordMapper.java
View file @
b9749a7d
package
cn
.
wisenergy
.
mapper
;
package
cn
.
wisenergy
.
mapper
;
import
cn.wisenergy.model.app.TradeRecord
;
import
cn.wisenergy.model.app.TradeRecord
;
import
cn.wisenergy.model.vo.AccumulatedIncomeVo
;
import
cn.wisenergy.model.vo.WithdrawalRecordVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -44,5 +47,21 @@ public interface TradeRecordMapper extends BaseMapper<TradeRecord> {
...
@@ -44,5 +47,21 @@ public interface TradeRecordMapper extends BaseMapper<TradeRecord> {
* @param userId 用户id
* @param userId 用户id
* @return 用户交易列表
* @return 用户交易列表
*/
*/
List
<
TradeRecord
>
getByUserIdAndTime
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"yearMonth"
)
String
yearMonth
);
List
<
TradeRecord
>
getByUserIdAndTime
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"yearMonth"
)
Date
yearMonth
);
/**
* 获取不包括本月的六个月的累计收益
* @param userId 用户id
* @return 累计收益
*/
List
<
AccumulatedIncomeVo
>
getSixMonthIncome
(
@Param
(
"userId"
)
String
userId
);
/**
* 根据用户id 或 年月 ,获取用户本月交易提现列表
* @param userId 用户id
* @param yearMonth 年月
* @return 交易列表
*/
List
<
WithdrawalRecordVo
>
getWithdrawalRecord
(
@Param
(
"userId"
)
String
userId
,
Date
yearMonth
);
}
}
wisenergy-mapper/src/main/resources/mapper/LastAccountMapper.xml
0 → 100644
View file @
b9749a7d
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wisenergy.mapper.LastAccountMapper"
>
<resultMap
id=
"AccountMap"
type=
"cn.wisenergy.model.app.LastMonthAccount"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"user_level"
property=
"userLevel"
/>
<result
column=
"year_month"
property=
"yearMonth"
/>
<result
column=
"extract_money"
property=
"extractMoney"
/>
<result
column=
"earnings_month"
property=
"earningsMonth"
/>
<result
column=
"frozen_money"
property=
"frozenMoney"
/>
<result
column=
"earnings_total"
property=
"earningsTotal"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"table"
>
last_month_account_info
</sql>
<sql
id=
"cols_all"
>
id,
<include
refid=
"cols_exclude_id"
/>
</sql>
<sql
id=
"cols_exclude_id"
>
user_id,user_level,year_month,extract_money,earnings_month,frozen_money,earnings_total,create_time,update_time
</sql>
<sql
id=
"vals"
>
#{userId},#{userLevel},#{yearMonth},#{extractMoney},#{earningsMonth},#{frozenMoney},
#{earningsTotal},now(),now()
</sql>
<sql
id=
"updateCondition"
>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"userLevel != null"
>
user_level = #{userLevel},
</if>
<if
test=
"yearMonth != null"
>
year_month =#{yearMonth},
</if>
<if
test=
"extractMoney != null"
>
extract_money =#{extractMoney},
</if>
<if
test=
"earningsMonth != null"
>
earnings_month =#{earningsMonth},
</if>
<if
test=
"frozenMoney != null"
>
frozen_money =#{frozenMoney},
</if>
<if
test=
"earningsTotal != null"
>
earnings_total =#{earningsTotal},
</if>
update_time =now()
</sql>
<sql
id=
"criteria"
>
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"userId != null"
>
and user_id = #{userId}
</if>
<if
test=
"userLevel != null"
>
and user_level = #{userLevel}
</if>
<if
test=
"yearMonth != null"
>
and year_month =#{yearMonth}
</if>
<if
test=
"extractMoney != null"
>
and extract_money =#{extractMoney}
</if>
<if
test=
"earningsMonth != null"
>
and earnings_month =#{earningsMonth}
</if>
<if
test=
"frozenMoney != null"
>
and frozen_money =#{frozenMoney}
</if>
<if
test=
"earningsTotal != null"
>
and earnings_total =#{earningsTotal}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
</sql>
<select
id=
"getByUserIdAndTime"
resultType=
"cn.wisenergy.model.app.LastMonthAccount"
>
select
<include
refid=
"cols_all"
/>
from
<include
refid=
"table"
/>
<where>
user_id=#{userId}
and year_month=#{yearMonth}
</where>
</select>
</mapper>
\ No newline at end of file
wisenergy-mapper/src/main/resources/mapper/TradeRecordMapper.xml
View file @
b9749a7d
...
@@ -90,8 +90,41 @@
...
@@ -90,8 +90,41 @@
from
from
<include
refid=
"table"
/>
<include
refid=
"table"
/>
<where>
<where>
user_id=#{userId}
<if
test=
"userId"
>
and year_time=#{yearTime}
user_id=#{userId}
</if>
<if
test=
"yearMonth != null"
>
AND(
YEAR(year_month) = YEAR(#{yearMonth})
AND MONTH(year_month) = MONTH(#{yearMonth}))
</if>
</where>
</select>
<select
id=
"getSixMonthIncome"
resultType=
"cn.wisenergy.model.vo.AccumulatedIncomeVo"
>
SELECT user_id as userId,sum(money) as income ,
date_format(create_time,'%Y-%m') as yearMonth
FROM
<include
refid=
"table"
/>
WHERE date_format(create_time,'%Y-%m')
<
date_format(now(),'%Y-%m')
and date_format(create_time,'%Y-%m') >= date_format(now() - interval 7 month,'%Y-%m')
and (status=1 or status=3)
group by user_id ,create_time desc;
</select>
<select
id=
"getWithdrawalRecord"
resultType=
"cn.wisenergy.model.vo.WithdrawalRecordVo"
>
select user_id as userId, status as status, money as money, update_time as moneyTime
from
<include
refid=
"table"
/>
<where>
<if
test=
"userId"
>
user_id=#{userId}
</if>
<if
test=
"yearMonth != null"
>
AND(
YEAR(update_time) = YEAR(#{yearMonth})
AND MONTH(update_time) = MONTH(#{yearMonth}))
</if>
</where>
</where>
</select>
</select>
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/LastMonthAccount.java
0 → 100644
View file @
b9749a7d
package
cn
.
wisenergy
.
model
.
app
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
*@ Description: 上月账户实体类
*@ Author : 86187
*@ Date : 2021/3/3 11:24
* @author 86187
*/
@Data
@ApiModel
public
class
LastMonthAccount
implements
Serializable
{
/**
* 账户主键id
*/
@ApiModelProperty
(
name
=
"id"
,
value
=
"管理员主键id"
)
private
Integer
id
;
/**
* 用户id
*/
@ApiModelProperty
(
name
=
"userId"
,
value
=
"用户id"
)
private
String
userId
;
/**
* 用户等级
*/
@ApiModelProperty
(
name
=
"userLevel"
,
value
=
"用户等级"
)
private
Integer
userLevel
;
/**
* 年月
*/
@ApiModelProperty
(
name
=
"yearMonth"
,
value
=
"年月"
)
private
String
yearMonth
;
/**
* 可提现金额
*/
@ApiModelProperty
(
name
=
"extractMoney"
,
value
=
"可提现金额"
)
private
BigDecimal
extractMoney
;
/**
* 本月收益
*/
@ApiModelProperty
(
name
=
"earningsMonth"
,
value
=
"本月收益"
)
private
BigDecimal
earningsMonth
;
/**
* 冻结金额
*/
@ApiModelProperty
(
name
=
"frozenMoney"
,
value
=
"冻结金额"
)
private
BigDecimal
frozenMoney
;
/**
* 累计收益
*/
@ApiModelProperty
(
name
=
"earningsTotal"
,
value
=
"累计收益"
)
private
BigDecimal
earningsTotal
;
/**
* 创建时间
*/
@ApiModelProperty
(
name
=
"createTime"
,
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 修改时间
*/
@ApiModelProperty
(
name
=
"updateTime"
,
value
=
"修改时间"
)
private
Date
updateTime
;
}
wisenergy-model/src/main/java/cn/wisenergy/model/vo/WithdrawalAmountVo.java
View file @
b9749a7d
...
@@ -25,14 +25,21 @@ public class WithdrawalAmountVo {
...
@@ -25,14 +25,21 @@ public class WithdrawalAmountVo {
/**
/**
* 上月未提
* 上月未提
*/
*/
@ApiModelProperty
(
value
=
"上月未提"
,
name
=
"lastMoneyNot"
)
@ApiModelProperty
(
value
=
"上月未提"
,
name
=
"lastMoneyNot"
)
private
BigDecimal
lastMoneyNot
;
private
BigDecimal
lastMoneyNot
;
/**
/**
* 本月可提现
* 本月可提现
*/
*/
@ApiModelProperty
(
value
=
"本月可提现"
,
name
=
"currentMoneyCan"
)
@ApiModelProperty
(
value
=
"本月可提现"
,
name
=
"currentMoneyCan"
)
private
BigDecimal
currentMoneyCan
;
private
BigDecimal
currentMoneyCan
;
/**
* 提现规则
*/
@ApiModelProperty
(
value
=
"提现规则"
,
name
=
"withdrawRule"
)
private
String
withdrawRule
;
}
}
wisenergy-model/src/main/java/cn/wisenergy/model/vo/WithdrawalRecordVo.java
0 → 100644
View file @
b9749a7d
package
cn
.
wisenergy
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
*@ Description: 提现记录Vo
*@ Author : 86187
*@ Date : 2021/3/3 14:51
* @author 86187
*/
@Data
@ApiModel
(
"WithdrawalRecordVo"
)
public
class
WithdrawalRecordVo
{
/**
* 用户id
*/
@ApiModelProperty
(
value
=
"用户id"
,
name
=
"userId"
)
private
String
userId
;
/**
* 提现状态 2:银行处理中 3 :提现成功
*/
@ApiModelProperty
(
value
=
"提现状态 2:银行处理中 3 :提现成功"
,
name
=
"status"
)
private
Integer
status
;
/**
* 提现金额
*/
@ApiModelProperty
(
value
=
"提现金额"
,
name
=
"money"
)
private
BigDecimal
money
;
/**
* 提现时间
*/
@ApiModelProperty
(
value
=
"提现时间"
,
name
=
"moneyTime"
)
private
Date
moneyTime
;
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/WalletService.java
View file @
b9749a7d
package
cn
.
wisenergy
.
service
.
app
;
package
cn
.
wisenergy
.
service
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.vo.AccumulatedIncomeVo
;
import
cn.wisenergy.model.vo.*
;
import
cn.wisenergy.model.vo.MoneyPackageDetailVo
;
import
cn.wisenergy.model.vo.MoneyPackageVo
;
import
cn.wisenergy.model.vo.WithdrawalAmountVo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -46,4 +43,13 @@ public interface WalletService {
...
@@ -46,4 +43,13 @@ public interface WalletService {
* @return 当月总收益
* @return 当月总收益
*/
*/
R
<
MoneyPackageDetailVo
>
queryIncomeDetail
(
String
userId
);
R
<
MoneyPackageDetailVo
>
queryIncomeDetail
(
String
userId
);
/**
* 获取提现记录 userId 为空 查全部 不为空,查当前用户
*
* @param userId 用户唯一标识
* @param yearMonth 年月
* @return 提现记录列表
*/
R
<
List
<
WithdrawalRecordVo
>>
getWithdrawalRecord
(
String
userId
,
String
yearMonth
);
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/WalletServiceImpl.java
View file @
b9749a7d
...
@@ -3,8 +3,10 @@ package cn.wisenergy.service.app.impl;
...
@@ -3,8 +3,10 @@ package cn.wisenergy.service.app.impl;
import
cn.wisenergy.common.utils.DateUtil
;
import
cn.wisenergy.common.utils.DateUtil
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.mapper.AccountMapper
;
import
cn.wisenergy.mapper.AccountMapper
;
import
cn.wisenergy.mapper.LastAccountMapper
;
import
cn.wisenergy.mapper.TradeRecordMapper
;
import
cn.wisenergy.mapper.TradeRecordMapper
;
import
cn.wisenergy.model.app.AccountInfo
;
import
cn.wisenergy.model.app.AccountInfo
;
import
cn.wisenergy.model.app.LastMonthAccount
;
import
cn.wisenergy.model.app.TradeRecord
;
import
cn.wisenergy.model.app.TradeRecord
;
import
cn.wisenergy.model.enums.TradeRecordEnum
;
import
cn.wisenergy.model.enums.TradeRecordEnum
;
import
cn.wisenergy.model.vo.*
;
import
cn.wisenergy.model.vo.*
;
...
@@ -18,6 +20,7 @@ import org.springframework.util.CollectionUtils;
...
@@ -18,6 +20,7 @@ import org.springframework.util.CollectionUtils;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -35,6 +38,9 @@ public class WalletServiceImpl implements WalletService {
...
@@ -35,6 +38,9 @@ public class WalletServiceImpl implements WalletService {
@Autowired
@Autowired
private
TradeRecordMapper
tradeRecordMapper
;
private
TradeRecordMapper
tradeRecordMapper
;
@Autowired
private
LastAccountMapper
lastAccountMapper
;
@Override
@Override
public
R
<
MoneyPackageVo
>
getMoneyPackage
(
String
userId
)
{
public
R
<
MoneyPackageVo
>
getMoneyPackage
(
String
userId
)
{
...
@@ -70,17 +76,29 @@ public class WalletServiceImpl implements WalletService {
...
@@ -70,17 +76,29 @@ public class WalletServiceImpl implements WalletService {
Date
date
=
new
Date
();
Date
date
=
new
Date
();
String
yearMonth
=
DateUtil
.
convertDateToStr
(
date
,
PATTERN
);
String
yearMonth
=
DateUtil
.
convertDateToStr
(
date
,
PATTERN
);
WithdrawalAmountVo
withdrawalAmountVo
=
new
WithdrawalAmountVo
();
withdrawalAmountVo
.
setUserId
(
userId
);
//1、获取用户账户信息
//1、获取用户账户信息
AccountInfo
accountInfo
=
accountMapper
.
getByUserIdAndTime
(
userId
,
yearMonth
);
AccountInfo
accountInfo
=
accountMapper
.
getByUserIdAndTime
(
userId
,
yearMonth
);
if
(
null
==
accountInfo
)
{
if
(
null
==
accountInfo
)
{
return
R
.
error
(
"用户账户信息不存在!"
);
withdrawalAmountVo
.
setCurrentMoneyCan
(
new
BigDecimal
(
0
));
}
else
{
withdrawalAmountVo
.
setCurrentMoneyCan
(
accountInfo
.
getExtractMoney
());
}
}
WithdrawalAmountVo
withdrawalAmountVo
=
new
WithdrawalAmountVo
();
//2、 获取上月未提现
withdrawalAmountVo
.
setUserId
(
userId
);
Calendar
cal
=
Calendar
.
getInstance
();
withdrawalAmountVo
.
setCurrentMoneyCan
(
accountInfo
.
getExtractMoney
());
cal
.
setTime
(
new
Date
());
//TODO 获取上月为提现
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
withdrawalAmountVo
.
setLastMoneyNot
(
new
BigDecimal
(
0
));
Date
lastDate
=
cal
.
getTime
();
String
lastMonthTime
=
DateUtil
.
convertDateToStr
(
lastDate
,
PATTERN
);
LastMonthAccount
lastMonthAccount
=
lastAccountMapper
.
getByUserIdAndTime
(
userId
,
lastMonthTime
);
if
(
null
==
lastMonthAccount
)
{
withdrawalAmountVo
.
setLastMoneyNot
(
new
BigDecimal
(
0
));
}
else
{
withdrawalAmountVo
.
setLastMoneyNot
(
lastMonthAccount
.
getExtractMoney
());
}
return
R
.
ok
(
withdrawalAmountVo
);
return
R
.
ok
(
withdrawalAmountVo
);
}
}
...
@@ -91,22 +109,9 @@ public class WalletServiceImpl implements WalletService {
...
@@ -91,22 +109,9 @@ public class WalletServiceImpl implements WalletService {
return
R
.
error
(
"入参为空!"
);
return
R
.
error
(
"入参为空!"
);
}
}
List
<
TradeRecord
>
list
=
tradeRecordMapper
.
getByUserId
(
userId
);
//获取不包括本月在内的六个月的收益
if
(
CollectionUtils
.
isEmpty
(
list
))
{
List
<
AccumulatedIncomeVo
>
list
=
tradeRecordMapper
.
getSixMonthIncome
(
userId
);
return
R
.
ok
(
new
ArrayList
<>());
return
R
.
ok
(
list
);
}
List
<
AccumulatedIncomeVo
>
result
=
new
ArrayList
<>();
for
(
TradeRecord
tradeRecord
:
list
)
{
AccumulatedIncomeVo
incomeVo
=
new
AccumulatedIncomeVo
();
incomeVo
.
setUserId
(
tradeRecord
.
getUserId
());
String
yearMonth
=
DateUtil
.
convertDateToStr
(
tradeRecord
.
getCreateTime
(),
PATTERN
);
incomeVo
.
setYearMonth
(
yearMonth
);
incomeVo
.
setIncome
(
tradeRecord
.
getMoney
());
result
.
add
(
incomeVo
);
}
return
R
.
ok
(
result
);
}
}
@Override
@Override
...
@@ -125,7 +130,7 @@ public class WalletServiceImpl implements WalletService {
...
@@ -125,7 +130,7 @@ public class WalletServiceImpl implements WalletService {
}
}
//获取本月交易记录
//获取本月交易记录
List
<
TradeRecord
>
list
=
tradeRecordMapper
.
getByUserIdAndTime
(
userId
,
yearMonth
);
List
<
TradeRecord
>
list
=
tradeRecordMapper
.
getByUserIdAndTime
(
userId
,
date
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
R
.
ok
(
new
MoneyPackageDetailVo
());
return
R
.
ok
(
new
MoneyPackageDetailVo
());
}
}
...
@@ -149,4 +154,16 @@ public class WalletServiceImpl implements WalletService {
...
@@ -149,4 +154,16 @@ public class WalletServiceImpl implements WalletService {
return
R
.
ok
(
detailVo
);
return
R
.
ok
(
detailVo
);
}
}
@Override
public
R
<
List
<
WithdrawalRecordVo
>>
getWithdrawalRecord
(
String
userId
,
String
yearMonth
)
{
log
.
info
(
"shop-mall[]WalletServiceImpl[]queryIncomeDetail[]input.param.yearMonth:"
+
yearMonth
);
if
(
StringUtils
.
isBlank
(
yearMonth
))
{
return
R
.
error
(
"入参为空!"
);
}
Date
date
=
DateUtil
.
convertStrToDate
(
yearMonth
,
PATTERN
);
List
<
WithdrawalRecordVo
>
list
=
tradeRecordMapper
.
getWithdrawalRecord
(
userId
,
date
);
return
R
.
ok
(
list
);
}
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/WalletController.java
View file @
b9749a7d
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.vo.AccumulatedIncomeVo
;
import
cn.wisenergy.model.vo.*
;
import
cn.wisenergy.model.vo.MoneyPackageDetailVo
;
import
cn.wisenergy.model.vo.MoneyPackageVo
;
import
cn.wisenergy.model.vo.WithdrawalAmountVo
;
import
cn.wisenergy.service.app.WalletService
;
import
cn.wisenergy.service.app.WalletService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -77,4 +75,19 @@ public class WalletController {
...
@@ -77,4 +75,19 @@ public class WalletController {
return
walletService
.
queryIncomeDetail
(
userId
);
return
walletService
.
queryIncomeDetail
(
userId
);
}
}
@ApiOperation
(
value
=
"提现记录"
,
notes
=
"提现记录"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"yearMonth"
,
value
=
"时间(yyyy-MM-dd)"
,
dataType
=
"String"
,
required
=
true
)
})
@GetMapping
(
"/getWithdrawalRecord"
)
public
R
<
List
<
WithdrawalRecordVo
>>
getWithdrawalRecord
(
String
userId
,
String
yearMonth
)
{
log
.
info
(
"shop-mall[]WalletController[]getWithdrawalRecord[]input.param.userId:{},yearMonth:"
+
userId
,
yearMonth
);
if
(
StringUtils
.
isBlank
(
yearMonth
))
{
return
R
.
error
(
"入参不能为空!"
);
}
return
walletService
.
getWithdrawalRecord
(
userId
,
yearMonth
);
}
}
}
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