diff --git a/gather-app/src/main/java/com/ruoyi/business/controller/BusinessTripApprovalController.java b/gather-app/src/main/java/com/ruoyi/business/controller/BusinessTripApprovalController.java index 7c666dc..9be6834 100644 --- a/gather-app/src/main/java/com/ruoyi/business/controller/BusinessTripApprovalController.java +++ b/gather-app/src/main/java/com/ruoyi/business/controller/BusinessTripApprovalController.java @@ -17,10 +17,7 @@ import com.ruoyi.system.service.ISysUserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.*; import java.util.stream.Collectors; @@ -45,7 +42,7 @@ public class BusinessTripApprovalController extends BaseController { @PostMapping("/list") @ApiOperation("查询出差申请") - public TableDataInfo list(BusinessTripApproval businessTripApproval) { + public TableDataInfo list(@RequestBody BusinessTripApproval businessTripApproval) { startPage(); QueryWrapper queryWrapper = new QueryWrapper<>(businessTripApproval); queryWrapper.orderByDesc("create_time"); @@ -57,7 +54,7 @@ public class BusinessTripApprovalController extends BaseController { @PostMapping("/add") @ApiOperation("新增出差申请") - public AjaxResult add(BusinessTripApproval dto) { + public AjaxResult add(@RequestBody BusinessTripApproval dto) { SysUser user = getLoginUser().getUser(); if (dto.getHasOffcialCar() != null && dto.getHasOffcialCar() == 1) { if (dto.getCarModel() == null) {