Kaynağa Gözat

Merge branch 'zfb_trans'

zoujiajian 11 ay önce
ebeveyn
işleme
5a7b2dc8ca

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/DistributeMoneyApply.java

@@ -34,6 +34,11 @@ public class DistributeMoneyApply extends BaseEntity {
 
 	private Type type;
 
+	/**
+	 * usdt网格
+	 */
+	private String network;
+
 	private String account;
 
 	private String realName;

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/DistributePointsExchangeMoney.java

@@ -25,4 +25,9 @@ public class DistributePointsExchangeMoney extends BaseEntity{
 	private Integer points;
 
 	private BigDecimal money;
+
+	/**
+	 * usdt提现门槛
+	 */
+	private BigDecimal usdtLimit;
 }

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/UserMirrorShopDistributeMoneyApply.java

@@ -27,6 +27,11 @@ public class UserMirrorShopDistributeMoneyApply extends BaseEntity {
 
 	private Type type;
 
+	/**
+	 * usdt网格
+	 */
+	private String network;
+
 	private String account;
 
 	private String realName;

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/YhShopDistributeMoneyApply.java

@@ -27,6 +27,11 @@ public class YhShopDistributeMoneyApply extends BaseEntity {
 
 	private Type type;
 
+	/**
+	 * usdt网格
+	 */
+	private String network;
+
 	private String account;
 
 	private String realName;

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/request/ApplyMoneyReq.java

@@ -39,5 +39,10 @@ public class ApplyMoneyReq {
 	 */
 	private String remark;
 
+	/**
+	 * usdt网格
+	 */
+	private String network;
+
 	private Long userId;
 }

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/request/UserMirrorShopApplyMoneyReq.java

@@ -35,5 +35,10 @@ public class UserMirrorShopApplyMoneyReq {
 	 */
 	private String remark;
 
+	/**
+	 * usdt网格
+	 */
+	private String network;
+
 	private Long userId;
 }

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/request/YhShopApplyMoneyReq.java

@@ -34,5 +34,10 @@ public class YhShopApplyMoneyReq {
 	 */
 	private String remark;
 
+	/**
+	 * usdt网格
+	 */
+	private String network;
+
 	private Long userId;
 }

+ 3 - 0
netflix-dao/src/main/java/com/cyksj/model/views/DistributeMoneyApplyView.java

@@ -64,6 +64,9 @@ public class DistributeMoneyApplyView {
 	@DbField("dma.remark")
 	private String remark;
 
+	@DbField("dma.network")
+	private String network;
+
 	@DbField("dma.business_id")
 	private Long businessId;
 

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/mange/goods/CmsYhShopCommonServiceImpl.java

@@ -199,7 +199,7 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 
 		if (distributeMoneyApply.getVerifyStatus() == YhShopDistributeMoneyApply.Status.fail) {
 			String type = "shop";
-			String key = String.format(RedisService.key.APPLY_MONEY_DAY_LIMIT_KEY.getName(), DateTime.now().toDateStr(), type, distributeMoneyApply.getUserId());
+			String key = String.format(RedisService.key.APPLY_MONEY_DAY_LIMIT_KEY.getName(), distributeMoneyApply.getUserId().toString(), type, distributeMoneyApply.getUserId());
 			redisService.del(key);
 		}
 	}

+ 1 - 2
netflix-service/src/main/java/com/cyksj/service/mange/usermirror/impl/UserMirrorCommonServiceImpl.java

@@ -1,6 +1,5 @@
 package com.cyksj.service.mange.usermirror.impl;
 
-import cn.hutool.core.date.DateTime;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cyksj.common.exception.BusinessRuntimeException;
@@ -77,7 +76,7 @@ public class UserMirrorCommonServiceImpl implements UserMirrorCommonService {
 
 		if (distributeMoneyApply.getVerifyStatus() == UserMirrorShopDistributeMoneyApply.Status.fail) {
 			String type = "mirrorShop";
-			String key = String.format(RedisService.key.APPLY_MONEY_DAY_LIMIT_KEY.getName(), DateTime.now().toDateStr(), type, distributeMoneyApply.getUserId());
+			String key = String.format(RedisService.key.APPLY_MONEY_DAY_LIMIT_KEY.getName(), distributeMoneyApply.getUserId().toString(), type, distributeMoneyApply.getUserId());
 			redisService.del(key);
 		}
 	}

+ 4 - 5
netflix-service/src/main/java/com/cyksj/service/pay/impl/TransferFuncServiceImpl.java

@@ -254,6 +254,7 @@ public class TransferFuncServiceImpl implements TransferFuncService {
 			distributeMoneyApply.setWalletAddr(applyMoneyReq.getWalletAddr());
 			distributeMoneyApply.setRemark(applyMoneyReq.getRemark());
 			distributeMoneyApply.setType(applyMoneyReq.getType());
+			distributeMoneyApply.setNetwork(applyMoneyReq.getNetwork());
 			if (isTakeAll != null && isTakeAll) {
 				distributeMoneyApply.setVerifyStatus(UserMirrorShopDistributeMoneyApply.Status.verifying);
 			} else {
@@ -306,13 +307,9 @@ public class TransferFuncServiceImpl implements TransferFuncService {
 		model.setOutBizNo(donNo);
 		//单位元
 		model.setTransAmount(money.divide(BigDecimal.valueOf(100)).toString());
-		model.setProductCode(ZfbProductCode.STD_RED_PACKET.getProductCode());
+		model.setProductCode(ZfbProductCode.TRANS_ACCOUNT_NO_PWD.getProductCode());
 		model.setBizScene(TransferConstant.DIRECT_TRANSFER);
 		model.setOrderTitle(remark);
-		//红包业务必传,取值REDPACKET
-		JSONObject businessParams = new JSONObject();
-		businessParams.putOpt(TransferConstant.SUB_BIZ_SCENE, TransferConstant.RED_PACKET);
-		model.setBusinessParams(businessParams.toString());
 		Participant payeeInfo = new Participant();
 		payeeInfo.setIdentity(account);
 		payeeInfo.setIdentityType(TransferConstant.ALIPAY_LOGON_ID);
@@ -441,6 +438,7 @@ public class TransferFuncServiceImpl implements TransferFuncService {
 			distributeMoneyApply.setRemark(applyMoneyReq.getRemark());
 			distributeMoneyApply.setType(applyMoneyReq.getType());
 			distributeMoneyApply.setMType(applyMoneyReq.getMType());
+			distributeMoneyApply.setNetwork(applyMoneyReq.getNetwork());
 			if (isTakeAll != null && isTakeAll) {
 				distributeMoneyApply.setVerifyStatus(DistributeMoneyApply.Status.verifying);
 			} else {
@@ -545,6 +543,7 @@ public class TransferFuncServiceImpl implements TransferFuncService {
 			distributeMoneyApply.setWalletAddr(applyMoneyReq.getWalletAddr());
 			distributeMoneyApply.setRemark(applyMoneyReq.getRemark());
 			distributeMoneyApply.setType(applyMoneyReq.getType());
+			distributeMoneyApply.setNetwork(applyMoneyReq.getNetwork());
 			if (isTakeAll != null && isTakeAll) {
 				distributeMoneyApply.setVerifyStatus(YhShopDistributeMoneyApply.Status.verifying);
 			} else {

+ 13 - 0
netflix-web/src/main/java/com/cyksj/web/controller/cps/CpsApplyMoneyController.java

@@ -1,9 +1,12 @@
 package com.cyksj.web.controller.cps;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cyksj.dto.Result;
 import com.cyksj.enums.GatewayResponse;
 import com.cyksj.mapper.UserMapper;
 import com.cyksj.mapper.manage.distribute.DistributeMoneyApplyMapper;
+import com.cyksj.mapper.manage.distribute.DistributePointsExchangeMoneyMapper;
+import com.cyksj.model.entity.DistributePointsExchangeMoney;
 import com.cyksj.model.entity.User;
 import com.cyksj.model.request.ApplyMoneyReq;
 import com.cyksj.model.views.CpsApplyMoneyView;
@@ -41,6 +44,8 @@ public class CpsApplyMoneyController {
 
 	private final UserMapper userMapper;
 
+	private final DistributePointsExchangeMoneyMapper distributePointsExchangeMoneyMapper;
+
 	private final HttpServletRequest request;
 
 	/**
@@ -104,4 +109,12 @@ public class CpsApplyMoneyController {
 		applyMoneyReq.setUserId(cpsUserId);
 		return transferFuncService.subApplyMoney(applyMoneyReq);
 	}
+
+	/**
+	 * 提现门槛
+	 */
+	@GetMapping("/applyMoney/threshold")
+	public Result<DistributePointsExchangeMoney> getThreshold() {
+		return GatewayResponse.SUCCESS.newBuilder().toResult(distributePointsExchangeMoneyMapper.selectOne(Wrappers.lambdaQuery(DistributePointsExchangeMoney.class).last("limit 1")));
+	}
 }

+ 1 - 1
netflix-web/src/main/java/com/cyksj/web/controller/manage/distribute/DistributeController.java

@@ -533,7 +533,7 @@ public class DistributeController {
 		distributeMoneyApplyMapper.updateById(distributeMoneyApply);
 
 		if (distributeMoneyApply.getVerifyStatus() == DistributeMoneyApply.Status.fail) {
-			String key = String.format(RedisService.key.APPLY_MONEY_DAY_LIMIT_KEY.getName(), DateTime.now().toDateStr(), DistributeMoneyApply.MType.ds.name(), distributeMoneyApply.getUserId());
+			String key = String.format(RedisService.key.APPLY_MONEY_DAY_LIMIT_KEY.getName(), distributeMoneyApply.getUserId().toString(), DistributeMoneyApply.MType.ds.name(), distributeMoneyApply.getUserId());
 			redisService.del(key);
 		}
 		return GatewayResponse.SUCCESS.newBuilder().toResult("审核操作成功");

+ 11 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/shop/YhShopUserController.java

@@ -8,6 +8,7 @@ import com.cyksj.common.exception.BusinessRuntimeException;
 import com.cyksj.dto.Result;
 import com.cyksj.enums.GatewayResponse;
 import com.cyksj.mapper.GoodsDonMapper;
+import com.cyksj.mapper.manage.distribute.DistributePointsExchangeMoneyMapper;
 import com.cyksj.mapper.shop.YhShopApplyRecordMapper;
 import com.cyksj.mapper.shop.YhShopMapper;
 import com.cyksj.model.entity.*;
@@ -57,6 +58,8 @@ public class YhShopUserController {
 
 	private final RefreshCacheService refreshCacheService;
 
+	private final DistributePointsExchangeMoneyMapper distributePointsExchangeMoneyMapper;
+
 	/**
 	 * 店铺 信息详情
 	 */
@@ -291,4 +294,12 @@ public class YhShopUserController {
 		yhShopManageService.addUserShop(yhShop);
 		return GatewayResponse.SUCCESS.newBuilder().toResult();
 	}
+
+	/**
+	 * 提现门槛
+	 */
+	@GetMapping("/applyMoney/threshold")
+	public Result<DistributePointsExchangeMoney> getThreshold() {
+		return GatewayResponse.SUCCESS.newBuilder().toResult(distributePointsExchangeMoneyMapper.selectOne(Wrappers.lambdaQuery(DistributePointsExchangeMoney.class).last("limit 1")));
+	}
 }