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.
59 lines
1.9 KiB
Java
59 lines
1.9 KiB
Java
6 years ago
|
package com.kiisoo.ic.customer.controller;
|
||
|
|
||
|
import com.kiisoo.ic.common.BaseController;
|
||
|
import com.kiisoo.ic.customer.entity.CustomerViewVO;
|
||
|
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;
|
||
|
|
||
|
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 regionId 区域id
|
||
|
* @param shopId 店铺id
|
||
|
* @param sellerId 导购id
|
||
|
* @param sevenDayStartTime 近七天开始时间
|
||
|
* @param sevenDayEndTime 近七天结束时间
|
||
|
* @return 客户概览VO
|
||
|
*/
|
||
|
@ResponseBody
|
||
|
@RequestMapping(value = "/main", method = RequestMethod.GET)
|
||
|
public Map<String,Object> getMainData(@RequestParam("userId")Long userId, Long regionId, Long shopId, Long sellerId,
|
||
|
@RequestParam("sevenDayStartTime")String sevenDayStartTime, @RequestParam("sevenDayEndTime")String sevenDayEndTime){
|
||
|
try{
|
||
|
CustomerViewVO result = customerViewService.selectCustomerViewMain(userId, regionId, shopId, sellerId, sevenDayStartTime, sevenDayEndTime);
|
||
|
return data(result);
|
||
|
}catch (Exception e){
|
||
|
log.error("查询客户数据概览出错", e);
|
||
|
return fail();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|