| | |
| | | }) |
| | | @PostMapping(value = "/findShopBusinessesData") |
| | | public AjaxResult findShopBusinessesData(@RequestBody BusinessesDto businessesDto) { |
| | | SysBusinessData sysBusinessData = new SysBusinessData(); |
| | | // 若shopId为空,则查询门店经营报表 |
| | | if (businessesDto.getShopId() == null) { |
| | | sysBusinessData.setShopId(businessesDto.getShopId()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(sysBusinessData); |
| | | |
| | | String unit = ""; |
| | | if (BusinessesDto.DAY.equals(businessesDto.getType())) { |
| | | sysBusinessData.setT1("%Y-%m-%d"); |
| | | unit = "日"; |
| | | } else { |
| | | sysBusinessData.setT1("%Y-%m"); |
| | | unit = "月"; |
| | | } |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset((businessesDto.getPageNum() - 1) * businessesDto.getPageSize()); |
| | | pageVo.setLimit(businessesDto.getPageSize()); |
| | | |
| | | return AjaxResult.buildSuccessInstance(sysBusinessDataDao.selectApiBusinessDataInPage(sysBusinessData, pageVo), sysBusinessDataDao.selectApiBusinessDataTotal(sysBusinessData)); |
| | | // PaginationVO pageVo = new PaginationVO(); |
| | | // pageVo.setOffset((businessesDto.getPageNum() - 1) * businessesDto.getPageSize()); |
| | | // pageVo.setLimit(businessesDto.getPageSize()); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | Date now = calendar.getTime(); |
| | | List<Date> xAxis = StatisticsTimeUtil.getTimeSpace("2021-01-13", "2021-01-13", unit); |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | return AjaxResult.buildSuccessInstance("123"); |
| | | } |
| | | |
| | | @ApiOperation(value = "专项", notes = "专项") |