package com.fjhx.supply.controller.supplier; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fjhx.common.constant.SourceConstant; import com.fjhx.supply.entity.supplier.dto.SupplierInfoDto; import com.fjhx.supply.entity.supplier.dto.SupplierInfoSelectDto; import com.fjhx.supply.entity.supplier.vo.SupplierInfoVo; import com.fjhx.supply.service.supplier.SupplierInfoService; import com.ruoyi.common.core.domain.BaseSelectDto; import org.springframework.beans.factory.annotation.Autowired; 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; /** *

* 供应商 前端控制器 *

* * @author * @since 2023-03-17 */ @DS(SourceConstant.SUPPLY) @RestController @RequestMapping("/supplierInfo") public class SupplierInfoController { @Autowired private SupplierInfoService supplierInfoService; /** * 供应商分页 */ @PostMapping("/page") public Page page(@RequestBody SupplierInfoSelectDto dto) { return supplierInfoService.getPage(dto); } /** * 供应商分页 维多利亚 */ @PostMapping("/pageByWdly") public Page pageByWdly(@RequestBody SupplierInfoSelectDto dto) { return supplierInfoService.getPageByWdly(dto); } /** * 供应商明细 */ @PostMapping("/detail") public SupplierInfoVo detail(@RequestBody BaseSelectDto dto) { return supplierInfoService.detail(dto.getId()); } /** * 供应商新增 */ @PostMapping("/add") public void add(@RequestBody SupplierInfoDto supplierInfoDto) { supplierInfoService.add(supplierInfoDto); } /** * 供应商编辑 */ @PostMapping("/edit") public void edit(@RequestBody SupplierInfoDto supplierInfoDto) { supplierInfoService.edit(supplierInfoDto); } /** * 供应商删除 */ @PostMapping("/delete") public void delete(@RequestBody BaseSelectDto dto) { supplierInfoService.delete(dto.getId()); } }