Commit fd185271 authored by machengbo's avatar machengbo

no message

parent dd181812
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework.session:spring-session-data-redis:1.3.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.4.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.8.1.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.2.1.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.session:spring-session:1.3.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:2.9.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.47" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.3.1.tmp" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.3.1.tmp" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.3.1.tmp" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.3.1.tmp" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.3.1.tmp" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.3" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:4.2.0" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:0.9.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.14" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.8.12" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.3" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
</component>
</module>
\ No newline at end of file
This diff is collapsed.
package com.jz.manage.moduls.controller;
public class BaseController {
/*public User getCurrentUser(){
User user = (User) SecurityUtils.getSubject().getPrincipals().iterator().next();
return user;
}
public Integer getCurrentUserId(){
return getCurrentUser().getUserId();
}*/
}
package com.jz.manage.moduls.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jz.common.utils.Result;
import com.jz.manage.moduls.entity.User;
import com.jz.manage.moduls.service.TestUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
/*
*
* 测试样例
* */
@RestController
@RequestMapping("/user")
@Api(tags = "测试样例API")
public class TestUserController extends BaseController {
@Autowired
private TestUserService testUserService;
@PostMapping("/getTest")
public List<Map> getTest() {
System.out.print("117576575" + testUserService.getTest().toString());
return testUserService.getTest();
}
@GetMapping(value = "/events")
@ApiOperation(value = "测试样例列表(分页查询)", notes = "事件列表(分页查询)")
public Result<IPage<User>> queryPageList(User event, HttpServletRequest req) throws Exception {
Result<IPage<User>> result = new Result<IPage<User>>();
IPage<User> pageList = testUserService.queryPage(new Page<User>(1, 2), event);
result.setSuccess(true);
result.setResult(pageList);
return result;
}
@GetMapping(value = "/queryPageListSff")
@ApiOperation(value = "测试样例列表(分页查询)", notes = "事件列表(分页查询)")
public Result<IPage<Map>> queryPageListSff(User event, HttpServletRequest req) throws Exception {
Result<IPage<Map>> result = new Result<IPage<Map>>();
IPage<Map> pageList = testUserService.queryListPage(new Page<Map>(1, 2), event);
result.setSuccess(true);
result.setResult(pageList);
return result;
}
}
package com.jz.manage.moduls.controller.sys;
import com.jz.manage.moduls.controller.BaseController;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class LoginController extends BaseController {
/*@ApiOperation("登录接口")
@RequestMapping(value = "/login", method = RequestMethod.POST)
public Result<JSONObject> login(@RequestBody SysUser sysUser, HttpServletRequest request) throws Exception {
Result<JSONObject> result = new Result<>();
String account = sysUser.getAccount();
String password = sysUser.getPassword();
Subject subject = SecurityUtils.getSubject(); //获取当前用户
//将用户输入的用户名写密码封装到一个UsernamePasswordToken对象中
UsernamePasswordToken token = new UsernamePasswordToken(account, password);
//用Subject对象执行登录方法,没有抛出任何异常说明登录成功
try {
//执行登录方法,如果没有异常,就OK
//login()方法会调用 Realm类中执行认证逻辑的方法,
//并将这个参数传递给doGetAuthenticationInfo()方法
subject.login(token);
result.setSuccess(true);
result.setCode(CommonConstant.SC_OK_200);
result.setMessage("登录成功!");
return result;
} catch (UnknownAccountException e) {
result.setSuccess(false);
result.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
result.setMessage("账号错误!");
return result;
} catch (IncorrectCredentialsException e) {
result.setSuccess(false);
result.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
result.setMessage("密码错误!");
return result;
}
}*/
}
package com.jz.manage.moduls.controller.sys;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 功能菜单(TSysMenu)表控制层
*
* @author makejava
* @since 2020-11-29 14:30:23
*/
@RestController
@RequestMapping("tSysMenu")
public class SysMenuController extends BaseController {
/**
* 服务对象
*/
@Autowired
private SysMenuService sysMenuService;
}
\ No newline at end of file
package com.jz.manage.moduls.controller.sys;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.service.SysOrgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 组织机构表(SysOrg)表控制层
*
* @author makejava
* @since 2020-11-29 14:30:24
*/
@RestController
@RequestMapping("sysOrg")
public class SysOrgController extends BaseController {
/**
* 服务对象
*/
@Autowired
private SysOrgService sysOrgService;
}
\ No newline at end of file
package com.jz.manage.moduls.controller.sys;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 角色表(TSysRole)表控制层
*
* @author makejava
* @since 2020-11-29 14:30:25
*/
@RestController
@RequestMapping("sysRole")
public class SysRoleController extends BaseController {
/**
* 服务对象
*/
@Autowired
private SysRoleService tSysRoleService;
}
\ No newline at end of file
package com.jz.manage.moduls.controller.sys;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.service.SysRoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* (TSysRoleMenu)表控制层
*
* @author makejava
* @since 2020-11-29 14:30:25
*/
@RestController
@RequestMapping("sysRoleMenu")
public class SysRoleMenuController extends BaseController {
/**
* 服务对象
*/
@Autowired
private SysRoleMenuService sysRoleMenuService;
}
\ No newline at end of file
package com.jz.manage.moduls.controller.sys;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 平台系统用户表(TSysUser)表控制层
*
* @author makejava
* @since 2020-11-29 14:30:26
*/
@RestController
@RequestMapping("sysUser")
public class SysUserController extends BaseController {
/**
* 服务对象
*/
@Autowired
private SysUserService sysUserService;
}
\ No newline at end of file
package com.jz.manage.moduls.controller.sys;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.service.SysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* (SysUserRole)控制层
*
* @author Bellamy
* @since 2020-11-29 14:30:27
*/
@RestController
@RequestMapping("sysUserRole")
public class SysUserRoleController extends BaseController {
/**
* 服务对象
*/
@Autowired
private SysUserRoleService tSysUserRoleService;
}
\ No newline at end of file
package com.jz.manage.moduls.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/*
* 测试样例
* */
@TableName("tb_user")
@ApiModel
public class User implements Serializable {
/**
* id
*/
@TableId(value = "user_id",type = IdType.AUTO)
private Integer userId;
/**
* 用户名
*/
@ApiModelProperty(value = "用户名",required = true)
private String username;
/**
* 密码
*/
@ApiModelProperty(value = "密码")
private String password;
/**
* 年龄
*/
@ApiModelProperty(value = "年龄")
private Integer age;
/**
* 电话
*/
@ApiModelProperty(value = "电话")
private Integer telphone;
/**
* 地址
*/
@ApiModelProperty(value = "地址")
private String addres;
/**
*/
private String delFlag;
/**
* 组织机构ID
*/
@ApiModelProperty(value = "组织机构ID")
private Integer orgId;
/*
* 姓名
* */
@ApiModelProperty(value = "姓名")
private String account;
/**
* 性别
*/
@ApiModelProperty(value = "性别")
private String gender;
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password == null ? null : password.trim();
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Integer getTelphone() {
return telphone;
}
public void setTelphone(Integer telphone) {
this.telphone = telphone;
}
public String getAddres() {
return addres;
}
public void setAddres(String addres) {
this.addres = addres == null ? null : addres.trim();
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag == null ? null : delFlag.trim();
}
public Integer getOrgId() {
return orgId;
}
public void setOrgId(Integer orgId) {
this.orgId = orgId;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
}
\ No newline at end of file
package com.jz.manage.moduls.entity.sys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
* 功能菜单(SysMenu)实体类
*
* @author Bellamy
* @since 2020-11-29 14:30:23
*/
@TableName("t_sys_menu")
@ApiModel
public class SysMenu implements Serializable {
private static final long serialVersionUID = 256732259347445947L;
/**
* 菜单ID
*/
@TableId(value = "menu_id",type = IdType.AUTO)
private Long menuId;
/**
* 菜单名称
*/
@ApiModelProperty(value = "菜单名称")
private String menuName;
/**
* 菜单路径
*/
@ApiModelProperty(value = "菜单路径url")
private String url;
/**
* 父级id
*/
@ApiModelProperty(value = "父级id")
private Long parentId;
/**
* 是否为子节点:Y是,N否
*/
@ApiModelProperty(value = "是否为子节点:Y是,N否")
private String ifChild;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date creTime;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private Long crePerson;
/**
* 删除标识:Y删除,N未删除
*/
@ApiModelProperty(value = "删除标识:Y删除,N未删除")
private String delFlag;
public Long getMenuId() {
return menuId;
}
public void setMenuId(Long menuId) {
this.menuId = menuId;
}
public String getMenuName() {
return menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public String getIfChild() {
return ifChild;
}
public void setIfChild(String ifChild) {
this.ifChild = ifChild;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public Long getCrePerson() {
return crePerson;
}
public void setCrePerson(Long crePerson) {
this.crePerson = crePerson;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}
\ No newline at end of file
package com.jz.manage.moduls.entity.sys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
* 组织机构表(TSysOrg)实体类
*
* @author Bellamy
* @since 2020-11-29 14:30:24
*/
@TableName("t_sys_org")
@ApiModel
public class SysOrg implements Serializable {
private static final long serialVersionUID = 289053694180114461L;
/**
* 组织机构id
*/
@TableId(value = "org_id",type = IdType.AUTO)
@ApiModelProperty(value = "组织机构id")
private Long orgId;
/**
* 组织名称
*/
@ApiModelProperty(value = "组织名称")
private String orgName;
/**
* 父组织id
*/
@ApiModelProperty(value = "父组织id")
private Long parentOrgId;
/**
* 是否子节点:Y是,N否
*/
@ApiModelProperty(value = "是否子节点:Y是,N否")
private String ifChild;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date creTime;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String crePerson;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private String uptPerson;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date uptTime;
/**
* 删除标识:Y删除,N未删除
*/
@ApiModelProperty(value = "删除标识:Y删除,N未删除")
private String delFlag;
public Long getOrgId() {
return orgId;
}
public void setOrgId(Long orgId) {
this.orgId = orgId;
}
public String getOrgName() {
return orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public Long getParentOrgId() {
return parentOrgId;
}
public void setParentOrgId(Long parentOrgId) {
this.parentOrgId = parentOrgId;
}
public String getIfChild() {
return ifChild;
}
public void setIfChild(String ifChild) {
this.ifChild = ifChild;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public String getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}
\ No newline at end of file
package com.jz.manage.moduls.entity.sys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
* 角色表(TSysRole)实体类
*
* @author Bellamy
* @since 2020-11-29 14:30:24
*/
@TableName("t_sys_role")
@ApiModel
public class SysRole implements Serializable {
private static final long serialVersionUID = 805800518211894799L;
/**
* 角色id
*/
@TableId(value = "role_id",type = IdType.AUTO)
@ApiModelProperty(value = "角色id")
private Long roleId;
/**
* 角色名称
*/
@ApiModelProperty(value = "角色名称")
private String roleName;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date creTime;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String crePerson;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date uptTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private String uptPerson;
/**
* 删除标识:Y删除,N未删除
*/
@ApiModelProperty(value = "删除标识:Y删除,N未删除")
private String delFlag;
public Long getRoleId() {
return roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}
\ No newline at end of file
package com.jz.manage.moduls.entity.sys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
/**
* (SysRoleMenu)实体类
*
* @author Bellamy
* @since 2020-11-29 14:30:25
*/
@TableName("t_sys_role_menu")
@ApiModel
public class SysRoleMenu implements Serializable {
private static final long serialVersionUID = -82724914905011429L;
/**
* 主键
*/
@TableId(value = "role_menu_id",type = IdType.AUTO)
private Long roleMenuId;
/**
* 角色id
*/
private Long roleId;
/**
* 菜单id
*/
private Long menuId;
public Long getRoleMenuId() {
return roleMenuId;
}
public void setRoleMenuId(Long roleMenuId) {
this.roleMenuId = roleMenuId;
}
public Long getRoleId() {
return roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
public Long getMenuId() {
return menuId;
}
public void setMenuId(Long menuId) {
this.menuId = menuId;
}
}
\ No newline at end of file
package com.jz.manage.moduls.entity.sys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.util.Date;
/**
* 平台系统用户表(SysUser)实体类
*
* @author Bellamy
* @since 2020-11-29 14:30:26
*/
@TableName("t_sys_user")
@ApiModel
public class SysUser implements Serializable {
private static final long serialVersionUID = 340254540407496782L;
/**
* 平台用户id
*/
@TableId(value = "user_id",type = IdType.AUTO)
private Long userId;
/**
* 组织机构id
*/
private Long orgId;
/**
* 用户姓名
*/
private String userName;
/**
* 账户
*/
private String account;
/**
* 密码
*/
private String password;
/**
* 供应商编号
*/
private String supplierCode;
/**
* 供应商名称(店铺名称)
*/
private String supplierName;
/**
* 电话
*/
private String telephone;
/**
* 创建时间
*/
private Date creTime;
/**
* 删除标识
*/
private String delFlag;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getOrgId() {
return orgId;
}
public void setOrgId(Long orgId) {
this.orgId = orgId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getSupplierCode() {
return supplierCode;
}
public void setSupplierCode(String supplierCode) {
this.supplierCode = supplierCode;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}
\ No newline at end of file
package com.jz.manage.moduls.entity.sys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
/**
* (TSysUserRole)实体类
*
* @author Bellamy
* @since 2020-11-29 14:30:26
*/
@TableName("t_sys_user_role")
@ApiModel
public class SysUserRole implements Serializable {
private static final long serialVersionUID = -55311533564196399L;
/**
* 主键
*/
@TableId(value = "user_role_id",type = IdType.AUTO)
private Long userRoleId;
/**
* 用户id
*/
private Long userId;
/**
* 角色id
*/
private Long roleId;
public Long getUserRoleId() {
return userRoleId;
}
public void setUserRoleId(Long userRoleId) {
this.userRoleId = userRoleId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getRoleId() {
return roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
}
\ No newline at end of file
package com.jz.manage.moduls.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.entity.User;
import java.util.Map;
public interface TestMapper extends BaseMapper<Map> {
IPage<Map> queryListPage(Page<Map> userPage, User event);
}
package com.jz.manage.moduls.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.entity.User;
import java.util.List;
import java.util.Map;
/*
* 测试样例
* */
public interface TestUserMapper extends BaseMapper<User> {
List<Map> getTest();
IPage<User> queryPage(Page<User> userPage, User event);
}
package com.jz.manage.moduls.mapper.sys;
import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.entity.sys.SysMenu;
/**
* 功能菜单(SysMenu)表数据库访问层
*
* @author Bellamy
* @since 2020-11-29 14:30:23
*/
public interface SysMenuDao extends BaseMapper<SysMenu> {
}
\ No newline at end of file
package com.jz.manage.moduls.mapper.sys;
import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.entity.sys.SysOrg;
/**
* 组织机构表(SysOrg)表数据库访问层
*
* @author Bellamy
* @since 2020-11-29 14:30:24
*/
public interface SysOrgDao extends BaseMapper<SysOrg> {
}
\ No newline at end of file
package com.jz.manage.moduls.mapper.sys;
import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.entity.sys.SysRole;
/**
* 角色表(SysRole)表数据库访问层
*
* @author Bellamy
* @since 2020-11-29 14:30:24
*/
public interface SysRoleDao extends BaseMapper<SysRole> {
}
\ No newline at end of file
package com.jz.manage.moduls.mapper.sys;
import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.entity.sys.SysRoleMenu;
/**
* (SysRoleMenu)表数据库访问层
*
* @author Bellamy
* @since 2020-11-29 14:30:25
*/
public interface SysRoleMenuDao extends BaseMapper<SysRoleMenu> {
}
\ No newline at end of file
package com.jz.manage.moduls.mapper.sys;
import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.entity.sys.SysUser;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 平台系统用户表(SysUser)表数据库访问层
*
* @author Bellamy
* @since 2020-11-29 14:30:26
*/
public interface SysUserDao extends BaseMapper<SysUser> {
List<Map> getUserRoleByAccount(@Param("account") String account);
}
\ No newline at end of file
package com.jz.manage.moduls.mapper.sys;
import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.entity.sys.SysUserRole;
/**
* (SysUserRole)表数据库访问层
*
* @author Bellamy
* @since 2020-11-29 14:30:26
*/
public interface SysUserRoleDao extends BaseMapper<SysUserRole> {
}
\ No newline at end of file
package com.jz.manage.moduls.service;
/**
* 功能菜单(TSysMenu)表服务接口
*
* @author Bellamy
* @since 2020-11-29 14:30:23
*/
public interface SysMenuService {
}
\ No newline at end of file
package com.jz.manage.moduls.service;
/**
* 组织机构表(TSysOrg)表服务接口
*
* @author Bellamy
* @since 2020-11-29 14:30:24
*/
public interface SysOrgService {
}
\ No newline at end of file
package com.jz.manage.moduls.service;
/**
* (TSysRoleMenu)表服务接口
*
* @author Bellamy
* @since 2020-11-29 14:30:25
*/
public interface SysRoleMenuService {
}
\ No newline at end of file
package com.jz.manage.moduls.service;
/**
* 角色表(TSysRole)表服务接口
*
* @author Bellamy
* @since 2020-11-29 14:30:25
*/
public interface SysRoleService {
}
\ No newline at end of file
package com.jz.manage.moduls.service;
/**
* (SysUserRole)表服务接口
*
* @author Bellamy
* @since 2020-11-29 14:30:26
*/
public interface SysUserRoleService {
}
\ No newline at end of file
package com.jz.manage.moduls.service;
import com.jz.manage.moduls.entity.sys.SysUser;
import java.util.Map;
/**
* 平台系统用户表(SysUser)表服务接口
*
* @author Bellamy
* @since 2020-11-29 14:30:26
*/
public interface SysUserService {
/*
* 通过用户帐好进行查询
* */
SysUser selectByUsername(String account);
Map<String,Object> getUserRoleByAccount(String account);
}
\ No newline at end of file
package com.jz.manage.moduls.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jz.manage.moduls.entity.User;
import java.util.List;
import java.util.Map;
/*
* 测试样例
* */
public interface TestUserService {
List<Map> getTest();
IPage<User> queryPage(Page<User> userPage, User event);
IPage<Map> queryListPage(Page<Map> mapPage, User event);
}
package com.jz.manage.moduls.service.impl;
import com.jz.manage.moduls.mapper.sys.SysMenuDao;
import com.jz.manage.moduls.service.SysMenuService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 功能菜单(SysMenu)表服务实现类
*
* @author Bellamy
* @since 2020-11-29 14:30:23
*/
@Service("sysMenuService")
public class SysMenuServiceImpl implements SysMenuService {
@Resource
private SysMenuDao sysMenuDao;
}
\ No newline at end of file
package com.jz.manage.moduls.service.impl;
import com.jz.manage.moduls.mapper.sys.SysOrgDao;
import com.jz.manage.moduls.service.SysOrgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 组织机构表(SysOrg)表服务实现类
*
* @author Bellamy
* @since 2020-11-29 14:30:24
*/
@Service("sysOrgService")
public class SysOrgServiceImpl implements SysOrgService {
@Autowired
private SysOrgDao sysOrgDao;
}
\ No newline at end of file
package com.jz.manage.moduls.service.impl;
import com.jz.manage.moduls.mapper.sys.SysRoleMenuDao;
import com.jz.manage.moduls.service.SysRoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* (SysRoleMenu)表服务实现类
*
* @author Bellamy
* @since 2020-11-29 14:30:25
*/
@Service("sysRoleMenuService")
public class SysRoleMenuServiceImpl implements SysRoleMenuService {
@Autowired
private SysRoleMenuDao sysRoleMenuDao;
}
\ No newline at end of file
package com.jz.manage.moduls.service.impl;
import com.jz.manage.moduls.mapper.sys.SysRoleDao;
import com.jz.manage.moduls.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 角色表(SysRole)表服务实现类
*
* @author Bellamy
* @since 2020-11-29 14:30:25
*/
@Service("sysRoleService")
public class SysRoleServiceImpl implements SysRoleService {
@Autowired
private SysRoleDao SysRoleDao;
}
\ No newline at end of file
package com.jz.manage.moduls.service.impl;
import com.jz.manage.moduls.mapper.sys.SysUserRoleDao;
import com.jz.manage.moduls.service.SysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* (SysUserRole)表服务实现类
*
* @author makejava
* @since 2020-11-29 14:30:27
*/
@Service("sysUserRoleService")
public class SysUserRoleServiceImpl implements SysUserRoleService {
@Autowired
private SysUserRoleDao sysUserRoleDao;
}
\ No newline at end of file
package com.jz.manage.moduls.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jz.manage.moduls.mapper.sys.SysUserDao;
import com.jz.manage.moduls.entity.sys.SysUser;
import com.jz.manage.moduls.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
/**
* 平台系统用户表(SysUser)表服务实现类
*
* @author Bellamy
* @since 2020-11-29 14:30:26
*/
@Service("sysUserService")
@Transactional
public class SysUserServiceImpl implements SysUserService {
@Autowired
private SysUserDao sysUserDao;
@Override
public SysUser selectByUsername(String account) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("account", account);
return sysUserDao.selectOne(queryWrapper);
}
@Override
public Map<String, Object> getUserRoleByAccount(String account) {
Set<String> roleSet = new HashSet<>();
Set<String> roleMenuSet = new HashSet<>();
//查询用户拥有的角色
List<Map> list = sysUserDao.getUserRoleByAccount(account);
if (list.size() > 0 && list != null) {
for (Map map : list) {
roleSet.add(map.get("roleName").toString());
roleSet.add(map.get("roleId").toString());
roleMenuSet.add(map.get("menuId").toString());
roleMenuSet.add(map.get("menuName").toString());
roleMenuSet.add(map.get("parentId").toString());
roleMenuSet.add(map.get("url").toString());
}
}
Map<String, Object> userInfo = new HashMap<>();
userInfo.put("roleSet", roleSet);
userInfo.put("roleMenuSet", roleMenuSet);
return userInfo;
}
}
\ No newline at end of file
package com.jz.manage.moduls.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jz.manage.moduls.mapper.TestMapper;
import com.jz.manage.moduls.mapper.TestUserMapper;
import com.jz.manage.moduls.entity.User;
import com.jz.manage.moduls.service.TestUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/*
* 测试样例
* */
@Service
public class UserServiceImpl implements TestUserService {
private static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);
@Autowired
private TestUserMapper userMapper;
@Autowired
private TestMapper testMapper;
@Autowired
RedisTemplate redisTemplate;
@Autowired
StringRedisTemplate stringRedisTemplate;
@Override
public List<Map> getTest() {
Map<String, Object> columnMap = new HashMap<>();
columnMap.put("user_id", 2);
List<User> list = userMapper.selectByMap(columnMap);
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("user_id", 1);
User d = userMapper.selectOne(queryWrapper);
String aa = "1";
User e = userMapper.selectById(aa);
List<Integer> ids = new ArrayList<>();
ids.add(1);
ids.add(2);
List<User> listUser = userMapper.selectBatchIds(ids);
return userMapper.getTest();
}
@Override
public IPage<User> queryPage(Page<User> userPage, User event) {
return userMapper.queryPage(userPage,event);
}
@Override
public IPage<Map> queryListPage(Page<Map> mapPage, User event) {
return testMapper.queryListPage(mapPage,event);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment