|
|
@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -34,8 +35,8 @@ public class DepartmentController extends BaseController {
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public Map<String,Object> listDepartment(){
|
|
|
|
public Map<String,Object> listDepartment(){
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Boolean hasAdd = departmentService.listDepartment();
|
|
|
|
List<DepartmentDO> departments = departmentService.listDepartment();
|
|
|
|
return data(hasAdd);
|
|
|
|
return data(departments);
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
|
log.error("添加部门失败",e);
|
|
|
|
log.error("添加部门失败",e);
|
|
|
|
return fail();
|
|
|
|
return fail();
|
|
|
|