使用SSM開(kāi)發(fā)一個(gè)校友聯(lián)絡(luò)的平臺(tái)系統(tǒng)
項(xiàng)目編號(hào):BS-PT-019
后臺(tái)開(kāi)發(fā)技術(shù):SSM框架
前端開(kāi)發(fā)技術(shù):Bootstrap+Jquery+Ajax
開(kāi)發(fā)工具:IDEA / ECLIPSE
基于MAVEN開(kāi)發(fā)
數(shù)據(jù)庫(kù):MYSQL5.7
JDK:1.8
本項(xiàng)目基于SSM實(shí)現(xiàn)的校友錄平臺(tái),功能完整:主要包含校友通訊錄模塊,論壇模塊,新聞模塊,招聘模塊,校內(nèi)各組織管理模塊,班級(jí)管理模塊等,功能還是比較完整的,運(yùn)行無(wú)誤。數(shù)據(jù)庫(kù)采用MYSQL,開(kāi)發(fā)工具為IDEA或Eclipse.
下面展示一下系統(tǒng)的部分功能;
訪(fǎng)問(wèn)
輸入密碼: black? /? 12345678
?登陸:

首頁(yè)

新聞中心

班級(jí)通訊錄

校友組織:

校友論壇

職業(yè)招聘

校園服務(wù)

個(gè)人后臺(tái)管理中心

我的班級(jí)

我的論壇

我的招聘

系統(tǒng)管理員進(jìn)入:
sa? /? 12345678
后臺(tái)管理主界面

信息中心

組織管理

招聘管理

用戶(hù)管理

權(quán)限管理

數(shù)據(jù)字典管理

