Helius
2021-06-16 5728be2af515b2200e782aa201ca5d4d67d9ea47
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package com.ibeetl.admin.console.web;
 
import com.ibeetl.admin.console.model.PromoterModel;
import com.ibeetl.admin.console.service.StatisConsoleService;
import com.ibeetl.admin.core.annotation.Function;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
 
import java.util.List;
import java.util.Map;
 
/**
 * 数据统计项
 */
@Controller
public class StatisController {
 
    private static final String MODEL = "/admin/statis";
    private final Logger log = LoggerFactory.getLogger(this.getClass());
 
    @Autowired
    StatisConsoleService statisConsoleService;
 
    /*
    *客户统计首页
     */
    @GetMapping(MODEL + "/customer/index.do")
    // @Function("customer.statis")
    ModelAndView index(){
        ModelAndView view = new ModelAndView("/admin/statis/index.html");
        return view;
    }
    /*
     *客户统计首页
     */
    @GetMapping(MODEL + "/customer/user/index.do")
    // @Function("customer.statis")
    ModelAndView userIndex(){
        ModelAndView view = new ModelAndView("/admin/statis/userIndex.html");
        return view;
    }
 
    @GetMapping(MODEL + "/ifame/index.do")
    ModelAndView indexx(){
        ModelAndView view = new ModelAndView("/admin/index/indexDemo.html");
        return view;
    }
 
    /**
     * 跳转到用户列表
     * @return
     */
    @GetMapping(MODEL + "/customer/userStatis.do")
    //@Function("customer.statis")
    ModelAndView userStatis(){
        ModelAndView view = new ModelAndView("/admin/statis/userStatis.html");
        return view;
    }
 
    /**
     * 查询用户的经纬度
     */
    @PostMapping(MODEL + "/customer/queryLatAndLong.json")
    @Function("customer.statis")
    @ResponseBody
    Map<String, Object> queryLatAndLong(){
        return statisConsoleService.queryLatAndLong();
    }
 
 
    // -----推广员统计-----------------------
    @GetMapping(MODEL + "/promoter/index.do")
    @Function("promoter.statis")
    ModelAndView pindex(){
        ModelAndView view = new ModelAndView("/admin/statis/promoterstatis/index.html");
        return view;
    }
    @GetMapping(MODEL + "/promoter/order.do")
    @Function("promoter.statis")
    ModelAndView order(String startTime, String endTime, String userId){
        ModelAndView view = new ModelAndView("/admin/statis/promoterstatis/order.html");
        view.addObject("startTime", startTime);
        view.addObject("endTime", endTime);
        view.addObject("userId", userId);
        return view;
    }
 
    /**
     *
     * @param model
     * @return
     */
    @PostMapping(MODEL + "/promoter/promoterOrderDetail.json")
    @Function("promoter.statis")
    @ResponseBody
    Map<String, Object> promoterOrderDetail(PromoterModel model){
        return statisConsoleService.queryPromoterStatis(model);
    }
 
 
}