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);
|
}
|
|
|
}
|