Helius
2021-01-13 7ec998fe0bfc7c0366e52ed5389ae48faabf61f1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.matrix.system.hive.statistics;
 
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.pojo.AjaxResult;
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.hive.bean.AchieveNew;
import com.matrix.system.hive.service.AchieveNewService;
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;
 
/**
 * 客户数据统计
 *
 * @author wzy
 * @date 2020-12-18
 **/
@Controller
@RequestMapping(value = "/admin/vipStatistics")
public class VipStatisticsAction {
 
    @Autowired
    private AchieveNewService achieveNewService;
 
    @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())){
            achieveNew.setShopId(sysUsers.getShopId());
        }
        List<AchieveNew> list = achieveNewService.findVipConsumeStatisticsList(achieveNew, pageVo);
        int total = achieveNewService.findVipConsumeStatisticsTotal(achieveNew);
        return AjaxResult.buildSuccessInstance(list, total);
    }
}