|
|
@@ -23,6 +23,7 @@ import com.etotem.cfc.mapper.UserMapper;
|
|
|
import com.etotem.cfc.mapper.WithdrawalRequestMapper;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import java.util.Calendar;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -1009,7 +1010,7 @@ public class CommissionService {
|
|
|
.ge(User::getCreatedAt, monthBegin)
|
|
|
.le(User::getCreatedAt, monthLast)
|
|
|
.eq(User::getReferrerId, userId);
|
|
|
- int count = userMapper.selectCount(wrapper);
|
|
|
+ int count = userMapper.selectCount(wrapper).intValue();
|
|
|
monthCountMap.put((long) i, count);
|
|
|
}
|
|
|
|
|
|
@@ -1073,7 +1074,7 @@ public class CommissionService {
|
|
|
if (!memberIds.isEmpty()) {
|
|
|
wrapper.in(ProductOrder::getBuyerId, memberIds);
|
|
|
}
|
|
|
- int sum = productOrderMapper.selectList(wrapper).stream()
|
|
|
+ int sum = (int) productOrderMapper.selectList(wrapper).stream()
|
|
|
.mapToLong(o -> o.getTotalAmount() != null ? o.getTotalAmount() : 0)
|
|
|
.sum();
|
|
|
monthConsumptionMap.put((long) i, sum);
|
|
|
@@ -1124,12 +1125,12 @@ public class CommissionService {
|
|
|
LambdaQueryWrapper<ProductOrder> wrapper = new LambdaQueryWrapper<ProductOrder>()
|
|
|
.ge(ProductOrder::getCreatedAt, monthBegin)
|
|
|
.le(ProductOrder::getCreatedAt, monthLast)
|
|
|
- .eq(ProductOrder::getFulfillStatus, "completed")
|
|
|
- .eq(ProductOrder::getReferrerId, userId);
|
|
|
- int sum = productOrderMapper.selectList(wrapper).stream()
|
|
|
- .mapToLong(o -> o.getTotalAmount() != null ? o.getTotalAmount() : 0)
|
|
|
- .sum();
|
|
|
- monthL1ConsumptionMap.put((long) i, sum);
|
|
|
+.eq(ProductOrder::getFulfillStatus, "completed")
|
|
|
+ .eq(ProductOrder::getBuyerId, userId);
|
|
|
+ int sum = (int) productOrderMapper.selectList(wrapper).stream()
|
|
|
+ .mapToLong(o -> o.getTotalAmount() != null ? o.getTotalAmount() : 0)
|
|
|
+ .sum();
|
|
|
+ monthL1ConsumptionMap.put((long) i, sum);
|
|
|
}
|
|
|
|
|
|
for (int i = 0; i < months; i++) {
|