Compare commits
5 Commits
0cea57913e
...
0ccea389b3
Author | SHA1 | Date | |
---|---|---|---|
0ccea389b3 | |||
f01ad73c2b | |||
b5c8dfb0b2 | |||
eccb4dad70 | |||
c5867e7017 |
|
@ -10,12 +10,15 @@ import com.greenorange.promotion.constant.UserConstant;
|
|||
import com.greenorange.promotion.model.dto.withdrawalApply.WithdrawalApplyAddRequest;
|
||||
import com.greenorange.promotion.model.dto.withdrawalApply.WithdrawalApplyQueryRequest;
|
||||
import com.greenorange.promotion.model.entity.FundsChange;
|
||||
import com.greenorange.promotion.model.entity.UserMainInfo;
|
||||
import com.greenorange.promotion.model.entity.WithdrawalApply;
|
||||
import com.greenorange.promotion.model.vo.fundsChange.FundsChangeVO;
|
||||
import com.greenorange.promotion.model.vo.fundsChange.FundsItemVO;
|
||||
import com.greenorange.promotion.model.vo.withdrawalApply.WithdrawalApplyVO;
|
||||
import com.greenorange.promotion.service.common.CommonService;
|
||||
import com.greenorange.promotion.service.settle.FundsChangeService;
|
||||
import com.greenorange.promotion.service.settle.WithdrawalApplyService;
|
||||
import com.greenorange.promotion.service.userInfo.UserMainInfoService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
|
@ -50,6 +53,9 @@ public class WithdrawalApplyController {
|
|||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
@Resource
|
||||
private UserMainInfoService userMainInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 小程序端用户申请提现
|
||||
|
@ -96,11 +102,16 @@ public class WithdrawalApplyController {
|
|||
@Operation(summary = "小程序端用户查询资金变动记录", description = "参数:无,权限:管理员,方法名:queryFundsChangeByUserId")
|
||||
@RequiresPermission(mustRole = UserConstant.DEFAULT_ROLE)
|
||||
// @SysLog(title = "提现申请记录管理", content = "小程序端用户查询资金变动记录")
|
||||
public BaseResponse<List<FundsChangeVO>> queryFundsChangeByUserId(HttpServletRequest request) {
|
||||
public BaseResponse<FundsItemVO> queryFundsChangeByUserId(HttpServletRequest request) {
|
||||
Long userId = (Long) request.getAttribute("userId");
|
||||
LambdaQueryWrapper<UserMainInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(UserMainInfo::getUserId, userId);
|
||||
UserMainInfo userMainInfo = userMainInfoService.getOne(lambdaQueryWrapper);
|
||||
FundsItemVO fundsItemVO = commonService.copyProperties(userMainInfo, FundsItemVO.class);
|
||||
List<FundsChange> fundsChangeList = commonService.findByFieldEqTargetField(FundsChange::getUserId, userId, fundsChangeService);
|
||||
List<FundsChangeVO> fundsChangeVOS = commonService.convertList(fundsChangeList, FundsChangeVO.class);
|
||||
return ResultUtils.success(fundsChangeVOS);
|
||||
fundsItemVO.setFundsChangeVOList(fundsChangeVOS);
|
||||
return ResultUtils.success(fundsItemVO);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ public class UserAccountController {
|
|||
* @return 用户账户信息
|
||||
*/
|
||||
@PostMapping("queryById")
|
||||
@Operation(summary = "web端管理员根据id查询用户账户", description = "参数:无,权限:管理员,方法名:queryUserAccountByUserId")
|
||||
@Operation(summary = "小程序端根据id查询用户账户", description = "参数:无,权限:管理员,方法名:queryUserAccountByUserId")
|
||||
@RequiresPermission(mustRole = UserConstant.DEFAULT_ROLE)
|
||||
// @SysLog(title = "用户账户管理", content = "web端管理员根据id查询用户账户")
|
||||
public BaseResponse<UserAccountVO> queryUserAccountByUserId(HttpServletRequest request) {
|
||||
|
|
|
@ -18,6 +18,7 @@ import java.io.Serializable;
|
|||
"idCardNumber",
|
||||
"phoneNumber",
|
||||
"bankCardNumber",
|
||||
"openBank",
|
||||
"userId",
|
||||
})
|
||||
public class UserAccountAddRequest implements Serializable {
|
||||
|
@ -50,6 +51,13 @@ public class UserAccountAddRequest implements Serializable {
|
|||
@Schema(description = "银行卡号", example = "5105105105105100")
|
||||
private String bankCardNumber;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
*/
|
||||
@NotBlank(message = "开户银行不能为空")
|
||||
@Schema(description = "开户银行", example = "中国工商银行")
|
||||
private String openBank;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -52,6 +52,13 @@ public class UserAccountQueryRequest extends PageRequest implements Serializable
|
|||
@Schema(description = "银行卡号", example = "5105105105105100")
|
||||
private String bankCardNumber;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
*/
|
||||
@NotBlank(message = "开户银行不能为空")
|
||||
@Schema(description = "开户银行", example = "中国工商银行")
|
||||
private String openBank;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.io.Serializable;
|
|||
"idCardNumber",
|
||||
"phoneNumber",
|
||||
"bankCardNumber",
|
||||
"openBank",
|
||||
"userId",
|
||||
})
|
||||
public class UserAccountUpdateRequest implements Serializable {
|
||||
|
@ -58,6 +59,13 @@ public class UserAccountUpdateRequest implements Serializable {
|
|||
@Schema(description = "银行卡号", example = "5105105105105100")
|
||||
private String bankCardNumber;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
*/
|
||||
@NotBlank(message = "开户银行不能为空")
|
||||
@Schema(description = "开户银行", example = "中国工商银行")
|
||||
private String openBank;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -6,6 +6,7 @@ import lombok.Data;
|
|||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 资金变动记录 视图对象
|
||||
|
@ -38,6 +39,12 @@ public class FundsChangeVO implements Serializable {
|
|||
@Schema(description = "当前金额(变动后的总金额)", example = "0.34")
|
||||
private BigDecimal currentAmount;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间", example = "2023-02-01 09:09:09")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
package com.greenorange.promotion.model.vo.fundsChange;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 资金明细 视图对象
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "资金明细 视图对象")
|
||||
public class FundsItemVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 当前余额
|
||||
*/
|
||||
@Schema(description = "当前余额", example = "10.00")
|
||||
private BigDecimal currentBalance;
|
||||
|
||||
/**
|
||||
* 提现中的金额
|
||||
*/
|
||||
@Schema(description = "提现中的金额", example = "15.00")
|
||||
private BigDecimal withdrawalAmount;
|
||||
|
||||
/**
|
||||
* 已提现的金额
|
||||
*/
|
||||
@Schema(description = "已提现的金额", example = "20.00")
|
||||
private BigDecimal withdrawnAmount;
|
||||
|
||||
/**
|
||||
* 资金明细变动记录列表
|
||||
*/
|
||||
@Schema(description = "资金明细变动记录列表")
|
||||
private List<FundsChangeVO> fundsChangeVOList;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user