package com.dgtis.dorm.manager.admin.web;

import com.dgtis.dorm.manager.admin.annotation.LoginAdmin;
import com.dgtis.dorm.manager.db.domain.AlumniUser;
import com.dgtis.dorm.manager.db.domain.NewsComment;
import com.dgtis.dorm.manager.db.domain.QuestionsAnswers;
import com.dgtis.dorm.manager.db.service.DeptInfoService;
import com.dgtis.dorm.manager.db.service.NewsCommentService;
import com.dgtis.dorm.manager.db.service.QuestionsAnswersService;
import com.dgtis.dorm.manager.db.service.UserService;
import com.dgtis.dorm.manager.db.util.ResponseUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.*;

@RestController
@RequestMapping("/admin/deptinfo")
public class DeptInfoController {
    private final Log logger = LogFactory.getLog(DeptInfoController.class);

    @Autowired
    private DeptInfoService deptInfoService;


    /**
     * @descption: 查询所有等级为2的部门列表只有部门Unid 和名称
     * @param:
     * @return: java.lang.Object
     * @auther: qxp
     * @date:19-8-6 15:20
     */
    @GetMapping("/list")
    public Object list(){
       List<Map<String,Object>> resultList = deptInfoService.getLeve2DeptList();

       return ResponseUtil.ok(resultList);
    }

}
