Commit 6e4bbce0 authored by libin's avatar libin

提现方式调整(1:线下自动 2:线下手动 3:线上自动)

parent 13b8acdb
......@@ -26,4 +26,8 @@ public class WalletCathFindDTO extends PageParam {
private Long startTime;
private Long endTime;
/**
* 提现方式 1:线下自动 2:线下手动 3:线上自动
*/
private Integer withdrawWay;
}
......@@ -56,6 +56,6 @@ public class WalletCathListDTO {
private String accountName;
@ApiModelProperty(value = "线下提现方式 1:自动 2:手动")
private Integer offlineWay;
@ApiModelProperty(value = "提现方式 1:线下自动 2:线下手动 3:线上自动")
private Integer withdrawWay;
}
......@@ -134,9 +134,9 @@ public class MyWalletCath implements Serializable {
@Column(name = "account_name")
private String accountName;
@Column(name = "offline_way")
@ApiModelProperty(value = "线下提现方式 1:自动 2:手动")
private Integer offlineWay;
@Column(name = "withdraw_way")
@ApiModelProperty(value = "提现方式 1:线下自动 2:线下手动 3:线上自动")
private Integer withdrawWay;
@Column(name = "real_reason")
private String realReason;
......
......@@ -52,6 +52,6 @@ public class WalletCathAdminVo {
private String accountName;
@ApiModelProperty(value = "线下提现方式 1:自动 2:手动")
private Integer offlineWay;
@ApiModelProperty(value = "提现方式 1:线下自动 2:线下手动 3:线上自动")
private Integer withdrawWay;
}
......@@ -21,6 +21,7 @@ import com.github.wxiaoqi.security.common.util.OrderUtil;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.app.entity.vo.WithDrawRuleVo;
import com.xxfc.platform.app.enumconstant.WithDrawWayEnum;
import com.xxfc.platform.app.feign.ConfigFeign;
import com.xxfc.platform.universal.feign.ThirdFeign;
import com.xxfc.platform.universal.vo.FundPayVo;
......@@ -100,9 +101,6 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
private DateTimeFormatter dateTimeFormatter;
private static final Integer WITHDRAW_ONLINE_WAY = 1;
private static final Integer WITHDRAW_OFFLINE_WAY = 2;
private BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(12);
......@@ -347,8 +345,10 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
walletCath.setAccountName(applyCathVo.getAccountName());
walletCath.setAccountNumber(accountNumber);
walletCath.setAmount(amount);
//手续费
walletCath.setCommission(commission);
walletCath.setRealAmount(realAmount);
walletCath.setWithdrawWay(withdrawWay);
myWalletCathBiz.insertSelective(walletCath);
//提现金额
BigDecimal withdrawals = realAmount.add(commission);
......@@ -362,7 +362,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
myWallet.setVersion(sumDto.getVersion());
mapper.updMyWater(myWallet);
//线上自动提现
if (WITHDRAW_ONLINE_WAY.equals(withdrawWay)) {
if (WithDrawWayEnum.WITHDRAW_ONLINE_WAY.getCode() == withdrawWay) {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String host = StringUtils.defaultIfBlank(request.getHeader("userHost"), ClientUtil.getClientIp(request));
FundPayVo fundPayVo = FundPayVo.builder()
......
......@@ -101,12 +101,7 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
PageDataVO<WalletCathListDTO> walletCathListDTOPage = PageDataVO.pageInfo(walletCathFindDTO.getPage(),
walletCathFindDTO.getLimit(),
() -> mapper.selectByUserNameOrPhoneOrWithDrawSate(walletCathFindDTO.getUsername(),
walletCathFindDTO.getPhone(),
walletCathFindDTO.getState(),
walletCathFindDTO.getOrderNo(),
walletCathFindDTO.getStartTime(),
walletCathFindDTO.getEndTime()));
() -> mapper.selectWalletCatchAll(walletCathFindDTO));
List<WalletCathListDTO> walletCathListDTOList = walletCathListDTOPage.getData();
if (CollectionUtils.isEmpty(walletCathListDTOList)) {
......
package com.github.wxiaoqi.security.admin.mapper;
import com.github.wxiaoqi.security.admin.dto.PersonalConsumptionDTO;
import com.github.wxiaoqi.security.admin.dto.WalletCathFindDTO;
import com.github.wxiaoqi.security.admin.dto.WalletCathListDTO;
import com.github.wxiaoqi.security.admin.dto.WalletCathSumDto;
import com.github.wxiaoqi.security.admin.entity.MyWalletCath;
......@@ -17,12 +18,7 @@ import java.util.List;
*/
public interface MyWalletCathMapper extends Mapper<MyWalletCath> {
List<WalletCathListDTO> selectByUserNameOrPhoneOrWithDrawSate(@Param("userName") String userName,
@Param("phone") String phone,
@Param("state") Integer state,
@Param("orderNo") String orderNo,
@Param("startTime") Long startTime,
@Param("endTime") Long endTime);
List<WalletCathListDTO> selectWalletCatchAll(WalletCathFindDTO walletCathFindDTO);
List<PersonalConsumptionDTO> findUserWithDrawingByUserIds(@Param("userIds") List<Integer> userIds);
......
......@@ -3,7 +3,7 @@
<mapper namespace="com.github.wxiaoqi.security.admin.mapper.MyWalletCathMapper">
<select id="selectByUserNameOrPhoneOrWithDrawSate"
<select id="selectWalletCatchAll"
resultType="com.github.wxiaoqi.security.admin.dto.WalletCathListDTO">
SELECT
wc.id,
......@@ -19,12 +19,16 @@
wc.order_no AS `orderNo`,
wc.account_number AS `accountNumber`,
wc.account_name AS `accountName`,
wc.offline_way AS `offlineWay`
wc.withdraw_way AS `withdrawWay`
FROM
(SELECT * FROM `my_wallet_cath` WHERE 1 = 1
(SELECT * FROM `my_wallet_cath`
<where>
<if test="state != null">
AND `stauts`=#{state}
</if>
<if test="withdrawWay != null">
AND `withdraw_way`=#{withdrawWay}
</if>
<if test="orderNo !=null and orderNo !=''">
AND `order_no` = #{orderNo}
</if>
......@@ -41,13 +45,14 @@
`crt_time` <= #{endTime}
]]>
</if>
</where>
) AS `wc`
INNER JOIN ( SELECT `id`, `username` FROM `app_user_login` <if test="phone != null and phone != ''">
WHERE `username`=#{phone}
</if> ) AS `aul` ON aul.id = wc.user_id
INNER JOIN ( SELECT `userid`, `nickname`, `realname` FROM `app_user_detail` <if
test="userName != null and userName != ''">
WHERE nickname =#{userName} OR realname =#{userName}
test="username != null and username != ''">
WHERE nickname =#{username} OR realname =#{username}
</if> ) AS `aud` ON aud.userid = aul.id order by wc.crt_time DESC
</select>
......
......@@ -44,7 +44,7 @@ public class WithDrawRuleVo {
private Integer maxNumberOfDay;
/**
* 1. 线上 2.线下
* 1.线下:自动 2.线下:手动 3. 线上
*/
private Integer withdrawWay;
......
package com.xxfc.platform.app.enumconstant;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author libin
* @version 1.0
* @description 提现方式
* @data 2020/1/7 8:44
*/
@AllArgsConstructor
@Getter
public enum WithDrawWayEnum {
WITHDRAW_ONLINE_WAY(3, "线上"),
WITHDRAW_OFFLINE_AUTO_WAY(2, "线下手动"),
WITHDRAW_OFFLINE_WAY(1, "线下自动");
private int code;
private String desc;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment