mirror of https://gitee.com/stylefeng/roses
【8.0】【area】删除没用接口
parent
215b5427ee
commit
a83878999d
|
@ -3,14 +3,10 @@ package cn.stylefeng.roses.kernel.city.modular.controller;
|
|||
import cn.stylefeng.roses.kernel.city.modular.entity.Area;
|
||||
import cn.stylefeng.roses.kernel.city.modular.pojo.request.AreaRequest;
|
||||
import cn.stylefeng.roses.kernel.city.modular.service.AreaService;
|
||||
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@ -29,53 +25,6 @@ public class AreaController {
|
|||
@Resource
|
||||
private AreaService areaService;
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @author LiYanJun
|
||||
* @date 2023/07/05 18:12
|
||||
*/
|
||||
@PostResource(name = "添加行政区域", path = "/area/add")
|
||||
public ResponseData<Area> add(@RequestBody @Validated(AreaRequest.add.class) AreaRequest areaRequest) {
|
||||
areaService.add(areaRequest);
|
||||
return new SuccessResponseData<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @author LiYanJun
|
||||
* @date 2023/07/05 18:12
|
||||
*/
|
||||
@PostResource(name = "删除行政区域", path = "/area/delete")
|
||||
public ResponseData<?> delete(@RequestBody @Validated(AreaRequest.delete.class) AreaRequest areaRequest) {
|
||||
areaService.del(areaRequest);
|
||||
return new SuccessResponseData<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @author LiYanJun
|
||||
* @date 2023/07/05 18:12
|
||||
*/
|
||||
@PostResource(name = "编辑行政区域", path = "/area/edit")
|
||||
public ResponseData<?> edit(@RequestBody @Validated(AreaRequest.edit.class) AreaRequest areaRequest) {
|
||||
areaService.edit(areaRequest);
|
||||
return new SuccessResponseData<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看详情
|
||||
*
|
||||
* @author LiYanJun
|
||||
* @date 2023/07/05 18:12
|
||||
*/
|
||||
@GetResource(name = "查看行政区域详情", path = "/area/detail")
|
||||
public ResponseData<Area> detail(@Validated(AreaRequest.detail.class) AreaRequest areaRequest) {
|
||||
return new SuccessResponseData<>(areaService.detail(areaRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
|
@ -87,15 +36,4 @@ public class AreaController {
|
|||
return new SuccessResponseData<>(areaService.findList(areaRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表(带分页)
|
||||
*
|
||||
* @author LiYanJun
|
||||
* @date 2023/07/05 18:12
|
||||
*/
|
||||
@GetResource(name = "分页查询行政区域", path = "/area/page")
|
||||
public ResponseData<PageResult<Area>> page(AreaRequest areaRequest) {
|
||||
return new SuccessResponseData<>(areaService.findPage(areaRequest));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue