| | |
| | | import com.xiaopeng.api.model.operation.XpCruisePlan; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.operation.dto.XpCruisePlanAddDTO; |
| | | import com.xiaopeng.operation.dto.XpCruisePlanEditDTO; |
| | | import com.xiaopeng.operation.query.CruisePlanQuery; |
| | | import com.xiaopeng.operation.service.IXpCruisePlanService; |
| | | import com.xiaopeng.operation.vo.XpCruisePlanDetailVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | 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 javax.validation.Valid; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import io.swagger.annotations.ApiParam; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author mitao |
| | | * @since 2026-02-26 |
| | | */ |
| | | @Validated |
| | | @RestController |
| | | @RequiredArgsConstructor(onConstructor_ = @Lazy) |
| | | public class XpCruisePlanController { |
| | |
| | | return R.ok(xpCruisePlanService.getPageList(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增巡游计划", tags = {"管理后台-巡游计划"}) |
| | | @PostMapping(value = {"/api/v1/xp-cruise-plan/add"}) |
| | | public R<?> add(@Valid @RequestBody XpCruisePlanAddDTO dto){ |
| | | xpCruisePlanService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑巡游计划", tags = {"管理后台-巡游计划"}) |
| | | @PostMapping(value = {"/api/v1/xp-cruise-plan/edit"}) |
| | | public R<?> edit(@Valid @RequestBody XpCruisePlanEditDTO dto){ |
| | | xpCruisePlanService.edit(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除巡游计划", tags = {"管理后台-巡游计划"}) |
| | | @DeleteMapping(value = {"/api/v1/xp-cruise-plan/deleteById/{id}"}) |
| | | public R<?> deleteById(@ApiParam(name = "id", value = "巡游计划ID") @PathVariable Long id){ |
| | | xpCruisePlanService.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "巡游计划详情", tags = {"管理后台-巡游计划"}) |
| | | @GetMapping(value = {"/api/v1/xp-cruise-plan/detail"}) |
| | | public R<XpCruisePlanDetailVO> detail(@ApiParam(name = "id", value = "巡游计划ID") @RequestParam Long id){ |
| | | return R.ok(xpCruisePlanService.detail(id)); |
| | | } |
| | | |
| | | } |
| | | |