diff --git a/bd-api/bd-api-system/src/main/java/com/hzs/system/config/IWithdrawalAutoServiceApi.java b/bd-api/bd-api-system/src/main/java/com/hzs/system/config/IWithdrawalAutoServiceApi.java
deleted file mode 100644
index 5f37d4d4..00000000
--- a/bd-api/bd-api-system/src/main/java/com/hzs/system/config/IWithdrawalAutoServiceApi.java
+++ /dev/null
@@ -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>
- **/
- R> queryWithdrawalAuto(Integer pkCountry);
-}
diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/controller/manage/CuMemberWithdrawController.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/controller/manage/CuMemberWithdrawController.java
index 918e9f9d..f151ceb8 100644
--- a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/controller/manage/CuMemberWithdrawController.java
+++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/controller/manage/CuMemberWithdrawController.java
@@ -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 cuMemberWithdrawList = cuMemberWithdrawService.checkWithdrawPetitionByState(pkIds, EApproveStatus.WAIT_SUBMIT.getValue());
+ List 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) objects[0]);
tableDataInfo.setRows((List) objects[1]);
@@ -137,18 +131,18 @@ public class CuMemberWithdrawController extends BaseController {
Integer pkCountry = SecurityUtils.getPkCountry();
cuMemberWithdrawVO.setPkCountry(pkCountry);
cuMemberWithdrawVO.setSystemType(SecurityUtils.getSystemType());
- List cuMemberWithdrawList = (List) cuMemberWithdrawService.selectMemberWithdrawList(cuMemberWithdrawVO)[1];
+ List cuMemberWithdrawList = (List) iCuMemberWithdrawService.selectMemberWithdrawList(cuMemberWithdrawVO)[1];
//枚举翻译
- Map transactionMap = iTransactionCommonService.exportEnumTransaction(EApproveStatus.values(), EWithdrawStatus.values());
+ Map 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 util = new ExcelUtil<>(CuMemberWithdrawVO.class, menuColumnServiceApi.queryMenuColumn("CashDetails", SecurityUtils.getUserId()).getData());
+ ExcelUtil 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 pkIds = memberWithdrawVO.getPkIds();
Assert.notNull(pkIds, TransactionUtils.getContent(FinanceMsgConstants.SELECT_PAID_RECORD));
- List withdrawApproveStateByIds = cuMemberWithdrawService.getWithdrawApproveStateByIds(pkIds, EApproveStatus.FINISH.getValue());
+ List 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();
}
diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/dto/CuMemberBonusAccountParam.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/dto/CuMemberBonusAccountParam.java
index 4f7091ba..949eb029 100644
--- a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/dto/CuMemberBonusAccountParam.java
+++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/dto/CuMemberBonusAccountParam.java
@@ -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
diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/mapper/CuMemberAccountMapper.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/mapper/CuMemberAccountMapper.java
index 2319e26a..f5c87489 100644
--- a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/mapper/CuMemberAccountMapper.java
+++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/mapper/CuMemberAccountMapper.java
@@ -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 {
*/
List queryMemberAccountByCondition(CuMemberAccount cuMemberAccount);
-
/**
* 根据会员编码获取余额
*
@@ -45,15 +43,6 @@ public interface CuMemberAccountMapper extends BaseMapper {
*/
Integer updateMemberAccount(CuMemberAccount cuMemberAccount);
-
- /**
- * 根据国家查询余额与银行卡信息
- *
- * @param pkCountry 国家ID
- * @return List
- */
- List queryMemberAccountByPkCountry(@Param("pkCountry") Integer pkCountry);
-
/**
* 根据用户编号查询账户余额 (行转列)
*
@@ -176,14 +165,6 @@ public interface CuMemberAccountMapper extends BaseMapper {
*/
List selectMemberAccountByPkMember(@Param(value = "pkMembers") List pkMembers);
- /**
- * 查询会员账户以及会员信息
- *
- * @param memberIdList 会员ID列表
- * @return
- */
- List queryAccountAndMemberInfo(@Param("memberIdList") List memberIdList);
-
/**
* 根据用户ID查询钱包余额
*
@@ -201,33 +182,6 @@ public interface CuMemberAccountMapper extends BaseMapper {
*/
List 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 bonusList,
- @Param("operateType") int operateType,
- @Param("pkModified") Long pkModified);
-
/**
* 根据来源单号查询奖金账号信息
*
diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberAccountService.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberAccountService.java
index e869194c..a61bc22f 100644
--- a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberAccountService.java
+++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberAccountService.java
@@ -24,7 +24,6 @@ public interface ICuMemberAccountService extends IService {
*/
List queryMemberAccountByCondition(CuMemberAccount cuMemberAccount);
-
/**
* 根据会员编码获取余额
*
@@ -34,7 +33,6 @@ public interface ICuMemberAccountService extends IService {
*/
BigDecimal selectBalanceByMemberCode(Long pkMember, Integer accountType);
-
/**
* 更新用户余额
*
@@ -92,14 +90,6 @@ public interface ICuMemberAccountService extends IService {
*/
List selectAccountDetail(Long pkMember, Integer pkCountry);
- /**
- * 根据国家查询余额与银行卡信息
- *
- * @param pkCountry 国家ID
- * @return List
- */
- List queryMemberAccountByPkcountry(Integer pkCountry);
-
/**
* 根据用户编号查询账户余额 (行转列)
*
@@ -138,7 +128,6 @@ public interface ICuMemberAccountService extends IService {
*/
List queryMemberAccountByMemberCodes(List memberCodes, List memberCodeStrs);
-
/**
* 根据用户编号集查询余额(所有字段)
*
@@ -147,7 +136,6 @@ public interface ICuMemberAccountService extends IService {
*/
List queryMemberAccountAllByMemberCodes(List memberCodes, Integer pkCountry);
-
/**
* 查询钱包明细
*
@@ -156,7 +144,6 @@ public interface ICuMemberAccountService extends IService {
*/
Object[] selectMemberAccountList(CuMemberWalletDetailVO memberWalletDetailVO);
-
/**
* 根据用户编号查询用户ID
*
@@ -190,7 +177,6 @@ public interface ICuMemberAccountService extends IService {
*/
List queryMemberAccountByPkMember(List pkMembers);
-
/**
* 批量更新账户余额(不同用户相同账户)
*
@@ -200,7 +186,6 @@ public interface ICuMemberAccountService extends IService {
*/
Boolean batchUpdateMemberAccountByPkmember(List pkMemberList, int pkAccount, Integer isWithdraw);
-
/**
* 更新账户余额(不同用户不同账户)
*
@@ -210,7 +195,6 @@ public interface ICuMemberAccountService extends IService {
*/
Boolean batchUpdateMemberAccountByPkMemberCountry(List pkMemberList, Integer isWithdraw);
-
/**
* 批理更新会员的钱包状态
*
@@ -229,14 +213,6 @@ public interface ICuMemberAccountService extends IService {
*/
List selectMemberAccountByPkMember(List pkMembers);
- /**
- * 查询会员账户以及会员信息
- *
- * @param memberIdList 会员ID列表
- * @return
- */
- List queryAccountAndMemberInfo(List memberIdList);
-
/**
* 根据会员姓名与会员编号查询账户信息
*
@@ -245,23 +221,8 @@ public interface ICuMemberAccountService extends IService {
*/
Object[] queryMemberAccountByMemberCodeAndName(CuMemberAccountVO cuMemberAccountVO);
-
List 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 {
*/
CuMemberRechargeAccountParam findMemberBalanceById(Integer pkAccount, Long pkMember);
-
- /**
- * 批量更新奖金账号
- *
- * @param bonusList 奖金账号参数
- * @param operateType 操作类型
- * @param operateType 修改人
- * @return Boolean
- */
- Boolean batchUpdateBonusAccountByPkMember(List bonusList, int operateType, Long pkModified);
-
-
/**
* 根据来源单号查询奖金账号信息
*
diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberBankService.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberBankService.java
index b9fba553..aac28341 100644
--- a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberBankService.java
+++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberBankService.java
@@ -12,6 +12,7 @@ import java.util.List;
* 会员信息-银行卡信息 服务类
*/
public interface ICuMemberBankService extends IService {
+
/**
* 根据主键查询银行卡信息
*
@@ -45,7 +46,6 @@ public interface ICuMemberBankService extends IService {
*/
Integer saveMemberBank(CuMemberBankParam cuMemberBankParam);
-
/**
* 查询绑定的银行卡
*
diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberWithdrawService.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberWithdrawService.java
index 4a11f5e4..f02596ae 100644
--- a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberWithdrawService.java
+++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/ICuMemberWithdrawService.java
@@ -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 {
+
/**
* 根据用户ID查询用户的提现次数
*
@@ -32,7 +32,6 @@ public interface ICuMemberWithdrawService extends IService {
*/
List selectWithdrawByBatch(String batchNO);
-
/**
* 保存提现
*
@@ -49,7 +48,6 @@ public interface ICuMemberWithdrawService extends IService {
*/
Integer updateWithdrawByCode(MemberAccountAudit memberAccountAudit);
-
/**
* 查询列表信息
*
@@ -58,7 +56,6 @@ public interface ICuMemberWithdrawService extends IService {
*/
Object[] selectMemberWithdrawList(CuMemberWithdrawVO cuMemberWithdrawVO);
-
/**
* 查询提现信息详情
*
@@ -83,16 +80,6 @@ public interface ICuMemberWithdrawService extends IService {
*/
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 {
*/
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 {
*/
BigDecimal getAccountBalance(Integer accountsType, CuMemberAccount cuMemberAccount);
-
/**
* @param pkIds 主键集合
* @param approveState 审核状态
@@ -164,7 +141,6 @@ public interface ICuMemberWithdrawService extends IService {
*/
Integer confirmWithdrawPetition(CuMemberPetitionVO cuMemberPetitionVO);
-
/**
* 会员端查询提现列表
*
@@ -183,7 +159,6 @@ public interface ICuMemberWithdrawService extends IService {
*/
Integer updateWithdrawStatusByPkId(Long pkId, Long pkModified);
-
/**
* 查询会员是否存在提现记录
*
diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/impl/CuMemberAccountServiceImpl.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/impl/CuMemberAccountServiceImpl.java
index 48d27424..80c7ba89 100644
--- a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/impl/CuMemberAccountServiceImpl.java
+++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/impl/CuMemberAccountServiceImpl.java
@@ -324,11 +324,6 @@ public class CuMemberAccountServiceImpl extends ServiceImpl queryMemberAccountByPkcountry(Integer pkCountry) {
- return baseMapper.queryMemberAccountByPkCountry(pkCountry);
- }
-
@Override
public List queryMemberAccountByMemberCode(String memberCode, List accountTypes, Integer pkCountry) {
List pkAccounts = new ArrayList<>();
@@ -610,12 +605,6 @@ public class CuMemberAccountServiceImpl extends ServiceImpl queryAccountAndMemberInfo(List memberIdList) {
- return baseMapper.queryAccountAndMemberInfo(memberIdList);
- }
-
@Override
public Object[] queryMemberAccountByMemberCodeAndName(CuMemberAccountVO cuMemberAccountVO) {
CuMemberAccountExtVO cuMemberAccountExtVO;
@@ -784,28 +773,12 @@ public class CuMemberAccountServiceImpl extends ServiceImpl cuMemberRechargeAccountParams = baseMapper.queryMemberAccountByMemberCode(null, Collections.singletonList(pkAccount), pkMember);
return CollUtil.isNotEmpty(cuMemberRechargeAccountParams) ? cuMemberRechargeAccountParams.get(0) : null;
}
-
- @Override
- public Boolean batchUpdateBonusAccountByPkMember(List bonusList, int operateType, Long pkModified) {
- return baseMapper.batchUpdateBonusAccountByPkMember(bonusList, operateType, pkModified);
- }
-
@Override
public List selectMemberBonusAccountBySourceCode(String sourceCode) {
return baseMapper.selectMemberBonusAccountBySourceCode(sourceCode);
diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/impl/CuMemberRechargeServiceImpl.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/impl/CuMemberRechargeServiceImpl.java
index f7a2825b..ffab2e10 100644
--- a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/impl/CuMemberRechargeServiceImpl.java
+++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/service/impl/CuMemberRechargeServiceImpl.java
@@ -478,8 +478,7 @@ public class CuMemberRechargeServiceImpl extends ServiceImpl 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 getWithdrawTimes(Long pkMember) {
@@ -106,7 +84,6 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl cuMemberAccountExts, List 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 withdrawTimesByPkCountry = baseMapper.getWithdrawTimesByPkCountry(pkCountry);
- Map 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 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 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 bdWithdrawalTaxExtR = withdrawalTaxServiceApi.queryWithdrawalTax(pkCountry);
+ R bdWithdrawalTaxExtR = iWithdrawalTaxServiceApi.queryWithdrawalTax(pkCountry);
BdWithdrawalTaxExt withdrawalTax = bdWithdrawalTaxExtR.getData();
if (null == withdrawalTax) {
return BigDecimal.ZERO;
@@ -517,7 +382,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl getWithdrawApproveStateByIds(List pkIds, Integer approveState) {
return baseMapper.getWithdrawApproveStateByIds(pkIds, approveState);
}
-
@Override
public CuMemberPetitionVO showMemberWithdrawPetition(List pkIds, Integer approveState) {
CuMemberPetitionVO memberPetitionVo = new CuMemberPetitionVO();
@@ -563,7 +414,6 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl checkWithdrawPetitionByState(List pkIds, Integer approveState) {
return BeanUtil.copyToList(baseMapper.showMemberWithdrawPetition(pkIds, approveState), CuMemberWithdrawVO.class);
@@ -587,7 +437,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl 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 memberWithdrawList = memberPetitionVo.getMemberWithdrawList();
//提交提现用户
@@ -600,7 +450,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl submit = approvalServiceApi.submit(approvalSubmitDTO, loginUser);
+ R submit = iApprovalServiceApi.submit(approvalSubmitDTO, loginUser);
if (!submit.isSuccess()) {
throw new RuntimeException(submit.getMsg());
}
@@ -636,7 +486,7 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl cuMemberWithdrawList = baseMapper.selectMemberWithdrawListByPkMember(pkMember, pkCountry);
if (CollUtil.isNotEmpty(cuMemberWithdrawList)) {
//查询币种值
- List allAccounts = cuMemberBaseService.getAccountByCountryId(pkCountry);
+ List allAccounts = iCuMemberBaseService.getAccountByCountryId(pkCountry);
Map 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 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 wrapper = new LambdaQueryWrapper<>();
@@ -753,13 +603,13 @@ public class CuMemberWithdrawServiceImpl extends ServiceImpl 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);
}
}
}
diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/vo/CuMemberWithdrawVO.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/vo/CuMemberWithdrawVO.java
index cc3cc670..a44b50df 100644
--- a/bd-business/bd-business-member/src/main/java/com/hzs/member/account/vo/CuMemberWithdrawVO.java
+++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/account/vo/CuMemberWithdrawVO.java
@@ -13,15 +13,8 @@ import java.util.Date;
import java.util.List;
/**
- *
* 会员提现表
- *
- *
- * @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 = "打款状态")
@@ -317,7 +309,7 @@ public class CuMemberWithdrawVO extends CuMemberBaseVO {
/**
* 查询状态
*/
- private Integer queryStatus;
+ private Integer queryStatus;
/**
* 会员编号集合
diff --git a/bd-business/bd-business-member/src/main/resources/mapper/member/account/CuMemberAccountMapper.xml b/bd-business/bd-business-member/src/main/resources/mapper/member/account/CuMemberAccountMapper.xml
index 5c02d7bc..daf4be14 100644
--- a/bd-business/bd-business-member/src/main/resources/mapper/member/account/CuMemberAccountMapper.xml
+++ b/bd-business/bd-business-member/src/main/resources/mapper/member/account/CuMemberAccountMapper.xml
@@ -235,19 +235,6 @@
-
-
-
- *
- * @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 queryWrapper = new QueryWrapper();
- queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
- if(StringUtils.isNotNull(withdrawalAuto.getPkWithdrawal())){
- queryWrapper.eq("PK_WITHDRAWAL",withdrawalAuto.getPkWithdrawal());
+ QueryWrapper 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 list = withdrawalAutoService.list(queryWrapper);
+ List 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));
}
+
}
diff --git a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/controller/manage/BdWithdrawalController.java b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/controller/manage/BdWithdrawalController.java
index 887056ed..d9d4a150 100644
--- a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/controller/manage/BdWithdrawalController.java
+++ b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/controller/manage/BdWithdrawalController.java
@@ -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;
/**
- *
* 提现设置主表 前端控制器
- *
- *
- * @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 listExt = withdrawalService.listExt(withdrawalExt);
- for(BdWithdrawalExt bwd: listExt){
- //暂时使用中国
- if(StringUtils.isNotNull(bwd.getMinAmount())){
- bwd.setMinAmountUsa(currencyService.getDollar(bwd.getMinAmount(),SecurityUtils.getPkCountry()));
+ List listExt = iBdWithdrawalService.listExt(withdrawalExt);
+ for (BdWithdrawalExt bwd : listExt) {
+ //暂时使用中国
+ 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 queryWrapperAuto = new QueryWrapper();
- queryWrapperAuto.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
- if(StringUtils.isNotNull(bwd.getPkId())){
- queryWrapperAuto.eq("PK_WITHDRAWAL",bwd.getPkId());
+ QueryWrapper queryWrapperAuto = new QueryWrapper<>();
+ queryWrapperAuto.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
+ if (StringUtils.isNotNull(bwd.getPkId())) {
+ queryWrapperAuto.eq("PK_WITHDRAWAL", bwd.getPkId());
}
- List listAuto = withdrawalAutoService.list(queryWrapperAuto);
+ List listAuto = iBdWithdrawalAutoService.list(queryWrapperAuto);
List 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 queryWrapper = new QueryWrapper();
- queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
+ public void export(HttpServletResponse response) {
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
queryWrapper.orderByDesc("CREATION_TIME");
- List list = withdrawalService.list(queryWrapper);
- List listExt=new ArrayList<>();
- for(BdWithdrawal bwd: list){
- BdWithdrawalExt withdrawalExtNew= BeanUtil.copyProperties(bwd, BdWithdrawalExt.class);
+ List list = iBdWithdrawalService.list(queryWrapper);
+ List 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 queryWrapperAuto = new QueryWrapper();
- queryWrapperAuto.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
- if(StringUtils.isNotNull(bwd.getPkId())){
- queryWrapperAuto.eq("PK_WITHDRAWAL",bwd.getPkId());
+ QueryWrapper queryWrapperAuto = new QueryWrapper<>();
+ queryWrapperAuto.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
+ if (StringUtils.isNotNull(bwd.getPkId())) {
+ queryWrapperAuto.eq("PK_WITHDRAWAL", bwd.getPkId());
}
- List listAuto = withdrawalAutoService.list(queryWrapperAuto);
+ List listAuto = iBdWithdrawalAutoService.list(queryWrapperAuto);
List 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 queryWrapper = new QueryWrapper();
- queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
queryWrapper.orderByDesc("CREATION_TIME");
- List list = withdrawalService.list(queryWrapper);
- List listExt=new ArrayList<>();
- for(BdWithdrawal bwd: list){
- BdWithdrawalExt withdrawalExtNew= BeanUtil.copyProperties(bwd, BdWithdrawalExt.class);
+ List list = iBdWithdrawalService.list(queryWrapper);
+ List 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 queryWrapperAuto = new QueryWrapper();
- queryWrapperAuto.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
- if(StringUtils.isNotNull(bwd.getPkId())){
- queryWrapperAuto.eq("PK_WITHDRAWAL",bwd.getPkId());
+ QueryWrapper queryWrapperAuto = new QueryWrapper<>();
+ queryWrapperAuto.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
+ if (StringUtils.isNotNull(bwd.getPkId())) {
+ queryWrapperAuto.eq("PK_WITHDRAWAL", bwd.getPkId());
}
- List listAuto = withdrawalAutoService.list(queryWrapperAuto);
+ List listAuto = iBdWithdrawalAutoService.list(queryWrapperAuto);
List 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 withdrawalAutoList =withdrawalService.getWithdrawalAutoList(withdrawalAutoExt);
- if(CollectionUtil.isNotEmpty(withdrawalAutoList)){
+ List withdrawalAutoList = iBdWithdrawalService.getWithdrawalAutoList(withdrawalAutoExt);
+ if (CollectionUtil.isNotEmpty(withdrawalAutoList)) {
withdrawalExt.setWithdrawalAutoList(withdrawalAutoList);
- }else{
- List withdrawalAutoListNew=new ArrayList<>();
+ } else {
+ List 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 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));
}
}
diff --git a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/controller/manage/BdWithdrawalProcessController.java b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/controller/manage/BdWithdrawalProcessController.java
index 9b2f0f7e..2fbee859 100644
--- a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/controller/manage/BdWithdrawalProcessController.java
+++ b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/controller/manage/BdWithdrawalProcessController.java
@@ -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;
/**
- *
* 提现手续费手续费配置 前端控制器
- *
- *
- * @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 queryWrapper = new QueryWrapper();
+ QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
queryWrapper.orderByDesc("CREATION_TIME");
- List list = withdrawalProcessService.list(queryWrapper);
- List listExt=new ArrayList<>();
+ List list = iBdWithdrawalProcessService.list(queryWrapper);
+ List 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 queryWrapper = new QueryWrapper();
+ QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
queryWrapper.orderByDesc("CREATION_TIME");
- List list = withdrawalProcessService.list(queryWrapper);
- List listExt=new ArrayList<>();
+ List list = iBdWithdrawalProcessService.list(queryWrapper);
+ List listExt = new ArrayList<>();
list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdWithdrawalProcessExt.class)));
ExcelUtil 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 queryWrapper=new QueryWrapper();
- queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
- BdWithdrawalProcess withdrawalProcessCheck=withdrawalProcessService.getOne(queryWrapper);
- if(StringUtils.isNotNull(withdrawalProcessCheck)){
+ QueryWrapper 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 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));
}
}
diff --git a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/provider/WithdrawalAutoServiceProvider.java b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/provider/WithdrawalAutoServiceProvider.java
deleted file mode 100644
index c418d8bb..00000000
--- a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/provider/WithdrawalAutoServiceProvider.java
+++ /dev/null
@@ -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>
- **/
- @Override
- public R> queryWithdrawalAuto(Integer pkCountry) {
- return R.ok(withdrawalAutoService.queryWithdrawalAuto(pkCountry));
- }
-}
diff --git a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/provider/WithdrawalServiceProvider.java b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/provider/WithdrawalServiceProvider.java
index ffe3ba19..a199ef1f 100644
--- a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/provider/WithdrawalServiceProvider.java
+++ b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/provider/WithdrawalServiceProvider.java
@@ -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服务类
*/
diff --git a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/IBdWithdrawalAutoService.java b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/IBdWithdrawalAutoService.java
index 0784818c..71db90d2 100644
--- a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/IBdWithdrawalAutoService.java
+++ b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/IBdWithdrawalAutoService.java
@@ -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;
-
/**
- *
* 自动提现明细表 服务类
- *
- *
- * @author zhangjing
- * @since 2022-08-31
*/
public interface IBdWithdrawalAutoService extends IService {
- List queryWithdrawalAuto(Integer pkCountry);
}
diff --git a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/impl/BdWithdrawalAutoServiceImpl.java b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/impl/BdWithdrawalAutoServiceImpl.java
index 91e7a1aa..500ef592 100644
--- a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/impl/BdWithdrawalAutoServiceImpl.java
+++ b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/impl/BdWithdrawalAutoServiceImpl.java
@@ -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;
-
/**
- *
* 自动提现明细表 服务实现类
- *
- *
- * @author zhangjing
- * @since 2022-08-31
*/
@Service
public class BdWithdrawalAutoServiceImpl extends ServiceImpl 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
- **/
- @Override
- public List queryWithdrawalAuto(Integer pkCountry) {
- List withdrawalAuto = redisService.getCacheObject(CacheConstants.BD_WITHDRAWAL_AUTO + pkCountry);
- if(CollectionUtil.isEmpty(withdrawalAuto)){
- QueryWrapper 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;
- }
-
-
}
diff --git a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/impl/BdWithdrawalServiceImpl.java b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/impl/BdWithdrawalServiceImpl.java
index 8e952a10..be92a202 100644
--- a/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/impl/BdWithdrawalServiceImpl.java
+++ b/bd-business/bd-business-system/src/main/java/com/hzs/system/config/service/impl/BdWithdrawalServiceImpl.java
@@ -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 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 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 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);
}
diff --git a/bd-business/bd-business-system/src/main/java/com/hzs/system/enums/controller/EnumsInitController.java b/bd-business/bd-business-system/src/main/java/com/hzs/system/enums/controller/EnumsInitController.java
index fd619647..cb6f3640 100644
--- a/bd-business/bd-business-system/src/main/java/com/hzs/system/enums/controller/EnumsInitController.java
+++ b/bd-business/bd-business-system/src/main/java/com/hzs/system/enums/controller/EnumsInitController.java
@@ -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()));
- }
-
/**
* 站内信类型
*/
diff --git a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java
index d0721ef2..1cbd1bda 100644
--- a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java
+++ b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java
@@ -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:";
-
/**
* 个税明细配置
*/
diff --git a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/EnumsPrefixConstants.java b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/EnumsPrefixConstants.java
index da568db1..cd3c7151 100644
--- a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/EnumsPrefixConstants.java
+++ b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/EnumsPrefixConstants.java
@@ -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_";
-
/**
* 店铺枚举(配送中心等级)
*/
diff --git a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/EWithdrawStatus.java b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/EWithdrawStatus.java
index 7f182210..210453b4 100644
--- a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/EWithdrawStatus.java
+++ b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/EWithdrawStatus.java
@@ -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 "";
+ }
}
diff --git a/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/system/base/BdCurrency.java b/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/system/base/BdCurrency.java
index 74e5b21e..a94d59db 100644
--- a/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/system/base/BdCurrency.java
+++ b/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/system/base/BdCurrency.java
@@ -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)
diff --git a/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/system/config/BdWithdrawalAuto.java b/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/system/config/BdWithdrawalAuto.java
index a7d2b632..063b2071 100644
--- a/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/system/config/BdWithdrawalAuto.java
+++ b/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/system/config/BdWithdrawalAuto.java
@@ -12,12 +12,7 @@ import lombok.experimental.Accessors;
import java.math.BigDecimal;
/**
- *
* 自动提现明细表
- *
- *
- * @author zhangjing
- * @since 2022-08-31
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -47,5 +42,4 @@ public class BdWithdrawalAuto extends BaseEntity {
private Integer withdrawalCycle;
-
}