| | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.service.AchieveNewService; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 客户数据统计 |
| | |
| | | @Autowired |
| | | private AchieveNewService achieveNewService; |
| | | |
| | | @Autowired |
| | | private SysVipInfoService sysVipInfoService; |
| | | |
| | | @RequestMapping(value = "/vipConsumeStatistics") |
| | | @ResponseBody |
| | | public AjaxResult vipConsumeStatistics(AchieveNew achieveNew, PaginationVO pageVo) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | achieveNew.setShopId(sysUsers.getShopId()); |
| | | } |
| | | List<AchieveNew> list = achieveNewService.findVipConsumeStatisticsList(achieveNew, pageVo); |
| | | List<Map<String, Object>> list = achieveNewService.findVipConsumeStatisticsList(achieveNew, pageVo); |
| | | int total = achieveNewService.findVipConsumeStatisticsTotal(achieveNew); |
| | | return AjaxResult.buildSuccessInstance(list, total); |
| | | } |
| | | |
| | | @RequestMapping(value = "/vipArrearsStatistics") |
| | | @ResponseBody |
| | | public AjaxResult vipArrearsStatistics(SysVipInfo sysVipInfo, PaginationVO pageVo) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | sysVipInfo.setShopId(sysUsers.getShopId()); |
| | | } |
| | | |
| | | int total = sysVipInfoService.findVipArrearsStatisticsTotal(sysVipInfo); |
| | | return AjaxResult.buildSuccessInstance(sysVipInfoService.findVipArrearsStatistics(sysVipInfo, pageVo), total); |
| | | } |
| | | } |