Commit aed47833 authored by liqin's avatar liqin 💬

Merge branch 'master' of http://111.203.232.171:8888/licc/shop-mall into master

parents c1806b24 b79d3b12
......@@ -232,7 +232,7 @@ public class AccountManager {
//更新月收益
if (!CollectionUtils.isEmpty(accountInfoList)) {
for (AccountInfo accountInfo : accountInfoList) {
int count = accountMapper.updateById(accountInfo);
int count = accountMapper.edit(accountInfo);
if (count == 0) {
return false;
}
......
......@@ -159,7 +159,13 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
String userId = entity.getKey();
//1)、统计当前用户月度业绩
double userCount = entity.getValue();
tempMap.put(userId, userCount);
if (tempMap.containsKey(entity.getKey())) {
double teamMoney = userCount + tempMap.get(entity.getKey());
tempMap.put(entity.getKey(), teamMoney);
} else {
//key 不存在,加入集合 当前用户团队绩效
tempMap.put(entity.getKey(), userCount);
}
//2)、获取当前用户的上级用户列表
List<User> userList = getByList(userId);
......@@ -171,11 +177,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
//3)、统计当前用户的上级用户团队绩效
//key 存在 当前用户团队绩效 + 上级用户团队绩效
if (tempMap.containsKey(userInfo.getUserId())) {
double teamMoney = userCount + map.get(userInfo.getUserId());
map.put(userInfo.getUserId(), teamMoney);
double teamMoney = userCount + tempMap.get(userInfo.getUserId());
tempMap.put(userInfo.getUserId(), teamMoney);
} else {
//key 不存在,加入集合 当前用户团队绩效
map.put(userInfo.getUserId(), userCount);
tempMap.put(userInfo.getUserId(), userCount);
}
}
}
......@@ -196,7 +202,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
performance.setMonthTeamPerformance(BigDecimal.valueOf(entity.getValue()));
performance.setUserLevel(user.getUserLevel());
performance.setYearMonth(yearMonth);
teamPerformanceMapper.add(performance);
addList.add(performance);
} else {
teamPerformance.setMonthTeamPerformance(BigDecimal.valueOf(entity.getValue()));
......
......@@ -607,7 +607,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
BigDecimal cultivatingPrize = cultivatingPrizeMapper.getcultivatingPrizeByUserLevel(level).getCultivatingPrize();
if (1 != bronzeTree) {
//给上级用户幼苗等级培育奖
//给上级用户青铜等级培育奖
//1.上级用户本月收益 ++
AccountInfo beIntivedUserAccount = accountMapper.getByUserId(inviteUserId);
BigDecimal earningsMonth = beIntivedUserAccount.getEarningsMonth();
......@@ -627,7 +627,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
//3.修改培育奖记录状态 ==1
bronzeTree = 1;
cultivatingPrizeInfo.setSeedling(bronzeTree);
cultivatingPrizeInfo.setBronzeTree(bronzeTree);
cultivatingPrizeInfoMapper.updateById(cultivatingPrizeInfo);
}
} else if (3 == level) {
......@@ -636,7 +636,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
BigDecimal cultivatingPrize = cultivatingPrizeMapper.getcultivatingPrizeByUserLevel(level).getCultivatingPrize();
if (1 != silverTree) {
//给上级用户幼苗等级培育奖
//给上级用户白银等级培育奖
//1.上级用户本月收益 ++
AccountInfo beIntivedUserAccount = accountMapper.getByUserId(inviteUserId);
BigDecimal earningsMonth = beIntivedUserAccount.getEarningsMonth();
......@@ -656,7 +656,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
//3.修改培育奖记录状态 ==1
silverTree = 1;
cultivatingPrizeInfo.setSeedling(silverTree);
cultivatingPrizeInfo.setSilverTree(silverTree);
cultivatingPrizeInfoMapper.updateById(cultivatingPrizeInfo);
}
} else if (4 == level) {
......@@ -665,7 +665,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
BigDecimal cultivatingPrize = cultivatingPrizeMapper.getcultivatingPrizeByUserLevel(level).getCultivatingPrize();
if (1 != goldTree) {
//给上级用户幼苗等级培育奖
//给上级用户黄金等级培育奖
//1.上级用户本月收益 ++
AccountInfo beIntivedUserAccount = accountMapper.getByUserId(inviteUserId);
BigDecimal earningsMonth = beIntivedUserAccount.getEarningsMonth();
......@@ -685,7 +685,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
//3.修改培育奖记录状态 ==1
goldTree = 1;
cultivatingPrizeInfo.setSeedling(goldTree);
cultivatingPrizeInfo.setGoldTree(goldTree);
cultivatingPrizeInfoMapper.updateById(cultivatingPrizeInfo);
}
} else if (5 == level) {
......@@ -694,7 +694,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
BigDecimal cultivatingPrize = cultivatingPrizeMapper.getcultivatingPrizeByUserLevel(level).getCultivatingPrize();
if (1 != farmer) {
//给上级用户幼苗等级培育奖
//给上级用户农场主等级培育奖
//1.上级用户本月收益 ++
AccountInfo beIntivedUserAccount = accountMapper.getByUserId(inviteUserId);
BigDecimal earningsMonth = beIntivedUserAccount.getEarningsMonth();
......@@ -714,7 +714,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
//3.修改培育奖记录状态 ==1
farmer = 1;
cultivatingPrizeInfo.setSeedling(farmer);
cultivatingPrizeInfo.setFarmer(farmer);
cultivatingPrizeInfoMapper.updateById(cultivatingPrizeInfo);
}
} else if (6 == level) {
......@@ -723,7 +723,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
BigDecimal cultivatingPrize = cultivatingPrizeMapper.getcultivatingPrizeByUserLevel(level).getCultivatingPrize();
if (1 != forestStart) {
//给上级用户幼苗等级培育奖
//给上级用户森林之星等级培育奖
//1.上级用户本月收益 ++
AccountInfo beIntivedUserAccount = accountMapper.getByUserId(inviteUserId);
BigDecimal earningsMonth = beIntivedUserAccount.getEarningsMonth();
......@@ -743,7 +743,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
//3.修改培育奖记录状态 ==1
forestStart = 1;
cultivatingPrizeInfo.setSeedling(forestStart);
cultivatingPrizeInfo.setForestStart(forestStart);
cultivatingPrizeInfoMapper.updateById(cultivatingPrizeInfo);
}
} else if (7 == level) {
......@@ -752,7 +752,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
BigDecimal cultivatingPrize = cultivatingPrizeMapper.getcultivatingPrizeByUserLevel(level).getCultivatingPrize();
if (1 != partner) {
//给上级用户幼苗等级培育奖
//给上级用户西田森合伙人等级培育奖
//1.上级用户本月收益 ++
AccountInfo beIntivedUserAccount = accountMapper.getByUserId(inviteUserId);
BigDecimal earningsMonth = beIntivedUserAccount.getEarningsMonth();
......@@ -772,7 +772,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper,User> implemen
//3.修改培育奖记录状态 ==1
partner = 1;
cultivatingPrizeInfo.setSeedling(partner);
cultivatingPrizeInfo.setPartner(partner);
cultivatingPrizeInfoMapper.updateById(cultivatingPrizeInfo);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment