資源簡(jiǎn)介
開(kāi)發(fā)工具使用idea,前端框架使用了layui、bootstrap等主要框架
后端使用ssm技術(shù),數(shù)據(jù)庫(kù)采用了mysql,主要分為管理員、學(xué)生、教師、課程、菜單管理五個(gè)管理模塊,根據(jù)權(quán)限生成對(duì)應(yīng)菜單
代碼片段和文件信息
package?com.scco.controller;
import?com.scco.entity.Admin;
import?com.scco.entity.Menu;
import?com.scco.service.AdminService;
import?com.scco.service.MenuService;
import?com.scco.utils.TableResult;
import?org.apache.log4j.Logger;
import?org.springframework.stereotype.Controller;
import?org.springframework.web.bind.annotation.RequestMapping;
import?org.springframework.web.bind.annotation.RequestMethod;
import?org.springframework.web.bind.annotation.ResponseBody;
import?org.springframework.web.bind.annotation.SessionAttributes;
import?org.springframework.web.servlet.ModelAndView;
import?javax.annotation.Resource;
import?javax.servlet.http.HttpServletRequest;
import?java.util.ArrayList;
import?java.util.HashMap;
import?java.util.List;
import?java.util.Map;
@SessionAttributes(“currentAdmin“)
@RequestMapping(“/admin“)
@Controller
public?class?AdminController?{
????@Resource
????private?AdminService?adminService;
????private?Logger?logger?=?Logger.getLogger(AdminController.class.getName());
????//?列表分頁(yè)
????@ResponseBody
????@RequestMapping(value?=?“/adminList“?method?=?RequestMethod.GET)
????public?TableResult?queryList(Integer?page?Integer?limit)?{
????????page?=?(page?-?1)?*?limit;
????????Map?pageMap?=?new?HashMap<>();
????????pageMap.put(“page“?page);
????????pageMap.put(“l(fā)imit“?limit);
????????List?admintList?=?adminService.queryData(pageMap);
????????int?count?=?adminService.queryCount();
????????return?new?TableResult(0?“請(qǐng)求成功“?count?admintList);
????}
????//?新增管理員
????@ResponseBody
????@RequestMapping(value?=?“addAdmin“?method?=?RequestMethod.POST)
????public?Integer?save(Admin?admin)?{
????????logger.debug(“------------開(kāi)始添加用戶“);
????????int?result;
????????String?a_id?=?adminService.checkAdminById(admin.getA_id());
????????if?(a_id?==?null)?{
????????????result?=?adminService.insertAdmin(admin);
????????}?else?{
????????????result?=?-2;
????????}
????????logger.debug(“---add===result:“?+?result);
????????return?result;
????}
????//?批量刪除管理員數(shù)據(jù)
????@ResponseBody
????@RequestMapping(value?=?“/batchDelAdmin“?method?=?RequestMethod.POST)
????public?Integer?delete(String?ids)?{
????????logger.debug(“-----------開(kāi)始刪除管理員數(shù)據(jù)“);
????????logger.debug(“---ids:“?+?ids);
????????int?result;
????????String[]?idArray?=?ids.split(““);
????????List?idList?=?new?ArrayList<>();
????????for?(String?id?:?idArray)?{
????????????idList.add(id);
????????}
????????logger.debug(“---刪除集合idList:“?+?idList);
????????result?=?adminService.batchDelAdmin(idList);
????????logger.debug(“---delete===result:“?+?result);
????????logger.debug(“------------刪除結(jié)束“);
????????return?result;
????}
????//?獲取更新管理員數(shù)據(jù)
????@RequestMapping(value?=?“/queryAdminById“?method?=?RequestMethod.GET)
????public?ModelAndView?update(String?a_id)?{
????????logger.debug(“------------獲取管理員更新頁(yè)數(shù)據(jù)“);
????????logger.debug(“---a_id:“?+?a_id);
????????ModelAndView?mav
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????目錄???????????0??2019-03-19?12:22??sccoSystem\
?????目錄???????????0??2019-05-19?11:02??sccoSystem\.idea\
?????文件?????????607??2019-05-19?08:49??sccoSystem\.idea\compiler.xm
?????文件?????????209??2019-03-18?13:32??sccoSystem\.idea\encodings.xm
?????文件?????????656??2019-03-18?13:32??sccoSystem\.idea\misc.xm
?????文件?????????234??2019-04-01?22:57??sccoSystem\.idea\sqldialects.xm
?????文件????????8915??2019-03-18?17:11??sccoSystem\.idea\uiDesigner.xm
?????文件?????????315??2019-03-19?08:49??sccoSystem\.idea\webContexts.xm
?????文件???????69170??2019-05-19?11:02??sccoSystem\.idea\workspace.xm
?????文件???????12964??2019-03-19?12:22??sccoSystem\pom.xm
?????文件??????????81??2019-03-18?13:07??sccoSystem\sccoSystem.iml
?????目錄???????????0??2019-03-18?14:14??sccoSystem\src\
?????目錄???????????0??2019-03-18?15:31??sccoSystem\src\main\
?????目錄???????????0??2019-03-18?15:47??sccoSystem\src\main\java\
?????目錄???????????0??2019-03-18?15:47??sccoSystem\src\main\java\com\
?????目錄???????????0??2019-04-16?15:33??sccoSystem\src\main\java\com\scco\
?????目錄???????????0??2019-05-11?13:34??sccoSystem\src\main\java\com\scco\controller\
?????文件????????4919??2019-04-16?16:16??sccoSystem\src\main\java\com\scco\controller\AdminController.java
?????文件????????4865??2019-04-11?15:20??sccoSystem\src\main\java\com\scco\controller\CourseController.java
?????文件????????1593??2019-04-07?10:23??sccoSystem\src\main\java\com\scco\controller\ImgCodeValidController.java
?????文件????????4891??2019-04-27?16:11??sccoSystem\src\main\java\com\scco\controller\LoginController.java
?????文件???????10088??2019-04-27?18:39??sccoSystem\src\main\java\com\scco\controller\MenuController.java
?????文件???????11335??2019-05-10?23:31??sccoSystem\src\main\java\com\scco\controller\StudentController.java
?????文件???????10051??2019-05-11?13:34??sccoSystem\src\main\java\com\scco\controller\TeacherController.java
?????目錄???????????0??2019-03-19?15:37??sccoSystem\src\main\java\com\scco\converter\
?????文件?????????519??2019-03-19?15:36??sccoSystem\src\main\java\com\scco\converter\DateConverter.java
?????目錄???????????0??2019-04-24?18:20??sccoSystem\src\main\java\com\scco\entity\
?????文件????????1750??2019-04-18?12:27??sccoSystem\src\main\java\com\scco\entity\Admin.java
?????文件????????1648??2019-04-11?15:58??sccoSystem\src\main\java\com\scco\entity\Course.java
?????文件?????????880??2019-04-18?12:37??sccoSystem\src\main\java\com\scco\entity\Menu.java
?????文件????????3322??2019-04-24?18:20??sccoSystem\src\main\java\com\scco\entity\Student.java
............此處省略1169個(gè)文件信息
評(píng)論
共有 條評(píng)論