zoujiajian 1 rok pred
rodič
commit
5ad0a2eec9

+ 5 - 0
netflix-common/src/main/java/com/cyksj/common/constant/Constant.java

@@ -517,4 +517,9 @@ public interface Constant {
 	 * 第三方分类id
 	 */
 	Long THIRD_CATEGORY = 6l;
+
+	/**
+	 * 提现黑名单
+	 */
+	String APPLY_MONEY_BLACK = "apply_money_black";
 }

+ 7 - 0
netflix-service/src/main/java/com/cyksj/service/pay/impl/TransferFuncServiceImpl.java

@@ -91,6 +91,13 @@ public class TransferFuncServiceImpl implements TransferFuncService {
 	@Override
 	public Result distributeApply(ApplyMoneyReq applyMoneyReq) throws Exception {
 		applyMoneyReq.setMType(DistributeMoneyApply.MType.ds);
+		SysConfig black = sysConfigService.getOne(Wrappers.lambdaQuery(SysConfig.class)
+				.eq(SysConfig::getSysKey, Constant.APPLY_MONEY_BLACK).last("limit 1"));
+		if (black != null && StrUtil.isNotBlank(black.getSysValue())) {
+			if (Jsons.parseList(black.getSysValue(), Long.class).contains(applyMoneyReq.getUserId())) {
+				throw BusinessRuntimeException.getInstance("提现异常");
+			}
+		}
 		String key = String.format(RedisService.key.APPLY_MONEY_DAY_LIMIT_KEY.getName(), DateTime.now().toDateStr(), applyMoneyReq.getMType(), applyMoneyReq.getUserId());
 		if (!redisService.setNx(key, applyMoneyReq.getUserId(), RedisService.key.APPLY_MONEY_DAY_LIMIT_KEY.getTimeout())) {
 			throw BusinessRuntimeException.getInstance("每天仅可提现一次");

+ 0 - 2
netflix-web/src/main/java/com/cyksj/web/controller/user/DistributePopularizeController.java

@@ -3,8 +3,6 @@ package com.cyksj.web.controller.user;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.StrUtil;
-import cn.hutool.extra.qrcode.QrCodeUtil;
-import cn.hutool.extra.qrcode.QrConfig;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cyksj.common.EnvCommonService;
 import com.cyksj.common.annotation.NoSubmit;