|
@@ -94,6 +94,7 @@ public class AppUserCountDividendController extends BaseController
|
|
{
|
|
{
|
|
String userId = dto.getUserId();
|
|
String userId = dto.getUserId();
|
|
String dateNo = dto.getDateNum();
|
|
String dateNo = dto.getDateNum();
|
|
|
|
+ Long curUserId = SecurityUtils.getUserId();
|
|
if(null == userId && StringUtils.isBlank(dateNo)){
|
|
if(null == userId && StringUtils.isBlank(dateNo)){
|
|
return HttpRet.fail("发放失败,参数为空");
|
|
return HttpRet.fail("发放失败,参数为空");
|
|
}
|
|
}
|
|
@@ -109,7 +110,7 @@ public class AppUserCountDividendController extends BaseController
|
|
if(null == dividendList || dividendList.size() < 1){
|
|
if(null == dividendList || dividendList.size() < 1){
|
|
return HttpRet.fail("发放失败,不存在或已发放");
|
|
return HttpRet.fail("发放失败,不存在或已发放");
|
|
}
|
|
}
|
|
- AppUser curUser = appUserService.selectAppUserByUserid(Long.parseLong(userId));
|
|
+ AppUser curUser = appUserService.selectAppUserByUserid(curUserId);
|
|
if(curUser.getDiamondCoin() < dividendList.stream().mapToDouble(e->e.getDiamondCoin()).sum()){
|
|
if(curUser.getDiamondCoin() < dividendList.stream().mapToDouble(e->e.getDiamondCoin()).sum()){
|
|
return HttpRet.fail("发放失败,余额不足");
|
|
return HttpRet.fail("发放失败,余额不足");
|
|
}
|
|
}
|