package com.ruoyi.web.controller.api;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.basic.PageInfo;
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.system.model.TChildcareServices;
|
import com.ruoyi.system.query.TChildcareServicesQuery;
|
import com.ruoyi.system.service.TChildcareServicesService;
|
import com.ruoyi.system.vo.TChildcareServicesVO;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* <p>
|
* 托育服务需求 前端控制器
|
* </p>
|
*
|
* @author xiaochen
|
* @since 2025-11-06
|
*/
|
@Api(tags = "托育服务需求管理")
|
@RestController
|
@RequestMapping("/t-childcare-services")
|
public class TChildcareServicesController {
|
|
private final TChildcareServicesService childcareServicesService;
|
@Autowired
|
public TChildcareServicesController(TChildcareServicesService childcareServicesService) {
|
this.childcareServicesService = childcareServicesService;
|
}
|
|
/**
|
* 获取托育服务需求管理管理列表
|
*/
|
@ApiOperation(value = "获取托育服务需求管理分页列表")
|
@PostMapping(value = "/pageList")
|
public R<PageInfo<TChildcareServicesVO>> pageList(@RequestBody TChildcareServicesQuery query) {
|
return R.ok(childcareServicesService.pageList(query));
|
}
|
|
/**
|
* 获取托育服务需求管理管理列表
|
*/
|
@ApiOperation(value = "获取托育服务需求管理列表")
|
@PostMapping(value = "/list")
|
public R<List<TChildcareServices>> list() {
|
return R.ok(childcareServicesService.list(Wrappers.lambdaQuery(TChildcareServices.class).orderByDesc(TChildcareServices::getCreateTime)));
|
}
|
|
/**
|
* 查看托育服务需求管理详情
|
*/
|
@ApiOperation(value = "查看托育服务需求管理详情")
|
@GetMapping(value = "/getDetailById")
|
public R<TChildcareServices> getDetailById(@RequestParam String id) {
|
return R.ok(childcareServicesService.getById(id));
|
}
|
|
/**
|
* 删除托育服务需求管理
|
*/
|
@Log(title = "托育服务需求管理信息-删除托育服务需求管理", businessType = BusinessType.DELETE)
|
@ApiOperation(value = "删除托育服务需求管理")
|
@DeleteMapping(value = "/deleteById")
|
public R<Boolean> deleteById(@RequestParam String id) {
|
return R.ok(childcareServicesService.removeById(id));
|
}
|
|
/**
|
* 批量删除托育服务需求管理
|
*/
|
@Log(title = "托育服务需求管理信息-删除托育服务需求管理", businessType = BusinessType.DELETE)
|
@ApiOperation(value = "批量删除托育服务需求管理")
|
@DeleteMapping(value = "/deleteByIds")
|
public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
|
return R.ok(childcareServicesService.removeByIds(ids));
|
}
|
|
}
|