You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

package com.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.commons.Result;
import com.entity.Maintenancerecord;
import com.entity.Supplier;
import com.service.MaintenancerecordService;
import com.service.SupplierService;
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;
import java.util.HashMap;
/**
* <p>
* 前端控制器
* </p>
*
* @author 刘宇豪
* @since 2024年12月28日
*/
@RestController
@RequestMapping("/supplier")
public class SupplierController {
@Autowired
SupplierService maintenancerecordService;
@PostMapping("/maintenancerecordPage")
public Result maintenancerecordPage(@RequestBody HashMap<String,String> map) throws Exception{
Page<Supplier> objectPage = new Page<>(Integer.valueOf(map.get("current")),Integer.valueOf(map.get("size")));
IPage<Supplier> maintenancerecordPage = maintenancerecordService.page(objectPage);
return Result.success(200,"查询成功",maintenancerecordPage);
}
}