| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | return tAgentRespList; |
| | | } |
| | | |
| | | @Override |
| | | public void getDataStatistics(Integer agentId, Model model) { |
| | | // 代理商总数 |
| | | Integer agentTotal = tAgentMapper.selectCount(new EntityWrapper<TAgent>() |
| | | .eq("id", agentId)); |
| | | // 代理商最近一个月新增数量 |
| | | LocalDate now = LocalDate.now(); |
| | | LocalDate localDate = now.plusMonths(1); |
| | | Integer agentMonthTotal = tAgentMapper.selectCount(new EntityWrapper<TAgent>() |
| | | .eq("id", agentId) |
| | | .between("createTime", localDate, now)); |
| | | model.addAttribute("agentTotal",agentTotal); |
| | | model.addAttribute("agentMonthTotal",agentMonthTotal); |
| | | } |
| | | } |