96 lines
2.9 KiB
Java
96 lines
2.9 KiB
Java
package com.cdzy.ebikeoperate.controller;
|
|
|
|
import com.cdzy.ebikeoperate.model.pojo.EbikeSysRusecondset;
|
|
import com.mybatisflex.core.paginate.Page;
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import com.cdzy.ebikeoperate.service.EbikeSysRusecondsetService;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 区域用车配置表 控制层。
|
|
*
|
|
* @author user
|
|
* @since 2025-04-28
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/ebikeSysRusecondset")
|
|
public class EbikeSysRusecondsetController {
|
|
|
|
@Autowired
|
|
private EbikeSysRusecondsetService ebikeSysRusecondsetService;
|
|
|
|
/**
|
|
* 添加区域用车配置表。
|
|
*
|
|
* @param ebikeSysRusecondset 区域用车配置表
|
|
* @return {@code true} 添加成功,{@code false} 添加失败
|
|
*/
|
|
@PostMapping("save")
|
|
public boolean save(@RequestBody EbikeSysRusecondset ebikeSysRusecondset) {
|
|
return ebikeSysRusecondsetService.save(ebikeSysRusecondset);
|
|
}
|
|
|
|
/**
|
|
* 根据主键删除区域用车配置表。
|
|
*
|
|
* @param id 主键
|
|
* @return {@code true} 删除成功,{@code false} 删除失败
|
|
*/
|
|
@DeleteMapping("remove/{id}")
|
|
public boolean remove(@PathVariable String id) {
|
|
return ebikeSysRusecondsetService.removeById(id);
|
|
}
|
|
|
|
/**
|
|
* 根据主键更新区域用车配置表。
|
|
*
|
|
* @param ebikeSysRusecondset 区域用车配置表
|
|
* @return {@code true} 更新成功,{@code false} 更新失败
|
|
*/
|
|
@PutMapping("update")
|
|
public boolean update(@RequestBody EbikeSysRusecondset ebikeSysRusecondset) {
|
|
return ebikeSysRusecondsetService.updateById(ebikeSysRusecondset);
|
|
}
|
|
|
|
/**
|
|
* 查询所有区域用车配置表。
|
|
*
|
|
* @return 所有数据
|
|
*/
|
|
@GetMapping("list")
|
|
public List<EbikeSysRusecondset> list() {
|
|
return ebikeSysRusecondsetService.list();
|
|
}
|
|
|
|
/**
|
|
* 根据区域用车配置表主键获取详细信息。
|
|
*
|
|
* @param id 区域用车配置表主键
|
|
* @return 区域用车配置表详情
|
|
*/
|
|
@GetMapping("getInfo/{id}")
|
|
public EbikeSysRusecondset getInfo(@PathVariable String id) {
|
|
return ebikeSysRusecondsetService.getById(id);
|
|
}
|
|
|
|
/**
|
|
* 分页查询区域用车配置表。
|
|
*
|
|
* @param page 分页对象
|
|
* @return 分页对象
|
|
*/
|
|
@GetMapping("page")
|
|
public Page<EbikeSysRusecondset> page(Page<EbikeSysRusecondset> page) {
|
|
return ebikeSysRusecondsetService.page(page);
|
|
}
|
|
|
|
}
|