Commit a5d3d44d authored by licc's avatar licc

优化月度任务代码

parent ea341e61
......@@ -143,15 +143,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
//key 不存在,加入集合
map.put(userId, payMoney);
}
//累加订单成交额
totalMoney = totalMoney.add(orderInfo.getPayment());
}
//累计用户和上级用户-团队业绩
Map<String, Double> tempMap = new HashMap<>();
//遍历订单
for (Map.Entry<String, Double> entity : map.entrySet()) {
String userId = entity.getKey();
//1)、统计当前用户月度业绩
......@@ -223,14 +219,13 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
return R.ok(1, false);
}
return R.ok(0, true);
}
/**
* 获取用户的商机信息
* 获取用户的上级列表
*
* @param userId 用户id
* @return
* @return 用户的上级列表
*/
@Override
public List<User> getByList(String userId) {
......@@ -361,7 +356,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
*
* @param totalMoney 月金额总额
* @param userList 用户列表
* @return
* @return true or false
*/
private boolean monthlyIncome(BigDecimal totalMoney, List<User> userList) {
double total = totalMoney.doubleValue();
......
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