You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bsdgy-server/src/main/java/com/kiisoo/ic/customer/controller/CustomerViewController.java

102 lines
3.5 KiB
Java

package com.kiisoo.ic.customer.controller;
import com.kiisoo.ic.common.BaseController;
import com.kiisoo.ic.customer.entity.CustomerViewVO;
6 years ago
import com.kiisoo.ic.customer.entity.CustomerViewZeroExtendVO;
import com.kiisoo.ic.customer.service.CustomerViewService;
import lombok.extern.slf4j.Slf4j;
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.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
6 years ago
import java.util.List;
import java.util.Map;
/**
* @Description:
* @Author: wangyinjia
* @Date: 2020/4/9
* @Company: kiisoo
* @Version: 1.0
*/
@Slf4j
@Controller
@RequestMapping("/customer/view")
public class CustomerViewController extends BaseController {
/**
* service
*/
@Autowired
private CustomerViewService customerViewService;
/**
* main
* @param userId id
* @param selectStartTime
* @param selectEndTime
* @param startTime
* @param endTime
* @return VO
*/
@ResponseBody
@RequestMapping(value = "/main", method = RequestMethod.GET)
public Map<String,Object> getMainData(@RequestParam("userId")Long userId, @RequestParam("selectStartTime")String selectStartTime, @RequestParam("selectEndTime")String selectEndTime,
@RequestParam("startTime")String startTime, @RequestParam("endTime")String endTime){
try{
CustomerViewVO result = customerViewService.selectCustomerViewMain(userId, selectStartTime, selectEndTime, startTime, endTime);
return data(result);
}catch (Exception e){
log.error("查询客户数据概览出错", e);
return fail();
}
}
6 years ago
/**
* main
* @return VO
*/
@ResponseBody
@RequestMapping(value = "/all/count", method = RequestMethod.GET)
public Map<String,Object> getAllCount(){
try{
CustomerViewVO result = customerViewService.getAllCount();
return data(result);
}catch (Exception e){
log.error("查询客户数据概览出错", e);
return fail();
}
}
6 years ago
/**
* 广0
* @param userId id
* @param regionId id
* @param companyId id
* @param customerId id
* @param startTime
* @param endTime
* @param pageNum
* @param pageSize
* @return
*/
@ResponseBody
@RequestMapping(value = "/all/zero", method = RequestMethod.GET)
public Map<String,Object> getMainData(@RequestParam("userId") long userId, Long regionId , Long companyId, Long customerId,
String startTime, String endTime, @RequestParam("pageNum") int pageNum, @RequestParam("pageSize") int pageSize){
try{
List<CustomerViewZeroExtendVO> result = customerViewService.zeroExtendList(userId, regionId, companyId, customerId, startTime, endTime, pageNum,pageSize);
return data(result);
}catch (Exception e){
log.error("查询推广为0店铺出错", e);
return fail();
}
}
}