From c84de2a02892d1a4d9af628b226ee0960011fd41 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Sat, 29 Oct 2022 21:55:14 +0800
Subject: [PATCH] 20221021
---
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java | 30 ++++++++++++++++++++++++++++--
1 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java b/src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
index 3efad30..582475d 100644
--- a/src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -28,6 +28,7 @@
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
@@ -698,8 +699,12 @@
}
}
//(2)每24小时只能提现一次
+ // 提现次数
+ DataDictionaryCustom withdrawOutTimesDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.OUT_ACCOUNT_PROFIT.getType(), DataDictionaryEnum.OUT_ACCOUNT_PROFIT.getCode());
+ String withdrawOutTimesStr = withdrawOutTimesDic.getValue() == null ? "1" : withdrawOutTimesDic.getValue();
+ int withdrawOutTimes = Integer.parseInt(withdrawOutTimesStr);
Integer withdrawTimesReal = memberCoinWithdrawDao.selectByMemberIdAndCreateTime(memberId,DateUtil.format(DateUtil.date(),"yyyy-MM-dd"));
- if(1 > withdrawTimesReal){
+ if(withdrawOutTimes < withdrawTimesReal){
return new FebsResponse().fail().message(MessageSourceUtils.getString("member_err_0014"));
}
@@ -1099,11 +1104,32 @@
public BigDecimal updatePTFC(Long memberId, BigDecimal totalProfit) {
BigDecimal multiply = totalProfit.multiply(new BigDecimal(0.05));
DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity(
- memberId, multiply, "系统", 9);
+ memberId, multiply.negate(), "系统", 9);
dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity);
return multiply;
}
+ @Override
+ public Integer isGoal(String num) {
+ Set set = new HashSet();
+ num = StrUtil.subSuf(num,1);
+ char[] chars = num.toCharArray();
+ for(char c:chars) {
+ set.add(c);
+ }
+ if(set.size()==num.length()){
+ return 1;
+ }else{
+ return 2;
+ }
+ }
+
+ public static void main(String[] args) {
+
+ String num = StrUtil.subSuf("01234",1);
+ System.out.print(num);
+ }
+
private String isIdentity(List<String> refererIds,String levelCode){
String flag = levelCode;
for(String str : refererIds){
--
Gitblit v1.9.1