本系統(tǒng)功能完整,全面,運(yùn)行無(wú)誤,結(jié)構(gòu)清晰,使用SSM框架開(kāi)發(fā),適合做畢業(yè)設(shè)計(jì)使用。
部分核心實(shí)現(xiàn)代碼:
package com.xzit.ar.manage.controller.user;import com.xzit.ar.common.base.BaseController;import com.xzit.ar.common.exception.UtilException;import com.xzit.ar.common.page.Page;import com.xzit.ar.common.po.user.User;import com.xzit.ar.common.util.CommonUtil;import com.xzit.ar.manage.service.user.UserService;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.RequestBody;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;import org.springframework.web.bind.annotation.RequestParam;import javax.annotation.Resource;import java.util.Date;import java.util.HashMap;import java.util.Map;/**
* TODO ${TODO}
*
* @author znz
* @Date:2021/5/19 17:16.
*/public class UserController extends BaseController { ? ?
? ?private UserService userService; ? ?/**
? ? * TODO 加載用戶(hù)管理界面
? ? * @return
? ? */
? ?
? ?public String index() { ? ? ? ?return "user/user-index";
? ?} ? ?/**
? ? * TODO 查詢(xún)用戶(hù)列表
? ? * @param model
? ? * @param query
? ? * @param state
? ? * @return
? ? */
? ?
? ?public String queryUser(Model model, String query, String state, String isAdmin) { ? ? ? ?// 分頁(yè)類(lèi)
? ? ? ?Page<Map<String, Object>> page = new Page<>(getPageIndex(), getPageSize());
? ? ? ?Map<String, Object> user = new HashMap<>(); ? ? ? ?// 參數(shù)校驗(yàn)
? ? ? ?if (CommonUtil.isNotEmpty(query)) {
? ? ? ? ? ?user.put("query", "%" + query + "%");
? ? ? ?} ? ? ? ?if (CommonUtil.isNotEmpty(state)) {
? ? ? ? ? ?user.put("state", state);
? ? ? ?} ? ? ? ?if (CommonUtil.isNotEmpty(isAdmin)) {
? ? ? ? ? ?user.put("isAdmin", isAdmin);
? ? ? ?}
? ? ? ?page.setQueryMap(user); ? ? ? ?// 查詢(xún)用戶(hù)
? ? ? ?userService.queryUser(page); ? ? ? ?// 數(shù)據(jù)返回
? ? ? ?model.addAttribute("page", page);
? ? ? ?model.addAttribute("query", query);
? ? ? ?model.addAttribute("state", state);
? ? ? ?model.addAttribute("isAdmin", isAdmin); ? ? ? ?return "user/user-query";
? ?} ? ?
? ?public String userAddPage(Model model) {
? ? ? ?model.addAttribute("sex", false); ? ? ? ?return "user/user-add";
? ?} ? ?
? ?public String userAddSubmit(Model model, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? String account, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? String trueName, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? String isAdmin, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? String email, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? String introduce)throws UtilException { ? ? ? ?if (CommonUtil.isNotEmpty(account)) {
? ? ? ? ? ?Map<String, Object> _user = userService.getUserByAccount(account); ? ? ? ? ? ?if (_user != null) {
? ? ? ? ? ? ? ?setMessage(account + " 已存在");
? ? ? ? ? ? ? ?System.out.println(account + " 已存在"); ? ? ? ? ? ? ? ?return "redirect:/user.action";
? ? ? ? ? ?} else { ? ? ? ? ? ? ? ?User user = new User();
? ? ? ? ? ? ? ?user.setAccount(account);
? ? ? ? ? ? ? ?user.setTrueName(trueName);
? ? ? ? ? ? ? ?user.setEmail(email);
? ? ? ? ? ? ? ?user.setIsAdmin(isAdmin);
? ? ? ? ? ? ? ?user.setIntroduce(introduce);
? ? ? ? ? ? ? ?user.setState("A");
? ? ? ? ? ? ? ?user.setPassword(CommonUtil.md5("12345678"));
? ? ? ? ? ? ? ?user.setImageId(1);
? ? ? ? ? ? ? ?user.setStateTime(new Date());
? ? ? ? ? ? ? ?user.setCreateTime(new Date());
? ? ? ? ? ? ? ?userService.addUser(user);
? ? ? ? ? ?}
? ? ? ?} ? ? ? ?return "redirect:/user.action";
? ?}
}
/**
* TODO ${TODO}
*
* @author znz
* @Date:2021/5/19 17:16.
*/package com.xzit.ar.manage.controller;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.ui.ModelMap;import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;import com.xzit.ar.common.base.BaseController;import com.xzit.ar.common.constant.WebConstant;/**
* TODO ${TODO}
*
* @author znz
* @Date:2021/5/19 17:16.
*/public class ManageController extends BaseController { /**
* @Description: TODO 空請(qǐng)求跳轉(zhuǎn)<br>
* @author znz <br>
* @date 2021年12月23日 下午12:36:56 <br>
*/
public String index(ModelMap map) throws Exception { return "main/index";
} /**
* @Description: TODO 加載 歡迎界面 <br>
* @author znz <br>
* @date 2016年1月3日 下午4:23:41 <br>
*/
public String welcomeManage(Model model) { return "main/welcome";
} /**
* @Description: TODO 錯(cuò)誤請(qǐng)求跳轉(zhuǎn)<br>
* @author znz <br>
* @date 2021年12月23日 上午11:46:19 <br>
*/
public String error( { String errCode)return "404".equals(errCode) ? WebConstant.PAGE_ERROR_404 : WebConstant.PAGE_ERROR_500;
}
}
/**
* @Title: ControllerReflect.java <br>
* @Package com.xzit.ar.manage.controller <br>
* @Description: TODO <br>
* @author znz <br>
* @date 2021年1月3日 上午10:25:46 <br>
* @version V1.0 <br>
*/package com.xzit.ar.manage.controller.right;import java.util.List;import javax.annotation.Resource;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestParam;import com.xzit.ar.common.base.BaseController;import com.xzit.ar.common.exception.ServiceException;import com.xzit.ar.common.page.Page;import com.xzit.ar.common.po.role.Right;import com.xzit.ar.common.util.privilege.PrivilegeUtil;import com.xzit.ar.manage.service.right.RightService;/**
* @ClassName: ControllerReflect <br>
* @Description: TODO <br>
* @author znz <br>
* @date 2021年1月3日 上午10:25:46 <br>
* @version V1.0 <br>
*/public class RightController extends BaseController { ? ?
? ?private RightService rightService; ? ?/**
? ? * @Description: TODO 加載權(quán)限管理索引界面<br>
? ? * @author znz <br>
? ? * @date 2021年1月4日 上午11:39:33 <br>
? ? */
? ?
? ?public String indexRight() { ? ? ? ?return "authority/right/right-index";
? ?} ? ?
? ?public String queryRights(Model model, String queryInput) throws ServiceException {
? ? ? ?Page<Right> page = new Page<Right>();
? ? ? ?page.setPageIndex(getPageIndex());
? ? ? ?page.setPageSize(getPageSize());
? ? ? ?rightService.queryRights(page, queryInput);
? ? ? ?model.addAttribute("page", page);
? ? ? ?model.addAttribute("queryInput", queryInput); ? ? ? ?return "authority/right/right-query";
? ?} ? ?/**
? ? * @Title: addRight
? ? * @Description: TODO addRight
? ? */
? ?
? ?public String addRight() { ? ? ? ?return null;
? ?} ? ?
? ?public String updateRight(Model model, Integer rightId)throws ServiceException { ? ? ? ?Right right = rightService.selectById(rightId);
? ? ? ?model.addAttribute("right", right);
? ? ? ?setMessage(model, "只能改變權(quán)限名、是否公開(kāi)"); ? ? ? ?return "authority/right/right-update";
? ?} ? ?
? ?public String updateRightSubmit(Model model, Right right) throws ServiceException { ? ? ? ?int row = 0; ? ? ? ?if (right != null) { ? ? ? ? ? ?// 更新操作
? ? ? ? ? ?row = rightService.updateRight(right);
? ? ? ?} ? ? ? ?// 結(jié)果判斷
? ? ? ?if (row < 1) {
? ? ? ? ? ?setMessage(model, "修改失?。?#34;);
? ? ? ?} else {
? ? ? ? ? ?setMessage(model, "修改成功!");
? ? ? ?} ? ? ? ?return "forward:queryRights.action";
? ?} ? ?/**
? ? * @Title: scanAddRights
? ? * @Description: TODO 掃描并添加未被添加的權(quán)限
? ? */
? ?
? ?public String scanAddRights(Model model) throws ServiceException { ? ? ? ?int newRights = 0; ? ? ? ?// 索引當(dāng)前所有權(quán)限url
? ? ? ?List<String> rightUrlList = PrivilegeUtil.detectAllRightURL(); ? ? ? ?for (String rightUrl : rightUrlList) { ? ? ? ? ? ?// 判斷是否存在
? ? ? ? ? ?if (rightService.selectByRightUrl(rightUrl) == null) { ? ? ? ? ? ? ? ?// 生成默認(rèn)格式right
? ? ? ? ? ? ? ?Right right = PrivilegeUtil.makeDefaultRight(rightUrl); ? ? ? ? ? ? ? ?// 持久化right
? ? ? ? ? ? ? ?if (rightService.saveRight(right) > 0) {
? ? ? ? ? ? ? ? ? ?newRights++;
? ? ? ? ? ? ? ?}
? ? ? ? ? ?}
? ? ? ?} ? ? ? ?if (newRights > 0) {
? ? ? ? ? ?setMessage(model, "新增權(quán)限" + newRights + "條權(quán)限");
? ? ? ?} else {
? ? ? ? ? ?setMessage(model, "沒(méi)有新增權(quán)限");
? ? ? ?} ? ? ? ?return "forward:queryRights.action";
? ?}
}
/**
* @Title: RoleController.java
* @Package com.xzit.uscdl.manage.controller.right
* @Description: TODO
* @author znz
* @date 2021年3月15日 下午7:05:25
* @version V1.0
*/package com.xzit.ar.manage.controller.right;import java.util.ArrayList;import java.util.List;import javax.annotation.Resource;import com.xzit.ar.common.base.BaseController;import com.xzit.ar.common.exception.ServiceException;import com.xzit.ar.common.page.Page;import com.xzit.ar.common.po.role.Right;import com.xzit.ar.common.po.role.Role;import com.xzit.ar.common.util.CommonUtil;import com.xzit.ar.manage.service.right.RightService;import com.xzit.ar.manage.service.right.RoleService;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.RequestMapping;/**
* @author znz
* @ClassName: RoleController
* @Description: TODO
* @date 2021年3月15日 下午7:05:25
*/public class RoleController extends BaseController { ? ?
? ?private RoleService roleService; ? ?
? ?private RightService rightService; ? ?
? ?public String index() { ? ? ? ?return "authority/role/role-index";
? ?} ? ?
? ?public String queryRole(Model model) throws ServiceException {
? ? ? ?Page<Role> page = new Page<>(getPageIndex(), getPageSize()); ? ? ? ?// 傳遞數(shù)據(jù)
? ? ? ?model.addAttribute("page", roleService.queryRole(page)); ? ? ? ?return "authority/role/role-query";
? ?} ? ?
? ?public String edit(Model model) { ? ? ? ?return "";
? ?} ? ?
? ?public String editSubmit() { ? ? ? ?return "";
? ?} ? ?
? ?public String add() { ? ? ? ?return "";
? ?} ? ?
? ?public String addSubmit() { ? ? ? ?return "";
? ?} ? ?
? ?public String allot(Model model, Integer roleId) throws ServiceException { ? ? ? ?// 傳遞數(shù)據(jù)
? ? ? ?model.addAttribute("role", roleService.getRoleById(roleId)); ? ? ? ?// 所有權(quán)限
? ? ? ?model.addAttribute("rightList", rightService.getIsNotPublicRights()); ? ? ? ?// 角色已分配的權(quán)限
? ? ? ?List<Right> roleRights = roleService.getRightsByRole(roleId);
? ? ? ?List<Integer> rightIds = new ArrayList<>(); ? ? ? ?for (Right right : roleRights) {
? ? ? ? ? ?rightIds.add(right.getRightId());
? ? ? ?}
? ? ? ?model.addAttribute("roleRights", roleRights);
? ? ? ?model.addAttribute("rightIds", rightIds); ? ? ? ?return "authority/role/role-allot";
? ?} ? ?
? ?public String allotSubmit(Model model, String rightIds, Integer roleId) throws ServiceException {
? ? ? ?List<Integer> idList = CommonUtil.splitIds(rightIds); ? ? ? ?if (roleService.updateRoleRights(roleId, idList) > 0) {
? ? ? ? ? ?setMessage(model, "更新成功");
? ? ? ?} else {
? ? ? ? ? ?setMessage(model, "更新失敗");
? ? ? ?} ? ? ? ?return "forward:queryRole.action";
? ?}
}