package com.dsk.cscec.controller;


import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.DCustomerSearchBo;
import com.dsk.cscec.service.IDCustomerService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 组织维表(DCustomer)表控制层
 *
 * @author lcl
 * @since 2023-12-08 14:57:22
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/customer")
public class DCustomerController extends BaseController {
    /**
     * 服务对象
     */
    private final IDCustomerService baseService;

    /**
     * 供应商总台账筛选
     */
    @PostMapping("/all/searchList")
    public TableDataInfo<DCustomer> allSearchList(@RequestBody DCustomerSearchBo bo,@RequestBody PageQuery query) {
        return baseService.allSearchList(bo,query);
    }

    /**
     * 供应商信息
     */
    @GetMapping("/info/{customerKey}")
    public R<DCustomer> info(@PathVariable String customerKey) {
        return R.ok(baseService.getById(customerKey));
    }

  
}

