本系统实现了资产设备管理系统,管理端实现了管理员登录、用户新增、用户设置、岗位管理、审批节点、人员查询、组织设置、人员调整、角色设置、角色模块映射、模块设置、应用模块、光纤交换机、服务器、网络设备、存储设备、安全设备、机房设备、网点设备、资产登记、资产查询(类别)、资产台账、资产入库、资产查询(组织)、资产查询(类别)、资产查询(位置)、资产查询(人员)、数据统计
JDK版本:1.8
Mysql:8.0
登录用户名密码:admin oracle
package com.module.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.module.base.entity.SysMenus;
import com.module.base.entity.SysUserInfo;
import java.util.HashMap;
import java.util.List;
/**
*
* Mapper 接口
*
*/
public interface SysUserInfoMapper extends BaseMapper<SysUserInfo> {
//查询某个用户的菜单
List<SysMenus> listMyMenus(String user_id);
List<HashMap<String, Object>> listUserRoles(String user_id);
}
package com.module.base.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.annotion.Acl;
import com.core.common.base.BaseController;
import com.core.common.base.R;
import com.core.tool.util.DbUtil;
import com.core.tool.util.ToolUtil;
import com.module.base.entity.SysUserInfo;
import com.module.base.entity.SysUserRole;
import com.module.base.service.ISysUserInfoService;
import com.module.base.service.ISysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
/**
*
* 前端控制器
*
*/
@Controller
@RequestMapping("/api/sysUserInfo")
public class SysUserInfoController extends BaseController {
@Autowired
ISysUserInfoService SysUserInfoServiceImpl;
@Autowired
ISysUserRoleService SysUserRoleServiceImpl;
@ResponseBody
@Acl(info = "根据Id删除", value = Acl.ACL_DENY)
@RequestMapping(value = "/deleteById.do")
public R deleteById(@RequestParam(value = "id", required = true, defaultValue = "") String id) {
return R.SUCCESS_OPER(SysUserInfoServiceImpl.removeById(id));
}
/**
* 根据批量删除用户
* @param ids
*/
@ResponseBody
@Acl(info = "根据批量删除用户", value = Acl.ACL_DENY)
@RequestMapping(value = "/deleteByIds.do")
public R deleteByIds(@RequestParam(value = "ids", required = true, defaultValue = "[]") String ids) {
JSONArray res = JSONArray.parseArray(ids);
for (int i = 0; i < res.size(); i++) {
SysUserInfoServiceImpl.removeById(res.getString(i));
}
return R.SUCCESS_OPER();
}
/**
* 根据批量删除用户
* @param ids
*/
@ResponseBody
@Acl(info = "根据ID批量注销用户", value = Acl.ACL_DENY)
@RequestMapping(value = "/logOffByIds.do")
public R logOffByIds(@RequestParam(value = "ids", required = true, defaultValue = "[]") String ids) {
JSONArray res = JSONArray.parseArray(ids);
for (int i = 0; i < res.size(); i++) {
UpdateWrapper<SysUserInfo> ups = new UpdateWrapper<SysUserInfo>();
ups.set("islogoff", "1");
ups.eq("user_id", res.getString(i));
SysUserInfoServiceImpl.update(ups);
}
return R.SUCCESS_OPER();
}
/**
* 根据ID查询数据
* @param id
*/
@ResponseBody
@Acl(info = "根据Id查询", value = Acl.ACL_DENY)
@RequestMapping(value = "/selectById.do")
public R selectById(@RequestParam(value = "id", required = true, defaultValue = "") String id) {
return R.SUCCESS_OPER(SysUserInfoServiceImpl.getById(id));
}
@ResponseBody
@Acl(info = "插入", value = Acl.ACL_DENY)
@RequestMapping(value = "/insert.do")
public R insert(SysUserInfo entity) {
return R.SUCCESS_OPER(SysUserInfoServiceImpl.save(entity));
}
@ResponseBody
@Acl(info = "根据Id更新", value = Acl.ACL_DENY)
@RequestMapping(value = "/updateById.do")
public R updateById(SysUserInfo entity) {
return R.SUCCESS_OPER(SysUserInfoServiceImpl.updateById(entity));
}
@ResponseBody
@Acl(info = "存在则更新,否则插入", value = Acl.ACL_DENY)
@RequestMapping(value = "/insertOrUpdate.do")
public R insertOrUpdate(SysUserInfo entity) {
return R.SUCCESS_OPER(SysUserInfoServiceImpl.saveOrUpdate(entity));
}
@ResponseBody
@Acl(info = "查询所有,无分页", value = Acl.ACL_DENY)
@RequestMapping(value = "/selectList.do")
public R selectList() {
return R.SUCCESS_OPER(SysUserInfoServiceImpl.list(null));
}
@ResponseBody
@Acl(info = "查询所有,无分页", value = Acl.ACL_ALLOW)
@RequestMapping(value = "/selectByOpenId.do")
public R selectByOpenId(String open_id) {
return SysUserInfoServiceImpl.selectUserInfoByOpenId(open_id);
}
@ResponseBody
@Acl(info = "查询所有,有分页", value = Acl.ACL_DENY)
@RequestMapping(value = "/selectPage.do")
public R selectPage(@RequestParam(value = "ct", required = true, defaultValue = "") String ct, String groupId,
String start, String length,
@RequestParam(value = "pageSize", required = true, defaultValue = "10") String pageSize,
@RequestParam(value = "pageIndex", required = true, defaultValue = "1") String pageIndex) {
JSONObject respar = DbUtil.formatPageParameter(start, length, pageSize, pageIndex);
if (ToolUtil.isEmpty(respar)) {
return R.FAILURE_REQ_PARAM_ERROR();
}
int pagesize = respar.getIntValue("pagesize");
int pageindex = respar.getIntValue("pageindex");
QueryWrapper<SysUserInfo> ew = new QueryWrapper<SysUserInfo>();
ew.and(b -> b.eq(ToolUtil.isNotEmpty(ct), "name", ct).eq("1", "1").apply(ToolUtil.isNotEmpty(groupId),
" user_id in (select user_id from sys_user_group_item where dr=0 and group_id='" + groupId + "')", ""));
IPage<SysUserInfo> pdata = SysUserInfoServiceImpl.page(new Page<SysUserInfo>(pageindex, pagesize), ew);
JSONObject retrunObject = new JSONObject();
retrunObject.put("iTotalRecords", pdata.getTotal());
retrunObject.put("iTotalDisplayRecords", pdata.getTotal());
retrunObject.put("data", JSONArray.parseArray(JSON.toJSONString(pdata.getRecords(),
SerializerFeature.WriteDateUseDateFormat, SerializerFeature.DisableCircularReferenceDetect)));
return R.clearAttachDirect(retrunObject);
}
/**
* 根据用户查询权限
* @param user_id
*/
@RequestMapping("/queryRoles.do")
@ResponseBody
@Acl(info = "查询用户权限", value = Acl.ACL_DENY)
public R queryRoles(String user_id) {
if (ToolUtil.isEmpty(user_id)) {
return R.FAILURE_REQ_PARAM_ERROR();
}
JSONArray res = new JSONArray();
List<HashMap<String, Object>> map = SysUserInfoServiceImpl.listUserRoles(user_id);
for (int i = 0; i < map.size(); i++) {
HashMap<String, Object> mapt = map.get(i);
Iterator<Entry<String, Object>> it = mapt.entrySet().iterator();
while (it.hasNext()) {
Entry<String, Object> entry = it.next();
if (entry.getKey().toLowerCase().equals("role_id")) {
res.add(entry.getValue());
}
}
}
return R.SUCCESS_OPER(res);
}
/**
* 根据用户查询权限
* @param pwd1
* @param pwd2
* @param user_id
*/
@ResponseBody
@Acl(info = "强制修改密码", value = Acl.ACL_USER)
@RequestMapping(value = "/changeUserPwd.do")
public R changeUserPwd(String pwd1, String pwd2, String user_id) {
return SysUserInfoServiceImpl.changeUserPwdForce(user_id, pwd1, pwd2);
}
/**
* 增加用户
* @param entity
*/
@ResponseBody
@Acl(info = "增加用户", value = Acl.ACL_USER)
@RequestMapping(value = "/addUser.do")
public R addUser(SysUserInfo entity) {
return SysUserInfoServiceImpl.addUser(entity);
}
/**
* 批量修改用户权限
* @param userIds
* @param roles
*/
@RequestMapping("/changeRoles.do")
@ResponseBody
@Acl(info = "修改用户权限", value = Acl.ACL_DENY)
public R changeRoles(@RequestParam(value = "userIds", required = true, defaultValue = "[]") String userIds,
@RequestParam(value = "roles", required = true, defaultValue = "[]") String roles) {
JSONArray user_arr = JSONArray.parseArray(userIds);
JSONArray roles_arr = JSONArray.parseArray(roles);
if (user_arr.size() == 0 || roles_arr.size() == 0) {
return R.FAILURE_REQ_PARAM_ERROR();
}
for (int i = 0; i < user_arr.size(); i++) {
String user_id = user_arr.getString(i);
QueryWrapper<SysUserRole> we = new QueryWrapper<SysUserRole>();
we.and(b -> b.eq("user_id", user_id));
SysUserRoleServiceImpl.remove(we);
for (int j = 0; j < roles_arr.size(); j++) {
SysUserRole temp = new SysUserRole();
temp.setUserId(user_id);
temp.setRoleId(roles_arr.getString(j));
SysUserRoleServiceImpl.save(temp);
}
}
return R.SUCCESS_OPER();
}
}
package com.module.base.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.base.BaseModel;
import java.io.Serializable;
import java.util.Date;
/**
*
*
*
*/
@TableName("SYS_USER_INFO")
public class SysUserInfo extends BaseModel<SysUserInfo> {
private static final long serialVersionUID = 1L;
@TableId("USER_ID")
private String userId;
@TableField("EMPL_ID")
private String emplId;
/**
* user_name,建议唯一
*/
@TableField("USER_NAME")
private String userName;
/**
* 用户类型:sys,crm,wx
*/
@TableField("USER_TYPE")
private String userType;
/**
* 昵称
*/
@TableField("NICKNAME")
private String nickname;
/**
* 姓名
*/
@TableField("NAME")
private String name;
@TableField("PWD")
private String pwd;
@TableField("STATUS")
private String status;
/**
* 组织Id
*/
@TableField("ORG_ID")
private String orgId;
/**
* Y|N
*/
@TableField("LOCKED")
private String locked;
@TableField("TOKEN")
private String token;
/**
* 手机号码
*/
@TableField("TEL")
private String tel;
@TableField("QQ")
private String qq;
@TableField("MAIL")
private String mail;
@TableField("PROFILE")
private String profile;
/**
* 备注
*/
@TableField("MARK")
private String mark;
/**
* 家庭地址
*/
@TableField("HOMEADDR_DEF")
private String homeaddrDef;
/**
* 收货地址
*/
@TableField("RECEADDR_DEF")
private String receaddrDef;
@TableField("BIRTH")
private Date birth;
@TableField("WEIXIN")
private String weixin;
/**
* 1男,2女
*/
@TableField("SEX")
private String sex;
/**
* 头像
*/
@TableField("PHOTO")
private String photo;
/**
* 创建时间
*/
@TableField("CREATE_IP")
private String createIp;
@TableField("LAST_LOGIN_TIME")
private Date lastLoginTime;
@TableField("LAST_LOGIN_IP")
private String lastLoginIp;
/**
* 我的系统默认菜单
*/
@TableField("SYSTEM_ID")
private String systemId;
/**
* 微信open_id
*/
@TableField("OPEN_ID")
private String openId;
/**
* 积分
*/
@TableField("SCORE")
private String score;
/**
* 我的店铺
*/
@TableField("SHOP_ID")
private String shopId;
/**
* 微信头像
*/
@TableField("AVATARURL")
private String avatarurl;
@TableField("BALANCE")
private String balance;
/**
* 结算卡ID
*/
@TableField("CARD")
private String card;
/**
* 余额
*/
@TableField("AMOUNT")
private String amount;
/**
* 其他冻结金额
*/
@TableField("FAMOUNT")
private String famount;
/**
* 提现金额
*/
@TableField("TIXAMOUNT")
private String tixamount;
/**
* 信用分
*/
@TableField("CREDIT_SCORE")
private String creditScore;
/**
* 身份证
*/
@TableField("IDENTITY_CARD")
private String identityCard;
/**
* 驾照
*/
@TableField("DRIVER_CARD")
private String driverCard;
/**
* /**
* 民族
*/
@TableField("NATION")
private String nation;
/**
* 籍贯
*/
@TableField("NATIVE_PLACE")
private String nativePlace;
/**
* 自我评价
*/
@TableField("SELF_EVALUATE")
private String selfEvaluate;
@TableField("ALI_PAY_USERNAME")
private String aliPayUsername;
@TableField("ALI_PAY_ACCOUNT")
private String aliPayAccount;
/**
* 手机短号
*/
@TableField("SHORTMOBILE")
private String shortmobile;
@TableField("fposition")
private String fposition;
@TableField("sposition")
private String sposition;
@TableField("hrmstatus")
private String hrmstatus;
@TableField("islogoff")
private String islogoff;
@TableField("approval")
private String approval;
public String getApproval() {
return approval;
}
public void setApproval(String approval) {
this.approval = approval;
}
public String getIslogoff() {
return islogoff;
}
public void setIslogoff(String islogoff) {
this.islogoff = islogoff;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getEmplId() {
return emplId;
}
public void setEmplId(String emplId) {
this.emplId = emplId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserType() {
return userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getLocked() {
return locked;
}
public void setLocked(String locked) {
this.locked = locked;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
public String getQq() {
return qq;
}
public void setQq(String qq) {
this.qq = qq;
}
public String getMail() {
return mail;
}
public void setMail(String mail) {
this.mail = mail;
}
public String getProfile() {
return profile;
}
public void setProfile(String profile) {
this.profile = profile;
}
public String getMark() {
return mark;
}
public void setMark(String mark) {
this.mark = mark;
}
public String getHomeaddrDef() {
return homeaddrDef;
}
public void setHomeaddrDef(String homeaddrDef) {
this.homeaddrDef = homeaddrDef;
}
public String getReceaddrDef() {
return receaddrDef;
}
public void setReceaddrDef(String receaddrDef) {
this.receaddrDef = receaddrDef;
}
public Date getBirth() {
return birth;
}
public void setBirth(Date birth) {
this.birth = birth;
}
public String getWeixin() {
return weixin;
}
public void setWeixin(String weixin) {
this.weixin = weixin;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public String getCreateIp() {
return createIp;
}
public void setCreateIp(String createIp) {
this.createIp = createIp;
}
public Date getLastLoginTime() {
return lastLoginTime;
}
public void setLastLoginTime(Date lastLoginTime) {
this.lastLoginTime = lastLoginTime;
}
public String getLastLoginIp() {
return lastLoginIp;
}
public void setLastLoginIp(String lastLoginIp) {
this.lastLoginIp = lastLoginIp;
}
public String getSystemId() {
return systemId;
}
public void setSystemId(String systemId) {
this.systemId = systemId;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public String getScore() {
return score;
}
public void setScore(String score) {
this.score = score;
}
public String getShopId() {
return shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public String getAvatarurl() {
return avatarurl;
}
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
public String getBalance() {
return balance;
}
public void setBalance(String balance) {
this.balance = balance;
}
public String getCard() {
return card;
}
public void setCard(String card) {
this.card = card;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getFamount() {
return famount;
}
public void setFamount(String famount) {
this.famount = famount;
}
public String getTixamount() {
return tixamount;
}
public void setTixamount(String tixamount) {
this.tixamount = tixamount;
}
public String getCreditScore() {
return creditScore;
}
public void setCreditScore(String creditScore) {
this.creditScore = creditScore;
}
public String getIdentityCard() {
return identityCard;
}
public void setIdentityCard(String identityCard) {
this.identityCard = identityCard;
}
public String getDriverCard() {
return driverCard;
}
public void setDriverCard(String driverCard) {
this.driverCard = driverCard;
}
public String getNation() {
return nation;
}
public void setNation(String nation) {
this.nation = nation;
}
public String getNativePlace() {
return nativePlace;
}
public void setNativePlace(String nativePlace) {
this.nativePlace = nativePlace;
}
public String getSelfEvaluate() {
return selfEvaluate;
}
public void setSelfEvaluate(String selfEvaluate) {
this.selfEvaluate = selfEvaluate;
}
public String getAliPayUsername() {
return aliPayUsername;
}
public void setAliPayUsername(String aliPayUsername) {
this.aliPayUsername = aliPayUsername;
}
public String getAliPayAccount() {
return aliPayAccount;
}
public void setAliPayAccount(String aliPayAccount) {
this.aliPayAccount = aliPayAccount;
}
public String getShortmobile() {
return shortmobile;
}
public void setShortmobile(String shortmobile) {
this.shortmobile = shortmobile;
}
@Override
protected Serializable pkVal() {
return this.userId;
}
@Override
public String toString() {
return "SysUserInfo{" +
", userId=" + userId +
", emplId=" + emplId +
", userName=" + userName +
", userType=" + userType +
", nickname=" + nickname +
", name=" + name +
", pwd=" + pwd +
", status=" + status +
", orgId=" + orgId +
", locked=" + locked +
", token=" + token +
", tel=" + tel +
", qq=" + qq +
", mail=" + mail +
", profile=" + profile +
", mark=" + mark +
", homeaddrDef=" + homeaddrDef +
", receaddrDef=" + receaddrDef +
", birth=" + birth +
", weixin=" + weixin +
", sex=" + sex +
", photo=" + photo +
", createIp=" + createIp +
", lastLoginTime=" + lastLoginTime +
", lastLoginIp=" + lastLoginIp +
", systemId=" + systemId +
", openId=" + openId +
", score=" + score +
", shopId=" + shopId +
", avatarurl=" + avatarurl +
", balance=" + balance +
", card=" + card +
", amount=" + amount +
", famount=" + famount +
", tixamount=" + tixamount +
", creditScore=" + creditScore +
", identityCard=" + identityCard +
", driverCard=" + driverCard +
", nation=" + nation +
", nativePlace=" + nativePlace +
", selfEvaluate=" + selfEvaluate +
", aliPayUsername=" + aliPayUsername +
", aliPayAccount=" + aliPayAccount +
", shortmobile=" + shortmobile +
"}";
}
public String getFposition() {
return fposition;
}
public void setFposition(String fposition) {
this.fposition = fposition;
}
public String getHrmstatus() {
return hrmstatus;
}
public void setHrmstatus(String hrmstatus) {
this.hrmstatus = hrmstatus;
}
public String getSposition() {
return sposition;
}
public void setSposition(String sposition) {
this.sposition = sposition;
}
}
点击以下链接获取源码。
IDEA+SpringBoot + Mybatis + Shiro+Bootstrap+Mysql资产设备管理系统
IDEA+springboot+ MyBatis +ssm+ Bootstrap+Mysql房屋租赁系统源码
IDEA+SpringBoot +ssm+ Mybatis+easyui+Mysql求职招聘管理系统源码网站
idea+springboot+jpa+maven+jquery+mysql进销存管理系统源码
IDEA+java+spring+hibernate+jquery+mysql后台管理系统
IDEA + Spring Boot + Security + MyBatis Plus+Mysql低代码快速开发平台
IDEA+spring boot+activiti+shiro++layui+Mysql权限管理系统源码
IDEA+SpringBoot + Mybatis + Shiro+Bootstrap+Mysql智慧仓库WMS源码
IDEA+springboot+ssm+layui+mysql高校宿舍管理系统源码
IDEA+springboot + ssm +shiro+ easyui +mysql实现的进销存系统
IDEA+springboot+mybatis+shiro+bootstrap+Mysql网上书店管理系统
IDEA+springboot+mybatis+shiro+bootstrap+Mysql WMS仓库管理系统
IDEA+spring+spring mvc+mybatis+bootstrap+jquery+Mysql运动会管理系统源码
IDEA+SpringBoot+mybatis+bootstrap+jquery+Mysql车险理赔管理系统源码
IDEA+Spring Boot + MyBatis + Layui+Mysql垃圾回收管理系统源码
IDEA+SpringBoot+mybatis+SSM+layui+Mysql学生就业信息管理系统源码
IDEA+springboot+jpa+Layui+Mysql销售考评系统源码
IDEA+Spring + Spring MVC + MyBatis+Bootstrap+Mysql酒店管理系统源码
IDEA+spring boot+mybatis+spring mvc+bootstrap+Mysql停车位管理系统源码
Java+Swing+Mysql实现学生宿舍管理系统
Java+Swing+Txt实现自助款机系统
Java+Swing+Mysql自助存取款机系统
Java+Swing+mysql5实现学生成绩管理系统(带分页)
Java+Swing+Mysql实现超市商品管理系统源码
Java+Swing+Mysql实现通讯录管理系统源码
Java+Swing+Mysql实现图书管理系统源码