|
|
@@ -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("每天仅可提现一次");
|