## 提现明细添加身份证号;调整提现明细导出;提现等配置去掉缓存;
This commit is contained in:
parent
b9e3491a76
commit
77ea53b875
|
@ -1,25 +0,0 @@
|
|||
package com.hzs.system.config;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.system.config.BdWithdrawalAuto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询自动提现明细api
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/27 15:15
|
||||
* @param:
|
||||
* @return:
|
||||
**/
|
||||
public interface IWithdrawalAutoServiceApi {
|
||||
|
||||
/**
|
||||
* @description:根据国家查询自动提现明细列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/27 15:20
|
||||
* @param: [pkCountry]
|
||||
* @return: com.hzs.common.core.domain.R<java.util.List<com.hzs.common.domain.system.config.BdWithdrawalAuto>>
|
||||
**/
|
||||
R<List<BdWithdrawalAuto>> queryWithdrawalAuto(Integer pkCountry);
|
||||
}
|
|
@ -35,9 +35,6 @@ import java.util.*;
|
|||
|
||||
/**
|
||||
* 会员提现表 前端控制器
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-09-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manager/withdraw")
|
||||
|
@ -46,18 +43,15 @@ public class CuMemberWithdrawController extends BaseController {
|
|||
|
||||
@Autowired
|
||||
private UserTokenService userTokenService;
|
||||
|
||||
@Autowired
|
||||
private ICuMemberBaseService baseService;
|
||||
|
||||
private ICuMemberBaseService iCuMemberBaseService;
|
||||
@Autowired
|
||||
ICuMemberWithdrawService cuMemberWithdrawService;
|
||||
|
||||
private ICuMemberWithdrawService iCuMemberWithdrawService;
|
||||
@Autowired
|
||||
ITransactionCommonService iTransactionCommonService;
|
||||
private ITransactionCommonService iTransactionCommonService;
|
||||
|
||||
@DubboReference
|
||||
IMenuColumnServiceApi menuColumnServiceApi;
|
||||
IMenuColumnServiceApi iMenuColumnServiceApi;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -72,11 +66,11 @@ public class CuMemberWithdrawController extends BaseController {
|
|||
if (CollUtil.isEmpty(pkIds)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(FinanceMsgConstants.SELECT_INITIATING_SIGNATURE_RECORD));
|
||||
}
|
||||
List<CuMemberWithdrawVO> cuMemberWithdrawList = cuMemberWithdrawService.checkWithdrawPetitionByState(pkIds, EApproveStatus.WAIT_SUBMIT.getValue());
|
||||
List<CuMemberWithdrawVO> cuMemberWithdrawList = iCuMemberWithdrawService.checkWithdrawPetitionByState(pkIds, EApproveStatus.WAIT_SUBMIT.getValue());
|
||||
if (CollUtil.isNotEmpty(cuMemberWithdrawList)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(FinanceMsgConstants.SELECTED_RECORD_DUPLICATE_SIGNATURE_RECORD));
|
||||
}
|
||||
return AjaxResult.success(cuMemberWithdrawService.showMemberWithdrawPetition(pkIds, null));
|
||||
return AjaxResult.success(iCuMemberWithdrawService.showMemberWithdrawPetition(pkIds, null));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -91,7 +85,7 @@ public class CuMemberWithdrawController extends BaseController {
|
|||
LoginUser loginUser = userTokenService.getLoginUser();
|
||||
cuMemberPetitionVO.setLoginUser(loginUser);
|
||||
cuMemberPetitionVO.setPkCreat(SecurityUtils.getUserId());
|
||||
return AjaxResult.success(cuMemberWithdrawService.confirmWithdrawPetition(cuMemberPetitionVO));
|
||||
return AjaxResult.success(iCuMemberWithdrawService.confirmWithdrawPetition(cuMemberPetitionVO));
|
||||
}
|
||||
|
||||
|
||||
|
@ -117,7 +111,7 @@ public class CuMemberWithdrawController extends BaseController {
|
|||
}
|
||||
}
|
||||
startPage();
|
||||
Object[] objects = cuMemberWithdrawService.selectMemberWithdrawList(cuMemberWithdrawVO);
|
||||
Object[] objects = iCuMemberWithdrawService.selectMemberWithdrawList(cuMemberWithdrawVO);
|
||||
//处理分页
|
||||
TableDataInfo tableDataInfo = getDataTable((List<CuMemberWithdrawExt>) objects[0]);
|
||||
tableDataInfo.setRows((List<CuMemberWithdrawVO>) objects[1]);
|
||||
|
@ -137,18 +131,18 @@ public class CuMemberWithdrawController extends BaseController {
|
|||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
cuMemberWithdrawVO.setPkCountry(pkCountry);
|
||||
cuMemberWithdrawVO.setSystemType(SecurityUtils.getSystemType());
|
||||
List<CuMemberWithdrawVO> cuMemberWithdrawList = (List<CuMemberWithdrawVO>) cuMemberWithdrawService.selectMemberWithdrawList(cuMemberWithdrawVO)[1];
|
||||
List<CuMemberWithdrawVO> cuMemberWithdrawList = (List<CuMemberWithdrawVO>) iCuMemberWithdrawService.selectMemberWithdrawList(cuMemberWithdrawVO)[1];
|
||||
//枚举翻译
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EApproveStatus.values(), EWithdrawStatus.values());
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EApproveStatus.values());
|
||||
if (CollUtil.isNotEmpty(cuMemberWithdrawList)) {
|
||||
for (CuMemberWithdrawVO memberWithdraw : cuMemberWithdrawList) {
|
||||
Integer pkAccount = memberWithdraw.getPkAccount();
|
||||
memberWithdraw.setPkAccountVal(baseService.getAccountTranslateFromDataBase(pkAccount));
|
||||
memberWithdraw.setPkAccountVal(iCuMemberBaseService.getAccountTranslateFromDataBase(pkAccount));
|
||||
memberWithdraw.setApproveStateVal(transactionMap.get(EnumsPrefixConstants.APPROVE_STATUS + memberWithdraw.getApproveState()));
|
||||
memberWithdraw.setStatusVal(transactionMap.get(EnumsPrefixConstants.ENU_WITHDRAW_STATUS + memberWithdraw.getStatus()));
|
||||
memberWithdraw.setStatusVal(EWithdrawStatus.getLabelByValue(memberWithdraw.getStatus()));
|
||||
}
|
||||
}
|
||||
ExcelUtil<CuMemberWithdrawVO> util = new ExcelUtil<>(CuMemberWithdrawVO.class, menuColumnServiceApi.queryMenuColumn("CashDetails", SecurityUtils.getUserId()).getData());
|
||||
ExcelUtil<CuMemberWithdrawVO> util = new ExcelUtil<>(CuMemberWithdrawVO.class, iMenuColumnServiceApi.queryMenuColumn("CashDetails", SecurityUtils.getUserId()).getData());
|
||||
util.exportExcel(response, cuMemberWithdrawList, TransactionUtils.getContent(FinanceMsgConstants.WITHDRAWAL_DETAILS_EXPORT));
|
||||
}
|
||||
|
||||
|
@ -162,7 +156,7 @@ public class CuMemberWithdrawController extends BaseController {
|
|||
@GetMapping("/details")
|
||||
public AjaxResult findWithdrawDetails(Long pkId) {
|
||||
Assert.notNull(pkId, TransactionUtils.getContent(FinanceMsgConstants.SELECT_WITHDRAWAL_RECORD));
|
||||
CuMemberWithdrawVO cuMemberRechargeDetailVO = cuMemberWithdrawService.queryCuMemberWithdrawDetail(pkId);
|
||||
CuMemberWithdrawVO cuMemberRechargeDetailVO = iCuMemberWithdrawService.queryCuMemberWithdrawDetail(pkId);
|
||||
return AjaxResult.success(cuMemberRechargeDetailVO);
|
||||
}
|
||||
|
||||
|
@ -178,7 +172,7 @@ public class CuMemberWithdrawController extends BaseController {
|
|||
public AjaxResult withdrawPayment(@RequestBody CuMemberWithdrawVO memberWithdrawVO) {
|
||||
List<Long> pkIds = memberWithdrawVO.getPkIds();
|
||||
Assert.notNull(pkIds, TransactionUtils.getContent(FinanceMsgConstants.SELECT_PAID_RECORD));
|
||||
List<CuMemberWithdraw> withdrawApproveStateByIds = cuMemberWithdrawService.getWithdrawApproveStateByIds(pkIds, EApproveStatus.FINISH.getValue());
|
||||
List<CuMemberWithdraw> withdrawApproveStateByIds = iCuMemberWithdrawService.getWithdrawApproveStateByIds(pkIds, EApproveStatus.FINISH.getValue());
|
||||
if (CollUtil.isNotEmpty(withdrawApproveStateByIds)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(FinanceMsgConstants.DATA_UNAPPROVED_DATA));
|
||||
}
|
||||
|
@ -188,7 +182,7 @@ public class CuMemberWithdrawController extends BaseController {
|
|||
memberWithdrawVO.setPayer(pkMember);
|
||||
memberWithdrawVO.setPaymentTime(new Date());
|
||||
memberWithdrawVO.setPkModified(pkMember);
|
||||
return toAjax(cuMemberWithdrawService.withdrawPaymentByPkId(memberWithdrawVO));
|
||||
return toAjax(iCuMemberWithdrawService.withdrawPaymentByPkId(memberWithdrawVO));
|
||||
}
|
||||
|
||||
|
||||
|
@ -207,13 +201,13 @@ public class CuMemberWithdrawController extends BaseController {
|
|||
memberWithdrawVO.setPayer(SecurityUtils.getUserId());
|
||||
memberWithdrawVO.setPayerRemarks(memberWithdrawVO.getPayerRemarks());
|
||||
memberWithdrawVO.setPaymentTime(new Date());
|
||||
return toAjax(cuMemberWithdrawService.withdrawPaymentPositiveByPkId(memberWithdrawVO));
|
||||
return toAjax(iCuMemberWithdrawService.withdrawPaymentPositiveByPkId(memberWithdrawVO));
|
||||
}
|
||||
|
||||
@Log(module = EOperationModule.WITHDRAWAL_DETAIL, business = EOperationBusiness.WITHDRAWAL_DETAIL, method = EOperationMethod.REJECT)
|
||||
@PostMapping("/reject")
|
||||
public AjaxResult reject(@RequestBody CuMemberWithdrawRejectParam param) {
|
||||
cuMemberWithdrawService.withdrawReject(param);
|
||||
iCuMemberWithdrawService.withdrawReject(param);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,12 +10,6 @@ import java.math.BigDecimal;
|
|||
|
||||
/**
|
||||
* 奖金账户操作参数
|
||||
*
|
||||
* @Description:
|
||||
* @Author: ljc
|
||||
* @Time: 2023/3/25 13:56
|
||||
* @Classname: CuMemberAccountParam
|
||||
* @Package_name: com.hzs.member.account.dto
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
import com.hzs.common.domain.member.account.CuMemberAccount;
|
||||
import com.hzs.common.domain.member.account.CuMemberAccountRechargeExt;
|
||||
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
||||
import com.hzs.member.account.dto.CuMemberBonusAccountParam;
|
||||
import com.hzs.member.account.dto.CuMemberRechargeAccountParam;
|
||||
import com.hzs.member.account.dto.MemberAmountDTO;
|
||||
import com.hzs.member.account.vo.CuMemberAccountVO;
|
||||
|
@ -28,7 +27,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
|
|||
*/
|
||||
List<CuMemberAccountExt> queryMemberAccountByCondition(CuMemberAccount cuMemberAccount);
|
||||
|
||||
|
||||
/**
|
||||
* 根据会员编码获取余额
|
||||
*
|
||||
|
@ -45,15 +43,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
|
|||
*/
|
||||
Integer updateMemberAccount(CuMemberAccount cuMemberAccount);
|
||||
|
||||
|
||||
/**
|
||||
* 根据国家查询余额与银行卡信息
|
||||
*
|
||||
* @param pkCountry 国家ID
|
||||
* @return List<CuMemberAccountExt>
|
||||
*/
|
||||
List<CuMemberAccountExt> queryMemberAccountByPkCountry(@Param("pkCountry") Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 根据用户编号查询账户余额 (行转列)
|
||||
*
|
||||
|
@ -176,14 +165,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
|
|||
*/
|
||||
List<CuMemberAccount> selectMemberAccountByPkMember(@Param(value = "pkMembers") List<Long> pkMembers);
|
||||
|
||||
/**
|
||||
* 查询会员账户以及会员信息
|
||||
*
|
||||
* @param memberIdList 会员ID列表
|
||||
* @return
|
||||
*/
|
||||
List<CuMemberAccountExt> queryAccountAndMemberInfo(@Param("memberIdList") List<Long> memberIdList);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询钱包余额
|
||||
*
|
||||
|
@ -201,33 +182,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
|
|||
*/
|
||||
List<CuMemberAccountExt> queryMemberAccountByMemberCodeAndName(CuMemberAccountVO cuMemberAccountVO);
|
||||
|
||||
/**
|
||||
* 奖金发放,根据期间发放奖金,更新奖金余额
|
||||
*
|
||||
* @param startPeriod 期间
|
||||
*/
|
||||
void updateMemberAccountGrantByPeriod(@Param("pkCountry") Integer pkCountry, @Param("startPeriod") Integer startPeriod,
|
||||
@Param("endPeriod") Integer endPeriod);
|
||||
|
||||
/**
|
||||
* 奖金可提现,根据期间更新可提现金额,减少可消费金额
|
||||
*
|
||||
* @param startPeriod 期间
|
||||
*/
|
||||
void updateMemberAccountWithdrawalByPeriod(@Param("startPeriod") Integer startPeriod, @Param("endPeriod") Integer endPeriod, @Param("pkCountry") Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 批量更新奖金账号
|
||||
*
|
||||
* @param bonusList 奖金账号参数
|
||||
* @param operateType 操作类型
|
||||
* @param operateType 修改人
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean batchUpdateBonusAccountByPkMember(@Param("bonusList") List<CuMemberBonusAccountParam> bonusList,
|
||||
@Param("operateType") int operateType,
|
||||
@Param("pkModified") Long pkModified);
|
||||
|
||||
/**
|
||||
* 根据来源单号查询奖金账号信息
|
||||
*
|
||||
|
|
|
@ -24,7 +24,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
List<CuMemberAccountExt> queryMemberAccountByCondition(CuMemberAccount cuMemberAccount);
|
||||
|
||||
|
||||
/**
|
||||
* 根据会员编码获取余额
|
||||
*
|
||||
|
@ -34,7 +33,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
BigDecimal selectBalanceByMemberCode(Long pkMember, Integer accountType);
|
||||
|
||||
|
||||
/**
|
||||
* 更新用户余额
|
||||
*
|
||||
|
@ -92,14 +90,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
List<CuMemberAccountShowVO> selectAccountDetail(Long pkMember, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 根据国家查询余额与银行卡信息
|
||||
*
|
||||
* @param pkCountry 国家ID
|
||||
* @return List<CuMemberAccountExt>
|
||||
*/
|
||||
List<CuMemberAccountExt> queryMemberAccountByPkcountry(Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 根据用户编号查询账户余额 (行转列)
|
||||
*
|
||||
|
@ -138,7 +128,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
List<CuMemberAccountExt> queryMemberAccountByMemberCodes(List<CuMemberRechargeVO> memberCodes, List<String> memberCodeStrs);
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户编号集查询余额(所有字段)
|
||||
*
|
||||
|
@ -147,7 +136,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
List<CuMemberWalletDetailVO> queryMemberAccountAllByMemberCodes(List<String> memberCodes, Integer pkCountry);
|
||||
|
||||
|
||||
/**
|
||||
* 查询钱包明细
|
||||
*
|
||||
|
@ -156,7 +144,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
Object[] selectMemberAccountList(CuMemberWalletDetailVO memberWalletDetailVO);
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户编号查询用户ID
|
||||
*
|
||||
|
@ -190,7 +177,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
List<CuMemberAccountExt> queryMemberAccountByPkMember(List<MemberAmountDTO> pkMembers);
|
||||
|
||||
|
||||
/**
|
||||
* 批量更新账户余额(不同用户相同账户)
|
||||
*
|
||||
|
@ -200,7 +186,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
Boolean batchUpdateMemberAccountByPkmember(List<MemberAmountDTO> pkMemberList, int pkAccount, Integer isWithdraw);
|
||||
|
||||
|
||||
/**
|
||||
* 更新账户余额(不同用户不同账户)
|
||||
*
|
||||
|
@ -210,7 +195,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
Boolean batchUpdateMemberAccountByPkMemberCountry(List<MemberAmountDTO> pkMemberList, Integer isWithdraw);
|
||||
|
||||
|
||||
/**
|
||||
* 批理更新会员的钱包状态
|
||||
*
|
||||
|
@ -229,14 +213,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
List<CuMemberAccount> selectMemberAccountByPkMember(List<Long> pkMembers);
|
||||
|
||||
/**
|
||||
* 查询会员账户以及会员信息
|
||||
*
|
||||
* @param memberIdList 会员ID列表
|
||||
* @return
|
||||
*/
|
||||
List<CuMemberAccountExt> queryAccountAndMemberInfo(List<Long> memberIdList);
|
||||
|
||||
/**
|
||||
* 根据会员姓名与会员编号查询账户信息
|
||||
*
|
||||
|
@ -245,23 +221,8 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
Object[] queryMemberAccountByMemberCodeAndName(CuMemberAccountVO cuMemberAccountVO);
|
||||
|
||||
|
||||
List<CuMemberAccountExportVO> selectFrozenAmountExport(CuMemberAccountVO cuMemberAccountVO);
|
||||
|
||||
/**
|
||||
* 奖金发放,根据期间发放奖金,更新奖金余额
|
||||
*
|
||||
* @param startPeriod 期间
|
||||
*/
|
||||
void updateMemberAccountGrantByPeriod(Integer pkCountry, Integer startPeriod, Integer endPeriod);
|
||||
|
||||
/**
|
||||
* 奖金可提现,根据期间更新可提现金额,减少可消费金额
|
||||
*
|
||||
* @param startPeriod 期间
|
||||
*/
|
||||
void updateMemberAccountWithdrawalByPeriod(Integer startPeriod, Integer endPeriod, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询账户余额信息
|
||||
*
|
||||
|
@ -271,18 +232,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
|
|||
*/
|
||||
CuMemberRechargeAccountParam findMemberBalanceById(Integer pkAccount, Long pkMember);
|
||||
|
||||
|
||||
/**
|
||||
* 批量更新奖金账号
|
||||
*
|
||||
* @param bonusList 奖金账号参数
|
||||
* @param operateType 操作类型
|
||||
* @param operateType 修改人
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean batchUpdateBonusAccountByPkMember(List<CuMemberBonusAccountParam> bonusList, int operateType, Long pkModified);
|
||||
|
||||
|
||||
/**
|
||||
* 根据来源单号查询奖金账号信息
|
||||
*
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.List;
|
|||
* 会员信息-银行卡信息 服务类
|
||||
*/
|
||||
public interface ICuMemberBankService extends IService<CuMemberBank> {
|
||||
|
||||
/**
|
||||
* 根据主键查询银行卡信息
|
||||
*
|
||||
|
@ -45,7 +46,6 @@ public interface ICuMemberBankService extends IService<CuMemberBank> {
|
|||
*/
|
||||
Integer saveMemberBank(CuMemberBankParam cuMemberBankParam);
|
||||
|
||||
|
||||
/**
|
||||
* 查询绑定的银行卡
|
||||
*
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.hzs.member.account.service;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.account.CuMemberAccount;
|
||||
import com.hzs.common.domain.member.account.CuMemberWithdraw;
|
||||
import com.hzs.common.domain.system.config.BdWithdrawal;
|
||||
import com.hzs.member.account.dto.MemberAccountAudit;
|
||||
import com.hzs.member.account.param.CuMemberWithdrawRejectParam;
|
||||
import com.hzs.member.account.vo.CuMemberPetitionVO;
|
||||
|
@ -16,6 +15,7 @@ import java.util.List;
|
|||
* 会员提现表 服务类
|
||||
*/
|
||||
public interface ICuMemberWithdrawService extends IService<CuMemberWithdraw> {
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户的提现次数
|
||||
*
|
||||
|
@ -32,7 +32,6 @@ public interface ICuMemberWithdrawService extends IService<CuMemberWithdraw> {
|
|||
*/
|
||||
List<CuMemberWithdraw> selectWithdrawByBatch(String batchNO);
|
||||
|
||||
|
||||
/**
|
||||
* 保存提现
|
||||
*
|
||||
|
@ -49,7 +48,6 @@ public interface ICuMemberWithdrawService extends IService<CuMemberWithdraw> {
|
|||
*/
|
||||
Integer updateWithdrawByCode(MemberAccountAudit memberAccountAudit);
|
||||
|
||||
|
||||
/**
|
||||
* 查询列表信息
|
||||
*
|
||||
|
@ -58,7 +56,6 @@ public interface ICuMemberWithdrawService extends IService<CuMemberWithdraw> {
|
|||
*/
|
||||
Object[] selectMemberWithdrawList(CuMemberWithdrawVO cuMemberWithdrawVO);
|
||||
|
||||
|
||||
/**
|
||||
* 查询提现信息详情
|
||||
*
|
||||
|
@ -83,16 +80,6 @@ public interface ICuMemberWithdrawService extends IService<CuMemberWithdraw> {
|
|||
*/
|
||||
Integer withdrawPaymentPositiveByPkId(CuMemberWithdrawVO memberWithdrawVO);
|
||||
|
||||
|
||||
/**
|
||||
* 获取余额
|
||||
*
|
||||
* @param pkMember 用户ID
|
||||
* @param pkCountry 国家ID
|
||||
* @return BigDecimal
|
||||
*/
|
||||
BigDecimal getBalance(Long pkMember, Integer pkCountry, Integer accountsType);
|
||||
|
||||
/**
|
||||
* 计算本次提现应该交的个税
|
||||
*
|
||||
|
@ -113,15 +100,6 @@ public interface ICuMemberWithdrawService extends IService<CuMemberWithdraw> {
|
|||
*/
|
||||
BigDecimal computeServiceCharge(Integer pkCountry, BigDecimal cashAmount);
|
||||
|
||||
/**
|
||||
* 获取取整后的金额
|
||||
*
|
||||
* @param bdWithdrawal 提现配置信息
|
||||
* @param cashAmount 提现金额
|
||||
* @return BigDecimal
|
||||
*/
|
||||
BigDecimal computeRounding(BdWithdrawal bdWithdrawal, BigDecimal cashAmount);
|
||||
|
||||
/**
|
||||
* 获取账户余额
|
||||
*
|
||||
|
@ -131,7 +109,6 @@ public interface ICuMemberWithdrawService extends IService<CuMemberWithdraw> {
|
|||
*/
|
||||
BigDecimal getAccountBalance(Integer accountsType, CuMemberAccount cuMemberAccount);
|
||||
|
||||
|
||||
/**
|
||||
* @param pkIds 主键集合
|
||||
* @param approveState 审核状态
|
||||
|
@ -164,7 +141,6 @@ public interface ICuMemberWithdrawService extends IService<CuMemberWithdraw> {
|
|||
*/
|
||||
Integer confirmWithdrawPetition(CuMemberPetitionVO cuMemberPetitionVO);
|
||||
|
||||
|
||||
/**
|
||||
* 会员端查询提现列表
|
||||
*
|
||||
|
@ -183,7 +159,6 @@ public interface ICuMemberWithdrawService extends IService<CuMemberWithdraw> {
|
|||
*/
|
||||
Integer updateWithdrawStatusByPkId(Long pkId, Long pkModified);
|
||||
|
||||
|
||||
/**
|
||||
* 查询会员是否存在提现记录
|
||||
*
|
||||
|
|
|
@ -324,11 +324,6 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
|
|||
return memberAccountShowVOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CuMemberAccountExt> queryMemberAccountByPkcountry(Integer pkCountry) {
|
||||
return baseMapper.queryMemberAccountByPkCountry(pkCountry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CuMemberRechargeAccountParam> queryMemberAccountByMemberCode(String memberCode, List<Integer> accountTypes, Integer pkCountry) {
|
||||
List<Integer> pkAccounts = new ArrayList<>();
|
||||
|
@ -610,12 +605,6 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
|
|||
return baseMapper.selectMemberAccountByPkMember(pkMembers);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuMemberAccountExt> queryAccountAndMemberInfo(List<Long> memberIdList) {
|
||||
return baseMapper.queryAccountAndMemberInfo(memberIdList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] queryMemberAccountByMemberCodeAndName(CuMemberAccountVO cuMemberAccountVO) {
|
||||
CuMemberAccountExtVO cuMemberAccountExtVO;
|
||||
|
@ -784,28 +773,12 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
|
|||
return cuMemberAccountExtVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMemberAccountGrantByPeriod(Integer pkCountry, Integer startPeriod, Integer endPeriod) {
|
||||
baseMapper.updateMemberAccountGrantByPeriod(pkCountry, startPeriod, endPeriod);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMemberAccountWithdrawalByPeriod(Integer startPeriod, Integer endPeriod, Integer pkCountry) {
|
||||
baseMapper.updateMemberAccountWithdrawalByPeriod(startPeriod, endPeriod, pkCountry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuMemberRechargeAccountParam findMemberBalanceById(Integer pkAccount, Long pkMember) {
|
||||
List<CuMemberRechargeAccountParam> cuMemberRechargeAccountParams = baseMapper.queryMemberAccountByMemberCode(null, Collections.singletonList(pkAccount), pkMember);
|
||||
return CollUtil.isNotEmpty(cuMemberRechargeAccountParams) ? cuMemberRechargeAccountParams.get(0) : null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean batchUpdateBonusAccountByPkMember(List<CuMemberBonusAccountParam> bonusList, int operateType, Long pkModified) {
|
||||
return baseMapper.batchUpdateBonusAccountByPkMember(bonusList, operateType, pkModified);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CuMemberAccountRechargeExt> selectMemberBonusAccountBySourceCode(String sourceCode) {
|
||||
return baseMapper.selectMemberBonusAccountBySourceCode(sourceCode);
|
||||
|
|
|
@ -478,8 +478,7 @@ public class CuMemberRechargeServiceImpl extends ServiceImpl<CuMemberRechargeMap
|
|||
CuMemberRechargeExt cuMemberRechargeExt = baseMapper.selectMemberRechargeListTotal(memberRechargeVO);
|
||||
cuMemberRechargeVOS.add(BeanUtil.copyProperties(cuMemberRechargeExt, CuMemberRechargeVO.class));
|
||||
}
|
||||
Object[] objects = new Object[]{cuMemberRechargeExts, cuMemberRechargeVOS};
|
||||
return objects;
|
||||
return new Object[]{cuMemberRechargeExts, cuMemberRechargeVOS};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,8 +20,6 @@ import com.hzs.common.domain.member.account.CuMemberAccount;
|
|||
import com.hzs.common.domain.member.account.CuMemberTrade;
|
||||
import com.hzs.common.domain.member.account.CuMemberWithdraw;
|
||||
import com.hzs.common.domain.member.account.CuMemberWithdrawExt;
|
||||
import com.hzs.common.domain.member.base.CuMember;
|
||||
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
||||
import com.hzs.common.domain.system.config.*;
|
||||
import com.hzs.common.domain.system.config.ext.BdWithdrawalTaxExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
|
@ -31,13 +29,10 @@ import com.hzs.member.account.dto.MemberAccountAudit;
|
|||
import com.hzs.member.account.mapper.CuMemberWithdrawMapper;
|
||||
import com.hzs.member.account.param.CuMemberWithdrawRejectParam;
|
||||
import com.hzs.member.account.service.*;
|
||||
import com.hzs.member.account.vo.CuMemberBankVO;
|
||||
import com.hzs.member.account.vo.CuMemberPetitionVO;
|
||||
import com.hzs.member.account.vo.CuMemberTradeVO;
|
||||
import com.hzs.member.account.vo.CuMemberWithdrawVO;
|
||||
import com.hzs.member.base.service.ICuMemberService;
|
||||
import com.hzs.system.base.dto.CurrencyDTO;
|
||||
import com.hzs.system.config.IWithdrawalAutoServiceApi;
|
||||
import com.hzs.system.config.IWithdrawalProcessServiceApi;
|
||||
import com.hzs.system.config.IWithdrawalTaxServiceApi;
|
||||
import com.hzs.system.sys.IApprovalServiceApi;
|
||||
|
@ -52,8 +47,6 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.DayOfWeek;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -64,34 +57,19 @@ import java.util.stream.Collectors;
|
|||
@Slf4j
|
||||
public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMapper, CuMemberWithdraw> implements ICuMemberWithdrawService {
|
||||
|
||||
@Autowired
|
||||
private ICuMemberTradeService iCuMemberTradeService;
|
||||
@Autowired
|
||||
private ICuMemberAccountService iCuMemberAccountService;
|
||||
@Autowired
|
||||
private ICuMemberBaseService iCuMemberBaseService;
|
||||
|
||||
@DubboReference
|
||||
IWithdrawalTaxServiceApi withdrawalTaxServiceApi;
|
||||
|
||||
@Autowired
|
||||
ICuMemberTradeService cuMemberTradeService;
|
||||
|
||||
@Autowired
|
||||
ICuMemberAccountService cuMemberAccountService;
|
||||
|
||||
@Autowired
|
||||
ICuMemberBaseService cuMemberBaseService;
|
||||
|
||||
@Autowired
|
||||
ICuMemberBankService cuMemberBankService;
|
||||
|
||||
@Autowired
|
||||
ICuMemberService cuMemberService;
|
||||
|
||||
IWithdrawalTaxServiceApi iWithdrawalTaxServiceApi;
|
||||
@DubboReference
|
||||
IWithdrawalAutoServiceApi withdrawalAutoServiceApi;
|
||||
|
||||
IWithdrawalProcessServiceApi iWithdrawalProcessServiceApi;
|
||||
@DubboReference
|
||||
IWithdrawalProcessServiceApi withdrawalProcessServiceApi;
|
||||
|
||||
@DubboReference
|
||||
IApprovalServiceApi approvalServiceApi;
|
||||
|
||||
IApprovalServiceApi iApprovalServiceApi;
|
||||
|
||||
@Override
|
||||
public List<CuMemberWithdraw> getWithdrawTimes(Long pkMember) {
|
||||
|
@ -106,7 +84,6 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
private BigDecimal[] getIncomeTax(BdWithdrawalTaxExt withdrawalTax, Integer pkCountry, BigDecimal curCashAmount) {
|
||||
//个税比例
|
||||
BigDecimal incomeTax = BigDecimal.ZERO;
|
||||
|
@ -149,10 +126,10 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
*/
|
||||
public Integer updateTradeAndBalancd(CuMemberWithdraw cuMemberWithdraw, EOperationMethod eMethodType) {
|
||||
CuMemberTrade cuMemberTrade = this.getCuMemberTrade(cuMemberWithdraw, eMethodType);
|
||||
cuMemberTradeService.save(cuMemberTrade);
|
||||
iCuMemberTradeService.save(cuMemberTrade);
|
||||
//更新余额表
|
||||
Integer pkAccount = cuMemberWithdraw.getPkAccount();
|
||||
int accountType = cuMemberBaseService.getAccount(pkAccount).getFieldValue();
|
||||
int accountType = iCuMemberBaseService.getAccount(pkAccount).getFieldValue();
|
||||
//提现金额
|
||||
BigDecimal cashAmount = cuMemberWithdraw.getCashAmount();
|
||||
BigDecimal amount = eMethodType.equals(EOperationMethod.INSERT) ? cashAmount.negate() : cashAmount;
|
||||
|
@ -160,7 +137,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
.accountType(accountType).amount(amount).pkModified(cuMemberWithdraw.getPkCreator())
|
||||
.accountClassify(ETradeClassify.WITHDRAWAL.getValue()).pkCountry(cuMemberWithdraw.getPkCountry())
|
||||
.transferType(ETransferType.TRANSFER_IN.getValue()).build();
|
||||
return cuMemberAccountService.updateMemberAccountByMemberCode(param);
|
||||
return iCuMemberAccountService.updateMemberAccountByMemberCode(param);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -182,9 +159,9 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
Integer tradeType = eMethodType.equals(EOperationMethod.INSERT) ? ETradeType.WITHDRAW.getValue() : ETradeType.WITHDRAWAL_REFUSED.getValue();
|
||||
Integer pkAccount = cuMemberWithdraw.getPkAccount();
|
||||
//账户值
|
||||
Integer accountValue = cuMemberBaseService.getAccountValueById(pkAccount);
|
||||
Integer accountValue = iCuMemberBaseService.getAccountValueById(pkAccount);
|
||||
//查询余额
|
||||
BigDecimal balance = cuMemberAccountService.selectBalanceByMemberCode(pkMember, accountValue);
|
||||
BigDecimal balance = iCuMemberAccountService.selectBalanceByMemberCode(pkMember, accountValue);
|
||||
CuMemberTrade memberTrade = CuMemberTrade.builder().pkMember(pkMember)
|
||||
.tradeCode(tradeCode)
|
||||
.pkAccount(pkAccount)
|
||||
|
@ -235,12 +212,9 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
CuMemberWithdrawExt cuMemberWithdrawExt = baseMapper.selectMemberWithdrawListTotal(memberWithdrawVO);
|
||||
cuMemberWithdrawVoS.add(BeanUtil.copyProperties(cuMemberWithdrawExt, CuMemberWithdrawVO.class));
|
||||
}
|
||||
Object[] objects = new Object[]{cuMemberWithdrawExts, cuMemberWithdrawVoS};
|
||||
return objects;
|
||||
|
||||
return new Object[]{cuMemberWithdrawExts, cuMemberWithdrawVoS};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 页面显示公用参数
|
||||
*
|
||||
|
@ -252,18 +226,18 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
Integer pkRate = memberWithdraw.getPkRate();
|
||||
if (null != pkRate) {
|
||||
//汇率
|
||||
exchangeRate = cuMemberBaseService.getCurrencyById(memberWithdraw.getPkRate()).getInExchangeRate();
|
||||
exchangeRate = iCuMemberBaseService.getCurrencyById(memberWithdraw.getPkRate()).getInExchangeRate();
|
||||
} else {
|
||||
//取最新的汇率
|
||||
CurrencyDTO currencyDTO = cuMemberBaseService.getCurrency(cuMemberWithdrawVO.getPkCountry());
|
||||
CurrencyDTO currencyDTO = iCuMemberBaseService.getCurrency(cuMemberWithdrawVO.getPkCountry());
|
||||
exchangeRate = currencyDTO.getInExchangeRate();
|
||||
}
|
||||
|
||||
//查询提现账户
|
||||
Integer pkAccount = memberWithdraw.getPkAccount();
|
||||
Integer accountsType = cuMemberBaseService.getAccountValueById(pkAccount);
|
||||
Integer accountsType = iCuMemberBaseService.getAccountValueById(pkAccount);
|
||||
//查询账户余额
|
||||
CuMemberAccount cuMemberAccount = cuMemberAccountService.queryCuMemberAccountByPkMember(memberWithdraw.getPkMember());
|
||||
CuMemberAccount cuMemberAccount = iCuMemberAccountService.queryCuMemberAccountByPkMember(memberWithdraw.getPkMember());
|
||||
BigDecimal availableBalance;
|
||||
if (accountsType.equals(EAccount.BONUS.getValue())) {
|
||||
BigDecimal balance = ReflectUtils.invokeGetter(cuMemberAccount, MemberFieldConstants.WITHDRAW_ACCOUNT + accountsType);
|
||||
|
@ -295,10 +269,9 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
cuMemberWithdrawVO.setSettleServiceCharge(settleServiceCharge);
|
||||
cuMemberWithdrawVO.setSettleCashAmount(settleCashAmount);
|
||||
cuMemberWithdrawVO.setSettleIssuedAmount(settleIssuedAmount);
|
||||
cuMemberWithdrawVO.setPkAccount(cuMemberBaseService.translateAccountValue(pkAccount));
|
||||
cuMemberWithdrawVO.setPkAccount(iCuMemberBaseService.translateAccountValue(pkAccount));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CuMemberWithdrawVO queryCuMemberWithdrawDetail(Long pkId) {
|
||||
CuMemberWithdrawVO memberRechargeDetailVo = new CuMemberWithdrawVO();
|
||||
|
@ -315,7 +288,6 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
return baseMapper.withdrawPaymentByPkId(cuMemberWithdraw);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer withdrawPaymentPositiveByPkId(CuMemberWithdrawVO memberWithdrawVO) {
|
||||
|
@ -332,79 +304,6 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员提现
|
||||
*
|
||||
* @param withdrawal 提现配置信息
|
||||
* @param cuMemberAccountExts 会员币种表
|
||||
* @param bdAccounts 币种信息
|
||||
* @param accountsType 配置的提现币种
|
||||
* @param pkCountry 国家ID
|
||||
*/
|
||||
public void memberWithDrawal(BdWithdrawal withdrawal, List<CuMemberAccountExt> cuMemberAccountExts, List<BdAccount> bdAccounts, Integer accountsType, Integer pkCountry) {
|
||||
//会员ID 银行卡ID
|
||||
Long pkMember;
|
||||
Long pkBank;
|
||||
//余额 锁定金额
|
||||
BigDecimal balance, lockAccount;
|
||||
//最高自动提现金额
|
||||
BigDecimal upperBound = withdrawal.getUpperBound();
|
||||
//最低自动提现金额
|
||||
BigDecimal lowerBound = withdrawal.getLowerBound();
|
||||
//配置文件中的提现次数
|
||||
Integer withdrawalNumber = withdrawal.getWithdrawalNumber();
|
||||
if (CollUtil.isNotEmpty(cuMemberAccountExts)) {
|
||||
//查询每个会员正在参与审核的次数
|
||||
List<CuMemberWithdrawExt> withdrawTimesByPkCountry = baseMapper.getWithdrawTimesByPkCountry(pkCountry);
|
||||
Map<Long, Integer> withdrawTimes = withdrawTimesByPkCountry.stream().collect(Collectors.toMap(CuMemberWithdrawExt::getPkMember, CuMemberWithdrawExt::getTimes));
|
||||
//汇率
|
||||
CurrencyDTO currencyDTO = cuMemberBaseService.getCurrency(pkCountry);
|
||||
for (CuMemberAccountExt cuMemberAccountExt : cuMemberAccountExts) {
|
||||
pkBank = cuMemberAccountExt.getPkBank();
|
||||
//是否绑定银行卡
|
||||
CuMemberBankVO memberBank = cuMemberBankService.selectCuMemberBankById(pkBank);
|
||||
log.info("----------是否绑定银行卡");
|
||||
if (null != memberBank) {
|
||||
log.info("----------绑定银行卡");
|
||||
pkMember = cuMemberAccountExt.getPkMember();
|
||||
//获取余额
|
||||
balance = getAvailableBalance(accountsType, cuMemberAccountExt);
|
||||
//是否取整
|
||||
balance = computeRounding(withdrawal, balance);
|
||||
// 提现金额在配置金额之间
|
||||
if (balance.compareTo(lowerBound) > 0 && balance.compareTo(upperBound) < 0) {
|
||||
log.info("----------提现开始");
|
||||
Integer times = withdrawTimes.get(pkMember) == null ? 0 : withdrawTimes.get(pkMember);
|
||||
//比较正在提现次数与配置的最大提现次数
|
||||
if (times <= withdrawalNumber) {
|
||||
//本次应缴个税
|
||||
BigDecimal payIncomeTax = computeIncomeTaxValue(pkMember, balance, pkCountry, lowerBound);
|
||||
//手续费金额
|
||||
BigDecimal serviceChargeAmount = computeServiceCharge(pkCountry, balance);
|
||||
BigDecimal issuedAmount = balance.subtract(payIncomeTax).subtract(serviceChargeAmount);
|
||||
String code = CommonUtil.createSerialNumber(EOrderPrefix.WITHDRAWAL_CODE.getValue());
|
||||
CuMember member = cuMemberService.getMember(pkMember);
|
||||
String remarks = member.getMemberCode() + "自动申请提现" + balance.toString();
|
||||
CuMemberWithdraw cuMemberWithdraw = CuMemberWithdraw.builder().pkMember(pkMember)
|
||||
.pkAccount(bdAccounts.get(0).getPkId()).pkBank(pkBank)
|
||||
.pkRate(currencyDTO.getPkId()).cashAmount(balance)
|
||||
.serviceCharge(serviceChargeAmount).incomeTax(payIncomeTax)
|
||||
.issuedAmount(issuedAmount).withdrawCode(code).remarks(remarks).build();
|
||||
cuMemberWithdraw.setApproveState(EApproveStatus.WAIT_SUBMIT.getValue());
|
||||
cuMemberWithdraw.setDelFlag(EDelFlag.UN_DELETE.getValue());
|
||||
cuMemberWithdraw.setPkCountry(pkCountry);
|
||||
cuMemberWithdraw.setPkCreator(pkMember);
|
||||
//保存提现、交易流水、余额信息
|
||||
baseMapper.insert(cuMemberWithdraw);
|
||||
this.updateTradeAndBalancd(cuMemberWithdraw, EOperationMethod.INSERT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取余额
|
||||
*
|
||||
|
@ -447,44 +346,10 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
return account.subtract(lockConsume).subtract(lockTransfer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询自动提现的时间
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean isWithdrawalCycle(Integer pkCountry) {
|
||||
//当前时间位于星期的第几天
|
||||
LocalDate localDate = LocalDate.now();
|
||||
DayOfWeek dayOfWeek = localDate.getDayOfWeek();
|
||||
Integer dayOfWeekNum = dayOfWeek.getValue();
|
||||
//自动提现配置的提现周期
|
||||
List<BdWithdrawalAuto> listR = withdrawalAutoServiceApi.queryWithdrawalAuto(pkCountry).getData();
|
||||
for (BdWithdrawalAuto withdrawalAuto : listR) {
|
||||
Integer withdrawalCycle = withdrawalAuto.getWithdrawalCycle();
|
||||
if (dayOfWeekNum.equals(withdrawalCycle)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getBalance(Long pkMember, Integer pkCountry, Integer accountsType) {
|
||||
//提现账户
|
||||
if (null == accountsType) {
|
||||
List<BdAccount> bdAccounts = cuMemberBaseService.getAccountByCountry(EAccountProperty.IS_WITHDRAWAL.getValue(), pkCountry);
|
||||
accountsType = bdAccounts.get(0).getFieldValue();
|
||||
}
|
||||
//查询账户余额
|
||||
return cuMemberAccountService.selectBalanceByMemberCode(pkMember, accountsType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal computeIncomeTaxValue(Long pkMember, BigDecimal cashAmount, Integer pkCountry, BigDecimal minAmount) {
|
||||
//获取个税配置
|
||||
R<BdWithdrawalTaxExt> bdWithdrawalTaxExtR = withdrawalTaxServiceApi.queryWithdrawalTax(pkCountry);
|
||||
R<BdWithdrawalTaxExt> bdWithdrawalTaxExtR = iWithdrawalTaxServiceApi.queryWithdrawalTax(pkCountry);
|
||||
BdWithdrawalTaxExt withdrawalTax = bdWithdrawalTaxExtR.getData();
|
||||
if (null == withdrawalTax) {
|
||||
return BigDecimal.ZERO;
|
||||
|
@ -517,7 +382,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
|
||||
@Override
|
||||
public BigDecimal computeServiceCharge(Integer pkCountry, BigDecimal cashAmount) {
|
||||
BdWithdrawalProcess withdrawalProcess = withdrawalProcessServiceApi.queryBdWithdrawalProcess(pkCountry).getData();
|
||||
BdWithdrawalProcess withdrawalProcess = iWithdrawalProcessServiceApi.queryBdWithdrawalProcess(pkCountry).getData();
|
||||
//手续费类型
|
||||
Integer serviceType = withdrawalProcess.getServiceType();
|
||||
BigDecimal serviceRatio = withdrawalProcess.getServiceRatio();
|
||||
|
@ -530,27 +395,13 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
//手续费金额 = 本次提现金额 * 手续费比例
|
||||
return cashAmount.multiply(serviceChargeeRatio).setScale(4, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal computeRounding(BdWithdrawal bdWithdrawal, BigDecimal cashAmount) {
|
||||
BigDecimal roundIngAmount = cashAmount;
|
||||
Integer isRounding = bdWithdrawal.getIsRounding();
|
||||
if (isRounding.equals(EYesNo.YES.getIntValue())) {
|
||||
//向下取整
|
||||
roundIngAmount = cashAmount.setScale(0, BigDecimal.ROUND_DOWN);
|
||||
}
|
||||
return roundIngAmount;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuMemberWithdraw> getWithdrawApproveStateByIds(List<Long> pkIds, Integer approveState) {
|
||||
return baseMapper.getWithdrawApproveStateByIds(pkIds, approveState);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CuMemberPetitionVO showMemberWithdrawPetition(List<Long> pkIds, Integer approveState) {
|
||||
CuMemberPetitionVO memberPetitionVo = new CuMemberPetitionVO();
|
||||
|
@ -563,7 +414,6 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
return memberPetitionVo;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuMemberWithdrawVO> checkWithdrawPetitionByState(List<Long> pkIds, Integer approveState) {
|
||||
return BeanUtil.copyToList(baseMapper.showMemberWithdrawPetition(pkIds, approveState), CuMemberWithdrawVO.class);
|
||||
|
@ -587,7 +437,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
List<String> withdrawCodeList = cuMemberWithdrawExts.stream().map(CuMemberWithdrawExt::getWithdrawCode).collect(Collectors.toList());
|
||||
CuMemberTradeVO memberTradeVO = CuMemberTradeVO.builder().sourceCode(businessNo)
|
||||
.tradeCodes(withdrawCodeList).pkModified(loginUser.getUserId()).build();
|
||||
cuMemberTradeService.updateSourceCodeByTradeCode(memberTradeVO);
|
||||
iCuMemberTradeService.updateSourceCodeByTradeCode(memberTradeVO);
|
||||
|
||||
List<CuMemberWithdrawVO> memberWithdrawList = memberPetitionVo.getMemberWithdrawList();
|
||||
//提交提现用户
|
||||
|
@ -600,7 +450,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
.remark(memberPetitionVo.getDescription())
|
||||
.pkMemberList(pkMembers).build();
|
||||
//调用审批接口
|
||||
R<String> submit = approvalServiceApi.submit(approvalSubmitDTO, loginUser);
|
||||
R<String> submit = iApprovalServiceApi.submit(approvalSubmitDTO, loginUser);
|
||||
if (!submit.isSuccess()) {
|
||||
throw new RuntimeException(submit.getMsg());
|
||||
}
|
||||
|
@ -636,7 +486,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
.freeSignFlag(false).build();
|
||||
}
|
||||
businessLogDTOList.add(businessLog);
|
||||
cuMemberBaseService.operationLogMQ(businessLogDTOList);
|
||||
iCuMemberBaseService.operationLogMQ(businessLogDTOList);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -647,7 +497,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
List<CuMemberWithdrawExt> cuMemberWithdrawList = baseMapper.selectMemberWithdrawListByPkMember(pkMember, pkCountry);
|
||||
if (CollUtil.isNotEmpty(cuMemberWithdrawList)) {
|
||||
//查询币种值
|
||||
List<BdAccount> allAccounts = cuMemberBaseService.getAccountByCountryId(pkCountry);
|
||||
List<BdAccount> allAccounts = iCuMemberBaseService.getAccountByCountryId(pkCountry);
|
||||
Map<Integer, BdAccount> map = allAccounts.stream().collect(Collectors.toMap(BdAccount::getPkId, o -> o));
|
||||
for (CuMemberWithdrawExt ext : cuMemberWithdrawList) {
|
||||
cuMemberWithdrawVO = BeanUtil.copyProperties(ext, CuMemberWithdrawVO.class);
|
||||
|
@ -669,18 +519,18 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
BigDecimal backAmount = cuMemberWithdraw.getCashAmount();
|
||||
if (backAmount.compareTo(BigDecimal.ZERO) > 0) {
|
||||
//插入交易明细表
|
||||
cuMemberTradeService.save(getCuMemberTradeInfo(cuMemberWithdraw));
|
||||
iCuMemberTradeService.save(getCuMemberTradeInfo(cuMemberWithdraw));
|
||||
//更新余额表
|
||||
CuMemberAccount cuMemberAccount = this.getCuMemberAccount(cuMemberWithdraw, backAmount);
|
||||
cuMemberAccount.setPkCountry(cuMemberWithdraw.getPkCountry());
|
||||
cuMemberAccountService.updateMemberAccount(cuMemberAccount, pkModified);
|
||||
iCuMemberAccountService.updateMemberAccount(cuMemberAccount, pkModified);
|
||||
}
|
||||
return baseMapper.updateWithdrawStatusByPkId(pkId, pkModified);
|
||||
}
|
||||
|
||||
private CuMemberAccount getCuMemberAccount(CuMemberWithdraw cuMemberWithdraw, BigDecimal backAmount) {
|
||||
Integer pkAccount = cuMemberWithdraw.getPkAccount();
|
||||
BdAccount account = cuMemberBaseService.getAccount(pkAccount);
|
||||
BdAccount account = iCuMemberBaseService.getAccount(pkAccount);
|
||||
if (account.getFieldValue().equals(EAccount.BONUS.getValue())) {
|
||||
return CuMemberAccount.builder()
|
||||
.account4(backAmount)
|
||||
|
@ -704,11 +554,11 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
private CuMemberTrade getCuMemberTradeInfo(CuMemberWithdraw cuMemberWithdraw) {
|
||||
Long pkMember = cuMemberWithdraw.getPkMember();
|
||||
Integer pkAccount = cuMemberWithdraw.getPkAccount();
|
||||
BdAccount account = cuMemberBaseService.getAccount(pkAccount);
|
||||
BdAccount account = iCuMemberBaseService.getAccount(pkAccount);
|
||||
//交易金额
|
||||
BigDecimal tradeAmount = cuMemberWithdraw.getCashAmount();
|
||||
//查询余额
|
||||
BigDecimal balance = cuMemberAccountService.selectBalanceByMemberCode(pkMember, account.getFieldValue());
|
||||
BigDecimal balance = iCuMemberAccountService.selectBalanceByMemberCode(pkMember, account.getFieldValue());
|
||||
CuMemberTrade memberTrade = CuMemberTrade.builder().pkMember(pkMember)
|
||||
.tradeCode(CommonUtil.createSerialNumber(EOrderPrefix.WITHDRAWAL_CODE.getValue()))
|
||||
.pkAccount(pkAccount)
|
||||
|
@ -734,13 +584,13 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
|
||||
@Override
|
||||
public void withdrawReject(CuMemberWithdrawRejectParam param) {
|
||||
if(ObjectUtil.isEmpty(param)){
|
||||
if (ObjectUtil.isEmpty(param)) {
|
||||
throw new ServiceException("参数异常!");
|
||||
}
|
||||
if(CollUtil.isEmpty(param.getIdList())){
|
||||
if (CollUtil.isEmpty(param.getIdList())) {
|
||||
throw new ServiceException("请选择需要驳回的数据!");
|
||||
}
|
||||
if(StrUtil.isEmpty(param.getRejectRemark())){
|
||||
if (StrUtil.isEmpty(param.getRejectRemark())) {
|
||||
throw new ServiceException("请录入驳回原因!");
|
||||
}
|
||||
LambdaQueryWrapper<CuMemberWithdraw> wrapper = new LambdaQueryWrapper<>();
|
||||
|
@ -753,13 +603,13 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl<CuMemberWithdrawMap
|
|||
baseMapper.update(withdraw, wrapper);
|
||||
List<CuMemberWithdraw> cuMemberWithdrawList = baseMapper.selectList(wrapper);
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
if(CollUtil.isNotEmpty(cuMemberWithdrawList)){
|
||||
if (CollUtil.isNotEmpty(cuMemberWithdrawList)) {
|
||||
for (CuMemberWithdraw cuMemberWithdraw : cuMemberWithdrawList) {
|
||||
BusinessCommissionDTO businessCommissionDTO = BusinessCommissionDTO.builder()
|
||||
.tradeCode(cuMemberWithdraw.getWithdrawCode()).pkCountry(pkCountry)
|
||||
.tradeType(EApprovalBusiness.WITHDRAWAL.getValue())
|
||||
.pkCreator(SecurityUtils.getUserId()).build();
|
||||
cuMemberTradeService.businessCommissionReject(businessCommissionDTO);
|
||||
iCuMemberTradeService.businessCommissionReject(businessCommissionDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,15 +13,8 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会员提现表
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-09-06
|
||||
*/
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Builder
|
||||
|
@ -227,7 +220,6 @@ public class CuMemberWithdrawVO extends CuMemberBaseVO {
|
|||
/**
|
||||
* 状态(0=未打款,1=已打款,2=已充正,3=撤消)
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.ENU_WITHDRAW_STATUS)
|
||||
private Integer status;
|
||||
|
||||
@Excel(name = "打款状态")
|
||||
|
|
|
@ -235,19 +235,6 @@
|
|||
</if>
|
||||
</update>
|
||||
|
||||
<select id="queryMemberAccountByPkCountry" resultType="com.hzs.common.domain.member.ext.CuMemberAccountExt">
|
||||
select a.*, b.pk_id pkBank
|
||||
from cu_member_account a,
|
||||
cu_member_bank b
|
||||
where a.pk_member = b.pk_member
|
||||
and a.del_flag = 0
|
||||
and b.del_flag = 0
|
||||
and b.default_card = 1
|
||||
and a.is_withdraw = 0
|
||||
and a.pk_country = #{pkCountry}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryMemberAccountByMemberCode" resultType="com.hzs.member.account.dto.CuMemberRechargeAccountParam">
|
||||
select pk_id, pk_member, account_name, decode(account_name, 'ACCOUNT4',
|
||||
WITHDRAW_ACCOUNT4-lock_withdraw_account4, 0) withdrawBalance,
|
||||
|
@ -989,53 +976,6 @@
|
|||
#{item.pkMember}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateMemberAccountGrantByPeriod">
|
||||
merge into cu_member_account a
|
||||
using (select pk_member,
|
||||
sum(real_income_total * bc.out_exchange_rate) account4,
|
||||
sum(back_points * bc.out_exchange_rate) account5,
|
||||
sum(repur_coupon_subtotal * bc.out_exchange_rate) account8,
|
||||
sum(global_points * bc.out_exchange_rate) account9,
|
||||
sum(car_award_points * bc.out_exchange_rate) account10
|
||||
from cu_member_bonus cb
|
||||
inner join bd_currency bc
|
||||
on cb.pk_country = bc.pk_country
|
||||
where cb.del_flag = 0
|
||||
and cb.pk_country = #{pkCountry}
|
||||
and period between #{startPeriod} and #{endPeriod}
|
||||
and cb.grant_status = 2
|
||||
group by pk_member
|
||||
) b
|
||||
on (a.pk_member = b.pk_member)
|
||||
when matched then
|
||||
update set a.account4 = a.account4 + b.account4,
|
||||
a.consume_account4 = a.consume_account4 + b.account4,
|
||||
a.account5 = a.account5 + b.account5,
|
||||
a.account8 = a.account8 + b.account8
|
||||
</update>
|
||||
<update id="updateMemberAccountWithdrawalByPeriod">
|
||||
merge into cu_member_account a
|
||||
using (
|
||||
select a.pk_member, (case when CONSUME_ACCOUNT4 >= a.consume_money then a.consume_money else CONSUME_ACCOUNT4 end) consume_money
|
||||
from (select ct.pk_member, sum(cd.consume_money) consume_money
|
||||
from cu_member_trade ct
|
||||
inner join cu_member_trade_detail cd
|
||||
on cd.pk_member_trade = ct.pk_id
|
||||
where cd.del_flag = 0
|
||||
and ct.del_flag = 0
|
||||
and cd.trade_statue = 1
|
||||
and cd.period between #{startPeriod} and #{endPeriod}
|
||||
and ct.pk_country = #{pkCountry}
|
||||
group by ct.pk_member) a
|
||||
inner join cu_member_account ca
|
||||
on a.pk_member = ca.pk_member
|
||||
where ca.CONSUME_ACCOUNT4 > 0
|
||||
) b
|
||||
on (a.pk_member = b.pk_member)
|
||||
when matched then
|
||||
update set a.withdraw_account4 = a.withdraw_account4 + b.consume_money,
|
||||
a.consume_account4 = a.consume_account4 - b.consume_money
|
||||
</update>
|
||||
|
||||
<select id="selectMemberAccountByPkMember" resultType="com.hzs.common.domain.member.account.CuMemberAccount">
|
||||
select a.pk_member,
|
||||
|
@ -1064,25 +1004,6 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询会员账户以及会员信息 -->
|
||||
<select id="queryAccountAndMemberInfo" resultType="com.hzs.common.domain.member.ext.CuMemberAccountExt">
|
||||
select cm.member_code,
|
||||
cm.member_name,
|
||||
cm.pk_parent,
|
||||
cm.pk_place_parent,
|
||||
cma.*
|
||||
from cu_member cm
|
||||
inner join cu_member_account cma
|
||||
on cm.pk_id = cma.pk_member
|
||||
where cm.del_flag = 0
|
||||
<if test="memberIdList != null and memberIdList.size > 0">
|
||||
and cm.pk_id in
|
||||
<foreach collection="memberIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryWalletBalanceByPkMember" resultType="com.hzs.member.account.dto.CuMemberRechargeAccountParam">
|
||||
select pk_id,
|
||||
decode(account_name, 'ACCOUNT4', WITHDRAW_ACCOUNT4 - lock_withdraw_account4, 0) withdrawBalance,
|
||||
|
@ -1217,52 +1138,6 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="batchUpdateBonusAccountByPkMember">
|
||||
MERGE INTO cu_member_account m
|
||||
USING
|
||||
(
|
||||
<foreach collection="bonusList" item="item" index="index" separator="union">
|
||||
select #{item.pkMember} pk_member,
|
||||
<if test='operateType == "1"'>
|
||||
#{item.account4} account4,
|
||||
#{item.consumeAccount4} consumeAccount4,
|
||||
</if>
|
||||
<if test='operateType == "2"'>
|
||||
#{item.account4} account4,
|
||||
#{item.withdrawAccount4} withdrawAccount4,
|
||||
</if>
|
||||
<if test='pkAccount == "3"'>
|
||||
#{item.account4} account4,
|
||||
#{item.consumeAccount4} consumeAccount4,
|
||||
#{item.withdrawAccount4} withdrawAccount4,
|
||||
</if>
|
||||
FROM DUAL
|
||||
</foreach>
|
||||
) t
|
||||
ON ( t.pk_member=m.pk_member and m.pk_member in
|
||||
<foreach collection="bonusList" item="item" open="(" close=")" separator=",">
|
||||
#{item.pkMember}
|
||||
</foreach>)
|
||||
WHEN MATCHED THEN
|
||||
UPDATE SET
|
||||
<if test='operateType == "1"'>
|
||||
m.account4 = NVL(t.account4, 0) + m.account4,
|
||||
m.consume_account4 = NVL(t.consumeAccount4, 0) + m.consume_account4,
|
||||
</if>
|
||||
<if test='operateType == "2"'>
|
||||
m.account4 = NVL(t.account4, 0) + m.account4,
|
||||
m.withdraw_account4 = NVL(t.withdrawAccount4, 0) + m.withdraw_account4,
|
||||
</if>
|
||||
<if test='operateType == "3"'>
|
||||
m.account4 = NVL(t.account4, 0) + m.account4,
|
||||
m.consume_account4 = NVL(t.consumeAccount4, 0) + m.consume_account4,
|
||||
m.withdraw_account4 = NVL(t.withdrawAccount4, 0) + m.withdraw_account4,
|
||||
</if>
|
||||
m.MODIFIED_TIME = sysdate,m.pk_modified = #{pkModified}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectMemberBonusAccountBySourceCode" resultType="com.hzs.common.domain.member.account.CuMemberAccountRechargeExt">
|
||||
SELECT r.pk_member pkMember,
|
||||
ma.account4 account4,
|
||||
|
|
|
@ -34,19 +34,6 @@
|
|||
<result column="BATCH" property="batch"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
DEL_FLAG
|
||||
,
|
||||
PK_COUNTRY,
|
||||
PK_CREATOR,
|
||||
CREATION_TIME,
|
||||
PK_MODIFIED,
|
||||
MODIFIED_TIME,
|
||||
PK_ID, PK_MEMBER, WITHDRAW_CODE, PK_ACCOUNT, PK_BANK, PK_RATE, CASH_AMOUNT, SERVICE_CHARGE, INCOME_TAX,
|
||||
ISSUED_AMOUNT,APPROVE_STATE, PAYMENT_TIME, PAYER, REMARKS, APPROVER, APPROVE_TIME, PK_ROLE, ROLE_NAME,STATUS,PAYER_REMARKS,APPROVE_REMARKS
|
||||
</sql>
|
||||
|
||||
<sql id="select_base">
|
||||
SELECT r.*,
|
||||
m.member_code memberCode,
|
||||
|
@ -55,7 +42,7 @@
|
|||
b.sub_bank_name subBankName,
|
||||
b.card_number cardNumber,
|
||||
b.account_name accountName,
|
||||
b.id_card idCard,
|
||||
nvl(m.id_card, b.id_card) idCard,
|
||||
b.phone,
|
||||
b.pk_id pkBdBank,
|
||||
u.user_name paymentName,
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
package com.hzs.system.base.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.system.base.BdCurrency;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 币种表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-04
|
||||
*/
|
||||
public interface BdCurrencyMapper extends BaseMapper<BdCurrency> {
|
||||
|
||||
|
|
|
@ -6,22 +6,12 @@ import com.hzs.common.domain.system.base.BdCurrency;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2022/8/29 10:59
|
||||
* @Classname: IBdCurrencyService
|
||||
* @PackageName: com.hzs.system.base.service
|
||||
*/
|
||||
public interface IBdCurrencyService extends IService<BdCurrency> {
|
||||
|
||||
/**
|
||||
* 根据国家获得币种
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return: BdCurrency
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/8 15:05
|
||||
*/
|
||||
BdCurrency getCurrency(Integer pkCountry);
|
||||
|
||||
|
@ -50,10 +40,6 @@ public interface IBdCurrencyService extends IService<BdCurrency> {
|
|||
|
||||
/**
|
||||
* 查询所有的币种汇率
|
||||
*
|
||||
* @return: List<BdCurrency>
|
||||
* @Author: sui q
|
||||
* @Date: 2023/3/4 16:06
|
||||
*/
|
||||
List<BdCurrency> queryAllBdCurrency();
|
||||
|
||||
|
@ -61,9 +47,6 @@ public interface IBdCurrencyService extends IService<BdCurrency> {
|
|||
* 更新汇率根据id
|
||||
*
|
||||
* @param pkId 主键
|
||||
* @return: void
|
||||
* @Author: sui q
|
||||
* @Date: 2023/3/10 15:37
|
||||
*/
|
||||
void updateCurrencyById(Integer pkId);
|
||||
|
||||
|
|
|
@ -18,20 +18,13 @@ import java.math.RoundingMode;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Author: yuhui
|
||||
* @Description: 币种服务类
|
||||
* 币种服务类
|
||||
*/
|
||||
@Service
|
||||
public class BdCurrencyServiceImpl extends ServiceImpl<BdCurrencyMapper, BdCurrency> implements IBdCurrencyService {
|
||||
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
public void setRedisService(RedisService redisService) {
|
||||
this.redisService = redisService;
|
||||
}
|
||||
private RedisService redisService;
|
||||
|
||||
@Override
|
||||
public BdCurrency getCurrency(Integer pkCountry) {
|
||||
|
@ -69,11 +62,6 @@ public class BdCurrencyServiceImpl extends ServiceImpl<BdCurrencyMapper, BdCurre
|
|||
return bdCurrency;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id 查询所属历史币种
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public BdCurrency getByHistoryPkid(Integer pkId) {
|
||||
BdCurrency bdCurrency = redisService.getCacheObject(CacheConstants.BD_HISTORY_CURRENCY_PK + pkId);
|
||||
|
@ -88,13 +76,6 @@ public class BdCurrencyServiceImpl extends ServiceImpl<BdCurrencyMapper, BdCurre
|
|||
return bdCurrency;
|
||||
}
|
||||
|
||||
/**
|
||||
* 本地币转换为美金
|
||||
*
|
||||
* @param localCurrency 本地币
|
||||
* @param pkCountry 结算国
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public BigDecimal getDollar(BigDecimal localCurrency, Integer pkCountry) {
|
||||
BdCurrency bdCurrency = getCurrency(pkCountry);
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
package com.hzs.system.config.controller.manage;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.enums.EDelFlag;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
import com.hzs.common.core.web.domain.AjaxResult;
|
||||
|
@ -21,12 +18,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 自动提现明细表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-08-31
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
@ -34,89 +26,57 @@ import java.util.List;
|
|||
public class BdWithdrawalAutoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBdWithdrawalAutoService withdrawalAutoService;
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
public void setRedisService(RedisService redisService) {
|
||||
this.redisService = redisService;
|
||||
}
|
||||
private IBdWithdrawalAutoService iBdWithdrawalAutoService;
|
||||
|
||||
/**
|
||||
* @description: 查询自动提现设置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:20
|
||||
* @param: [bdWithdrawal]
|
||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
||||
* 查询自动提现设置列表
|
||||
**/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BdWithdrawalAuto withdrawalAuto) {
|
||||
startPage();
|
||||
withdrawalAuto.setPkCountry(SecurityUtils.getPkCountry());
|
||||
QueryWrapper<BdWithdrawalAuto> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
|
||||
if(StringUtils.isNotNull(withdrawalAuto.getPkWithdrawal())){
|
||||
queryWrapper.eq("PK_WITHDRAWAL",withdrawalAuto.getPkWithdrawal());
|
||||
QueryWrapper<BdWithdrawalAuto> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
if (StringUtils.isNotNull(withdrawalAuto.getPkWithdrawal())) {
|
||||
queryWrapper.eq("PK_WITHDRAWAL", withdrawalAuto.getPkWithdrawal());
|
||||
}
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
List<BdWithdrawalAuto> list = withdrawalAutoService.list(queryWrapper);
|
||||
List<BdWithdrawalAuto> list = iBdWithdrawalAutoService.list(queryWrapper);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 新增自动提现设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [bdWithdrawal]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 新增自动提现设置
|
||||
**/
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(@RequestBody BdWithdrawalAuto withdrawalAuto) {
|
||||
withdrawalAuto.setPkCountry(SecurityUtils.getPkCountry());
|
||||
withdrawalAuto.setPkCreator(SecurityUtils.getUserId());
|
||||
withdrawalAuto.setCreationTime(new Date());
|
||||
redisService.deleteObject(CacheConstants.BD_WITHDRAWAL_AUTO + SecurityUtils.getPkCountry());
|
||||
return toAjax(withdrawalAutoService.save(withdrawalAuto));
|
||||
return toAjax(iBdWithdrawalAutoService.save(withdrawalAuto));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 修改自动提现设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [bdWithdrawal]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 修改自动提现设置
|
||||
**/
|
||||
@PostMapping("/update")
|
||||
public AjaxResult update(@RequestBody BdWithdrawalAuto withdrawalAuto) {
|
||||
withdrawalAuto.setPkModified(SecurityUtils.getUserId());
|
||||
withdrawalAuto.setModifiedTime(new Date());
|
||||
redisService.deleteObject(CacheConstants.BD_WITHDRAWAL_AUTO + SecurityUtils.getPkCountry());
|
||||
return toAjax(withdrawalAutoService.updateById(withdrawalAuto));
|
||||
return toAjax(iBdWithdrawalAutoService.updateById(withdrawalAuto));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询单条自动提现设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 查询单条自动提现设置
|
||||
**/
|
||||
@GetMapping("/getOne/{pkId}")
|
||||
public AjaxResult getOne(@PathVariable Long pkId) {
|
||||
BdWithdrawalAuto withdrawalAuto = withdrawalAutoService.getById(pkId);
|
||||
BdWithdrawalAuto withdrawalAuto = iBdWithdrawalAutoService.getById(pkId);
|
||||
return AjaxResult.success(withdrawalAuto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 删除自动提现设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 删除自动提现设置
|
||||
**/
|
||||
@DeleteMapping("/{pkId}")
|
||||
public AjaxResult delete(@PathVariable Long pkId) {
|
||||
|
@ -125,7 +85,7 @@ public class BdWithdrawalAutoController extends BaseController {
|
|||
updateWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue());
|
||||
updateWrapper.set("PK_MODIFIED", SecurityUtils.getUserId());
|
||||
updateWrapper.set("MODIFIED_TIME", new Date());
|
||||
redisService.deleteObject(CacheConstants.BD_WITHDRAWAL_AUTO + SecurityUtils.getPkCountry());
|
||||
return toAjax(withdrawalAutoService.update(updateWrapper));
|
||||
return toAjax(iBdWithdrawalAutoService.update(updateWrapper));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
package com.hzs.system.config.controller.manage;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.core.utils.poi.ExcelUtil;
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
|
@ -21,13 +18,10 @@ import com.hzs.common.domain.system.config.ext.BdWithdrawalAutoExt;
|
|||
import com.hzs.common.domain.system.config.ext.BdWithdrawalExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.util.TransactionUtils;
|
||||
import com.hzs.system.base.ITransactionServiceApi;
|
||||
import com.hzs.system.base.service.IBdCurrencyService;
|
||||
import com.hzs.system.config.IWithdrawalServiceApi;
|
||||
import com.hzs.system.config.service.IBdWithdrawalAutoService;
|
||||
import com.hzs.system.config.service.IBdWithdrawalService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -38,12 +32,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 提现设置主表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-08-29
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
@ -51,58 +40,42 @@ import java.util.List;
|
|||
public class BdWithdrawalController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBdWithdrawalService withdrawalService;
|
||||
@DubboReference
|
||||
private ITransactionServiceApi iTransactionServiceApi;
|
||||
private RedisService redisService;
|
||||
@DubboReference
|
||||
private IWithdrawalServiceApi withdrawalServiceApi;
|
||||
private IBdWithdrawalService iBdWithdrawalService;
|
||||
@Autowired
|
||||
private IBdWithdrawalAutoService withdrawalAutoService;
|
||||
private IBdWithdrawalAutoService iBdWithdrawalAutoService;
|
||||
@Autowired
|
||||
IBdCurrencyService currencyService;
|
||||
|
||||
|
||||
@Autowired
|
||||
public void setRedisService(RedisService redisService) {
|
||||
this.redisService = redisService;
|
||||
}
|
||||
|
||||
private IBdCurrencyService iBdCurrencyService;
|
||||
|
||||
/**
|
||||
* @description: 查询提现设置列表 理论每个国家只有一个提现配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:20
|
||||
* @param: [withdrawalParam]
|
||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
||||
* 查询提现设置列表 理论每个国家只有一个提现配置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_CONFIG,method = EOperationMethod.SELECT)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_CONFIG, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BdWithdrawalExt withdrawalExt) {
|
||||
startPage();
|
||||
withdrawalExt.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<BdWithdrawalExt> listExt = withdrawalService.listExt(withdrawalExt);
|
||||
for(BdWithdrawalExt bwd: listExt){
|
||||
List<BdWithdrawalExt> listExt = iBdWithdrawalService.listExt(withdrawalExt);
|
||||
for (BdWithdrawalExt bwd : listExt) {
|
||||
//暂时使用中国
|
||||
if(StringUtils.isNotNull(bwd.getMinAmount())){
|
||||
bwd.setMinAmountUsa(currencyService.getDollar(bwd.getMinAmount(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getMinAmount())) {
|
||||
bwd.setMinAmountUsa(iBdCurrencyService.getDollar(bwd.getMinAmount(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
if(StringUtils.isNotNull(bwd.getMaxAmount())){
|
||||
bwd.setMaxAmountUsa(currencyService.getDollar(bwd.getMaxAmount(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getMaxAmount())) {
|
||||
bwd.setMaxAmountUsa(iBdCurrencyService.getDollar(bwd.getMaxAmount(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
if(StringUtils.isNotNull(bwd.getLowerBound())){
|
||||
bwd.setLowerBoundUsa(currencyService.getDollar(bwd.getLowerBound(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getLowerBound())) {
|
||||
bwd.setLowerBoundUsa(iBdCurrencyService.getDollar(bwd.getLowerBound(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
if(StringUtils.isNotNull(bwd.getUpperBound())){
|
||||
bwd.setUpperBoundUsa(currencyService.getDollar(bwd.getUpperBound(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getUpperBound())) {
|
||||
bwd.setUpperBoundUsa(iBdCurrencyService.getDollar(bwd.getUpperBound(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
|
||||
QueryWrapper<BdWithdrawalAuto> queryWrapperAuto = new QueryWrapper();
|
||||
queryWrapperAuto.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
|
||||
if(StringUtils.isNotNull(bwd.getPkId())){
|
||||
queryWrapperAuto.eq("PK_WITHDRAWAL",bwd.getPkId());
|
||||
QueryWrapper<BdWithdrawalAuto> queryWrapperAuto = new QueryWrapper<>();
|
||||
queryWrapperAuto.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
if (StringUtils.isNotNull(bwd.getPkId())) {
|
||||
queryWrapperAuto.eq("PK_WITHDRAWAL", bwd.getPkId());
|
||||
}
|
||||
List<BdWithdrawalAuto> listAuto = withdrawalAutoService.list(queryWrapperAuto);
|
||||
List<BdWithdrawalAuto> listAuto = iBdWithdrawalAutoService.list(queryWrapperAuto);
|
||||
List<BdWithdrawalAutoExt> watExtList = new ArrayList<>();
|
||||
listAuto.forEach(item -> watExtList.add(BeanUtil.copyProperties(item, BdWithdrawalAutoExt.class)));
|
||||
bwd.setWithdrawalAutoList(watExtList);
|
||||
|
@ -111,42 +84,38 @@ public class BdWithdrawalController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* @description: 导出提现配置
|
||||
* @author: zhang jing
|
||||
* @date: 2023/3/3 16:19
|
||||
* @param: [response, withdrawalExt]
|
||||
* @return: void
|
||||
* 导出提现配置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_CONFIG,method = EOperationMethod.EXPORT)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_CONFIG, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BdWithdrawalExt withdrawalExt) {
|
||||
QueryWrapper<BdWithdrawal> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
|
||||
public void export(HttpServletResponse response) {
|
||||
QueryWrapper<BdWithdrawal> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
List<BdWithdrawal> list = withdrawalService.list(queryWrapper);
|
||||
List<BdWithdrawalExt> listExt=new ArrayList<>();
|
||||
for(BdWithdrawal bwd: list){
|
||||
BdWithdrawalExt withdrawalExtNew= BeanUtil.copyProperties(bwd, BdWithdrawalExt.class);
|
||||
List<BdWithdrawal> list = iBdWithdrawalService.list(queryWrapper);
|
||||
List<BdWithdrawalExt> listExt = new ArrayList<>();
|
||||
for (BdWithdrawal bwd : list) {
|
||||
BdWithdrawalExt withdrawalExtNew = BeanUtil.copyProperties(bwd, BdWithdrawalExt.class);
|
||||
//暂时使用中国
|
||||
if(StringUtils.isNotNull(bwd.getMinAmount())){
|
||||
withdrawalExtNew.setMinAmountUsa(currencyService.getDollar(bwd.getMinAmount(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getMinAmount())) {
|
||||
withdrawalExtNew.setMinAmountUsa(iBdCurrencyService.getDollar(bwd.getMinAmount(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
if(StringUtils.isNotNull(bwd.getMaxAmount())){
|
||||
withdrawalExtNew.setMaxAmountUsa(currencyService.getDollar(bwd.getMaxAmount(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getMaxAmount())) {
|
||||
withdrawalExtNew.setMaxAmountUsa(iBdCurrencyService.getDollar(bwd.getMaxAmount(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
if(StringUtils.isNotNull(bwd.getLowerBound())){
|
||||
withdrawalExtNew.setLowerBoundUsa(currencyService.getDollar(bwd.getLowerBound(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getLowerBound())) {
|
||||
withdrawalExtNew.setLowerBoundUsa(iBdCurrencyService.getDollar(bwd.getLowerBound(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
if(StringUtils.isNotNull(bwd.getUpperBound())){
|
||||
withdrawalExtNew.setUpperBoundUsa(currencyService.getDollar(bwd.getUpperBound(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getUpperBound())) {
|
||||
withdrawalExtNew.setUpperBoundUsa(iBdCurrencyService.getDollar(bwd.getUpperBound(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
|
||||
QueryWrapper<BdWithdrawalAuto> queryWrapperAuto = new QueryWrapper();
|
||||
queryWrapperAuto.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
|
||||
if(StringUtils.isNotNull(bwd.getPkId())){
|
||||
queryWrapperAuto.eq("PK_WITHDRAWAL",bwd.getPkId());
|
||||
QueryWrapper<BdWithdrawalAuto> queryWrapperAuto = new QueryWrapper<>();
|
||||
queryWrapperAuto.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
if (StringUtils.isNotNull(bwd.getPkId())) {
|
||||
queryWrapperAuto.eq("PK_WITHDRAWAL", bwd.getPkId());
|
||||
}
|
||||
List<BdWithdrawalAuto> listAuto = withdrawalAutoService.list(queryWrapperAuto);
|
||||
List<BdWithdrawalAuto> listAuto = iBdWithdrawalAutoService.list(queryWrapperAuto);
|
||||
List<BdWithdrawalAutoExt> watExtList = new ArrayList<>();
|
||||
listAuto.forEach(item -> watExtList.add(BeanUtil.copyProperties(item, BdWithdrawalAutoExt.class)));
|
||||
withdrawalExtNew.setWithdrawalAutoList(watExtList);
|
||||
|
@ -157,43 +126,39 @@ public class BdWithdrawalController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* @description: 提现手续费配置,理论每个国家只有一个提现配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/2 11:38
|
||||
* @param: [withdrawalExt]
|
||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
||||
* 提现手续费配置,理论每个国家只有一个提现配置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_CONFIG,method = EOperationMethod.SELECT)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_CONFIG, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/serviceChargelist")
|
||||
public TableDataInfo serviceChargelist(BdWithdrawalExt withdrawalExt) {
|
||||
public TableDataInfo serviceChargelist() {
|
||||
startPage();
|
||||
QueryWrapper<BdWithdrawal> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
|
||||
QueryWrapper<BdWithdrawal> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
List<BdWithdrawal> list = withdrawalService.list(queryWrapper);
|
||||
List<BdWithdrawalExt> listExt=new ArrayList<>();
|
||||
for(BdWithdrawal bwd: list){
|
||||
BdWithdrawalExt withdrawalExtNew= BeanUtil.copyProperties(bwd, BdWithdrawalExt.class);
|
||||
List<BdWithdrawal> list = iBdWithdrawalService.list(queryWrapper);
|
||||
List<BdWithdrawalExt> listExt = new ArrayList<>();
|
||||
for (BdWithdrawal bwd : list) {
|
||||
BdWithdrawalExt withdrawalExtNew = BeanUtil.copyProperties(bwd, BdWithdrawalExt.class);
|
||||
//暂时使用中国
|
||||
if(StringUtils.isNotNull(bwd.getMinAmount())){
|
||||
withdrawalExtNew.setMinAmountUsa(currencyService.getDollar(bwd.getMinAmount(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getMinAmount())) {
|
||||
withdrawalExtNew.setMinAmountUsa(iBdCurrencyService.getDollar(bwd.getMinAmount(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
if(StringUtils.isNotNull(bwd.getMaxAmount())){
|
||||
withdrawalExtNew.setMaxAmountUsa(currencyService.getDollar(bwd.getMaxAmount(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getMaxAmount())) {
|
||||
withdrawalExtNew.setMaxAmountUsa(iBdCurrencyService.getDollar(bwd.getMaxAmount(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
if(StringUtils.isNotNull(bwd.getLowerBound())){
|
||||
withdrawalExtNew.setLowerBoundUsa(currencyService.getDollar(bwd.getLowerBound(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getLowerBound())) {
|
||||
withdrawalExtNew.setLowerBoundUsa(iBdCurrencyService.getDollar(bwd.getLowerBound(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
if(StringUtils.isNotNull(bwd.getUpperBound())){
|
||||
withdrawalExtNew.setUpperBoundUsa(currencyService.getDollar(bwd.getUpperBound(),SecurityUtils.getPkCountry()));
|
||||
if (StringUtils.isNotNull(bwd.getUpperBound())) {
|
||||
withdrawalExtNew.setUpperBoundUsa(iBdCurrencyService.getDollar(bwd.getUpperBound(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
|
||||
QueryWrapper<BdWithdrawalAuto> queryWrapperAuto = new QueryWrapper();
|
||||
queryWrapperAuto.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
|
||||
if(StringUtils.isNotNull(bwd.getPkId())){
|
||||
queryWrapperAuto.eq("PK_WITHDRAWAL",bwd.getPkId());
|
||||
QueryWrapper<BdWithdrawalAuto> queryWrapperAuto = new QueryWrapper<>();
|
||||
queryWrapperAuto.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
if (StringUtils.isNotNull(bwd.getPkId())) {
|
||||
queryWrapperAuto.eq("PK_WITHDRAWAL", bwd.getPkId());
|
||||
}
|
||||
List<BdWithdrawalAuto> listAuto = withdrawalAutoService.list(queryWrapperAuto);
|
||||
List<BdWithdrawalAuto> listAuto = iBdWithdrawalAutoService.list(queryWrapperAuto);
|
||||
List<BdWithdrawalAutoExt> watExtList = new ArrayList<>();
|
||||
listAuto.forEach(item -> watExtList.add(BeanUtil.copyProperties(item, BdWithdrawalAutoExt.class)));
|
||||
withdrawalExtNew.setWithdrawalAutoList(watExtList);
|
||||
|
@ -202,147 +167,127 @@ public class BdWithdrawalController extends BaseController {
|
|||
return getDataTable(listExt);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 新增提现设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [withdrawalParam]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 新增提现设置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_CONFIG,method = EOperationMethod.INSERT)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_CONFIG, method = EOperationMethod.INSERT)
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(@RequestBody @Valid BdWithdrawalExt withdrawalExt) {
|
||||
if(StringUtils.isNull(withdrawalExt.getMinAmount())){
|
||||
if (StringUtils.isNull(withdrawalExt.getMinAmount())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MIN_AMOUNT_NOT_NULL));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getMaxAmount())){
|
||||
if (StringUtils.isNull(withdrawalExt.getMaxAmount())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MAX_AMOUNT_NOT_NULL));
|
||||
}
|
||||
if (withdrawalExt.getMaxAmount().compareTo(withdrawalExt.getMinAmount()) <0) {
|
||||
if (withdrawalExt.getMaxAmount().compareTo(withdrawalExt.getMinAmount()) < 0) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMPARISON_OF_SIZE));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getIsAuto())){
|
||||
if (StringUtils.isNull(withdrawalExt.getIsAuto())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.IS_AUTO_NOT_NULL));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getIsRounding())){
|
||||
if (StringUtils.isNull(withdrawalExt.getIsRounding())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.IS_ROUNDING_NOT_NULL));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getWithdrawalNumber())){
|
||||
if (StringUtils.isNull(withdrawalExt.getWithdrawalNumber())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.WITHDRAWAL_NUMBER_NOT_NULL));
|
||||
}
|
||||
if(EYesNo.YES.getIntValue()==withdrawalExt.getIsAuto()){
|
||||
if(StringUtils.isNull(withdrawalExt.getLowerBound())){
|
||||
if (EYesNo.YES.getIntValue() == withdrawalExt.getIsAuto()) {
|
||||
if (StringUtils.isNull(withdrawalExt.getLowerBound())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.LOWER_BOUND_NOT_NULL));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getUpperBound())){
|
||||
if (StringUtils.isNull(withdrawalExt.getUpperBound())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.UPPER_BOUND_NOT_NULL));
|
||||
}
|
||||
if(CollectionUtil.isEmpty(withdrawalExt.getWithdrawalAutoList())){
|
||||
if (CollectionUtil.isEmpty(withdrawalExt.getWithdrawalAutoList())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.WITHDRAWAL_CYCLE_NOT_NULL));
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getEffectiveDate())){
|
||||
if (StringUtils.isNull(withdrawalExt.getEffectiveDate())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.EFFECTIVE_DATE_NOT_NULL));
|
||||
}
|
||||
withdrawalExt.setPkCountry(SecurityUtils.getPkCountry());
|
||||
withdrawalExt.setPkCreator(SecurityUtils.getUserId());
|
||||
withdrawalExt.setCreationTime(new Date());
|
||||
return toAjax(withdrawalService.saveWithdrawal(withdrawalExt));
|
||||
return toAjax(iBdWithdrawalService.saveWithdrawal(withdrawalExt));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 修改提现设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [withdrawalParam]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 修改提现设置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_CONFIG,method = EOperationMethod.UPDATE)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_CONFIG, method = EOperationMethod.UPDATE)
|
||||
@PostMapping("/update")
|
||||
public AjaxResult update(@RequestBody BdWithdrawalExt withdrawalExt) {
|
||||
if(StringUtils.isNull(withdrawalExt.getMinAmount())){
|
||||
if (StringUtils.isNull(withdrawalExt.getMinAmount())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MIN_AMOUNT_NOT_NULL));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getMaxAmount())){
|
||||
if (StringUtils.isNull(withdrawalExt.getMaxAmount())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MAX_AMOUNT_NOT_NULL));
|
||||
}
|
||||
if (withdrawalExt.getMaxAmount().compareTo(withdrawalExt.getMinAmount()) <0) {
|
||||
if (withdrawalExt.getMaxAmount().compareTo(withdrawalExt.getMinAmount()) < 0) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.COMPARISON_OF_SIZE));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getIsAuto())){
|
||||
if (StringUtils.isNull(withdrawalExt.getIsAuto())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.IS_AUTO_NOT_NULL));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getIsRounding())){
|
||||
if (StringUtils.isNull(withdrawalExt.getIsRounding())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.IS_ROUNDING_NOT_NULL));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getWithdrawalNumber())){
|
||||
if (StringUtils.isNull(withdrawalExt.getWithdrawalNumber())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.WITHDRAWAL_NUMBER_NOT_NULL));
|
||||
}
|
||||
|
||||
if(StringUtils.isNull(withdrawalExt.getEffectiveDate())){
|
||||
if (StringUtils.isNull(withdrawalExt.getEffectiveDate())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.EFFECTIVE_DATE_NOT_NULL));
|
||||
}
|
||||
if(EYesNo.YES.getIntValue()==withdrawalExt.getIsAuto()){
|
||||
if(StringUtils.isNull(withdrawalExt.getLowerBound())){
|
||||
if (EYesNo.YES.getIntValue() == withdrawalExt.getIsAuto()) {
|
||||
if (StringUtils.isNull(withdrawalExt.getLowerBound())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.LOWER_BOUND_NOT_NULL));
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getUpperBound())){
|
||||
if (StringUtils.isNull(withdrawalExt.getUpperBound())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.UPPER_BOUND_NOT_NULL));
|
||||
}
|
||||
if(CollectionUtil.isEmpty(withdrawalExt.getWithdrawalAutoList())){
|
||||
if (CollectionUtil.isEmpty(withdrawalExt.getWithdrawalAutoList())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.WITHDRAWAL_CYCLE_NOT_NULL));
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalExt.getEffectiveDate())){
|
||||
if (StringUtils.isNull(withdrawalExt.getEffectiveDate())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.EFFECTIVE_DATE_NOT_NULL));
|
||||
}
|
||||
withdrawalExt.setPkModified(SecurityUtils.getUserId());
|
||||
withdrawalExt.setModifiedTime(new Date());
|
||||
return toAjax(withdrawalService.updateWithdrawal(withdrawalExt));
|
||||
return toAjax(iBdWithdrawalService.updateWithdrawal(withdrawalExt));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询单条提现设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 查询单条提现设置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_CONFIG,method = EOperationMethod.SELECT)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_CONFIG, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/getOne/{pkId}")
|
||||
public AjaxResult getOne(@PathVariable Integer pkId) {
|
||||
BdWithdrawal withdrawalParam = withdrawalService.getById(pkId);
|
||||
BdWithdrawal withdrawalParam = iBdWithdrawalService.getById(pkId);
|
||||
BdWithdrawalExt withdrawalExt = BeanUtil.copyProperties(withdrawalParam, BdWithdrawalExt.class);
|
||||
BdWithdrawalAutoExt withdrawalAutoExt=new BdWithdrawalAutoExt();
|
||||
BdWithdrawalAutoExt withdrawalAutoExt = new BdWithdrawalAutoExt();
|
||||
withdrawalAutoExt.setPkWithdrawal(pkId);
|
||||
List<BdWithdrawalAutoExt> withdrawalAutoList =withdrawalService.getWithdrawalAutoList(withdrawalAutoExt);
|
||||
if(CollectionUtil.isNotEmpty(withdrawalAutoList)){
|
||||
List<BdWithdrawalAutoExt> withdrawalAutoList = iBdWithdrawalService.getWithdrawalAutoList(withdrawalAutoExt);
|
||||
if (CollectionUtil.isNotEmpty(withdrawalAutoList)) {
|
||||
withdrawalExt.setWithdrawalAutoList(withdrawalAutoList);
|
||||
}else{
|
||||
List<BdWithdrawalAutoExt> withdrawalAutoListNew=new ArrayList<>();
|
||||
} else {
|
||||
List<BdWithdrawalAutoExt> withdrawalAutoListNew = new ArrayList<>();
|
||||
withdrawalExt.setWithdrawalAutoList(withdrawalAutoListNew);
|
||||
}
|
||||
return AjaxResult.success(withdrawalExt);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 删除提现设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 删除提现设置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_CONFIG,method = EOperationMethod.DELETE)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_CONFIG, method = EOperationMethod.DELETE)
|
||||
@DeleteMapping("/{pkId}")
|
||||
public AjaxResult delete(@PathVariable Long pkId) {
|
||||
BdWithdrawalAutoExt withdrawalAutoExt =new BdWithdrawalAutoExt();
|
||||
BdWithdrawalAutoExt withdrawalAutoExt = new BdWithdrawalAutoExt();
|
||||
withdrawalAutoExt.setPkCountry(SecurityUtils.getPkCountry());
|
||||
Integer count= withdrawalService.checkWithdraw(withdrawalAutoExt);
|
||||
if(count>0){
|
||||
Integer count = iBdWithdrawalService.checkWithdraw(withdrawalAutoExt);
|
||||
if (count > 0) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.ENABLE_STATE_NOT_DELETE));
|
||||
}
|
||||
UpdateWrapper<BdWithdrawal> updateWrapper = new UpdateWrapper<>();
|
||||
|
@ -350,9 +295,6 @@ public class BdWithdrawalController extends BaseController {
|
|||
updateWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue());
|
||||
updateWrapper.set("PK_MODIFIED", SecurityUtils.getUserId());
|
||||
updateWrapper.set("MODIFIED_TIME", new Date());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_WITHDRAWAL + SecurityUtils.getPkCountry());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_WITHDRAWAL_IS_AUTO + SecurityUtils.getPkCountry());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_WITHDRAWAL_AUTO + SecurityUtils.getPkCountry());
|
||||
return toAjax(withdrawalService.update(updateWrapper));
|
||||
return toAjax(iBdWithdrawalService.update(updateWrapper));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
package com.hzs.system.config.controller.manage;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
|
||||
import com.hzs.common.core.enums.EDelFlag;
|
||||
import com.hzs.common.core.enums.EOperationBusiness;
|
||||
import com.hzs.common.core.enums.EOperationMethod;
|
||||
import com.hzs.common.core.enums.EOperationModule;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.core.utils.poi.ExcelUtil;
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
|
@ -21,12 +18,9 @@ import com.hzs.common.domain.system.config.BdWithdrawalProcess;
|
|||
import com.hzs.common.domain.system.config.ext.BdWithdrawalAutoExt;
|
||||
import com.hzs.common.domain.system.config.ext.BdWithdrawalProcessExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.system.base.ITransactionServiceApi;
|
||||
import com.hzs.system.base.service.IBdCurrencyService;
|
||||
import com.hzs.system.config.IWithdrawalServiceApi;
|
||||
import com.hzs.system.config.service.IBdWithdrawalProcessService;
|
||||
import com.hzs.system.config.service.IBdWithdrawalService;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -37,166 +31,118 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 提现手续费手续费配置 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-11-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/bd-withdrawal-process")
|
||||
public class BdWithdrawalProcessController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBdWithdrawalProcessService withdrawalProcessService;
|
||||
@DubboReference
|
||||
private ITransactionServiceApi iTransactionServiceApi;
|
||||
private RedisService redisService;
|
||||
@DubboReference
|
||||
private IWithdrawalServiceApi withdrawalProcessServiceApi;
|
||||
private IBdWithdrawalProcessService iBdWithdrawalProcessService;
|
||||
@Autowired
|
||||
private IBdWithdrawalService withdrawalService;
|
||||
@Autowired
|
||||
IBdCurrencyService currencyService;
|
||||
|
||||
|
||||
@Autowired
|
||||
public void setRedisService(RedisService redisService) {
|
||||
this.redisService = redisService;
|
||||
}
|
||||
|
||||
private IBdWithdrawalService iBdWithdrawalService;
|
||||
|
||||
/**
|
||||
* @description: 查询提现手续费设置列表 理论每个国家只有一个提现手续费配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:20
|
||||
* @param: [withdrawalParam]
|
||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
||||
* 查询提现手续费设置列表 理论每个国家只有一个提现手续费配置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE,method = EOperationMethod.SELECT)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BdWithdrawalProcess withdrawalProcess) {
|
||||
public TableDataInfo list() {
|
||||
startPage();
|
||||
QueryWrapper<BdWithdrawalProcess> queryWrapper = new QueryWrapper();
|
||||
QueryWrapper<BdWithdrawalProcess> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
List<BdWithdrawalProcess> list = withdrawalProcessService.list(queryWrapper);
|
||||
List<BdWithdrawalProcessExt> listExt=new ArrayList<>();
|
||||
List<BdWithdrawalProcess> list = iBdWithdrawalProcessService.list(queryWrapper);
|
||||
List<BdWithdrawalProcessExt> listExt = new ArrayList<>();
|
||||
list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdWithdrawalProcessExt.class)));
|
||||
return getDataTable(listExt);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出提现手续费配置
|
||||
* @author: zhang jing
|
||||
* @date: 2023/3/3 17:07
|
||||
* @param: [response, withdrawalProcess]
|
||||
* @return: void
|
||||
* 导出提现手续费配置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE,method = EOperationMethod.EXPORT)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BdWithdrawalProcess withdrawalProcess) {
|
||||
QueryWrapper<BdWithdrawalProcess> queryWrapper = new QueryWrapper();
|
||||
QueryWrapper<BdWithdrawalProcess> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
List<BdWithdrawalProcess> list = withdrawalProcessService.list(queryWrapper);
|
||||
List<BdWithdrawalProcessExt> listExt=new ArrayList<>();
|
||||
List<BdWithdrawalProcess> list = iBdWithdrawalProcessService.list(queryWrapper);
|
||||
List<BdWithdrawalProcessExt> listExt = new ArrayList<>();
|
||||
list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdWithdrawalProcessExt.class)));
|
||||
ExcelUtil<BdWithdrawalProcessExt> util = new ExcelUtil<>(BdWithdrawalProcessExt.class);
|
||||
util.exportExcel(response, listExt, "提现手续费配置");
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增提现手续费设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [withdrawalParam]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 新增提现手续费设置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE,method = EOperationMethod.INSERT)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE, method = EOperationMethod.INSERT)
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(@RequestBody @Valid BdWithdrawalProcess withdrawalProcess) {
|
||||
if(StringUtils.isNull(withdrawalProcess.getServiceType())){
|
||||
if (StringUtils.isNull(withdrawalProcess.getServiceType())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.SERVICE_TYPE_NOT_NULL);
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalProcess.getServiceRatio())){
|
||||
if (StringUtils.isNull(withdrawalProcess.getServiceRatio())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.SERVICE_RATIO_NOT_NULL);
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalProcess.getEffectiveDate())){
|
||||
if (StringUtils.isNull(withdrawalProcess.getEffectiveDate())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.EFFECTIVE_DATE_NOT_NULL);
|
||||
}
|
||||
QueryWrapper<BdWithdrawalProcess> queryWrapper=new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
|
||||
BdWithdrawalProcess withdrawalProcessCheck=withdrawalProcessService.getOne(queryWrapper);
|
||||
if(StringUtils.isNotNull(withdrawalProcessCheck)){
|
||||
QueryWrapper<BdWithdrawalProcess> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
BdWithdrawalProcess withdrawalProcessCheck = iBdWithdrawalProcessService.getOne(queryWrapper);
|
||||
if (StringUtils.isNotNull(withdrawalProcessCheck)) {
|
||||
return AjaxResult.error(ConfigMsgConstants.SERVICE_TYPE_REPEAT);
|
||||
}
|
||||
withdrawalProcess.setPkCountry(SecurityUtils.getPkCountry());
|
||||
withdrawalProcess.setPkCreator(SecurityUtils.getUserId());
|
||||
withdrawalProcess.setCreationTime(new Date());
|
||||
redisService.deleteObject(CacheConstants.BD_WITHDRAWAL_PROCESS + SecurityUtils.getPkCountry());
|
||||
return toAjax(withdrawalProcessService.save(withdrawalProcess));
|
||||
return toAjax(iBdWithdrawalProcessService.save(withdrawalProcess));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 修改提现手续费设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [withdrawalParam]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 修改提现手续费设置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE,method = EOperationMethod.UPDATE)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE, method = EOperationMethod.UPDATE)
|
||||
@PostMapping("/update")
|
||||
public AjaxResult update(@RequestBody BdWithdrawalProcess withdrawalProcess) {
|
||||
if(StringUtils.isNull(withdrawalProcess.getServiceType())){
|
||||
if (StringUtils.isNull(withdrawalProcess.getServiceType())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.SERVICE_TYPE_NOT_NULL);
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalProcess.getServiceRatio())){
|
||||
if (StringUtils.isNull(withdrawalProcess.getServiceRatio())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.SERVICE_RATIO_NOT_NULL);
|
||||
}
|
||||
if(StringUtils.isNull(withdrawalProcess.getEffectiveDate())){
|
||||
if (StringUtils.isNull(withdrawalProcess.getEffectiveDate())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.EFFECTIVE_DATE_NOT_NULL);
|
||||
}
|
||||
withdrawalProcess.setPkCountry(SecurityUtils.getPkCountry());
|
||||
withdrawalProcess.setPkModified(SecurityUtils.getUserId());
|
||||
withdrawalProcess.setModifiedTime(new Date());
|
||||
redisService.deleteObject(CacheConstants.BD_WITHDRAWAL_PROCESS + SecurityUtils.getPkCountry());
|
||||
return toAjax(withdrawalProcessService.updateById(withdrawalProcess));
|
||||
return toAjax(iBdWithdrawalProcessService.updateById(withdrawalProcess));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询单条提现手续费设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 查询单条提现手续费设置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE,method = EOperationMethod.SELECT)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/getOne/{pkId}")
|
||||
public AjaxResult getOne(@PathVariable Integer pkId) {
|
||||
BdWithdrawalProcess withdrawalProcess = withdrawalProcessService.getById(pkId);
|
||||
BdWithdrawalProcess withdrawalProcess = iBdWithdrawalProcessService.getById(pkId);
|
||||
BdWithdrawalProcessExt withdrawalProcessExt = BeanUtil.copyProperties(withdrawalProcess, BdWithdrawalProcessExt.class);
|
||||
return AjaxResult.success(withdrawalProcessExt);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 删除提现手续费设置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 删除提现手续费设置
|
||||
**/
|
||||
@Log(module = EOperationModule.WALLET_CONFIG,business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE,method = EOperationMethod.DELETE)
|
||||
@Log(module = EOperationModule.WALLET_CONFIG, business = EOperationBusiness.WITHDRAWAL_SERVICE_CHARGE, method = EOperationMethod.DELETE)
|
||||
@DeleteMapping("/{pkId}")
|
||||
public AjaxResult delete(@PathVariable Long pkId) {
|
||||
BdWithdrawalAutoExt withdrawalAutoExt =new BdWithdrawalAutoExt();
|
||||
BdWithdrawalAutoExt withdrawalAutoExt = new BdWithdrawalAutoExt();
|
||||
withdrawalAutoExt.setPkCountry(SecurityUtils.getPkCountry());
|
||||
Integer count= withdrawalService.checkWithdraw(withdrawalAutoExt);
|
||||
if(count>0){
|
||||
Integer count = iBdWithdrawalService.checkWithdraw(withdrawalAutoExt);
|
||||
if (count > 0) {
|
||||
return AjaxResult.error(ConfigMsgConstants.ENABLE_STATE_NOT_DELETE);
|
||||
}
|
||||
UpdateWrapper<BdWithdrawalProcess> updateWrapper = new UpdateWrapper<>();
|
||||
|
@ -204,8 +150,7 @@ public class BdWithdrawalProcessController extends BaseController {
|
|||
updateWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue());
|
||||
updateWrapper.set("PK_MODIFIED", SecurityUtils.getUserId());
|
||||
updateWrapper.set("MODIFIED_TIME", new Date());
|
||||
redisService.deleteObject(CacheConstants.BD_WITHDRAWAL + SecurityUtils.getPkCountry());
|
||||
return toAjax(withdrawalProcessService.update(updateWrapper));
|
||||
return toAjax(iBdWithdrawalProcessService.update(updateWrapper));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
package com.hzs.system.config.provider;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.system.config.BdWithdrawalAuto;
|
||||
import com.hzs.system.config.IWithdrawalAutoServiceApi;
|
||||
import com.hzs.system.config.service.IBdWithdrawalAutoService;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 提现配置的dubbo服务类
|
||||
* @Author: zhang jing
|
||||
* @Time: 2022/9/9 14:11
|
||||
* @Classname: GradeServiceProvider
|
||||
* @PackageName: com.hzs.system.config.provider
|
||||
*/
|
||||
@DubboService
|
||||
public class WithdrawalAutoServiceProvider implements IWithdrawalAutoServiceApi {
|
||||
|
||||
@Autowired
|
||||
private IBdWithdrawalAutoService withdrawalAutoService;
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询自动提现明细列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/27 15:20
|
||||
* @param: [pkCountry]
|
||||
* @return: com.hzs.common.core.domain.R<java.util.List<com.hzs.common.domain.system.config.BdWithdrawalAuto>>
|
||||
**/
|
||||
@Override
|
||||
public R<List<BdWithdrawalAuto>> queryWithdrawalAuto(Integer pkCountry) {
|
||||
return R.ok(withdrawalAutoService.queryWithdrawalAuto(pkCountry));
|
||||
}
|
||||
}
|
|
@ -1,19 +1,12 @@
|
|||
package com.hzs.system.config.provider;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.system.config.BdAccount;
|
||||
import com.hzs.common.domain.system.config.BdWithdrawal;
|
||||
import com.hzs.common.domain.system.config.BdWithdrawalAuto;
|
||||
import com.hzs.system.config.IAccountServiceApi;
|
||||
import com.hzs.system.config.IWithdrawalServiceApi;
|
||||
import com.hzs.system.config.service.IBdAccountService;
|
||||
import com.hzs.system.config.service.IBdWithdrawalAutoService;
|
||||
import com.hzs.system.config.service.IBdWithdrawalService;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提现配置的dubbo服务类
|
||||
*/
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
package com.hzs.system.config.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.system.config.BdWithdrawalAuto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 自动提现明细表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-08-31
|
||||
*/
|
||||
public interface IBdWithdrawalAutoService extends IService<BdWithdrawalAuto> {
|
||||
|
||||
List<BdWithdrawalAuto> queryWithdrawalAuto(Integer pkCountry);
|
||||
}
|
||||
|
|
|
@ -1,56 +1,15 @@
|
|||
package com.hzs.system.config.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.domain.system.config.BdWithdrawalAuto;
|
||||
import com.hzs.system.config.mapper.BdWithdrawalAutoMapper;
|
||||
import com.hzs.system.config.service.IBdWithdrawalAutoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 自动提现明细表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-08-31
|
||||
*/
|
||||
@Service
|
||||
public class BdWithdrawalAutoServiceImpl extends ServiceImpl<BdWithdrawalAutoMapper, BdWithdrawalAuto> implements IBdWithdrawalAutoService {
|
||||
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
public void setRedisService(RedisService redisService) {
|
||||
this.redisService = redisService;
|
||||
}
|
||||
/**
|
||||
* @description: 根据国家查询自动提现明细列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/27 14:59
|
||||
* @param: [pkCountry]
|
||||
* @return: java.util.List<com.hzs.common.domain.system.config.BdWithdrawalAuto>
|
||||
**/
|
||||
@Override
|
||||
public List<BdWithdrawalAuto> queryWithdrawalAuto(Integer pkCountry) {
|
||||
List<BdWithdrawalAuto> withdrawalAuto = redisService.getCacheObject(CacheConstants.BD_WITHDRAWAL_AUTO + pkCountry);
|
||||
if(CollectionUtil.isEmpty(withdrawalAuto)){
|
||||
QueryWrapper<BdWithdrawalAuto> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY",pkCountry);
|
||||
withdrawalAuto = baseMapper.selectList(queryWrapper);
|
||||
if(CollectionUtil.isNotEmpty(withdrawalAuto)){
|
||||
redisService.setCacheObject(CacheConstants.BD_WITHDRAWAL_AUTO + pkCountry, withdrawalAuto);
|
||||
}
|
||||
}
|
||||
return withdrawalAuto;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -3,9 +3,7 @@ package com.hzs.system.config.service.impl;
|
|||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.enums.EDelFlag;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.domain.system.config.BdWithdrawal;
|
||||
import com.hzs.common.domain.system.config.BdWithdrawalAuto;
|
||||
import com.hzs.common.domain.system.config.ext.BdWithdrawalAutoExt;
|
||||
|
@ -27,15 +25,8 @@ import java.util.List;
|
|||
@Service
|
||||
public class BdWithdrawalServiceImpl extends ServiceImpl<BdWithdrawalMapper, BdWithdrawal> implements IBdWithdrawalService {
|
||||
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
public void setRedisService(RedisService redisService) {
|
||||
this.redisService = redisService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
IBdWithdrawalAutoService withdrawalAutoService;
|
||||
private IBdWithdrawalAutoService iBdWithdrawalAutoService;
|
||||
|
||||
@Override
|
||||
public BdWithdrawal queryWithdrawal(Integer pkCountry, Integer pkAccount) {
|
||||
|
@ -67,11 +58,8 @@ public class BdWithdrawalServiceImpl extends ServiceImpl<BdWithdrawalMapper, BdW
|
|||
wao.setPkCountry(SecurityUtils.getPkCountry());
|
||||
wao.setPkCreator(SecurityUtils.getUserId());
|
||||
wao.setCreationTime(new Date());
|
||||
withdrawalAutoService.save(wao);
|
||||
iBdWithdrawalAutoService.save(wao);
|
||||
}
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_WITHDRAWAL + SecurityUtils.getPkCountry());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_WITHDRAWAL_IS_AUTO + SecurityUtils.getPkCountry());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_WITHDRAWAL_AUTO + SecurityUtils.getPkCountry());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -82,18 +70,15 @@ public class BdWithdrawalServiceImpl extends ServiceImpl<BdWithdrawalMapper, BdW
|
|||
updateWrapper.eq("PK_WITHDRAWAL", withdrawalExt.getPkId());
|
||||
updateWrapper.eq("DEL_FLAG", EDelFlag.UN_DELETE.getValue());
|
||||
updateWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue());
|
||||
withdrawalAutoService.update(updateWrapper);
|
||||
iBdWithdrawalAutoService.update(updateWrapper);
|
||||
List<BdWithdrawalAutoExt> withdrawalAutoList = withdrawalExt.getWithdrawalAutoList();
|
||||
for (BdWithdrawalAuto wao : withdrawalAutoList) {
|
||||
wao.setPkWithdrawal(withdrawalExt.getPkId());
|
||||
wao.setPkCountry(SecurityUtils.getPkCountry());
|
||||
wao.setPkCreator(SecurityUtils.getUserId());
|
||||
wao.setCreationTime(new Date());
|
||||
withdrawalAutoService.save(wao);
|
||||
iBdWithdrawalAutoService.save(wao);
|
||||
}
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_WITHDRAWAL + SecurityUtils.getPkCountry());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_WITHDRAWAL_IS_AUTO + SecurityUtils.getPkCountry());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_WITHDRAWAL_AUTO + SecurityUtils.getPkCountry());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -102,5 +87,4 @@ public class BdWithdrawalServiceImpl extends ServiceImpl<BdWithdrawalMapper, BdW
|
|||
return baseMapper.getWithdrawalAutoList(withdrawalAutoExt);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2378,7 +2378,7 @@ public class EnumsController extends BaseController {
|
|||
public AjaxResult getPaymentStatus() {
|
||||
List<EnumEntity> enumEntityList = new ArrayList<>();
|
||||
for (EWithdrawStatus value : EWithdrawStatus.values()) {
|
||||
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel(), EnumsPrefixConstants.ENU_WITHDRAW_STATUS));
|
||||
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel()));
|
||||
}
|
||||
return AjaxResult.success(enumEntityList);
|
||||
}
|
||||
|
|
|
@ -521,10 +521,6 @@ public class EnumsInitController {
|
|||
initList.add(this.createData(value.getKey(), value.getLabel()));
|
||||
}
|
||||
|
||||
for (EWithdrawStatus value : EWithdrawStatus.values()) {
|
||||
initList.add(this.createData(value.getKey(), value.getLabel()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 站内信类型
|
||||
*/
|
||||
|
|
|
@ -151,27 +151,6 @@ public class CacheConstants {
|
|||
*/
|
||||
public static final String BD_SHARE = CACHE_PREFIX + "share:";
|
||||
|
||||
/**
|
||||
* 提现配置
|
||||
*/
|
||||
public static final String BD_WITHDRAWAL = CACHE_PREFIX + "withdrawal:";
|
||||
|
||||
/**
|
||||
* 提现手续费配置
|
||||
*/
|
||||
public static final String BD_WITHDRAWAL_PROCESS = CACHE_PREFIX + "withdrawalProcess:";
|
||||
|
||||
|
||||
/**
|
||||
* 自动提现明细配置
|
||||
*/
|
||||
public static final String BD_WITHDRAWAL_AUTO = CACHE_PREFIX + "withdrawalAuto:";
|
||||
|
||||
/**
|
||||
* 查询所有配置了自动提现的提现配置列表
|
||||
*/
|
||||
public static final String BD_WITHDRAWAL_IS_AUTO = CACHE_PREFIX + "withdrawal:is:auto:";
|
||||
|
||||
/**
|
||||
* 个税明细配置
|
||||
*/
|
||||
|
|
|
@ -600,11 +600,6 @@ public class EnumsPrefixConstants {
|
|||
*/
|
||||
public static final String EXEMPT_TYPE = "ENU_EXE_T_";
|
||||
|
||||
/**
|
||||
* 提现状态
|
||||
*/
|
||||
public static final String ENU_WITHDRAW_STATUS = "ENU_WITHDRAW_S_";
|
||||
|
||||
/**
|
||||
* 店铺枚举(配送中心等级)
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.common.core.enums;
|
||||
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
|
@ -14,20 +13,20 @@ public enum EWithdrawStatus {
|
|||
/**
|
||||
* 正常
|
||||
*/
|
||||
NORMAL(0, "未打款", 0, EnumsPrefixConstants.ENU_WITHDRAW_STATUS + "0"),
|
||||
NORMAL(0, "未打款", 0),
|
||||
|
||||
/**
|
||||
* 打款
|
||||
*/
|
||||
PAYMENT(1, "已打款", 0, EnumsPrefixConstants.ENU_WITHDRAW_STATUS + "1"),
|
||||
PAYMENT(1, "已打款", 0),
|
||||
/**
|
||||
* 充正
|
||||
*/
|
||||
CHARGING(2, "已充正", 0, EnumsPrefixConstants.ENU_WITHDRAW_STATUS + "2"),
|
||||
CHARGING(2, "已充正", 0),
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
CANCEL(3, "取消", 0, EnumsPrefixConstants.ENU_WITHDRAW_STATUS + "3"),
|
||||
CANCEL(3, "取消", 0),
|
||||
;
|
||||
|
||||
/**
|
||||
|
@ -42,9 +41,17 @@ public enum EWithdrawStatus {
|
|||
* 是否启用(0=是,1=否) -- 来源EYesNo
|
||||
*/
|
||||
private final int enable;
|
||||
/**
|
||||
* 国际化翻译key值
|
||||
*/
|
||||
private final String key;
|
||||
|
||||
public static String getLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (EWithdrawStatus enums : EWithdrawStatus.values()) {
|
||||
if (enums.getValue() == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,11 +13,6 @@ import lombok.experimental.Accessors;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* @author: yuhui
|
||||
* Description:
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
|
|
|
@ -12,12 +12,7 @@ import lombok.experimental.Accessors;
|
|||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 自动提现明细表
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-08-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
@ -47,5 +42,4 @@ public class BdWithdrawalAuto extends BaseEntity {
|
|||
private Integer withdrawalCycle;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue