|
@@ -96,9 +96,9 @@ public class AppUserCountDividendController extends BaseController
|
|
|
String userId = dto.getUserId();
|
|
|
String dateNo = dto.getDateNum();
|
|
|
Long curUserId = SecurityUtils.getUserId();
|
|
|
- if(null == userId && StringUtils.isBlank(dateNo)){
|
|
|
+
|
|
|
return HttpRet.fail("发放失败,参数为空");
|
|
|
- }
|
|
|
+ }*/
|
|
|
List<AppUserCountDividend> dividendList = appUserCountDividendService.selectUserDividendList(SecurityUtils.getUserId(), org.apache.commons.lang3.StringUtils.isBlank(userId)?null:Long.parseLong(userId),dateNo);
|
|
|
if(null == dividendList || dividendList.size() < 1){
|
|
|
return HttpRet.fail("发放失败,不存在或已发放");
|
|
@@ -120,7 +120,7 @@ public class AppUserCountDividendController extends BaseController
|
|
|
Long errUserId = countDividend.getUserId();
|
|
|
try {
|
|
|
List<FinTranRecord> tranRecordList = new ArrayList<>();
|
|
|
- AppUser appUser = userMap.get(countDividend.getUserId());
|
|
|
+ AppUser appUser = userMap.get(String.valueOf(countDividend.getUserId()));
|
|
|
AppUser curUser = appUserService.selectAppUserByUserid(curUserId);
|
|
|
if(!curUserId.equals(appUser.getPid())){
|
|
|
throw new ServiceException("只能给直属团队成员发放");
|
|
@@ -148,7 +148,8 @@ public class AppUserCountDividendController extends BaseController
|
|
|
curTran.setCurrencyType(TranCurrencyType.Balance.getType());
|
|
|
curTran.setRemarks(countDividend.getDateNo() + " 发放团队分红奖励");
|
|
|
curTran.setFromUid(curUserId);
|
|
|
- tranRecordList.add(curTran);
|
|
|
+
|
|
|
+ appUserService.updateUserAmount(curTran);
|
|
|
|
|
|
|
|
|
|
|
@@ -183,7 +184,8 @@ public class AppUserCountDividendController extends BaseController
|
|
|
curTran.setCurrencyType(TranCurrencyType.Coin.getType());
|
|
|
curTran.setRemarks(countDividend.getDateNo() + " 发放团队分红奖励");
|
|
|
curTran.setFromUid(curUserId);
|
|
|
- tranRecordList.add(curTran);
|
|
|
+
|
|
|
+ appUserService.updateUserAmount(curTran);
|
|
|
|
|
|
|
|
|
|
|
@@ -219,7 +221,7 @@ public class AppUserCountDividendController extends BaseController
|
|
|
userCountDividend.setStatus(1);
|
|
|
appUserCountDividendService.updateAppUserCountDividend(userCountDividend);
|
|
|
}catch (Exception ex){
|
|
|
- errMsg = "发放失败:".concat(ex.getMessage());
|
|
|
+ errMsg = "发放失败:" + ex.getMessage();
|
|
|
logger.info("{}发放失败:{}",errUserId,ex.getMessage());
|
|
|
break;
|
|
|
}
|