main
parent
a57a347bef
commit
af32ef53de
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
@ -0,0 +1 @@
|
||||
/target/
|
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>tamguo-modules-core</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,6 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
@ -0,0 +1,160 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.tamguo</groupId>
|
||||
<artifactId>tamguo-modules-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
<relativePath /> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<mybatis-plus-boot-starter.version>2.1.9</mybatis-plus-boot-starter.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
<!-- mybatis-plus begin -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatis-plus-boot-starter.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>tomcat-jdbc</artifactId>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- mybatis-plus end -->
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.nekohtml</groupId>
|
||||
<artifactId>nekohtml</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-redis</artifactId>
|
||||
<version>1.3.8.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.session</groupId>
|
||||
<artifactId>spring-session-data-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.32</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring</artifactId>
|
||||
<version>1.2.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-ehcache</artifactId>
|
||||
<version>1.2.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.songxinqiang</groupId>
|
||||
<artifactId>com.baidu.ueditor</artifactId>
|
||||
<version>1.1.2-edit-1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.0.18</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>3.2.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-email</artifactId>
|
||||
<version>1.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.theborakompanioni</groupId>
|
||||
<artifactId>thymeleaf-extras-shiro</artifactId>
|
||||
<version>1.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bladejava</groupId>
|
||||
<artifactId>blade-patchca</artifactId>
|
||||
<version>1.0.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>Camden.SR6</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<finalName>oms</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,30 @@
|
||||
package com.tamguo.config.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
|
||||
import com.tamguo.modules.sys.utils.ShiroUtils;
|
||||
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 注入公共字段自动填充,任选注入方式即可
|
||||
*/
|
||||
//@Component
|
||||
public class MyMetaObjectHandler extends MetaObjectHandler {
|
||||
|
||||
protected final static Logger logger = LoggerFactory.getLogger(MyMetaObjectHandler.class);
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
Object testType = getFieldValByName("createBy", metaObject);
|
||||
if (testType == null) {
|
||||
setFieldValByName("createBy", ShiroUtils.getUser() , metaObject); //mybatis-plus版本2.0.9+
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
logger.info("更新的时候干点不可描述的事情");
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.tamguo.config.dao;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
|
||||
/**
|
||||
* 实体父类
|
||||
*/
|
||||
public class SuperEntity<T extends Model<?>> extends Model<T> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId("id")
|
||||
private String id;
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.getId();
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import java.util.List;
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysAreaEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysAreaCondition;
|
||||
|
||||
public interface SysAreaMapper extends SuperMapper<SysAreaEntity>{
|
||||
|
||||
List<SysAreaEntity> listData(SysAreaCondition condition);
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysCompanyEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysCompanyCondition;
|
||||
|
||||
public interface SysCompanyMapper extends SuperMapper<SysCompanyEntity>{
|
||||
|
||||
List<SysCompanyEntity> listData(SysCompanyCondition condition);
|
||||
|
||||
SysCompanyEntity selectByCode(String code);
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import java.util.List;
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysMenuEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysMenuCondition;
|
||||
|
||||
public interface SysMenuMapper extends SuperMapper<SysMenuEntity>{
|
||||
|
||||
List<SysMenuEntity> listData(SysMenuCondition condition);
|
||||
|
||||
List<SysMenuEntity> selectMenuByRoleId(String roleCode);
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysOfficeEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysOfficeCondition;
|
||||
|
||||
public interface SysOfficeMapper extends SuperMapper<SysOfficeEntity>{
|
||||
|
||||
List<SysOfficeEntity> listData(SysOfficeCondition condition);
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysPostEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysPostCondition;
|
||||
|
||||
public interface SysPostMapper extends SuperMapper<SysPostEntity>{
|
||||
|
||||
List<SysPostEntity> listData(SysPostCondition condition , Pagination page);
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysRoleDataScopeEntity;
|
||||
|
||||
public interface SysRoleDataScopeMapper extends SuperMapper<SysRoleDataScopeEntity>{
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysRoleEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysRoleCondition;
|
||||
|
||||
public interface SysRoleMapper extends SuperMapper<SysRoleEntity>{
|
||||
|
||||
List<SysRoleEntity> listData(SysRoleCondition condition, Page<SysRoleEntity> page);
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysRoleMenuEntity;
|
||||
|
||||
public interface SysRoleMenuMapper extends SuperMapper<SysRoleMenuEntity>{
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysUserDataScopeEntity;
|
||||
|
||||
public interface SysUserDataScopeMapper extends SuperMapper<SysUserDataScopeEntity>{
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysUserEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysUserCondition;
|
||||
|
||||
public interface SysUserMapper extends SuperMapper<SysUserEntity>{
|
||||
|
||||
List<SysUserEntity> listData(SysUserCondition condition, Pagination page);
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysUserPostEntity;
|
||||
|
||||
public interface SysUserPostMapper extends SuperMapper<SysUserPostEntity>{
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.tamguo.modules.sys.model.SysUserRoleEntity;
|
||||
|
||||
public interface SysUserRoleMapper extends BaseMapper<SysUserRoleEntity>{
|
||||
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_area database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_area")
|
||||
public class SysAreaEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private String areaCode;
|
||||
private String areaName;
|
||||
private String areaType;
|
||||
private String createBy;
|
||||
private Date createDate;
|
||||
private String parentCode;
|
||||
private String parentCodes;
|
||||
private String remarks;
|
||||
private String status;
|
||||
private Boolean treeLeaf;
|
||||
private BigDecimal treeLevel;
|
||||
private String treeNames;
|
||||
private BigDecimal treeSort;
|
||||
private String treeSorts;
|
||||
private String updateBy;
|
||||
private Date updateDate;
|
||||
|
||||
public SysAreaEntity() {
|
||||
}
|
||||
|
||||
public String getAreaCode() {
|
||||
return this.areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return this.areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getAreaType() {
|
||||
return this.areaType;
|
||||
}
|
||||
|
||||
public void setAreaType(String areaType) {
|
||||
this.areaType = areaType;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return this.createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getParentCode() {
|
||||
return this.parentCode;
|
||||
}
|
||||
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public String getParentCodes() {
|
||||
return this.parentCodes;
|
||||
}
|
||||
|
||||
public void setParentCodes(String parentCodes) {
|
||||
this.parentCodes = parentCodes;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public BigDecimal getTreeLevel() {
|
||||
return this.treeLevel;
|
||||
}
|
||||
|
||||
public void setTreeLevel(BigDecimal treeLevel) {
|
||||
this.treeLevel = treeLevel;
|
||||
}
|
||||
|
||||
public String getTreeNames() {
|
||||
return this.treeNames;
|
||||
}
|
||||
|
||||
public void setTreeNames(String treeNames) {
|
||||
this.treeNames = treeNames;
|
||||
}
|
||||
|
||||
public BigDecimal getTreeSort() {
|
||||
return this.treeSort;
|
||||
}
|
||||
|
||||
public void setTreeSort(BigDecimal treeSort) {
|
||||
this.treeSort = treeSort;
|
||||
}
|
||||
|
||||
public String getTreeSorts() {
|
||||
return this.treeSorts;
|
||||
}
|
||||
|
||||
public void setTreeSorts(String treeSorts) {
|
||||
this.treeSorts = treeSorts;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateDate() {
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(Date updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return getAreaCode();
|
||||
}
|
||||
|
||||
public Boolean getTreeLeaf() {
|
||||
return treeLeaf;
|
||||
}
|
||||
|
||||
public void setTreeLeaf(Boolean treeLeaf) {
|
||||
this.treeLeaf = treeLeaf;
|
||||
}
|
||||
}
|
@ -0,0 +1,225 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotations.TableField;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_company database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_company")
|
||||
@KeySequence
|
||||
public class SysCompanyEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String ROOT_COMPANY_CODE = "0";
|
||||
public static final String TREE_CODE_COMPANY_SEPARATE = ",";
|
||||
public static final String TREE_NAME_COMPANY_SEPARATE = "/";
|
||||
|
||||
@TableId
|
||||
private String companyCode;
|
||||
private String areaCode;
|
||||
private String companyName;
|
||||
private String corpCode;
|
||||
private String corpName;
|
||||
private String createBy;
|
||||
private Date createDate;
|
||||
private String fullName;
|
||||
private String parentCode;
|
||||
private String parentCodes;
|
||||
private String remarks;
|
||||
private String status;
|
||||
private Boolean treeLeaf;
|
||||
private BigDecimal treeLevel;
|
||||
private String treeNames;
|
||||
private String treeSort;
|
||||
private String treeSorts;
|
||||
private String updateBy;
|
||||
private Date updateDate;
|
||||
private String viewCode;
|
||||
|
||||
@TableField(exist=false)
|
||||
private String treeAreaNames;
|
||||
|
||||
public SysCompanyEntity() {
|
||||
}
|
||||
|
||||
public String getAreaCode() {
|
||||
return this.areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return this.companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCorpCode() {
|
||||
return this.corpCode;
|
||||
}
|
||||
|
||||
public void setCorpCode(String corpCode) {
|
||||
this.corpCode = corpCode;
|
||||
}
|
||||
|
||||
public String getCorpName() {
|
||||
return this.corpName;
|
||||
}
|
||||
|
||||
public void setCorpName(String corpName) {
|
||||
this.corpName = corpName;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return this.createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return this.fullName;
|
||||
}
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getParentCode() {
|
||||
return this.parentCode;
|
||||
}
|
||||
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public String getParentCodes() {
|
||||
return this.parentCodes;
|
||||
}
|
||||
|
||||
public void setParentCodes(String parentCodes) {
|
||||
this.parentCodes = parentCodes;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public BigDecimal getTreeLevel() {
|
||||
return this.treeLevel;
|
||||
}
|
||||
|
||||
public void setTreeLevel(BigDecimal treeLevel) {
|
||||
this.treeLevel = treeLevel;
|
||||
}
|
||||
|
||||
public String getTreeNames() {
|
||||
return this.treeNames;
|
||||
}
|
||||
|
||||
public void setTreeNames(String treeNames) {
|
||||
this.treeNames = treeNames;
|
||||
}
|
||||
|
||||
public String getTreeSort() {
|
||||
return this.treeSort;
|
||||
}
|
||||
|
||||
public void setTreeSort(String treeSort) {
|
||||
this.treeSort = treeSort;
|
||||
}
|
||||
|
||||
public String getTreeSorts() {
|
||||
return this.treeSorts;
|
||||
}
|
||||
|
||||
public void setTreeSorts(String treeSorts) {
|
||||
this.treeSorts = treeSorts;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateDate() {
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(Date updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public String getViewCode() {
|
||||
return this.viewCode;
|
||||
}
|
||||
|
||||
public void setViewCode(String viewCode) {
|
||||
this.viewCode = viewCode;
|
||||
}
|
||||
|
||||
public Boolean getTreeLeaf() {
|
||||
return treeLeaf;
|
||||
}
|
||||
|
||||
public void setTreeLeaf(Boolean treeLeaf) {
|
||||
this.treeLeaf = treeLeaf;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.getCompanyCode();
|
||||
}
|
||||
|
||||
public String getCompanyCode() {
|
||||
return companyCode;
|
||||
}
|
||||
|
||||
public void setCompanyCode(String companyCode) {
|
||||
this.companyCode = companyCode;
|
||||
}
|
||||
|
||||
public String getTreeAreaNames() {
|
||||
return treeAreaNames;
|
||||
}
|
||||
|
||||
public void setTreeAreaNames(String treeAreaNames) {
|
||||
this.treeAreaNames = treeAreaNames;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,255 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.tamguo.modules.sys.model.enums.SysMenuStatusEnum;
|
||||
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_menu database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_menu")
|
||||
public class SysMenuEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String ROOT_MENU_CODE = "0";
|
||||
public static final String TREE_CODE_MENU_SEPARATE = ",";
|
||||
public static final String TREE_NAME_MENU_SEPARATE = "/";
|
||||
|
||||
@TableId
|
||||
private String menuCode;
|
||||
private String createBy;
|
||||
private Date createDate;
|
||||
private String isShow;
|
||||
private String menuColor;
|
||||
private String menuHref;
|
||||
private String menuIcon;
|
||||
private String menuName;
|
||||
private String menuTarget;
|
||||
private String menuType;
|
||||
private String parentCode;
|
||||
private String parentCodes;
|
||||
private String permission;
|
||||
private String remarks;
|
||||
|
||||
@JSONField(serialzeFeatures= SerializerFeature.WriteEnumUsingToString)
|
||||
private SysMenuStatusEnum status;
|
||||
private String sysCode;
|
||||
private Boolean treeLeaf;
|
||||
private BigDecimal treeLevel;
|
||||
private String treeNames;
|
||||
private BigDecimal treeSort;
|
||||
private String treeSorts;
|
||||
private String updateBy;
|
||||
private Date updateDate;
|
||||
private BigDecimal weight;
|
||||
|
||||
public SysMenuEntity() {
|
||||
}
|
||||
|
||||
public String getMenuCode() {
|
||||
return this.menuCode;
|
||||
}
|
||||
|
||||
public void setMenuCode(String menuCode) {
|
||||
this.menuCode = menuCode;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return this.createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getIsShow() {
|
||||
return this.isShow;
|
||||
}
|
||||
|
||||
public void setIsShow(String isShow) {
|
||||
this.isShow = isShow;
|
||||
}
|
||||
|
||||
public String getMenuColor() {
|
||||
return this.menuColor;
|
||||
}
|
||||
|
||||
public void setMenuColor(String menuColor) {
|
||||
this.menuColor = menuColor;
|
||||
}
|
||||
|
||||
public String getMenuHref() {
|
||||
return this.menuHref;
|
||||
}
|
||||
|
||||
public void setMenuHref(String menuHref) {
|
||||
this.menuHref = menuHref;
|
||||
}
|
||||
|
||||
public String getMenuIcon() {
|
||||
return this.menuIcon;
|
||||
}
|
||||
|
||||
public void setMenuIcon(String menuIcon) {
|
||||
this.menuIcon = menuIcon;
|
||||
}
|
||||
|
||||
public String getMenuName() {
|
||||
return this.menuName;
|
||||
}
|
||||
|
||||
public void setMenuName(String menuName) {
|
||||
this.menuName = menuName;
|
||||
}
|
||||
|
||||
public String getMenuTarget() {
|
||||
return this.menuTarget;
|
||||
}
|
||||
|
||||
public void setMenuTarget(String menuTarget) {
|
||||
this.menuTarget = menuTarget;
|
||||
}
|
||||
|
||||
public String getMenuType() {
|
||||
return this.menuType;
|
||||
}
|
||||
|
||||
public void setMenuType(String menuType) {
|
||||
this.menuType = menuType;
|
||||
}
|
||||
|
||||
public String getParentCode() {
|
||||
return this.parentCode;
|
||||
}
|
||||
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public String getParentCodes() {
|
||||
return this.parentCodes;
|
||||
}
|
||||
|
||||
public void setParentCodes(String parentCodes) {
|
||||
this.parentCodes = parentCodes;
|
||||
}
|
||||
|
||||
public String getPermission() {
|
||||
return this.permission;
|
||||
}
|
||||
|
||||
public void setPermission(String permission) {
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
|
||||
public String getSysCode() {
|
||||
return this.sysCode;
|
||||
}
|
||||
|
||||
public void setSysCode(String sysCode) {
|
||||
this.sysCode = sysCode;
|
||||
}
|
||||
|
||||
public BigDecimal getTreeLevel() {
|
||||
return this.treeLevel;
|
||||
}
|
||||
|
||||
public void setTreeLevel(BigDecimal treeLevel) {
|
||||
this.treeLevel = treeLevel;
|
||||
}
|
||||
|
||||
public String getTreeNames() {
|
||||
return this.treeNames;
|
||||
}
|
||||
|
||||
public void setTreeNames(String treeNames) {
|
||||
this.treeNames = treeNames;
|
||||
}
|
||||
|
||||
public BigDecimal getTreeSort() {
|
||||
return this.treeSort;
|
||||
}
|
||||
|
||||
public void setTreeSort(BigDecimal treeSort) {
|
||||
this.treeSort = treeSort;
|
||||
}
|
||||
|
||||
public String getTreeSorts() {
|
||||
return this.treeSorts;
|
||||
}
|
||||
|
||||
public void setTreeSorts(String treeSorts) {
|
||||
this.treeSorts = treeSorts;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateDate() {
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(Date updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public BigDecimal getWeight() {
|
||||
return this.weight;
|
||||
}
|
||||
|
||||
public void setWeight(BigDecimal weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
// grid tree
|
||||
public String getId() {
|
||||
return getMenuCode();
|
||||
}
|
||||
|
||||
public SysMenuStatusEnum getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(SysMenuStatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Boolean getTreeLeaf() {
|
||||
return treeLeaf;
|
||||
}
|
||||
|
||||
public void setTreeLeaf(Boolean treeLeaf) {
|
||||
this.treeLeaf = treeLeaf;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,257 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_office database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_office")
|
||||
public class SysOfficeEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public static final String ROOT_OFFICE_CODE = "0";
|
||||
public static final String TREE_CODE_OFFICE_SEPARATE = ",";
|
||||
public static final String TREE_NAME_OFFICE_SEPARATE = "/";
|
||||
|
||||
@TableId
|
||||
private String officeCode;
|
||||
private String address;
|
||||
private String corpCode;
|
||||
private String corpName;
|
||||
private String createBy;
|
||||
private Date createDate;
|
||||
private String email;
|
||||
private String fullName;
|
||||
private String leader;
|
||||
private String officeName;
|
||||
private String officeType;
|
||||
private String parentCode;
|
||||
private String parentCodes;
|
||||
private String phone;
|
||||
private String remarks;
|
||||
private String status;
|
||||
private Boolean treeLeaf;
|
||||
private BigDecimal treeLevel;
|
||||
private String treeNames;
|
||||
private BigDecimal treeSort;
|
||||
private String treeSorts;
|
||||
private String updateBy;
|
||||
private Date updateDate;
|
||||
private String viewCode;
|
||||
private String zipCode;
|
||||
|
||||
public SysOfficeEntity() {
|
||||
}
|
||||
|
||||
public String getOfficeCode() {
|
||||
return this.officeCode;
|
||||
}
|
||||
|
||||
public void setOfficeCode(String officeCode) {
|
||||
this.officeCode = officeCode;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return this.address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getCorpCode() {
|
||||
return this.corpCode;
|
||||
}
|
||||
|
||||
public void setCorpCode(String corpCode) {
|
||||
this.corpCode = corpCode;
|
||||
}
|
||||
|
||||
public String getCorpName() {
|
||||
return this.corpName;
|
||||
}
|
||||
|
||||
public void setCorpName(String corpName) {
|
||||
this.corpName = corpName;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return this.createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return this.email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return this.fullName;
|
||||
}
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getLeader() {
|
||||
return this.leader;
|
||||
}
|
||||
|
||||
public void setLeader(String leader) {
|
||||
this.leader = leader;
|
||||
}
|
||||
|
||||
public String getOfficeName() {
|
||||
return this.officeName;
|
||||
}
|
||||
|
||||
public void setOfficeName(String officeName) {
|
||||
this.officeName = officeName;
|
||||
}
|
||||
|
||||
public String getOfficeType() {
|
||||
return this.officeType;
|
||||
}
|
||||
|
||||
public void setOfficeType(String officeType) {
|
||||
this.officeType = officeType;
|
||||
}
|
||||
|
||||
public String getParentCode() {
|
||||
return this.parentCode;
|
||||
}
|
||||
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public String getParentCodes() {
|
||||
return this.parentCodes;
|
||||
}
|
||||
|
||||
public void setParentCodes(String parentCodes) {
|
||||
this.parentCodes = parentCodes;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return this.phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Boolean getTreeLeaf() {
|
||||
return this.treeLeaf;
|
||||
}
|
||||
|
||||
public void setTreeLeaf(Boolean treeLeaf) {
|
||||
this.treeLeaf = treeLeaf;
|
||||
}
|
||||
|
||||
public BigDecimal getTreeLevel() {
|
||||
return this.treeLevel;
|
||||
}
|
||||
|
||||
public void setTreeLevel(BigDecimal treeLevel) {
|
||||
this.treeLevel = treeLevel;
|
||||
}
|
||||
|
||||
public String getTreeNames() {
|
||||
return this.treeNames;
|
||||
}
|
||||
|
||||
public void setTreeNames(String treeNames) {
|
||||
this.treeNames = treeNames;
|
||||
}
|
||||
|
||||
public BigDecimal getTreeSort() {
|
||||
return this.treeSort;
|
||||
}
|
||||
|
||||
public void setTreeSort(BigDecimal treeSort) {
|
||||
this.treeSort = treeSort;
|
||||
}
|
||||
|
||||
public String getTreeSorts() {
|
||||
return this.treeSorts;
|
||||
}
|
||||
|
||||
public void setTreeSorts(String treeSorts) {
|
||||
this.treeSorts = treeSorts;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateDate() {
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(Date updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public String getViewCode() {
|
||||
return this.viewCode;
|
||||
}
|
||||
|
||||
public void setViewCode(String viewCode) {
|
||||
this.viewCode = viewCode;
|
||||
}
|
||||
|
||||
public String getZipCode() {
|
||||
return this.zipCode;
|
||||
}
|
||||
|
||||
public void setZipCode(String zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
|
||||
// grid tree
|
||||
public String getId() {
|
||||
return this.getOfficeCode();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.baomidou.mybatisplus.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.tamguo.modules.sys.model.enums.SysPostStatusEnum;
|
||||
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_post database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_post")
|
||||
public class SysPostEntity extends Model<SysPostEntity> implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private String postCode;
|
||||
private String corpCode;
|
||||
private String corpName;
|
||||
private String createBy;
|
||||
private Date createDate;
|
||||
private String postName;
|
||||
private BigDecimal postSort;
|
||||
private String postType;
|
||||
private String remarks;
|
||||
|
||||
@JSONField(serialzeFeatures= SerializerFeature.WriteEnumUsingToString)
|
||||
private SysPostStatusEnum status;
|
||||
private String updateBy;
|
||||
private Date updateDate;
|
||||
|
||||
public SysPostEntity() {
|
||||
}
|
||||
|
||||
public String getPostCode() {
|
||||
return this.postCode;
|
||||
}
|
||||
|
||||
public void setPostCode(String postCode) {
|
||||
this.postCode = postCode;
|
||||
}
|
||||
|
||||
public String getCorpCode() {
|
||||
return this.corpCode;
|
||||
}
|
||||
|
||||
public void setCorpCode(String corpCode) {
|
||||
this.corpCode = corpCode;
|
||||
}
|
||||
|
||||
public String getCorpName() {
|
||||
return this.corpName;
|
||||
}
|
||||
|
||||
public void setCorpName(String corpName) {
|
||||
this.corpName = corpName;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return this.createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getPostName() {
|
||||
return this.postName;
|
||||
}
|
||||
|
||||
public void setPostName(String postName) {
|
||||
this.postName = postName;
|
||||
}
|
||||
|
||||
public BigDecimal getPostSort() {
|
||||
return this.postSort;
|
||||
}
|
||||
|
||||
public void setPostSort(BigDecimal postSort) {
|
||||
this.postSort = postSort;
|
||||
}
|
||||
|
||||
public String getPostType() {
|
||||
return this.postType;
|
||||
}
|
||||
|
||||
public void setPostType(String postType) {
|
||||
this.postType = postType;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public SysPostStatusEnum getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(SysPostStatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateDate() {
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(Date updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return getPostCode();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
|
||||
@TableName(value="sys_role_data_scope")
|
||||
public class SysRoleDataScopeEntity {
|
||||
|
||||
private String roleCode;
|
||||
private String ctrlType;
|
||||
private String ctrlData;
|
||||
private String ctrlPermi;
|
||||
|
||||
public String getRoleCode() {
|
||||
return roleCode;
|
||||
}
|
||||
public void setRoleCode(String roleCode) {
|
||||
this.roleCode = roleCode;
|
||||
}
|
||||
public String getCtrlType() {
|
||||
return ctrlType;
|
||||
}
|
||||
public void setCtrlType(String ctrlType) {
|
||||
this.ctrlType = ctrlType;
|
||||
}
|
||||
public String getCtrlData() {
|
||||
return ctrlData;
|
||||
}
|
||||
public void setCtrlData(String ctrlData) {
|
||||
this.ctrlData = ctrlData;
|
||||
}
|
||||
public String getCtrlPermi() {
|
||||
return ctrlPermi;
|
||||
}
|
||||
public void setCtrlPermi(String ctrlPermi) {
|
||||
this.ctrlPermi = ctrlPermi;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,185 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableField;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_role database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_role")
|
||||
public class SysRoleEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private String roleCode;
|
||||
private String corpCode;
|
||||
private String corpName;
|
||||
private String createBy;
|
||||
private Date createDate;
|
||||
private String dataScope;
|
||||
private String isSys;
|
||||
private String remarks;
|
||||
private String roleName;
|
||||
private BigDecimal roleSort;
|
||||
private String roleType;
|
||||
private String status;
|
||||
private String updateBy;
|
||||
private Date updateDate;
|
||||
private String userType;
|
||||
|
||||
@TableField(exist=false)
|
||||
private String roleMenuListJson;
|
||||
@TableField(exist=false)
|
||||
private String roleDataScopeListJson;
|
||||
|
||||
public SysRoleEntity() {
|
||||
}
|
||||
|
||||
public String getRoleCode() {
|
||||
return this.roleCode;
|
||||
}
|
||||
|
||||
public void setRoleCode(String roleCode) {
|
||||
this.roleCode = roleCode;
|
||||
}
|
||||
|
||||
public String getCorpCode() {
|
||||
return this.corpCode;
|
||||
}
|
||||
|
||||
public void setCorpCode(String corpCode) {
|
||||
this.corpCode = corpCode;
|
||||
}
|
||||
|
||||
public String getCorpName() {
|
||||
return this.corpName;
|
||||
}
|
||||
|
||||
public void setCorpName(String corpName) {
|
||||
this.corpName = corpName;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return this.createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getDataScope() {
|
||||
return this.dataScope;
|
||||
}
|
||||
|
||||
public void setDataScope(String dataScope) {
|
||||
this.dataScope = dataScope;
|
||||
}
|
||||
|
||||
public String getIsSys() {
|
||||
return this.isSys;
|
||||
}
|
||||
|
||||
public void setIsSys(String isSys) {
|
||||
this.isSys = isSys;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRoleName() {
|
||||
return this.roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
public BigDecimal getRoleSort() {
|
||||
return this.roleSort;
|
||||
}
|
||||
|
||||
public void setRoleSort(BigDecimal roleSort) {
|
||||
this.roleSort = roleSort;
|
||||
}
|
||||
|
||||
public String getRoleType() {
|
||||
return this.roleType;
|
||||
}
|
||||
|
||||
public void setRoleType(String roleType) {
|
||||
this.roleType = roleType;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateDate() {
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(Date updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public String getUserType() {
|
||||
return this.userType;
|
||||
}
|
||||
|
||||
public void setUserType(String userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return getRoleCode();
|
||||
}
|
||||
|
||||
public String getRoleMenuListJson() {
|
||||
return roleMenuListJson;
|
||||
}
|
||||
|
||||
public void setRoleMenuListJson(String roleMenuListJson) {
|
||||
this.roleMenuListJson = roleMenuListJson;
|
||||
}
|
||||
|
||||
public String getRoleDataScopeListJson() {
|
||||
return roleDataScopeListJson;
|
||||
}
|
||||
|
||||
public void setRoleDataScopeListJson(String roleDataScopeListJson) {
|
||||
this.roleDataScopeListJson = roleDataScopeListJson;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
|
||||
@TableName(value="sys_role_menu")
|
||||
public class SysRoleMenuEntity {
|
||||
|
||||
private String roleCode;
|
||||
private String menuCode;
|
||||
|
||||
public String getRoleCode() {
|
||||
return roleCode;
|
||||
}
|
||||
public void setRoleCode(String roleCode) {
|
||||
this.roleCode = roleCode;
|
||||
}
|
||||
public String getMenuCode() {
|
||||
return menuCode;
|
||||
}
|
||||
public void setMenuCode(String menuCode) {
|
||||
this.menuCode = menuCode;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
|
||||
@TableName(value="sys_user_data_scope")
|
||||
public class SysUserDataScopeEntity {
|
||||
|
||||
private String userCode;
|
||||
private String ctrlType;
|
||||
private String ctrlData;
|
||||
private String ctrlPermi;
|
||||
public String getUserCode() {
|
||||
return userCode;
|
||||
}
|
||||
public void setUserCode(String userCode) {
|
||||
this.userCode = userCode;
|
||||
}
|
||||
public String getCtrlType() {
|
||||
return ctrlType;
|
||||
}
|
||||
public void setCtrlType(String ctrlType) {
|
||||
this.ctrlType = ctrlType;
|
||||
}
|
||||
public String getCtrlData() {
|
||||
return ctrlData;
|
||||
}
|
||||
public void setCtrlData(String ctrlData) {
|
||||
this.ctrlData = ctrlData;
|
||||
}
|
||||
public String getCtrlPermi() {
|
||||
return ctrlPermi;
|
||||
}
|
||||
public void setCtrlPermi(String ctrlPermi) {
|
||||
this.ctrlPermi = ctrlPermi;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,481 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.baomidou.mybatisplus.annotations.TableField;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.tamguo.modules.sys.model.enums.SysUserMgrTypeEnum;
|
||||
import com.tamguo.modules.sys.model.enums.SysUserStatusEnum;
|
||||
import com.tamguo.modules.sys.model.enums.SysUserTypeEnum;
|
||||
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_user database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_user")
|
||||
public class SysUserEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private String userCode;
|
||||
private String officeCode;
|
||||
private String officeName;
|
||||
private String companyCode;
|
||||
private String companyName;
|
||||
private String avatar;
|
||||
private String corpCode;
|
||||
private String corpName;
|
||||
private String createBy;
|
||||
private Date createDate;
|
||||
private String email;
|
||||
private String freezeCause;
|
||||
private Date freezeDate;
|
||||
private Date lastLoginDate;
|
||||
private String lastLoginIp;
|
||||
private String loginCode;
|
||||
|
||||
@JSONField(serialzeFeatures= SerializerFeature.WriteEnumUsingToString)
|
||||
private SysUserMgrTypeEnum mgrType;
|
||||
|
||||
private String mobile;
|
||||
private String mobileImei;
|
||||
private String password;
|
||||
private String phone;
|
||||
private Date pwdQuestUpdateDate;
|
||||
private String pwdQuestion;
|
||||
@TableField(value="pwd_question_2")
|
||||
private String pwdQuestion2;
|
||||
@TableField(value="pwd_question_3")
|
||||
private String pwdQuestion3;
|
||||
private String pwdQuestionAnswer;
|
||||
@TableField(value="pwd_question_answer_2")
|
||||
private String pwdQuestionAnswer2;
|
||||
@TableField(value="pwd_question_answer_3")
|
||||
private String pwdQuestionAnswer3;
|
||||
private BigDecimal pwdSecurityLevel;
|
||||
private Date pwdUpdateDate;
|
||||
private String pwdUpdateRecord;
|
||||
private String refCode;
|
||||
private String refName;
|
||||
private String remarks;
|
||||
private String sex;
|
||||
private String sign;
|
||||
|
||||
@JSONField(serialzeFeatures= SerializerFeature.WriteEnumUsingToString)
|
||||
private SysUserStatusEnum status;
|
||||
|
||||
private String updateBy;
|
||||
private Date updateDate;
|
||||
private String userName;
|
||||
private String empName;
|
||||
|
||||
@JSONField(serialzeFeatures= SerializerFeature.WriteEnumUsingToString)
|
||||
private SysUserTypeEnum userType;
|
||||
|
||||
private BigDecimal userWeight;
|
||||
private String wxOpenid;
|
||||
private String userNameEn;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> employeePosts;
|
||||
@TableField(exist=false)
|
||||
private String userRoleString;
|
||||
@TableField(exist=false)
|
||||
private String userDataScopeListJson;
|
||||
|
||||
public SysUserEntity() {
|
||||
}
|
||||
|
||||
public String getUserCode() {
|
||||
return this.userCode;
|
||||
}
|
||||
|
||||
public void setUserCode(String userCode) {
|
||||
this.userCode = userCode;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return this.avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getCorpCode() {
|
||||
return this.corpCode;
|
||||
}
|
||||
|
||||
public void setCorpCode(String corpCode) {
|
||||
this.corpCode = corpCode;
|
||||
}
|
||||
|
||||
public String getCorpName() {
|
||||
return this.corpName;
|
||||
}
|
||||
|
||||
public void setCorpName(String corpName) {
|
||||
this.corpName = corpName;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return this.createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return this.email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getFreezeCause() {
|
||||
return this.freezeCause;
|
||||
}
|
||||
|
||||
public void setFreezeCause(String freezeCause) {
|
||||
this.freezeCause = freezeCause;
|
||||
}
|
||||
|
||||
public Date getFreezeDate() {
|
||||
return this.freezeDate;
|
||||
}
|
||||
|
||||
public void setFreezeDate(Date freezeDate) {
|
||||
this.freezeDate = freezeDate;
|
||||
}
|
||||
|
||||
public Date getLastLoginDate() {
|
||||
return this.lastLoginDate;
|
||||
}
|
||||
|
||||
public void setLastLoginDate(Date lastLoginDate) {
|
||||
this.lastLoginDate = lastLoginDate;
|
||||
}
|
||||
|
||||
public String getLastLoginIp() {
|
||||
return this.lastLoginIp;
|
||||
}
|
||||
|
||||
public void setLastLoginIp(String lastLoginIp) {
|
||||
this.lastLoginIp = lastLoginIp;
|
||||
}
|
||||
|
||||
public String getLoginCode() {
|
||||
return this.loginCode;
|
||||
}
|
||||
|
||||
public void setLoginCode(String loginCode) {
|
||||
this.loginCode = loginCode;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return this.mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getMobileImei() {
|
||||
return this.mobileImei;
|
||||
}
|
||||
|
||||
public void setMobileImei(String mobileImei) {
|
||||
this.mobileImei = mobileImei;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return this.password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return this.phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public Date getPwdQuestUpdateDate() {
|
||||
return this.pwdQuestUpdateDate;
|
||||
}
|
||||
|
||||
public void setPwdQuestUpdateDate(Date pwdQuestUpdateDate) {
|
||||
this.pwdQuestUpdateDate = pwdQuestUpdateDate;
|
||||
}
|
||||
|
||||
public String getPwdQuestion() {
|
||||
return this.pwdQuestion;
|
||||
}
|
||||
|
||||
public void setPwdQuestion(String pwdQuestion) {
|
||||
this.pwdQuestion = pwdQuestion;
|
||||
}
|
||||
|
||||
public String getPwdQuestion2() {
|
||||
return this.pwdQuestion2;
|
||||
}
|
||||
|
||||
public void setPwdQuestion2(String pwdQuestion2) {
|
||||
this.pwdQuestion2 = pwdQuestion2;
|
||||
}
|
||||
|
||||
public String getPwdQuestion3() {
|
||||
return this.pwdQuestion3;
|
||||
}
|
||||
|
||||
public void setPwdQuestion3(String pwdQuestion3) {
|
||||
this.pwdQuestion3 = pwdQuestion3;
|
||||
}
|
||||
|
||||
public String getPwdQuestionAnswer() {
|
||||
return this.pwdQuestionAnswer;
|
||||
}
|
||||
|
||||
public void setPwdQuestionAnswer(String pwdQuestionAnswer) {
|
||||
this.pwdQuestionAnswer = pwdQuestionAnswer;
|
||||
}
|
||||
|
||||
public String getPwdQuestionAnswer2() {
|
||||
return this.pwdQuestionAnswer2;
|
||||
}
|
||||
|
||||
public void setPwdQuestionAnswer2(String pwdQuestionAnswer2) {
|
||||
this.pwdQuestionAnswer2 = pwdQuestionAnswer2;
|
||||
}
|
||||
|
||||
public String getPwdQuestionAnswer3() {
|
||||
return this.pwdQuestionAnswer3;
|
||||
}
|
||||
|
||||
public void setPwdQuestionAnswer3(String pwdQuestionAnswer3) {
|
||||
this.pwdQuestionAnswer3 = pwdQuestionAnswer3;
|
||||
}
|
||||
|
||||
public BigDecimal getPwdSecurityLevel() {
|
||||
return this.pwdSecurityLevel;
|
||||
}
|
||||
|
||||
public void setPwdSecurityLevel(BigDecimal pwdSecurityLevel) {
|
||||
this.pwdSecurityLevel = pwdSecurityLevel;
|
||||
}
|
||||
|
||||
public Date getPwdUpdateDate() {
|
||||
return this.pwdUpdateDate;
|
||||
}
|
||||
|
||||
public void setPwdUpdateDate(Date pwdUpdateDate) {
|
||||
this.pwdUpdateDate = pwdUpdateDate;
|
||||
}
|
||||
|
||||
public String getPwdUpdateRecord() {
|
||||
return this.pwdUpdateRecord;
|
||||
}
|
||||
|
||||
public void setPwdUpdateRecord(String pwdUpdateRecord) {
|
||||
this.pwdUpdateRecord = pwdUpdateRecord;
|
||||
}
|
||||
|
||||
public String getRefCode() {
|
||||
return this.refCode;
|
||||
}
|
||||
|
||||
public void setRefCode(String refCode) {
|
||||
this.refCode = refCode;
|
||||
}
|
||||
|
||||
public String getRefName() {
|
||||
return this.refName;
|
||||
}
|
||||
|
||||
public void setRefName(String refName) {
|
||||
this.refName = refName;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return this.sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return this.sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public SysUserStatusEnum getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(SysUserStatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateDate() {
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(Date updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return this.userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public BigDecimal getUserWeight() {
|
||||
return this.userWeight;
|
||||
}
|
||||
|
||||
public void setUserWeight(BigDecimal userWeight) {
|
||||
this.userWeight = userWeight;
|
||||
}
|
||||
|
||||
public String getWxOpenid() {
|
||||
return this.wxOpenid;
|
||||
}
|
||||
|
||||
public void setWxOpenid(String wxOpenid) {
|
||||
this.wxOpenid = wxOpenid;
|
||||
}
|
||||
|
||||
public String getOfficeCode() {
|
||||
return officeCode;
|
||||
}
|
||||
|
||||
public void setOfficeCode(String officeCode) {
|
||||
this.officeCode = officeCode;
|
||||
}
|
||||
|
||||
public String getOfficeName() {
|
||||
return officeName;
|
||||
}
|
||||
|
||||
public void setOfficeName(String officeName) {
|
||||
this.officeName = officeName;
|
||||
}
|
||||
|
||||
public String getCompanyCode() {
|
||||
return companyCode;
|
||||
}
|
||||
|
||||
public void setCompanyCode(String companyCode) {
|
||||
this.companyCode = companyCode;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public SysUserMgrTypeEnum getMgrType() {
|
||||
return mgrType;
|
||||
}
|
||||
|
||||
public void setMgrType(SysUserMgrTypeEnum mgrType) {
|
||||
this.mgrType = mgrType;
|
||||
}
|
||||
|
||||
public String getUserNameEn() {
|
||||
return userNameEn;
|
||||
}
|
||||
|
||||
public void setUserNameEn(String userNameEn) {
|
||||
this.userNameEn = userNameEn;
|
||||
}
|
||||
|
||||
public List<String> getEmployeePosts() {
|
||||
return employeePosts;
|
||||
}
|
||||
|
||||
public void setEmployeePosts(List<String> employeePosts) {
|
||||
this.employeePosts = employeePosts;
|
||||
}
|
||||
|
||||
public String getEmpName() {
|
||||
return empName;
|
||||
}
|
||||
|
||||
public void setEmpName(String empName) {
|
||||
this.empName = empName;
|
||||
}
|
||||
|
||||
public String getUserRoleString() {
|
||||
return userRoleString;
|
||||
}
|
||||
|
||||
public void setUserRoleString(String userRoleString) {
|
||||
this.userRoleString = userRoleString;
|
||||
}
|
||||
|
||||
public SysUserTypeEnum getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(SysUserTypeEnum userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getUserDataScopeListJson() {
|
||||
return userDataScopeListJson;
|
||||
}
|
||||
|
||||
public void setUserDataScopeListJson(String userDataScopeListJson) {
|
||||
this.userDataScopeListJson = userDataScopeListJson;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
|
||||
@TableName(value="sys_user_post")
|
||||
public class SysUserPostEntity {
|
||||
|
||||
private String userCode;
|
||||
private String postCode;
|
||||
public String getUserCode() {
|
||||
return userCode;
|
||||
}
|
||||
public void setUserCode(String userCode) {
|
||||
this.userCode = userCode;
|
||||
}
|
||||
public String getPostCode() {
|
||||
return postCode;
|
||||
}
|
||||
public void setPostCode(String postCode) {
|
||||
this.postCode = postCode;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
|
||||
@TableName(value="sys_user_role")
|
||||
public class SysUserRoleEntity {
|
||||
|
||||
private String userCode;
|
||||
private String roleCode;
|
||||
|
||||
public String getRoleCode() {
|
||||
return roleCode;
|
||||
}
|
||||
public void setRoleCode(String roleCode) {
|
||||
this.roleCode = roleCode;
|
||||
}
|
||||
public String getUserCode() {
|
||||
return userCode;
|
||||
}
|
||||
public void setUserCode(String userCode) {
|
||||
this.userCode = userCode;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.tamguo.modules.sys.model.condition;
|
||||
|
||||
public class SysAreaCondition {
|
||||
|
||||
private String parentCode;
|
||||
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
|
||||
public Integer getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
public void setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
public String getParentCode() {
|
||||
return parentCode;
|
||||
}
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.tamguo.modules.sys.model.condition;
|
||||
|
||||
public class SysCompanyCondition {
|
||||
|
||||
private String parentCode;
|
||||
private String companyName;
|
||||
private String fullName;
|
||||
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
public String getParentCode() {
|
||||
return parentCode;
|
||||
}
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.tamguo.modules.sys.model.condition;
|
||||
|
||||
public class SysMenuCondition {
|
||||
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
|
||||
public Integer getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
public void setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.tamguo.modules.sys.model.condition;
|
||||
|
||||
public class SysOfficeCondition {
|
||||
|
||||
private String parentCode;
|
||||
|
||||
public String getParentCode() {
|
||||
return parentCode;
|
||||
}
|
||||
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.tamguo.modules.sys.model.condition;
|
||||
|
||||
public class SysPostCondition {
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
private String postType;
|
||||
private String status;
|
||||
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getPostType() {
|
||||
return postType;
|
||||
}
|
||||
public void setPostType(String postType) {
|
||||
this.postType = postType;
|
||||
}
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
public Integer getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
public void setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.tamguo.modules.sys.model.condition;
|
||||
|
||||
public class SysRoleCondition {
|
||||
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
|
||||
public Integer getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
public void setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package com.tamguo.modules.sys.model.condition;
|
||||
|
||||
public class SysUserCondition {
|
||||
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
|
||||
private String loginCode;
|
||||
private String userName;
|
||||
private String email;
|
||||
private String mobile;
|
||||
private String phone;
|
||||
private String refName;
|
||||
private String officeName;
|
||||
private String officeCode;
|
||||
private String companyCode;
|
||||
private String companyName;
|
||||
private String postCode;
|
||||
private String status;
|
||||
private String userType;
|
||||
|
||||
private String orderBy;
|
||||
|
||||
public Integer getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
public void setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
public String getLoginCode() {
|
||||
return loginCode;
|
||||
}
|
||||
public void setLoginCode(String loginCode) {
|
||||
this.loginCode = loginCode;
|
||||
}
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
public String getRefName() {
|
||||
return refName;
|
||||
}
|
||||
public void setRefName(String refName) {
|
||||
this.refName = refName;
|
||||
}
|
||||
public String getOfficeName() {
|
||||
return officeName;
|
||||
}
|
||||
public void setOfficeName(String officeName) {
|
||||
this.officeName = officeName;
|
||||
}
|
||||
public String getOfficeCode() {
|
||||
return officeCode;
|
||||
}
|
||||
public void setOfficeCode(String officeCode) {
|
||||
this.officeCode = officeCode;
|
||||
}
|
||||
public String getCompanyCode() {
|
||||
return companyCode;
|
||||
}
|
||||
public void setCompanyCode(String companyCode) {
|
||||
this.companyCode = companyCode;
|
||||
}
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
public String getPostCode() {
|
||||
return postCode;
|
||||
}
|
||||
public void setPostCode(String postCode) {
|
||||
this.postCode = postCode;
|
||||
}
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
public String getUserType() {
|
||||
return userType;
|
||||
}
|
||||
public void setUserType(String userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
public String getOrderBy() {
|
||||
return orderBy;
|
||||
}
|
||||
public void setOrderBy(String orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.tamguo.modules.sys.model.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.enums.IEnum;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
public enum SysCompanyStatusEnum implements IEnum {
|
||||
NORMAL("normal", "正常"),
|
||||
DELETE("delete", "删除"),
|
||||
DISABLED("disabled" , "停用");
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
SysCompanyStatusEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Serializable getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc(){
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.tamguo.modules.sys.model.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.enums.IEnum;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
public enum SysMenuStatusEnum implements IEnum {
|
||||
NORMAL("0", "正常"),
|
||||
DELETE("1" , "删除"),
|
||||
DISABLED("2" , "停用");
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
SysMenuStatusEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Serializable getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc(){
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.tamguo.modules.sys.model.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.enums.IEnum;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
public enum SysOfficeStatusEnum implements IEnum {
|
||||
NORMAL("normal", "正常"),
|
||||
DELETE("delete", "删除"),
|
||||
DISABLED("disabled" , "停用");
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
SysOfficeStatusEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Serializable getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc(){
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.tamguo.modules.sys.model.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.enums.IEnum;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
public enum SysOfficeTypeEnum implements IEnum {
|
||||
PROVINCE("province", "省级公司"),
|
||||
CITY("city", "市级公司"),
|
||||
DEPARTMENT("department" , "部门");
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
SysOfficeTypeEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Serializable getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc(){
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.tamguo.modules.sys.model.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.enums.IEnum;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
public enum SysPostStatusEnum implements IEnum {
|
||||
NORMAL("normal", "正常"),
|
||||
DISABLED("disable" , "停用");
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
SysPostStatusEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Serializable getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc(){
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.tamguo.modules.sys.model.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.enums.IEnum;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
public enum SysPostTypeEnum implements IEnum {
|
||||
GAOGUAN("gaoguan", "高管"),
|
||||
ZHONGCENG("zhongceng", "中层"),
|
||||
JICENG("jiceng" , "基层"),
|
||||
QITA("qita" , "其他");
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
SysPostTypeEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static SysPostTypeEnum getPostType(String postType) {
|
||||
if("gaoguan".equals(postType)) {
|
||||
return SysPostTypeEnum.GAOGUAN;
|
||||
}else if("zhongceng".equals(postType)) {
|
||||
return SysPostTypeEnum.ZHONGCENG;
|
||||
}else if("jiceng".equals(postType)) {
|
||||
return SysPostTypeEnum.JICENG;
|
||||
}else if("qita".equals(postType)) {
|
||||
return SysPostTypeEnum.QITA;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Serializable getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc(){
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.tamguo.modules.sys.model.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.enums.IEnum;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
public enum SysUserMgrTypeEnum implements IEnum {
|
||||
NONE_ADMIN("0", "非系统管理员"),
|
||||
SYSTEM_ADMIN("1", "系统管理员"),
|
||||
SEC_ADMIN("2" , "二级管理员");
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
SysUserMgrTypeEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Serializable getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc(){
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.tamguo.modules.sys.model.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.enums.IEnum;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
public enum SysUserStatusEnum implements IEnum {
|
||||
NORMAL("0", "正常"),
|
||||
DELETE("1" , "删除"),
|
||||
DISABLED("2" , "禁用"),
|
||||
LOCKED("3", "锁定"),;
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
SysUserStatusEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Serializable getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc(){
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.tamguo.modules.sys.model.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.enums.IEnum;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
public enum SysUserTypeEnum implements IEnum {
|
||||
EMPLOYEE("employee", "雇员"),
|
||||
NONE("none", "系统");
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
SysUserTypeEnum(final String value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Serializable getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc(){
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.tamguo.modules.sys.model.SysAreaEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysAreaCondition;
|
||||
|
||||
public interface ISysAreaService extends IService<SysAreaEntity>{
|
||||
|
||||
List<SysAreaEntity> listData(SysAreaCondition condition);
|
||||
|
||||
JSONArray treeData(String excludeId);
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.tamguo.modules.sys.model.SysCompanyEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysCompanyCondition;
|
||||
|
||||
public interface ISysCompanyService extends IService<SysCompanyEntity>{
|
||||
|
||||
/** 公司树形结构*/
|
||||
JSONArray treeData(String excludeId);
|
||||
|
||||
/** 查询公司列表*/
|
||||
List<SysCompanyEntity> listData(SysCompanyCondition condition);
|
||||
|
||||
/** 根据ID查询公司*/
|
||||
SysCompanyEntity selectByCode(String code);
|
||||
|
||||
/** 新建公司*/
|
||||
void save(SysCompanyEntity company);
|
||||
|
||||
/** 修改公司*/
|
||||
void update(SysCompanyEntity company);
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.tamguo.modules.sys.model.SysMenuEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysMenuCondition;
|
||||
|
||||
public interface ISysMenuService extends IService<SysMenuEntity>{
|
||||
|
||||
/** 列表数据*/
|
||||
List<SysMenuEntity> listData(SysMenuCondition condition);
|
||||
|
||||
/** 树形结构*/
|
||||
JSONArray treeData(String excludeId);
|
||||
|
||||
/** 新增菜单*/
|
||||
void save(SysMenuEntity menu);
|
||||
|
||||
/** 修改菜单*/
|
||||
void update(SysMenuEntity menu);
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.tamguo.modules.sys.model.SysOfficeEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysOfficeCondition;
|
||||
|
||||
public interface ISysOfficeService extends IService<SysOfficeEntity>{
|
||||
|
||||
List<SysOfficeEntity> listData(SysOfficeCondition condition);
|
||||
|
||||
JSONArray treeData(String excludeId);
|
||||
|
||||
void save(SysOfficeEntity office);
|
||||
|
||||
void update(SysOfficeEntity office);
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.tamguo.modules.sys.model.SysPostEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysPostCondition;
|
||||
|
||||
public interface ISysPostService extends IService<SysPostEntity>{
|
||||
|
||||
/** 查询列表*/
|
||||
Page<SysPostEntity> listData(SysPostCondition condition);
|
||||
|
||||
/** 添加数据*/
|
||||
void add(SysPostEntity post);
|
||||
|
||||
/** 修改数据*/
|
||||
void update(SysPostEntity post);
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.tamguo.modules.sys.model.SysRoleDataScopeEntity;
|
||||
|
||||
public interface ISysRoleDataScopeService extends IService<SysRoleDataScopeEntity>{
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.tamguo.modules.sys.model.SysRoleEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysRoleCondition;
|
||||
|
||||
public interface ISysRoleService extends IService<SysRoleEntity>{
|
||||
|
||||
/** 列表查询*/
|
||||
Page<SysRoleEntity> listData(SysRoleCondition condition);
|
||||
|
||||
/** 属性菜单*/
|
||||
Map<String, Object> menuTreeData(String roleCode);
|
||||
|
||||
/** 分配功能权限*/
|
||||
void allowMenuPermission(SysRoleEntity role);
|
||||
|
||||
/** 授权数据权限*/
|
||||
void allowDataScope(SysRoleEntity role);
|
||||
|
||||
/** 角色树形结构*/
|
||||
List<SysRoleEntity> treeDate(String userType);
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.tamguo.modules.sys.model.SysUserDataScopeEntity;
|
||||
import com.tamguo.modules.sys.model.SysUserEntity;
|
||||
import com.tamguo.modules.sys.model.SysUserRoleEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysUserCondition;
|
||||
import com.tamguo.modules.sys.utils.Result;
|
||||
|
||||
public interface ISysUserService extends IService<SysUserEntity>{
|
||||
|
||||
public SysUserEntity queryByLoginCode(String loginCode);
|
||||
|
||||
public Page<SysUserEntity> listData(SysUserCondition condition);
|
||||
|
||||
/** 用户岗位*/
|
||||
public String queryUserPostByUserCode(String userCode);
|
||||
|
||||
/** 检查登录账号*/
|
||||
public Boolean checkLoginCode(String oldLoginCode , String loginCode);
|
||||
|
||||
/** 更新用户信息*/
|
||||
public void update(SysUserEntity user);
|
||||
|
||||
/** 添加用户信息*/
|
||||
public void save(SysUserEntity user);
|
||||
|
||||
/** 分配角色*/
|
||||
public void allowUserRole(SysUserEntity user);
|
||||
|
||||
/** 获取用户角色*/
|
||||
public List<SysUserRoleEntity> findUserRole(String userCode);
|
||||
|
||||
/** 用户数据权限*/
|
||||
public List<SysUserDataScopeEntity> selectUserDataScope(String userCode);
|
||||
|
||||
/** 保存用户数据权限*/
|
||||
public void saveUserDataScope(SysUserEntity user);
|
||||
|
||||
/** 停用账号*/
|
||||
public Result disable(String userCode);
|
||||
|
||||
/** 激活账号*/
|
||||
public Result enable(String userCode);
|
||||
|
||||
/** 删除用户*/
|
||||
public Result delete(String userCode);
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.tamguo.modules.sys.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.mapper.Condition;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.tamguo.modules.sys.dao.SysAreaMapper;
|
||||
import com.tamguo.modules.sys.model.SysAreaEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysAreaCondition;
|
||||
import com.tamguo.modules.sys.service.ISysAreaService;
|
||||
|
||||
@Service
|
||||
public class SysAreaServiceImpl extends ServiceImpl<SysAreaMapper, SysAreaEntity> implements ISysAreaService{
|
||||
|
||||
@Autowired
|
||||
SysAreaMapper sysAreaMapper;
|
||||
|
||||
@Override
|
||||
public List<SysAreaEntity> listData(SysAreaCondition condition) {
|
||||
return sysAreaMapper.listData(condition);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public JSONArray treeData(String excludeId) {
|
||||
List<SysAreaEntity> areaList = null;
|
||||
if(StringUtils.isEmpty(excludeId)) {
|
||||
areaList = sysAreaMapper.selectList(Condition.EMPTY);
|
||||
}else {
|
||||
areaList = sysAreaMapper.selectList(Condition.create().notLike("parent_codes", excludeId).ne("area_code", excludeId));
|
||||
}
|
||||
return turnZTreeData(areaList);
|
||||
}
|
||||
|
||||
private JSONArray turnZTreeData(List<SysAreaEntity> areaList) {
|
||||
if(areaList != null) {
|
||||
JSONArray nodes = new JSONArray();
|
||||
for(int i=0 ; i<areaList.size() ; i++) {
|
||||
JSONObject node = new JSONObject();
|
||||
|
||||
SysAreaEntity area = areaList.get(i);
|
||||
node.put("name", area.getAreaName());
|
||||
node.put("id", area.getId());
|
||||
node.put("pId", area.getParentCode());
|
||||
node.put("title", area.getAreaName());
|
||||
nodes.add(node);
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
package com.tamguo.modules.sys.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.mapper.Condition;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.tamguo.modules.sys.dao.SysCompanyMapper;
|
||||
import com.tamguo.modules.sys.model.SysCompanyEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysCompanyCondition;
|
||||
import com.tamguo.modules.sys.service.ISysCompanyService;
|
||||
import com.tamguo.modules.sys.utils.ShiroUtils;
|
||||
|
||||
@Service
|
||||
public class SysCompanyServiceImpl extends ServiceImpl<SysCompanyMapper, SysCompanyEntity> implements ISysCompanyService {
|
||||
|
||||
@Autowired
|
||||
private SysCompanyMapper sysCompanyMapper;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public JSONArray treeData(String excludeId) {
|
||||
List<SysCompanyEntity> companyList = null;
|
||||
if(StringUtils.isEmpty(excludeId)) {
|
||||
companyList = sysCompanyMapper.selectList(Condition.EMPTY);
|
||||
}else {
|
||||
companyList = sysCompanyMapper.selectList(Condition.create().notLike("parent_codes", excludeId).ne("company_code", excludeId));
|
||||
}
|
||||
return turnZTreeData(companyList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysCompanyEntity> listData(SysCompanyCondition condition) {
|
||||
return sysCompanyMapper.listData(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysCompanyEntity selectByCode(String code) {
|
||||
return sysCompanyMapper.selectByCode(code);
|
||||
}
|
||||
|
||||
private JSONArray turnZTreeData(List<SysCompanyEntity> companyList) {
|
||||
if(companyList != null) {
|
||||
JSONArray nodes = new JSONArray();
|
||||
for(int i=0 ; i<companyList.size() ; i++) {
|
||||
JSONObject node = new JSONObject();
|
||||
|
||||
SysCompanyEntity company = companyList.get(i);
|
||||
node.put("name", company.getCompanyName());
|
||||
node.put("id", company.getId());
|
||||
node.put("pId", company.getParentCode());
|
||||
node.put("title", company.getFullName());
|
||||
nodes.add(node);
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void save(SysCompanyEntity company) {
|
||||
|
||||
company.setCreateBy(ShiroUtils.getUserCode());
|
||||
company.setCreateDate(new Date());
|
||||
company.setUpdateBy(ShiroUtils.getUserCode());
|
||||
company.setUpdateDate(new Date());
|
||||
company.setCompanyCode(company.getViewCode());
|
||||
|
||||
// 更新树形结构
|
||||
this.handleTreeData(company);
|
||||
|
||||
sysCompanyMapper.insert(company);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void update(SysCompanyEntity company) {
|
||||
SysCompanyEntity entity = sysCompanyMapper.selectByCode(company.getCompanyCode());
|
||||
|
||||
String oldParentCode = entity.getParentCode();
|
||||
|
||||
entity.setUpdateBy(ShiroUtils.getUserCode());
|
||||
entity.setUpdateDate(new Date());
|
||||
entity.setAreaCode(company.getAreaCode());
|
||||
entity.setCompanyCode(company.getCompanyCode());
|
||||
entity.setCompanyName(company.getCompanyName());
|
||||
entity.setCorpCode(company.getCorpCode());
|
||||
entity.setCorpName(company.getCorpName());
|
||||
entity.setFullName(company.getFullName());
|
||||
entity.setParentCode(company.getParentCode());
|
||||
|
||||
// 更新树形结构
|
||||
this.handleTreeData(company);
|
||||
|
||||
sysCompanyMapper.updateById(entity);
|
||||
|
||||
// 更新旧的节点
|
||||
Integer count = sysCompanyMapper.selectCount(Condition.create().eq("parent_code", oldParentCode).ne("company_code", oldParentCode));
|
||||
if(count == 0) {
|
||||
SysCompanyEntity oldParentCompany = sysCompanyMapper.selectById(oldParentCode);
|
||||
oldParentCompany.setTreeLeaf(true);
|
||||
sysCompanyMapper.updateById(oldParentCompany);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理树形结构
|
||||
@SuppressWarnings("unchecked")
|
||||
private SysCompanyEntity handleTreeData(SysCompanyEntity company) {
|
||||
if(StringUtils.isEmpty(company.getParentCode())) {
|
||||
company.setParentCode(SysCompanyEntity.ROOT_COMPANY_CODE);
|
||||
company.setParentCodes(SysCompanyEntity.ROOT_COMPANY_CODE + SysCompanyEntity.TREE_CODE_COMPANY_SEPARATE);
|
||||
company.setTreeLeaf(true);
|
||||
company.setTreeLevel(new BigDecimal(0));
|
||||
company.setTreeNames(company.getCompanyName());
|
||||
company.setTreeSorts("00000000" + company.getTreeSort() + SysCompanyEntity.ROOT_COMPANY_CODE);
|
||||
} else {
|
||||
SysCompanyEntity parentCompany = sysCompanyMapper.selectById(company.getParentCode());
|
||||
|
||||
company.setParentCodes(parentCompany.getParentCodes() + parentCompany.getCompanyCode() + SysCompanyEntity.TREE_CODE_COMPANY_SEPARATE);
|
||||
company.setTreeLeaf(true);
|
||||
|
||||
company.setTreeLevel(parentCompany.getTreeLevel().add(new BigDecimal(1)));
|
||||
company.setTreeNames(parentCompany.getTreeNames() + SysCompanyEntity.TREE_NAME_COMPANY_SEPARATE + parentCompany.getCompanyName());
|
||||
company.setTreeSorts(parentCompany.getTreeSorts() + ("00000000" +company.getTreeSort()) + SysCompanyEntity.TREE_CODE_COMPANY_SEPARATE);
|
||||
|
||||
if(parentCompany.getTreeLeaf()) {
|
||||
parentCompany.setTreeLeaf(false);
|
||||
sysCompanyMapper.updateById(parentCompany);
|
||||
}
|
||||
}
|
||||
Integer count = sysCompanyMapper.selectCount(Condition.create().eq("parent_code", company.getCompanyCode()));
|
||||
if(count > 0) {
|
||||
company.setTreeLeaf(false);
|
||||
}else {
|
||||
company.setTreeLeaf(true);
|
||||
}
|
||||
return company;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,159 @@
|
||||
package com.tamguo.modules.sys.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.mapper.Condition;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.tamguo.modules.sys.dao.SysMenuMapper;
|
||||
import com.tamguo.modules.sys.model.SysMenuEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysMenuCondition;
|
||||
import com.tamguo.modules.sys.model.enums.SysMenuStatusEnum;
|
||||
import com.tamguo.modules.sys.service.ISysMenuService;
|
||||
import com.tamguo.modules.sys.utils.ShiroUtils;
|
||||
|
||||
@Service
|
||||
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenuEntity> implements ISysMenuService {
|
||||
|
||||
@Autowired
|
||||
SysMenuMapper sysMenuMapper;
|
||||
|
||||
@Override
|
||||
public List<SysMenuEntity> listData(SysMenuCondition condition) {
|
||||
return sysMenuMapper.listData(condition);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=true)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public JSONArray treeData(String excludeId) {
|
||||
List<SysMenuEntity> menus = null;
|
||||
if(StringUtils.isEmpty(excludeId)) {
|
||||
menus = sysMenuMapper.selectList(Condition.EMPTY);
|
||||
}else {
|
||||
menus = sysMenuMapper.selectList(Condition.create().notLike("parent_codes", excludeId).ne("menu_code", excludeId));
|
||||
}
|
||||
return turnZTreeData(menus);
|
||||
}
|
||||
|
||||
private JSONArray turnZTreeData(List<SysMenuEntity> menus) {
|
||||
if(menus != null) {
|
||||
JSONArray nodes = new JSONArray();
|
||||
for(int i=0 ; i<menus.size() ; i++) {
|
||||
JSONObject node = new JSONObject();
|
||||
|
||||
SysMenuEntity menu = menus.get(i);
|
||||
node.put("name", menu.getMenuName());
|
||||
node.put("id", menu.getId());
|
||||
node.put("pId", menu.getParentCode());
|
||||
node.put("title", menu.getMenuName());
|
||||
nodes.add(node);
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void save(SysMenuEntity menu) {
|
||||
menu.setCreateBy(ShiroUtils.getUserCode());
|
||||
menu.setCreateDate(new Date());
|
||||
menu.setUpdateBy(ShiroUtils.getUserCode());
|
||||
menu.setUpdateDate(new Date());
|
||||
menu.setStatus(SysMenuStatusEnum.NORMAL);
|
||||
// 父节点
|
||||
if(StringUtils.isEmpty(menu.getParentCode())) {
|
||||
menu.setTreeLeaf(true);
|
||||
menu.setTreeLevel(new BigDecimal(0));
|
||||
menu.setTreeNames(menu.getMenuName() + ",");
|
||||
}else {
|
||||
SysMenuEntity parentMenu = sysMenuMapper.selectById(menu.getParentCode());
|
||||
|
||||
menu.setTreeLeaf(true);
|
||||
menu.setTreeLevel(parentMenu.getTreeLevel().add(new BigDecimal(1)));
|
||||
menu.setTreeNames(parentMenu.getTreeNames() +"/"+ menu.getMenuName());
|
||||
menu.setParentCodes(parentMenu.getParentCodes() + menu.getParentCode() + ",");
|
||||
|
||||
parentMenu.setTreeLeaf(false);
|
||||
sysMenuMapper.updateById(parentMenu);
|
||||
}
|
||||
menu.setTreeSorts(menu.getTreeSort() + ",");
|
||||
sysMenuMapper.insert(menu);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void update(SysMenuEntity menu) {
|
||||
SysMenuEntity entity = sysMenuMapper.selectById(menu.getMenuCode());
|
||||
String oldParentCode = entity.getParentCode();
|
||||
|
||||
entity.setUpdateBy(ShiroUtils.getUserCode());
|
||||
entity.setUpdateDate(new Date());
|
||||
entity.setIsShow(menu.getIsShow());
|
||||
entity.setMenuCode(menu.getMenuCode());
|
||||
entity.setMenuColor(menu.getMenuColor());
|
||||
entity.setMenuHref(menu.getMenuHref());
|
||||
entity.setMenuIcon(menu.getMenuIcon());
|
||||
entity.setMenuName(menu.getMenuName());
|
||||
entity.setMenuTarget(menu.getMenuTarget());
|
||||
entity.setMenuType(menu.getMenuType());
|
||||
entity.setPermission(menu.getPermission());
|
||||
entity.setRemarks(menu.getRemarks());
|
||||
entity.setWeight(menu.getWeight());
|
||||
entity.setParentCode(menu.getParentCode());
|
||||
this.handleTreeData(entity);
|
||||
sysMenuMapper.updateById(entity);
|
||||
|
||||
// 更新旧的节点
|
||||
Integer count = sysMenuMapper.selectCount(Condition.create().eq("parent_code", oldParentCode).ne("menu_code", oldParentCode));
|
||||
if(count == 0) {
|
||||
SysMenuEntity oldParentMenu = sysMenuMapper.selectById(oldParentCode);
|
||||
oldParentMenu.setTreeLeaf(true);
|
||||
sysMenuMapper.updateById(oldParentMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理树形结构
|
||||
@SuppressWarnings("unchecked")
|
||||
private SysMenuEntity handleTreeData(SysMenuEntity menu) {
|
||||
if(StringUtils.isEmpty(menu.getParentCode())) {
|
||||
menu.setParentCode(SysMenuEntity.ROOT_MENU_CODE);
|
||||
menu.setParentCodes(SysMenuEntity.ROOT_MENU_CODE + SysMenuEntity.TREE_CODE_MENU_SEPARATE);
|
||||
menu.setTreeLeaf(true);
|
||||
menu.setTreeLevel(new BigDecimal(0));
|
||||
menu.setTreeNames(menu.getMenuName());
|
||||
menu.setTreeSorts(menu.getTreeSort().multiply(new BigDecimal(10000000)).toString() + SysMenuEntity.TREE_CODE_MENU_SEPARATE);
|
||||
} else {
|
||||
SysMenuEntity parentMenu = sysMenuMapper.selectById(menu.getParentCode());
|
||||
|
||||
menu.setParentCodes(parentMenu.getParentCodes() + parentMenu.getMenuCode() + SysMenuEntity.TREE_CODE_MENU_SEPARATE);
|
||||
menu.setTreeLeaf(true);
|
||||
|
||||
menu.setTreeLevel(parentMenu.getTreeLevel().add(new BigDecimal(1)));
|
||||
menu.setTreeNames(parentMenu.getTreeNames() + SysMenuEntity.TREE_NAME_MENU_SEPARATE + parentMenu.getMenuName());
|
||||
menu.setTreeSorts(parentMenu.getTreeSorts() + menu.getTreeSort().multiply(new BigDecimal(10000000)).toString() + SysMenuEntity.TREE_CODE_MENU_SEPARATE);
|
||||
|
||||
if(parentMenu.getTreeLeaf()) {
|
||||
parentMenu.setTreeLeaf(false);
|
||||
sysMenuMapper.updateById(parentMenu);
|
||||
}
|
||||
}
|
||||
Integer count = sysMenuMapper.selectCount(Condition.create().eq("parent_code", menu.getMenuCode()));
|
||||
if(count > 0) {
|
||||
menu.setTreeLeaf(false);
|
||||
}else {
|
||||
menu.setTreeLeaf(true);
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
package com.tamguo.modules.sys.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.mapper.Condition;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.tamguo.modules.sys.dao.SysOfficeMapper;
|
||||
import com.tamguo.modules.sys.model.SysOfficeEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysOfficeCondition;
|
||||
import com.tamguo.modules.sys.service.ISysOfficeService;
|
||||
import com.tamguo.modules.sys.utils.ShiroUtils;
|
||||
|
||||
@Service
|
||||
public class SysOfficeServiceImpl extends ServiceImpl<SysOfficeMapper, SysOfficeEntity> implements ISysOfficeService {
|
||||
|
||||
@Autowired
|
||||
private SysOfficeMapper sysOfficeMapper;
|
||||
|
||||
@Override
|
||||
public List<SysOfficeEntity> listData(SysOfficeCondition condition) {
|
||||
return sysOfficeMapper.listData(condition);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public JSONArray treeData(String excludeId) {
|
||||
List<SysOfficeEntity> officeList = null;
|
||||
if(StringUtils.isEmpty(excludeId)) {
|
||||
officeList = sysOfficeMapper.selectList(Condition.EMPTY);
|
||||
}else {
|
||||
officeList = sysOfficeMapper.selectList(Condition.create().notLike("parent_codes", excludeId).ne("office_code", excludeId));
|
||||
}
|
||||
return turnZTreeData(officeList);
|
||||
}
|
||||
|
||||
private JSONArray turnZTreeData(List<SysOfficeEntity> companyList) {
|
||||
if(companyList != null) {
|
||||
JSONArray nodes = new JSONArray();
|
||||
for(int i=0 ; i<companyList.size() ; i++) {
|
||||
JSONObject node = new JSONObject();
|
||||
|
||||
SysOfficeEntity office = companyList.get(i);
|
||||
node.put("name", office.getOfficeName());
|
||||
node.put("id", office.getId());
|
||||
node.put("pId", office.getParentCode());
|
||||
node.put("title", office.getFullName());
|
||||
nodes.add(node);
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void save(SysOfficeEntity office) {
|
||||
office.setCreateBy(ShiroUtils.getUserCode());
|
||||
office.setCreateDate(new Date());
|
||||
office.setUpdateBy(ShiroUtils.getUserCode());
|
||||
office.setUpdateDate(new Date());
|
||||
office.setOfficeCode(office.getViewCode());
|
||||
// 处理属性结构
|
||||
this.handleTreeData(office);
|
||||
|
||||
sysOfficeMapper.insert(office);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void update(SysOfficeEntity office) {
|
||||
SysOfficeEntity oldOffice = sysOfficeMapper.selectById(office.getOfficeCode());
|
||||
|
||||
String oldParentCode = oldOffice.getParentCode();
|
||||
|
||||
oldOffice.setAddress(office.getAddress());
|
||||
oldOffice.setCorpCode(office.getCorpCode());
|
||||
oldOffice.setCorpName(office.getCorpName());
|
||||
oldOffice.setEmail(office.getEmail());
|
||||
oldOffice.setFullName(office.getFullName());
|
||||
oldOffice.setLeader(office.getLeader());
|
||||
oldOffice.setOfficeCode(office.getOfficeCode());
|
||||
oldOffice.setOfficeName(office.getOfficeName());
|
||||
oldOffice.setOfficeType(office.getOfficeType());
|
||||
oldOffice.setParentCode(office.getParentCode());
|
||||
oldOffice.setRemarks(office.getRemarks());
|
||||
oldOffice.setPhone(office.getPhone());
|
||||
|
||||
// 处理属性结构
|
||||
this.handleTreeData(oldOffice);
|
||||
sysOfficeMapper.updateById(oldOffice);
|
||||
|
||||
// 更新旧的节点
|
||||
Integer count = sysOfficeMapper.selectCount(Condition.create().eq("parent_code", oldParentCode).ne("office_code", oldParentCode));
|
||||
if(count == 0) {
|
||||
SysOfficeEntity oldParentOffice = sysOfficeMapper.selectById(oldParentCode);
|
||||
oldParentOffice.setTreeLeaf(true);
|
||||
sysOfficeMapper.updateById(oldParentOffice);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理树形结构
|
||||
@SuppressWarnings("unchecked")
|
||||
private SysOfficeEntity handleTreeData(SysOfficeEntity office) {
|
||||
if(StringUtils.isEmpty(office.getParentCode())) {
|
||||
office.setParentCode(SysOfficeEntity.ROOT_OFFICE_CODE);
|
||||
office.setParentCodes(SysOfficeEntity.ROOT_OFFICE_CODE + SysOfficeEntity.TREE_CODE_OFFICE_SEPARATE);
|
||||
office.setTreeLeaf(true);
|
||||
office.setTreeLevel(new BigDecimal(0));
|
||||
office.setTreeNames(office.getOfficeName());
|
||||
office.setTreeSorts(office.getTreeSort().multiply(new BigDecimal(10000000)).toString() + SysOfficeEntity.TREE_CODE_OFFICE_SEPARATE);
|
||||
} else {
|
||||
SysOfficeEntity parentOffice = sysOfficeMapper.selectById(office.getParentCode());
|
||||
|
||||
office.setParentCodes(parentOffice.getParentCodes() + parentOffice.getOfficeCode() + SysOfficeEntity.TREE_CODE_OFFICE_SEPARATE);
|
||||
office.setTreeLeaf(true);
|
||||
|
||||
office.setTreeLevel(parentOffice.getTreeLevel().add(new BigDecimal(1)));
|
||||
office.setTreeNames(parentOffice.getTreeNames() + SysOfficeEntity.TREE_NAME_OFFICE_SEPARATE + parentOffice.getOfficeName());
|
||||
office.setTreeSorts(parentOffice.getTreeSorts() + office.getTreeSort().multiply(new BigDecimal(10000000)).toString() + SysOfficeEntity.TREE_CODE_OFFICE_SEPARATE);
|
||||
|
||||
if(parentOffice.getTreeLeaf()) {
|
||||
parentOffice.setTreeLeaf(false);
|
||||
sysOfficeMapper.updateById(parentOffice);
|
||||
}
|
||||
}
|
||||
Integer count = sysOfficeMapper.selectCount(Condition.create().eq("parent_code", office.getOfficeCode()));
|
||||
if(count > 0) {
|
||||
office.setTreeLeaf(false);
|
||||
}else {
|
||||
office.setTreeLeaf(true);
|
||||
}
|
||||
return office;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.tamguo.modules.sys.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.tamguo.modules.sys.dao.SysPostMapper;
|
||||
import com.tamguo.modules.sys.model.SysPostEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysPostCondition;
|
||||
import com.tamguo.modules.sys.model.enums.SysPostStatusEnum;
|
||||
import com.tamguo.modules.sys.service.ISysPostService;
|
||||
import com.tamguo.modules.sys.utils.ShiroUtils;
|
||||
|
||||
@Service
|
||||
public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPostEntity> implements ISysPostService{
|
||||
|
||||
@Autowired
|
||||
private SysPostMapper sysPostMapper;
|
||||
|
||||
@Override
|
||||
public Page<SysPostEntity> listData(SysPostCondition condition) {
|
||||
Page<SysPostEntity> page = new Page<>(condition.getPageNo(), condition.getPageSize());
|
||||
return page.setRecords(sysPostMapper.listData(condition , page));
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void add(SysPostEntity post) {
|
||||
post.setCreateDate(new Date());
|
||||
post.setCreateBy(ShiroUtils.getUserCode());
|
||||
post.setUpdateBy(ShiroUtils.getUserCode());
|
||||
post.setUpdateDate(new Date());
|
||||
post.setStatus(SysPostStatusEnum.NORMAL);
|
||||
sysPostMapper.insert(post);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void update(SysPostEntity post) {
|
||||
SysPostEntity entity = sysPostMapper.selectById(post.getPostCode());
|
||||
entity.setUpdateDate(new Date());
|
||||
entity.setUpdateBy(ShiroUtils.getUserCode());
|
||||
entity.setPostName(post.getPostName());
|
||||
entity.setPostCode(post.getPostCode());
|
||||
entity.setPostType(post.getPostType());
|
||||
entity.setPostSort(post.getPostSort());
|
||||
entity.setRemarks(post.getRemarks());
|
||||
|
||||
sysPostMapper.updateById(entity);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.tamguo.modules.sys.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.tamguo.modules.sys.dao.SysRoleDataScopeMapper;
|
||||
import com.tamguo.modules.sys.model.SysRoleDataScopeEntity;
|
||||
import com.tamguo.modules.sys.service.ISysRoleDataScopeService;
|
||||
|
||||
@Service
|
||||
public class SysRoleDataScopeServiceImpl extends ServiceImpl<SysRoleDataScopeMapper, SysRoleDataScopeEntity> implements ISysRoleDataScopeService{
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,236 @@
|
||||
package com.tamguo.modules.sys.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.mapper.Condition;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.toolkit.CollectionUtils;
|
||||
import com.tamguo.modules.sys.dao.SysUserDataScopeMapper;
|
||||
import com.tamguo.modules.sys.dao.SysUserMapper;
|
||||
import com.tamguo.modules.sys.dao.SysUserPostMapper;
|
||||
import com.tamguo.modules.sys.dao.SysUserRoleMapper;
|
||||
import com.tamguo.modules.sys.model.SysUserDataScopeEntity;
|
||||
import com.tamguo.modules.sys.model.SysUserEntity;
|
||||
import com.tamguo.modules.sys.model.SysUserPostEntity;
|
||||
import com.tamguo.modules.sys.model.SysUserRoleEntity;
|
||||
import com.tamguo.modules.sys.model.condition.SysUserCondition;
|
||||
import com.tamguo.modules.sys.model.enums.SysUserMgrTypeEnum;
|
||||
import com.tamguo.modules.sys.model.enums.SysUserStatusEnum;
|
||||
import com.tamguo.modules.sys.model.enums.SysUserTypeEnum;
|
||||
import com.tamguo.modules.sys.service.ISysRoleService;
|
||||
import com.tamguo.modules.sys.service.ISysUserService;
|
||||
import com.tamguo.modules.sys.utils.Result;
|
||||
import com.tamguo.modules.sys.utils.ShiroUtils;
|
||||
import com.tamguo.modules.sys.utils.TamguoConstant;
|
||||
|
||||
@Service
|
||||
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUserEntity> implements ISysUserService{
|
||||
|
||||
@Autowired
|
||||
public SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
public SysUserPostMapper sysUserPostMapper;
|
||||
@Autowired
|
||||
public SysUserRoleMapper sysUserRoleMapper;
|
||||
@Autowired
|
||||
public ISysRoleService iSysRoleService;
|
||||
@Autowired
|
||||
public SysUserDataScopeMapper sysUserDataScopeMapper;
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public SysUserEntity queryByLoginCode(String loginCode) {
|
||||
SysUserEntity condition = new SysUserEntity();
|
||||
condition.setLoginCode(loginCode);
|
||||
return sysUserMapper.selectOne(condition);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public Page<SysUserEntity> listData(SysUserCondition condition) {
|
||||
Page<SysUserEntity> page = new Page<>(condition.getPageNo() , condition.getPageSize());
|
||||
return page.setRecords(sysUserMapper.listData(condition , page));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public String queryUserPostByUserCode(String userCode) {
|
||||
Condition condition = Condition.create();
|
||||
condition.eq("user_code", userCode);
|
||||
List<SysUserPostEntity> userPostList = sysUserPostMapper.selectList(condition);
|
||||
|
||||
List<String> postCodes = new LinkedList<>();
|
||||
for(int i=0 ; i<userPostList.size() ; i++) {
|
||||
postCodes.add(userPostList.get(i).getPostCode());
|
||||
}
|
||||
return StringUtils.join(postCodes, ",");
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Boolean checkLoginCode(String oldLoginCode, String loginCode) {
|
||||
Condition condition = Condition.create();
|
||||
condition.eq("login_code", loginCode);
|
||||
condition.ne("login_code", oldLoginCode);
|
||||
List<SysUserEntity> userList = sysUserMapper.selectList(condition);
|
||||
return CollectionUtils.isEmpty(userList);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void update(SysUserEntity user) {
|
||||
SysUserEntity entity = sysUserMapper.selectById(user.getUserCode());
|
||||
entity.setOfficeCode(user.getOfficeCode());
|
||||
entity.setOfficeName(user.getOfficeName());
|
||||
entity.setCompanyCode(user.getCompanyCode());
|
||||
entity.setCompanyName(user.getCompanyName());
|
||||
entity.setLoginCode(user.getLoginCode());
|
||||
entity.setUserName(user.getUserName());
|
||||
entity.setEmail(user.getEmail());
|
||||
entity.setMobile(user.getMobile());
|
||||
entity.setPhone(user.getPhone());
|
||||
entity.setUserWeight(user.getUserWeight());
|
||||
entity.setRefName(user.getRefName());
|
||||
entity.setUserNameEn(user.getUserNameEn());
|
||||
entity.setRemarks(user.getRemarks());
|
||||
sysUserMapper.updateById(entity);
|
||||
|
||||
// 删除记录
|
||||
sysUserPostMapper.delete(Condition.create().eq("user_code", user.getUserCode()));
|
||||
// 处理岗位
|
||||
List<String> employeePosts = user.getEmployeePosts();
|
||||
for(int i=0 ; i<employeePosts.size() ; i++) {
|
||||
SysUserPostEntity userPost = new SysUserPostEntity();
|
||||
userPost.setPostCode(employeePosts.get(i));
|
||||
userPost.setUserCode(user.getUserCode());
|
||||
sysUserPostMapper.insert(userPost);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void save(SysUserEntity user) {
|
||||
user.setCreateBy(ShiroUtils.getUserCode());
|
||||
user.setCreateDate(new Date());
|
||||
user.setStatus(SysUserStatusEnum.NORMAL);
|
||||
// 设置初始密码
|
||||
user.setPassword(TamguoConstant.INIT_PASSWORD);
|
||||
user.setUserType(SysUserTypeEnum.EMPLOYEE);
|
||||
user.setMgrType(SysUserMgrTypeEnum.NONE_ADMIN);
|
||||
user.setUpdateBy(ShiroUtils.getUserCode());
|
||||
user.setUpdateDate(new Date());
|
||||
sysUserMapper.insert(user);
|
||||
|
||||
// 处理岗位
|
||||
List<String> employeePosts = user.getEmployeePosts();
|
||||
for(int i=0 ; i<employeePosts.size() ; i++) {
|
||||
SysUserPostEntity userPost = new SysUserPostEntity();
|
||||
userPost.setPostCode(employeePosts.get(i));
|
||||
userPost.setUserCode(user.getUserCode());
|
||||
sysUserPostMapper.insert(userPost);
|
||||
}
|
||||
|
||||
// 处理角色
|
||||
if(!StringUtils.isEmpty(user.getUserRoleString())) {
|
||||
String[] roleCodes = user.getUserRoleString().split(",");
|
||||
for(String roleCode : roleCodes) {
|
||||
SysUserRoleEntity role = new SysUserRoleEntity();
|
||||
role.setRoleCode(roleCode);
|
||||
role.setUserCode(user.getUserCode());
|
||||
sysUserRoleMapper.insert(role);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void allowUserRole(SysUserEntity user) {
|
||||
// 删除角色记录
|
||||
sysUserRoleMapper.delete(Condition.create().eq("user_code", user.getUserCode()));
|
||||
|
||||
// 处理角色
|
||||
if(!StringUtils.isEmpty(user.getUserRoleString())) {
|
||||
String[] roleCodes = user.getUserRoleString().split(",");
|
||||
for(String roleCode : roleCodes) {
|
||||
SysUserRoleEntity role = new SysUserRoleEntity();
|
||||
role.setRoleCode(roleCode);
|
||||
role.setUserCode(user.getUserCode());
|
||||
sysUserRoleMapper.insert(role);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Transactional(readOnly=true)
|
||||
@Override
|
||||
public List<SysUserRoleEntity> findUserRole(String userCode) {
|
||||
return sysUserRoleMapper.selectList(Condition.create().eq("user_code", userCode));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Transactional(readOnly=true)
|
||||
@Override
|
||||
public List<SysUserDataScopeEntity> selectUserDataScope(String userCode) {
|
||||
return sysUserDataScopeMapper.selectList(Condition.create().eq("user_code", userCode));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void saveUserDataScope(SysUserEntity user) {
|
||||
// 删除之前的数据权限
|
||||
sysUserDataScopeMapper.delete(Condition.create().eq("user_code", user.getUserCode()));
|
||||
|
||||
if(!StringUtils.isEmpty(user.getUserDataScopeListJson())) {
|
||||
JSONArray dataScopeList = JSONArray.parseArray(user.getUserDataScopeListJson());
|
||||
for(int i=0 ; i<dataScopeList.size() ; i++) {
|
||||
SysUserDataScopeEntity entity = new SysUserDataScopeEntity();
|
||||
entity.setCtrlData(dataScopeList.getJSONObject(i).getString("ctrlData"));
|
||||
entity.setCtrlType(dataScopeList.getJSONObject(i).getString("ctrlType"));
|
||||
entity.setUserCode(user.getUserCode());
|
||||
entity.setCtrlPermi("2");
|
||||
sysUserDataScopeMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public Result disable(String userCode) {
|
||||
SysUserEntity user = sysUserMapper.selectById(userCode);
|
||||
user.setStatus(SysUserStatusEnum.DISABLED);
|
||||
sysUserMapper.updateById(user);
|
||||
return Result.result(0, null, "停用成功!");
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public Result enable(String userCode) {
|
||||
SysUserEntity user = sysUserMapper.selectById(userCode);
|
||||
user.setStatus(SysUserStatusEnum.NORMAL);
|
||||
sysUserMapper.updateById(user);
|
||||
return Result.result(0, null, "激活成功!");
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public Result delete(String userCode) {
|
||||
SysUserEntity user = sysUserMapper.selectById(userCode);
|
||||
user.setStatus(SysUserStatusEnum.DELETE);
|
||||
sysUserMapper.updateById(user);
|
||||
return Result.result(0, null, "删除成功!");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
import java.io.InterruptedIOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public abstract class AbstractRunningLogHandler implements LogHandler {
|
||||
|
||||
private static Method getStackTraceMethod;
|
||||
private static Method getClassNameMethod;
|
||||
private static Method getMethodNameMethod;
|
||||
private static Method getFileNameMethod;
|
||||
private static Method getLineNumberMethod;
|
||||
|
||||
static {
|
||||
try {
|
||||
Class<?>[] noArgs = null;
|
||||
getStackTraceMethod = Throwable.class.getMethod("getStackTrace", noArgs);
|
||||
Class<?> stackTraceElementClass = Class.forName("java.lang.StackTraceElement");
|
||||
getClassNameMethod = stackTraceElementClass.getMethod("getClassName", noArgs);
|
||||
getMethodNameMethod = stackTraceElementClass.getMethod("getMethodName", noArgs);
|
||||
getFileNameMethod = stackTraceElementClass.getMethod("getFileName", noArgs);
|
||||
getLineNumberMethod = stackTraceElementClass.getMethod("getLineNumber", noArgs);
|
||||
} catch (ClassNotFoundException ex) {
|
||||
LogDebug.debug("will use pre-JDK 1.4 methods to determine location.");
|
||||
} catch (NoSuchMethodException ex) {
|
||||
LogDebug.debug("will use pre-JDK 1.4 methods to determine location.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得指定class的StackTraceElement
|
||||
*
|
||||
* @param t
|
||||
* @param fqnOfCallingClass
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected StackTraceElement getRunningStackTrace(Throwable t, String fqnOfCallingClass) {
|
||||
if (getLineNumberMethod != null) {
|
||||
try {
|
||||
Object[] noArgs = null;
|
||||
Object[] elements = (Object[]) getStackTraceMethod.invoke(t, noArgs);
|
||||
for (int i = elements.length - 1; i >= 0; i--) {
|
||||
String thisClass = (String) getClassNameMethod.invoke(elements[i], noArgs);
|
||||
if (fqnOfCallingClass.equals(thisClass)) {
|
||||
// 执行class名称
|
||||
String className = fqnOfCallingClass;
|
||||
// 执行方法名称
|
||||
String methodName = (String) getMethodNameMethod.invoke(elements[i], noArgs);
|
||||
// 执行class文件名称
|
||||
String fileName = (String) getFileNameMethod.invoke(elements[i], noArgs);
|
||||
// 执行到行号
|
||||
int lineNumber = ((Integer) getLineNumberMethod.invoke(elements[i], noArgs)).intValue();
|
||||
return new StackTraceElement(className, methodName, fileName, lineNumber);
|
||||
}
|
||||
}
|
||||
} catch (IllegalAccessException ex) {
|
||||
LogDebug.debug("failed using JDK 1.4 methods", ex);
|
||||
} catch (InvocationTargetException ex) {
|
||||
if (ex.getTargetException() instanceof InterruptedException
|
||||
|| ex.getTargetException() instanceof InterruptedIOException) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
LogDebug.debug("failed using JDK 1.4 methods", ex);
|
||||
} catch (RuntimeException ex) {
|
||||
LogDebug.debug("failed using JDK 1.4 methods", ex);
|
||||
}
|
||||
}
|
||||
return this.createDefaultStackTrace();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建默认StackTraceElement
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private StackTraceElement createDefaultStackTrace() {
|
||||
return new StackTraceElement(this.getClass().getName(), "log", this.getClass().getName(), 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(String msg, String fqnOfCallingClass) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(String msg, Throwable t, String fqnOfCallingClass) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(String msg, String fqnOfCallingClass) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(String msg, Throwable t, String fqnOfCallingClass) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(String msg, String fqnOfCallingClass) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(String msg, Throwable t, String fqnOfCallingClass) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warning(String msg, String fqnOfCallingClass) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warning(String msg, Throwable t, String fqnOfCallingClass) {
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
public class CException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 6401592364022805815L;
|
||||
|
||||
public CException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public CException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public CException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
/**
|
||||
* 统一异常处理 日志处理
|
||||
*
|
||||
*/
|
||||
public class ExceptionSupport {
|
||||
|
||||
private final static Result failResult = Result.failResult("500");
|
||||
private static LogHandler handler = new Log4jHandler();
|
||||
|
||||
private final static String LOG_INFO_PREFIX = "--info>> ";
|
||||
private final static String LOG_ERROR_PREFIX = "--error>> ";
|
||||
|
||||
public static Result resolverResult(String methodInfo, Class<?> clazz, Exception e) {
|
||||
if(e instanceof CException) {
|
||||
handler.info(formatInfoLevelMsg(methodInfo, e.getMessage()), clazz.getName());
|
||||
return Result.failResult(e.getMessage());
|
||||
}
|
||||
handler.error(formatErrorLevelMsg(methodInfo), e, clazz.getName());
|
||||
return failResult;
|
||||
}
|
||||
|
||||
private static String formatInfoLevelMsg(String methodInfo, String infoMsg) {
|
||||
return LOG_INFO_PREFIX + methodInfo + ": " + infoMsg;
|
||||
}
|
||||
|
||||
private static String formatErrorLevelMsg(String methodInfo) {
|
||||
return LOG_ERROR_PREFIX + methodInfo;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
public class IdGen
|
||||
{
|
||||
private long workerId;
|
||||
private long datacenterId;
|
||||
private long sequence = 0L;
|
||||
private long twepoch = 1288834974657L;
|
||||
private long workerIdBits = 5L;
|
||||
private long datacenterIdBits = 5L;
|
||||
private long maxWorkerId = -1L ^ (-1L << workerIdBits);
|
||||
private long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
|
||||
private long sequenceBits = 12L;
|
||||
private long workerIdShift = sequenceBits;
|
||||
private long datacenterIdShift = sequenceBits + workerIdBits;
|
||||
private long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
|
||||
private long sequenceMask = -1L ^ (-1L << sequenceBits);
|
||||
private long lastTimestamp = -1L;
|
||||
private String suffix;
|
||||
private boolean flag;
|
||||
|
||||
private static class IdGenHolder {
|
||||
private static final IdGen instance = new IdGen();
|
||||
}
|
||||
|
||||
public static IdGen get(){
|
||||
return IdGenHolder.instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字符串拼接id
|
||||
* @param suffix 字符串
|
||||
* @param flag true:前缀 false:后缀
|
||||
* @return
|
||||
*/
|
||||
public static IdGen get(String suffix,boolean flag){
|
||||
if(suffix == null || suffix.trim().length() == 0)
|
||||
return IdGenHolder.instance;
|
||||
else{
|
||||
return new IdGen(suffix,flag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public IdGen() {
|
||||
this(0L, 0L);
|
||||
}
|
||||
|
||||
public IdGen(String suffix,boolean flag){
|
||||
this.suffix = suffix;
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public IdGen(long workerId, long datacenterId) {
|
||||
if (workerId > maxWorkerId || workerId < 0) {
|
||||
throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
|
||||
}
|
||||
if (datacenterId > maxDatacenterId || datacenterId < 0) {
|
||||
throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
|
||||
}
|
||||
this.workerId = workerId;
|
||||
this.datacenterId = datacenterId;
|
||||
}
|
||||
|
||||
public synchronized String nextId() {
|
||||
long timestamp = timeGen();
|
||||
if (timestamp < lastTimestamp) {
|
||||
throw new RuntimeException(String.format(
|
||||
"Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
|
||||
}
|
||||
if (lastTimestamp == timestamp) {
|
||||
sequence = (sequence + 1) & sequenceMask;
|
||||
if (sequence == 0) {
|
||||
timestamp = tilNextMillis(lastTimestamp);
|
||||
}
|
||||
} else {
|
||||
sequence = 0L;
|
||||
}
|
||||
lastTimestamp = timestamp;
|
||||
|
||||
long serialNumber = ((timestamp - twepoch) << timestampLeftShift) | (datacenterId << datacenterIdShift)
|
||||
| (workerId << workerIdShift) | sequence;
|
||||
|
||||
return (suffix == null || suffix.trim().length() == 0) ? serialNumber+"" : (flag ? (new StringBuffer()).append(suffix).append(serialNumber).toString() : (new StringBuffer()).append(serialNumber).append(suffix).toString());
|
||||
}
|
||||
|
||||
protected long tilNextMillis(long lastTimestamp) {
|
||||
long timestamp = timeGen();
|
||||
while (timestamp <= lastTimestamp) {
|
||||
timestamp = timeGen();
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
protected long timeGen() {
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.event.Level;
|
||||
|
||||
public class Log4jHandler extends AbstractRunningLogHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(Log4jHandler.class);
|
||||
|
||||
@Override
|
||||
public void info(String msg, String fqnOfCallingClass) {
|
||||
logger.info(fqnOfCallingClass, Level.INFO, msg, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(String msg, Throwable t, String fqnOfCallingClass) {
|
||||
logger.info(fqnOfCallingClass, Level.INFO, msg, t);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(String msg, String fqnOfCallingClass) {
|
||||
logger.error(fqnOfCallingClass, Level.ERROR, msg, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(String msg, Throwable t, String fqnOfCallingClass) {
|
||||
logger.error(fqnOfCallingClass, Level.ERROR, msg, t);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
public class LogDebug {
|
||||
|
||||
private final static String DEBUG_LOG_KEY = "-- LogHandler: ";
|
||||
|
||||
public static void debug(String msg) {
|
||||
System.err.println(DEBUG_LOG_KEY + msg);
|
||||
}
|
||||
|
||||
public static void debug(String msg, Throwable t) {
|
||||
System.err.println(DEBUG_LOG_KEY + msg);
|
||||
if (t != null)
|
||||
t.printStackTrace(System.err);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
public interface LogHandler {
|
||||
|
||||
public void info(String msg, String fqnOfCallingClass);
|
||||
|
||||
public void info(String msg, Throwable t, String fqnOfCallingClass);
|
||||
|
||||
public void error(String msg, String fqnOfCallingClass);
|
||||
|
||||
public void error(String msg, Throwable t, String fqnOfCallingClass);
|
||||
|
||||
public void debug(String msg, String fqnOfCallingClass);
|
||||
|
||||
public void debug(String msg, Throwable t, String fqnOfCallingClass);
|
||||
|
||||
public void warning(String msg, String fqnOfCallingClass);
|
||||
|
||||
public void warning(String msg, Throwable t, String fqnOfCallingClass);
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
|
||||
public class ObjectUtil extends SerializeTranscoder {
|
||||
@Override
|
||||
public byte[] serialize(Object value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException("Can't serialize null");
|
||||
}
|
||||
byte[] result = null;
|
||||
ByteArrayOutputStream bos = null;
|
||||
ObjectOutputStream os = null;
|
||||
try {
|
||||
bos = new ByteArrayOutputStream();
|
||||
os = new ObjectOutputStream(bos);
|
||||
os.writeObject(value);
|
||||
os.close();
|
||||
bos.close();
|
||||
result = bos.toByteArray();
|
||||
} catch (IOException e) {
|
||||
throw new IllegalArgumentException("Non-serializable object", e);
|
||||
} finally {
|
||||
close(os);
|
||||
close(bos);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object deserialize(byte[] in) {
|
||||
Object result = null;
|
||||
ByteArrayInputStream bis = null;
|
||||
ObjectInputStream is = null;
|
||||
try {
|
||||
if (in != null) {
|
||||
bis = new ByteArrayInputStream(in);
|
||||
is = new ObjectInputStream(bis);
|
||||
result = is.readObject();
|
||||
is.close();
|
||||
bis.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
close(is);
|
||||
close(bis);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static boolean equals(Object o1, Object o2) {
|
||||
|
||||
if (o1 == o2) {
|
||||
return true;
|
||||
} else if (o1 == null || o2 == null) {
|
||||
return false;
|
||||
} else {
|
||||
return o1.equals(o2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Result implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1651614836984397356L;
|
||||
|
||||
private int code;
|
||||
|
||||
private Object result;
|
||||
|
||||
private String message;
|
||||
|
||||
public static final int SUCCESS_CODE = 0;
|
||||
|
||||
public static final int FAIL_CODE = 1;
|
||||
|
||||
private Result() {
|
||||
}
|
||||
|
||||
private Result(int code, Object result, String message) {
|
||||
this.code = code;
|
||||
this.result = result;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功响应
|
||||
*
|
||||
* @param result
|
||||
* @return
|
||||
*/
|
||||
public static Result successResult(Object result) {
|
||||
return result(SUCCESS_CODE, result, "");
|
||||
}
|
||||
|
||||
public static Result successResult(Object records, Long recordSum, Long rowsOfPage) {
|
||||
return successResult(records, recordSum, rowsOfPage, null);
|
||||
}
|
||||
|
||||
public static Result successResult(Object records, Long recordSum, Long rowsOfPage, Object userData) {
|
||||
Map<String, Object> result = resultOfList(records, recordSum, rowsOfPage, userData);
|
||||
|
||||
return successResult(result);
|
||||
}
|
||||
|
||||
public static Map<String, Object> resultOfList(Object records, Long recordSum, Long rowsOfPage) {
|
||||
return resultOfList(records, recordSum, rowsOfPage, null);
|
||||
}
|
||||
|
||||
public static Map<String, Object> resultOfList(Object Obj, Long records, Long rowsOfPage, Object userData) {
|
||||
Map<String, Object> result = new HashMap<String, Object>();
|
||||
result.put("rows", Obj);
|
||||
result.put("records", records);
|
||||
result.put("total", rowsOfPage);
|
||||
if (null != userData) {
|
||||
result.put("userdata", userData);
|
||||
}
|
||||
;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<String, Object> jqGridResult(List<?> list, long totalCount, int pageSize, int currPage,
|
||||
int totalPage) {
|
||||
Map<String, Object> result = new HashMap<String, Object>();
|
||||
result.put("list", list);
|
||||
result.put("count", totalCount);
|
||||
result.put("next", currPage == totalPage ? currPage : currPage + 1);
|
||||
result.put("prev", currPage == 1 ? 1 : currPage - 1);
|
||||
result.put("first", 1);
|
||||
result.put("last", totalPage);
|
||||
result.put("pageSize", pageSize);
|
||||
result.put("pageNo", currPage);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败响应
|
||||
*
|
||||
* @param errorMsg
|
||||
* @return
|
||||
*/
|
||||
public static Result failResult(String errorMsg) {
|
||||
return result(FAIL_CODE, "", errorMsg);
|
||||
}
|
||||
|
||||
public static Result result(int code, Object result, String message) {
|
||||
Result res = new Result(code, result, message);
|
||||
return res;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Object getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
public abstract class SerializeTranscoder {
|
||||
|
||||
public abstract byte[] serialize(Object value);
|
||||
|
||||
public abstract Object deserialize(byte[] in);
|
||||
|
||||
public void close(Closeable closeable) {
|
||||
if (closeable != null) {
|
||||
try {
|
||||
closeable.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* Setting - 系统
|
||||
*
|
||||
* @author candy.tam
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
public final class Setting {
|
||||
|
||||
/** 域名 */
|
||||
@Value(value="${domain.name}")
|
||||
public String domain;
|
||||
/** 静态资源地址*/
|
||||
@Value(value="${static.domain}")
|
||||
public String staticDomain;
|
||||
@Value(value="${version}")
|
||||
public String version;
|
||||
/** 真题 */
|
||||
public final String PAPER_TYPE_ZHENTI = "1";
|
||||
/** 模拟*/
|
||||
public final String PAPER_TYPE_MONI = "2";
|
||||
/** 押题*/
|
||||
public final String PAPER_TYPE_YATI = "3";
|
||||
/** 名校 */
|
||||
public final String PAPER_TYPE_MINGXIAO = "4";
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.session.Session;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
|
||||
import com.tamguo.modules.sys.model.SysUserEntity;
|
||||
|
||||
public class ShiroUtils {
|
||||
|
||||
public static Session getSession() {
|
||||
return SecurityUtils.getSubject().getSession();
|
||||
}
|
||||
|
||||
public static Subject getSubject() {
|
||||
return SecurityUtils.getSubject();
|
||||
}
|
||||
|
||||
public static SysUserEntity getUser() {
|
||||
return (SysUserEntity)SecurityUtils.getSubject().getPrincipal();
|
||||
}
|
||||
|
||||
public static String getUserCode() {
|
||||
return getUser().getUserCode();
|
||||
}
|
||||
|
||||
public static void setSessionAttribute(Object key, Object value) {
|
||||
getSession().setAttribute(key, value);
|
||||
}
|
||||
|
||||
public static Object getSessionAttribute(Object key) {
|
||||
return getSession().getAttribute(key);
|
||||
}
|
||||
|
||||
public static boolean isLogin() {
|
||||
return SecurityUtils.getSubject().getPrincipal() != null;
|
||||
}
|
||||
|
||||
public static void logout() {
|
||||
SecurityUtils.getSubject().logout();
|
||||
}
|
||||
|
||||
public static String getKaptcha(String key) {
|
||||
String kaptcha = getSessionAttribute(key).toString();
|
||||
// getSession().removeAttribute(key);
|
||||
return kaptcha;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
public enum Status {
|
||||
SUCCESS , ERROR
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
public class TamguoConstant {
|
||||
|
||||
public static final String WEBSITE_NAME = "探果网";
|
||||
|
||||
public static final String REDIS_PRE_KEY = "TAMGUO:";
|
||||
|
||||
/** 高考SubjectId*/
|
||||
public static final String GAOKAO_SUBJECT_ID = "13";
|
||||
|
||||
/** 高考专区缓存KEY*/
|
||||
public static final String GAOKAO_COURSE_AREA = "GAOKAO_COURSE_AREA";
|
||||
|
||||
/** 首页菜单缓存KEY*/
|
||||
public static final String INDEX_MENU = "index_menu";
|
||||
|
||||
/** 首页菜单缓存KEY*/
|
||||
public static final String ALL_INDEX_MENU = "all_index_menu";
|
||||
|
||||
/** 首页左侧菜单缓存KEY*/
|
||||
public static final String LEFT_INDEX_MENU = "left_index_menu";
|
||||
|
||||
/** 首页底部菜单缓存KEY*/
|
||||
public static final String FOOTER_INDEX_MENU = "footer_index_menu";
|
||||
|
||||
/** 北京地区ID*/
|
||||
public static final String BEIJING_AREA_ID = "1";
|
||||
|
||||
/** 真题类型ID*/
|
||||
public static final String ZHENGTI_PAPER_ID = "1";
|
||||
|
||||
/** 模拟类型ID */
|
||||
public static final String SIMULATION_PAPER_ID = "2";
|
||||
|
||||
/** 首页历年真题缓存KEY*/
|
||||
public static final String HISTORY_PAPER = "HistoryPaper:";
|
||||
|
||||
/** 首页模拟试卷缓存KEY*/
|
||||
public static final String SIMULATION_PAPER = "SimulationPaper:";
|
||||
|
||||
/** 首页热门试卷缓存KEY*/
|
||||
public static final String HOT_PAPER = "HOT_PAPER";
|
||||
|
||||
/** 名校试卷缓存KEY*/
|
||||
public static final String ELITE_SCHOOL_PAPER = "EliteSchoolPaper:";
|
||||
|
||||
/** 所有广告缓存KEY*/
|
||||
public static final String ALL_AD = "AllAd:";
|
||||
|
||||
/** 名校缓存KEY*/
|
||||
public static final String ELITE_PAPER = "ElitePaper:";
|
||||
|
||||
/** 章节科目为空*/
|
||||
public static final String CHAPTER_COURSE_EMPTY = "all";
|
||||
|
||||
/** 默认分页大笑*/
|
||||
public static final Integer DEFAULT_PAGE_SIZE = 10;
|
||||
|
||||
/** 单选题*/
|
||||
public static final String QUESTION_TYOE_DANXUANTI = "1";
|
||||
|
||||
/** 简答题*/
|
||||
public static final String QUESTION_TYOE_JIANDATI = "2";
|
||||
|
||||
/** 书面表达*/
|
||||
public static final String QUESTION_TYOE_SHUMIANBIAODA = "3";
|
||||
|
||||
/** 默认会员头像*/
|
||||
public static final String DEFAULT_MEMBER_AVATAR = "images/avatar.png";
|
||||
|
||||
/** 重置密码KEY*/
|
||||
public static final String RESET_PASSWORD_KEY = "ResetPasswordKey";
|
||||
|
||||
/** ALIYUN */
|
||||
public static final String ALIYUN_ACCESS_KEY_ID = "LTAINGkheMeWtxUR";
|
||||
|
||||
/** ALIYUN*/
|
||||
public static final String ALIYUN_ACCESS_KEY_SECRET = "ONUKuCz85kU4In07y4dvpM28mfWOGa";
|
||||
|
||||
/** ALIYUN*/
|
||||
public static final String ALIYUN_SMTP_HOST_NAME = "smtp.aliyun.com";
|
||||
|
||||
/** ALIYUN*/
|
||||
public static final int ALIYUN_SMTP_HOST_PORT = 465;
|
||||
|
||||
/** ALIYUN*/
|
||||
public static final String ALIYUN_MAIL_ACCOUNT = "candy.tam@aliyun.com";
|
||||
|
||||
/** ALIYUN*/
|
||||
public static final String ALIYUN_MAIL_PASSWORD = "tanguo520pig";
|
||||
|
||||
/** 邮件主题*/
|
||||
public static final String ALIYUN_MAIL_SUBJECT_FINDPASSWORD = "探果网找回密码";
|
||||
|
||||
/** 邮箱找回密码前缀*/
|
||||
public static final String ALIYUN_MAIL_FIND_PASSWORD_PREFIX = "EMAIL_FIND_PASSWORD_";
|
||||
|
||||
/** 短信找回密码前缀*/
|
||||
public static final String ALIYUN_MOBILE_SMS_PREFIX = "MOBILE_SMS_PREKEY_";
|
||||
|
||||
/** 安全验证前缀*/
|
||||
public static final String SECURITY_CHECK_PREFIX = "securityCheck:";
|
||||
|
||||
/** 默认的章节根目录*/
|
||||
public static final String CHAPTER_DEFAULT_ROOT_UID = "-1";
|
||||
|
||||
/** 登录错误次数*/
|
||||
public static final String LOGIN_FAILURE_COUNT = "loginFailureCount:";
|
||||
|
||||
/** 题目未审核*/
|
||||
public static final String QUESTION_NOTHING_AUDIT_STATUS = "0";
|
||||
|
||||
/** 题目审核成功*/
|
||||
public static final String QUESTION_SUCCESS_AUDIT_STATUS = "1";
|
||||
|
||||
/** 题目审核失败*/
|
||||
public static final String QUESTION_FAILED_AUDIT_STATUS = "2";
|
||||
|
||||
/** 题目审核失败*/
|
||||
public static final String TEACHER_ROLE_ID = "2";
|
||||
|
||||
/** 初始密码*/
|
||||
public static final String INIT_PASSWORD = "123456";
|
||||
|
||||
/** 验证码常数*/
|
||||
public static final String KAPTCHA_SESSION_KEY = "KAPTCHA_SESSION_KEY";
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public class UploaderMessage {
|
||||
private Status status;
|
||||
private String statusMsg = "";
|
||||
private ArrayList<Integer> errorKys;
|
||||
private String error = "";
|
||||
private String filePath = "";
|
||||
|
||||
public Status getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Status status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatusMsg() {
|
||||
return statusMsg;
|
||||
}
|
||||
|
||||
public void setStatusMsg(String statusMsg) {
|
||||
this.statusMsg = statusMsg;
|
||||
}
|
||||
|
||||
public ArrayList<Integer> getErrorKys() {
|
||||
return errorKys;
|
||||
}
|
||||
|
||||
public void setErrorKys(ArrayList<Integer> errorKys) {
|
||||
this.errorKys = errorKys;
|
||||
}
|
||||
|
||||
public String getError() {
|
||||
return error;
|
||||
}
|
||||
|
||||
public void setError(String error) {
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,53 @@
|
||||
package com.tamguo.modules.sys.utils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
public class XMLConfiguration {
|
||||
private Document document = null;
|
||||
|
||||
public boolean readConfigFile(String configFilename) {
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
try {
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
document = db.parse(configFilename);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (document == null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean readConfigFile(InputStream stream) {
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
try {
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
document = db.parse(stream);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (document == null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public Document getDocument() {
|
||||
return document;
|
||||
}
|
||||
|
||||
protected void setDocument(Document document) {
|
||||
this.document = document;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue