| | |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.enums.OrderStateEnum; |
| | | import com.stylefeng.guns.modular.system.enums.PayStatusEnum; |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import com.stylefeng.guns.modular.system.enums.UserTypeEnum; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITAgentService; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 3){ |
| | | wrapper.eq("id",ShiroKit.getUser().getObjectId()); |
| | | } |
| | | wrapper.ne("status", StatusEnum.DELETE.getCode()); |
| | | return wrapper; |
| | | } |
| | | |
| | |
| | | model.addAttribute("principal",tAgent.getPrincipal()); |
| | | model.addAttribute("principalPhone",tAgent.getPrincipalPhone()); |
| | | model.addAttribute("email",tAgent.getEmail()); |
| | | model.addAttribute("serviceCalls",tAgent.getServiceCalls()); |
| | | model.addAttribute("area",tAgent.getProvinceName()+tAgent.getCityName()); |
| | | // 订单信息 |
| | | // 订单总量 |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |