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.
38 lines
1.2 KiB
Java
38 lines
1.2 KiB
Java
|
6 years ago
|
package com.kiisoo.ic.customer.controller;
|
||
|
|
|
||
|
|
import com.kiisoo.ic.common.BaseController;
|
||
|
|
import com.kiisoo.ic.customer.CustomerService;
|
||
|
|
import com.kiisoo.ic.customer.entity.OpCustomerDTO;
|
||
|
|
import lombok.extern.slf4j.Slf4j;
|
||
|
|
import org.apache.ibatis.annotations.Param;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||
|
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
|
||
|
|
import java.util.Date;
|
||
|
|
import java.util.List;
|
||
|
|
import java.util.Map;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 客户
|
||
|
|
*/
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/customer")
|
||
|
|
@Slf4j
|
||
|
|
public class CustomerController extends BaseController {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private CustomerService customerService;
|
||
|
|
|
||
|
|
@ResponseBody
|
||
|
|
@PostMapping("/info")
|
||
|
|
public Map<String, Object> getCustomerInfo(@Param("userId") long userId, Long shopId, Long regionId ,
|
||
|
|
@Param("startDate") Date startDate, @Param("endDate") Date endDate){
|
||
|
|
|
||
|
|
List<OpCustomerDTO> opCustomerDTOS = customerService.getCustomerByUserAndDate(userId, shopId, regionId, startDate, endDate);
|
||
|
|
return data(opCustomerDTOS);
|
||
|
|
}
|
||
|
|
}
|