1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-04 22:41:24 +08:00

nitice manage module compeled

This commit is contained in:
cccccyb
2023-05-06 02:54:30 +08:00
parent 90aad35eb4
commit 1ac3906964
22 changed files with 787 additions and 160 deletions

View File

@@ -1,8 +1,17 @@
package com.cfive.pinnacle.controller;
import com.cfive.pinnacle.entity.Department;
import com.cfive.pinnacle.entity.common.ResponseCode;
import com.cfive.pinnacle.entity.common.ResponseResult;
import com.cfive.pinnacle.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* <p>
* 部门 前端控制器
@@ -13,6 +22,17 @@ import org.springframework.web.bind.annotation.RestController;
*/
@RestController
@RequestMapping("/department")
@CrossOrigin
public class DepartmentController {
@Autowired
IDepartmentService departmentService;
@GetMapping
public ResponseResult getDepartAndUser(){
List<Department> getDepartAndUser = departmentService.getDepartAndUser();
Integer code = getDepartAndUser != null ? ResponseCode.DATABASE_SELECT_OK : ResponseCode.DATABASE_SELECT_ERROR;
String msg = getDepartAndUser != null ? "" : "数据查询失败,请尝试!";
return ResponseResult.build(code, msg, getDepartAndUser);
}
}