專案編號:BS-PT-019
后臺開發技術:SSM框架
前端開發技術:Bootstrap+Jquery+Ajax
開發工具:IDEA / ECLIPSE
基于MAVEN開發
資料庫:MYSQL5.7
JDK:1.8
本專案基于SSM實作的校友錄平臺,功能完整:主要包含校友通訊錄模塊,論壇模塊,新聞模塊,招聘模塊,校內各組織管理模塊,班級管理模塊等,功能還是比較完整的,運行無誤,資料庫采用MYSQL,開發工具為IDEA或Eclipse.
下面展示一下系統的部分功能;
訪問http://localhost:8080/ar-portal/index.action
輸入密碼: black / 12345678
登陸:

首頁

新聞中心

班級通訊錄

校友組織:

校友論壇

職業招聘

校園服務

個人后臺管理中心

我的班級

我的論壇

我的招聘

系統管理員進入:
http://localhost:8080/ar-portal/index.action
sa / 12345678
后臺管理主界面

資訊中心

組織管理

招聘管理

用戶管理

權限管理

資料字典管理

本系統功能完整,全面,運行無誤,結構清晰,使用SSM框架開發,適合做畢業設計使用,做畢業設計,可以找指南針畢業設計服務,
部分功能實作代碼:
/**
* @Title: LoginServiceImpl.java <br>
* @Package com.xzit.ar.manage.service.impl <br>
* @Description: TODO <br>
* @date 2021年11月2日 下午2:47:21 <br>
* @version V1.0 <br>
*/
package com.xzit.ar.manage.service.impl;import java.util.Map;
import javax.annotation.Resource;
import com.xzit.ar.common.exception.ServiceException;
import com.xzit.ar.common.mapper.user.UserMapper;
import com.xzit.ar.common.util.CommonUtil;
import com.xzit.ar.manage.service.LoginService;/**
* @ClassName: LoginServiceImpl <br>
* @Description: TODO <br>
* @date 2021年11月2日 下午2:47:21 <br>
* @version V1.0 <br>
*/
public class LoginServiceImpl implements LoginService {
@Resource
private UserMapper userMapper;@Override
public Map<String, Object> validateUser(String account, String password) throws ServiceException {
Map<String, Object> user = null;
try {
// 關鍵引數校驗
if (CommonUtil.isNotEmpty(account) && CommonUtil.isNotEmpty(password)) {
// 查找用戶
user = userMapper.selectByAccount(account);
if (user != null) {
// 校驗密碼
if (password.equals(user.get("password"))) {
// 加載用戶關聯資訊
//Integer userId = (Integer) (user.get("userId"));
} else {
user.put("userId", null);
user.put("password", null);
}
}
}
} catch (Exception e) {
throw new ServiceException("系統例外,登錄失敗");
}
return user;
}}
package com.xzit.ar.manage.service.user.impl;
import com.xzit.ar.common.mapper.user.UserInfoMapper;
import com.xzit.ar.common.mapper.user.UserMapper;
import com.xzit.ar.common.page.Page;
import com.xzit.ar.common.po.user.User;
import com.xzit.ar.common.po.user.UserInfo;
import com.xzit.ar.manage.service.user.UserService;
import org.springframework.stereotype.Service;import javax.annotation.Resource;
import java.util.List;
import java.util.Map;/**
* TODO ${TODO}
*
* @Date:2021/11/19 20:43.
*/
@Service("userService")
public class UserServiceImpl implements UserService{@Resource
private UserMapper userMapper;@Resource
private UserInfoMapper userInfoMapper;/**
* TODO 查詢用戶串列
*
* @param page
* @return
*/
@Override
public List<Map<String, Object>> queryUser(Page<Map<String, Object>> page) {
userMapper.queryUser(page);
return null;
}@Override
public User addUser(User user) {
try {
int a = userMapper.save(user);
Map<String, Object> _user = userMapper.selectByAccount(user.getAccount());
UserInfo userInfo = new UserInfo();
userInfo.setUserId(Integer.parseInt(_user.get("userId").toString()));
userInfo.setState("A");
userInfoMapper.save(userInfo);
} catch (Exception e) {
e.printStackTrace();
}return null;
}@Override
public Map<String, Object> getUserByAccount(String account) {
try {
return userMapper.selectByAccount(account);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
/**
* @Title: RightServiceImpl.java <br>
* @Package com.xzit.ar.manage.service.right.impl <br>
* @Description: TODO <br>
* @date 2021年11月2日 下午10:50:51 <br>
* @version V1.0 <br>
*/
package com.xzit.ar.manage.service.right.impl;import java.util.List;
import java.util.Map;import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xzit.ar.common.exception.ServiceException;
import com.xzit.ar.common.mapper.role.RightMapper;
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;/**
* @author Mr.Black <br>
* @version V1.0 <br>
* @ClassName: RightServiceImpl <br>
* @Description: TODO <br>
* @date 2021年1月2日 下午10:50:51 <br>
*/
@Service("rightService")
public class RightServiceImpl implements RightService {@Resource
private RightMapper rightMapper;@Override
public int saveRight(Right right) throws ServiceException {
int row = 0;
try {
// 為要存盤的權限設定權限位、權限碼
Integer rightPos = null;
Long rightCode = null;
// 獲取資料庫當前最高
Map<String, Object> topPosCode = rightMapper.selectTopPosCode();
Integer topPos = null;
Long topCode = null;
// 判斷是否已獲取權限位、權限碼
if (topPosCode != null) {
topPos = (Integer) topPosCode.get("topPos");
topCode = (Long) topPosCode.get("topCode");
}
// 為要存盤的權限計算權限位、權限碼
if (topPos == null) {
rightPos = 0;
rightCode = 1L;
} else {
// 權限碼是否達到最大值
if (topCode >= (1L << 60)) {
rightPos = topPos + 1;
rightCode = 1L;
} else {
rightPos = topPos;
rightCode = topCode << 1;
}
}
System.out.println(rightPos + " " + rightCode);
// 設定權限位、權限碼
right.setRightPos(rightPos);
right.setRightCode(rightCode);// 存盤權限
row = rightMapper.save(right);
// 重繪權限串列
PrivilegeUtil.refreshAllRights();
} catch (Exception e) {
throw new ServiceException("操作例外");
}
return row;
}@Override
public Right selectByRightUrl(String rightUrl) throws ServiceException {
Right right = null;
try {
right = rightMapper.selectByRightUrl(rightUrl);
if (right != null) {
System.out.println("權限 URL : " + rightUrl + " 已存在!");
}
} catch (Exception e) {
throw new ServiceException("系統例外!");
}
return right;
}@Override
public List<Map<String, Object>> queryRights(Page<Right> page, String queryInput) throws ServiceException {
List<Map<String, Object>> rightList = null;
try {
// 對關鍵引數的校驗
if (queryInput == null) {
queryInput = "";
}
queryInput = "%" + queryInput + "%";
// 查詢
rightList = rightMapper.queryRights(page, queryInput);
} catch (Exception e) {
throw new ServiceException("系統例外");
}return rightList;
}@Override
public Right selectById(Integer rightId) throws ServiceException {
try {
return rightMapper.selectById(rightId);
} catch (Exception e) {
throw new ServiceException("系統錯誤");
}
}@Override
public int updateRight(Right right) throws ServiceException {
int row;
try {
row = rightMapper.update(right);
// 重繪權限串列
PrivilegeUtil.refreshAllRights();
} catch (Exception e) {
throw new ServiceException("系統錯誤,更改失敗");
}
return row;
}@Override
public List<Right> getIsNotPublicRights() throws ServiceException {
try {
return rightMapper.getIsNotPublicRights();
} catch (Exception e) {
throw new ServiceException("記載權限時發生錯誤");
}
}}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/374714.html
標籤:其他
