|
@@ -10,6 +10,9 @@ import org.dromara.common.web.core.BaseController;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+/**
|
|
|
+ * 供应商管理接口
|
|
|
+ */
|
|
|
@RestController
|
|
|
@RequiredArgsConstructor
|
|
|
@RequestMapping("/inventoryManagement/Supplier")
|
|
@@ -17,21 +20,42 @@ public class SupplierController extends BaseController {
|
|
|
|
|
|
private final SupplierServiceImpl supplierService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 分页查询供应商管理
|
|
|
+ * @param supplierBo 查询条件
|
|
|
+ * @param pageQuery 分页条件
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
@GetMapping("/PageList")
|
|
|
public TableDataInfo<SupplierVo> selectPageSupplierList(SupplierBo supplierBo, PageQuery pageQuery) {
|
|
|
return supplierService.selectPageSupplierList(supplierBo, pageQuery);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 新增供应商
|
|
|
+ * @param supplierBo 供应商BO对象
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
@PostMapping()
|
|
|
public int insertSupplier(@Validated @RequestBody SupplierBo supplierBo) {
|
|
|
return supplierService.insertSupplier(supplierBo);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改供应商
|
|
|
+ * @param supplierBo 供应商BO对象
|
|
|
+ * @return 影响行数
|
|
|
+ */
|
|
|
@PutMapping()
|
|
|
public int updateSupplier(@Validated @RequestBody SupplierBo supplierBo) {
|
|
|
return supplierService.updateSupplier(supplierBo);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 删除供应商
|
|
|
+ * @param supplierIds 供应商ID
|
|
|
+ * @return 影响行数
|
|
|
+ */
|
|
|
@DeleteMapping("/{supplierIds}")
|
|
|
public int deleteSupplierById(@PathVariable Long[] supplierIds) {
|
|
|
return supplierService.deleteSupplierById(supplierIds);
|