|
|
@@ -1,112 +0,0 @@
|
|
|
-package com.zhongzheng.controller.user;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-import java.util.Arrays;
|
|
|
-
|
|
|
-import lombok.RequiredArgsConstructor;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-import com.zhongzheng.common.annotation.Log;
|
|
|
-import com.zhongzheng.common.core.controller.BaseController;
|
|
|
-import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
-import com.zhongzheng.common.enums.BusinessType;
|
|
|
-import com.zhongzheng.modules.user.vo.SchoolProjectVo;
|
|
|
-import com.zhongzheng.modules.user.bo.SchoolProjectQueryBo;
|
|
|
-import com.zhongzheng.modules.user.bo.SchoolProjectAddBo;
|
|
|
-import com.zhongzheng.modules.user.bo.SchoolProjectEditBo;
|
|
|
-import com.zhongzheng.modules.user.service.ISchoolProjectService;
|
|
|
-import com.zhongzheng.common.utils.poi.ExcelUtil;
|
|
|
-import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-
|
|
|
-/**
|
|
|
- * 院校绑定项目Controller
|
|
|
- *
|
|
|
- * @author ruoyi
|
|
|
- * @date 2021-10-09
|
|
|
- */
|
|
|
-@Api(value = "院校绑定项目控制器", tags = {"院校绑定项目管理"})
|
|
|
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
-@RestController
|
|
|
-@RequestMapping("/modules.user/project")
|
|
|
-public class SchoolProjectController extends BaseController {
|
|
|
-
|
|
|
- private final ISchoolProjectService iSchoolProjectService;
|
|
|
-
|
|
|
- /**
|
|
|
- * 查询院校绑定项目列表
|
|
|
- */
|
|
|
- @ApiOperation("查询院校绑定项目列表")
|
|
|
- @PreAuthorize("@ss.hasPermi('modules.user:project:list')")
|
|
|
- @GetMapping("/list")
|
|
|
- public TableDataInfo<SchoolProjectVo> list(SchoolProjectQueryBo bo) {
|
|
|
- startPage();
|
|
|
- List<SchoolProjectVo> list = iSchoolProjectService.queryList(bo);
|
|
|
- return getDataTable(list);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 导出院校绑定项目列表
|
|
|
- */
|
|
|
- @ApiOperation("导出院校绑定项目列表")
|
|
|
- @PreAuthorize("@ss.hasPermi('modules.user:project:export')")
|
|
|
- @Log(title = "院校绑定项目", businessType = BusinessType.EXPORT)
|
|
|
- @GetMapping("/export")
|
|
|
- public AjaxResult<SchoolProjectVo> export(SchoolProjectQueryBo bo) {
|
|
|
- List<SchoolProjectVo> list = iSchoolProjectService.queryList(bo);
|
|
|
- ExcelUtil<SchoolProjectVo> util = new ExcelUtil<SchoolProjectVo>(SchoolProjectVo.class);
|
|
|
- return util.exportExcel(list, "院校绑定项目");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取院校绑定项目详细信息
|
|
|
- */
|
|
|
- @ApiOperation("获取院校绑定项目详细信息")
|
|
|
- @PreAuthorize("@ss.hasPermi('modules.user:project:query')")
|
|
|
- @GetMapping("/{id}")
|
|
|
- public AjaxResult<SchoolProjectVo> getInfo(@PathVariable("id" ) Long id) {
|
|
|
- return AjaxResult.success(iSchoolProjectService.queryById(id));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 新增院校绑定项目
|
|
|
- */
|
|
|
- @ApiOperation("新增院校绑定项目")
|
|
|
- @PreAuthorize("@ss.hasPermi('modules.user:project:add')")
|
|
|
- @Log(title = "院校绑定项目", businessType = BusinessType.INSERT)
|
|
|
- @PostMapping()
|
|
|
- public AjaxResult<Void> add(@RequestBody SchoolProjectAddBo bo) {
|
|
|
- return toAjax(iSchoolProjectService.insertByAddBo(bo) ? 1 : 0);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 修改院校绑定项目
|
|
|
- */
|
|
|
- @ApiOperation("修改院校绑定项目")
|
|
|
- @PreAuthorize("@ss.hasPermi('modules.user:project:edit')")
|
|
|
- @Log(title = "院校绑定项目", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping()
|
|
|
- public AjaxResult<Void> edit(@RequestBody SchoolProjectEditBo bo) {
|
|
|
- return toAjax(iSchoolProjectService.updateByEditBo(bo) ? 1 : 0);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 删除院校绑定项目
|
|
|
- */
|
|
|
- @ApiOperation("删除院校绑定项目")
|
|
|
- @PreAuthorize("@ss.hasPermi('modules.user:project:remove')")
|
|
|
- @Log(title = "院校绑定项目" , businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{ids}")
|
|
|
- public AjaxResult<Void> remove(@PathVariable Long[] ids) {
|
|
|
- return toAjax(iSchoolProjectService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
|
|
- }
|
|
|
-}
|