package com.storlead.sales.controller.customer;


import com.storlead.framework.common.result.Result;
import com.storlead.sales.pojo.dto.customer.CustomerSearchSearchDTO;
import com.storlead.sales.service.customer.CustomerSearchService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 查询记录表 前端控制器
 * </p>
 *
 * @author YPZ
 * @since 2025-06-03
 */
@RestController
@RequestMapping("/customer-search")
@Api(tags = "销售: 通用查询相关接口")
public class CustomerSearchController {

    @Resource
    private CustomerSearchService  customerSearchService;
    @PostMapping(value = "/list")
    @ApiOperation(value = "通用查询-列表", notes = "通用查询-列表")
    public Result<?> list(@RequestBody CustomerSearchSearchDTO customerSearchSearchDTO) {
//去掉customerSearchDTO.getBlurry()前后空格
//        if (!ObjectUtils.isEmpty(customerSearchSearchDTO.getBlurry())){
//            customerSearchSearchDTO.setBlurry(customerSearchSearchDTO.getBlurry().trim());
//        }
//        if (!ObjectUtils.isEmpty(customerSearchSearchDTO.getCustomerName())){
//            customerSearchSearchDTO.setCustomerName(customerSearchSearchDTO.getCustomerName().trim());
//        }
        return customerSearchService.selectListVO(customerSearchSearchDTO);
    }

}
