Browse Source

审核失败,用户可重新申请提现

zoujiajian 2 năm trước cách đây
mục cha
commit
794ec20b75

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

@@ -12,6 +12,7 @@ import com.cyksj.mapper.shop.*;
 import com.cyksj.model.entity.*;
 import com.cyksj.model.request.DistributeApplyMoneyReq;
 import com.cyksj.model.request.YhShopVerifyReq;
+import com.cyksj.redis.RedisService;
 import com.cyksj.service.mange.CmsYhShopCommonService;
 import com.cyksj.service.mange.business.UserBusinessRateService;
 import com.cyksj.service.shop.YhShopUserPlatDistributeRateService;
@@ -55,6 +56,8 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 
 	private final YhShopUserPlatDistributeRateMapper yhShopUserPlatDistributeRateMapper;
 
+	private final RedisService redisService;
+
 	@Override
 	@Transactional(rollbackFor = Throwable.class)
 	public void verifyYhShopApply(YhShopVerifyReq verifyReq) {
@@ -106,6 +109,12 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 		yhShopApplyRecord.setVerifyStatus(verifyStatus);
 		yhShopApplyRecordMapper.updateById(yhShopApplyRecord);
 		yhShopMapper.updateById(yhShop);
+
+		if (yhShopApplyRecord.getVerifyStatus() == YhShopApplyRecord.Status.fail) {
+			String type = "shop";
+			String key = String.format(RedisService.key.APPLY_MONEY_DAY_LIMIT_KEY.getName(), DateTime.now().toDateStr(), type, yhShopApplyRecord.getUserId());
+			redisService.del(key);
+		}
 	}
 
 	@Override

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

@@ -479,6 +479,11 @@ public class DistributeController {
 			distributeMoneyApply.setImg(distributeApplyMoneyReq.getImg());
 		}
 		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());
+			redisService.del(key);
+		}
 		return GatewayResponse.SUCCESS.newBuilder().toResult("审核操作成功");
 	}