kongdeqiang
2024-04-22 7bc78d8f70a4d11e46f8bd640228804a3dd0dc68
src/main/java/com/boying/controller/EnterParkController.java
@@ -14,6 +14,8 @@
import com.boying.service.ParkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
@@ -33,6 +35,7 @@
@RequiredArgsConstructor
@RequestMapping("ffzf/enterpark" )
@Api(value = "enterpark", tags = "入场表管理")
@Tag(description = "ffzf/enterpark" , name = "入场表记录" )
public class EnterParkController {
    private final EnterParkService enterParkService;
@@ -65,6 +68,7 @@
//    }
    @PostMapping("/findPage")
    @Operation(summary = "分页查询" , description = "分页查询" )
    public Object findPage(Page page, String  carNo,Integer parkId,String date) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        if(StringUtils.isNotBlank(date)){
@@ -92,6 +96,7 @@
     */
    @ApiOperation(value = "通过id查询", notes = "通过id查询")
    @GetMapping("/{id}" )
    @Operation(summary = "根据id查询" , description = "根据id查询" )
    public R getById(@PathVariable("id" ) Integer id) {
        return R.ok(enterParkService.getById(id));
    }
@@ -103,6 +108,7 @@
     */
    @ApiOperation(value = "新增入场表", notes = "新增入场表")
    @PostMapping
    @Operation(summary = "新增入场" , description = "新增入场" )
    public R save(@RequestBody EnterPark enterPark) {
        return R.ok(enterParkService.save(enterPark));
    }
@@ -114,6 +120,7 @@
     */
    @ApiOperation(value = "修改入场表", notes = "修改入场表")
    @PutMapping
    @Operation(summary = "修改入场" , description = "修改入场" )
    public R updateById(@RequestBody EnterPark enterPark) {
        return R.ok(enterParkService.updateById(enterPark));
    }
@@ -125,6 +132,7 @@
     */
    @ApiOperation(value = "通过id删除入场表", notes = "通过id删除入场表")
    @DeleteMapping("/{id}" )
    @Operation(summary = "删除入场" , description = "删除入场" )
    public R removeById(@PathVariable Integer id) {
        return R.ok(enterParkService.removeById(id));
    }
@@ -136,6 +144,7 @@
     * @return excel 文件流
     */
    @GetMapping("/export")
    @Operation(summary = "导出入场" , description = "导出入场" )
    public List<EnterPark> export(EnterPark enterPark) {
        return enterParkService.list(Wrappers.query(enterPark));
    }