Merge remote-tracking branch 'origin/main-zhb'
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
package com.buy507.mall.portal.controller;
|
||||
|
||||
import com.buy507.mall.common.api.CommonResult;
|
||||
import com.buy507.mall.portal.domain.WithdrawApplyParam;
|
||||
import com.buy507.mall.portal.service.MyWalletService;
|
||||
import com.buy507.mall.portal.service.UmsMemberService;
|
||||
import com.buy507.mall.portal.vo.WalletCashVo;
|
||||
import com.buy507.mall.portal.vo.WalletPointsVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/wallet")
|
||||
@@ -17,25 +17,28 @@ public class MyWalletController {
|
||||
@Autowired
|
||||
private MyWalletService myWalletService;
|
||||
|
||||
/**
|
||||
* 获取现金余额和流水
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Autowired
|
||||
private UmsMemberService memberService;
|
||||
|
||||
|
||||
@ApiOperation("获取现金余额和流水")
|
||||
@GetMapping("/balance")
|
||||
public CommonResult<WalletCashVo> getBalance(@RequestParam Long userId){
|
||||
WalletCashVo walletCashVo = myWalletService.getBalanceAndCashFlow(userId);
|
||||
return CommonResult.success(walletCashVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取积分余额和流水
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ApiOperation("获取积分余额和流水")
|
||||
@GetMapping("/points")
|
||||
public CommonResult<WalletPointsVo> getIntegration(@RequestParam Long userId){
|
||||
WalletPointsVo walletPointsVo = myWalletService.getIntegrationAndPointsFlow(userId);
|
||||
return CommonResult.success(walletPointsVo);
|
||||
}
|
||||
|
||||
@ApiOperation("会员提现申请")
|
||||
@PostMapping(value = "/withdraw")
|
||||
public CommonResult withdrawApply(@RequestBody WithdrawApplyParam applyParam) {
|
||||
return memberService.withdrawApply(applyParam);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface PortalCommonService {
|
||||
|
||||
/**
|
||||
* 获取会员的折扣
|
||||
* @param member
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
BigDecimal getDiscount(Long memberId);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class PortalCommonServiceImpl implements PortalCommonService {
|
||||
|
||||
/**
|
||||
* 获取会员的折扣
|
||||
* @param member
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -862,6 +862,12 @@ public class UmsMemberServiceImpl implements UmsMemberService {
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提现申请列表
|
||||
* @param pageSize
|
||||
* @param pageNum
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MemberWithdrawApplyResult> getWithdrawApply(Integer pageSize, Integer pageNum) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
@@ -870,6 +876,11 @@ public class UmsMemberServiceImpl implements UmsMemberService {
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员提现申请
|
||||
* @param applyParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public CommonResult withdrawApply(WithdrawApplyParam applyParam) {
|
||||
|
||||
@@ -911,7 +922,7 @@ public class UmsMemberServiceImpl implements UmsMemberService {
|
||||
}
|
||||
|
||||
if(applyParam.getValue() <= 0) {
|
||||
return CommonResult.validateFailed("提现积分无效");
|
||||
return CommonResult.validateFailed("提现无效");
|
||||
}
|
||||
|
||||
String withdrawMultipleStr = commonService.getDictionaryValue(Constants.D_WITHDRAW_MULTIPLE);
|
||||
|
||||
Reference in New Issue
Block a user