ApplyAreasController.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.zhongzheng.controller.base;
  2. import com.zhongzheng.common.annotation.Log;
  3. import com.zhongzheng.common.core.controller.BaseController;
  4. import com.zhongzheng.common.core.domain.AjaxResult;
  5. import com.zhongzheng.common.core.page.TableDataInfo;
  6. import com.zhongzheng.common.enums.BusinessType;
  7. import com.zhongzheng.modules.base.bo.ApplyAreasAddBo;
  8. import com.zhongzheng.modules.base.bo.ApplyAreasEditBo;
  9. import com.zhongzheng.modules.base.bo.ApplyAreasQueryBo;
  10. import com.zhongzheng.modules.base.domain.ApplyAreas;
  11. import com.zhongzheng.modules.base.service.IApplyAreasService;
  12. import com.zhongzheng.modules.base.vo.ApplyAreasVo;
  13. import io.swagger.annotations.Api;
  14. import io.swagger.annotations.ApiOperation;
  15. import lombok.RequiredArgsConstructor;
  16. import org.springframework.beans.factory.annotation.Autowired;
  17. import org.springframework.security.access.prepost.PreAuthorize;
  18. import org.springframework.web.bind.annotation.*;
  19. import java.util.ArrayList;
  20. import java.util.Arrays;
  21. import java.util.List;
  22. /**
  23. * 报考地区Controller
  24. *
  25. * @author hjl
  26. * @date 2021-10-08
  27. */
  28. @Api(value = "报考省市控制器", tags = {"报考省市管理"})
  29. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  30. @RestController
  31. @RequestMapping("/apply/areas")
  32. public class ApplyAreasController extends BaseController {
  33. private final IApplyAreasService iApplyAreasService;
  34. /**
  35. * 查询报考省地区列表
  36. */
  37. @ApiOperation("查询报考省地区列表")
  38. @GetMapping("/list")
  39. public TableDataInfo<ApplyAreasVo> list(ApplyAreasQueryBo bo) {
  40. bo.setStatus(new ArrayList<Integer>(Arrays.asList(1)));
  41. bo.setParentId(0L);
  42. startPage();
  43. List<ApplyAreasVo> list = iApplyAreasService.queryList(bo);
  44. return getDataTable(list);
  45. }
  46. /**
  47. * 查询报考市地区列表
  48. */
  49. @ApiOperation("查询报考市地区列表")
  50. @GetMapping("/cityList")
  51. public TableDataInfo<ApplyAreas> cityList(ApplyAreasQueryBo bo) {
  52. startPage();
  53. List<ApplyAreas> list = iApplyAreasService.selectCityList(bo);
  54. return getDataTable(list);
  55. }
  56. }