diff --git a/tamguo-modules-core/.classpath b/tamguo-modules-core/.classpath
new file mode 100644
index 0000000..16c89cc
--- /dev/null
+++ b/tamguo-modules-core/.classpath
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tamguo-modules-core/.gitignore b/tamguo-modules-core/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/tamguo-modules-core/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/tamguo-modules-core/.project b/tamguo-modules-core/.project
new file mode 100644
index 0000000..2d09286
--- /dev/null
+++ b/tamguo-modules-core/.project
@@ -0,0 +1,23 @@
+
+
+ tamguo-modules-core
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+
+
diff --git a/tamguo-modules-core/.settings/org.eclipse.core.resources.prefs b/tamguo-modules-core/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..04cfa2c
--- /dev/null
+++ b/tamguo-modules-core/.settings/org.eclipse.core.resources.prefs
@@ -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/=UTF-8
diff --git a/tamguo-modules-core/.settings/org.eclipse.jdt.core.prefs b/tamguo-modules-core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..d59e09c
--- /dev/null
+++ b/tamguo-modules-core/.settings/org.eclipse.jdt.core.prefs
@@ -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
diff --git a/tamguo-modules-core/.settings/org.eclipse.m2e.core.prefs b/tamguo-modules-core/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..14b697b
--- /dev/null
+++ b/tamguo-modules-core/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/tamguo-modules-core/pom.xml b/tamguo-modules-core/pom.xml
new file mode 100644
index 0000000..eee8ae4
--- /dev/null
+++ b/tamguo-modules-core/pom.xml
@@ -0,0 +1,160 @@
+
+ 4.0.0
+ com.tamguo
+ tamguo-modules-core
+ 1.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.0.3.RELEASE
+
+
+
+
+ UTF-8
+ 1.8
+ 2.1.9
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
+
+ org.springframework.boot
+ spring-boot-starter-jdbc
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ ${mybatis-plus-boot-starter.version}
+
+
+ tomcat-jdbc
+ org.apache.tomcat
+
+
+
+
+
+ net.sourceforge.nekohtml
+ nekohtml
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.springframework.boot
+ spring-boot-starter-redis
+ 1.3.8.RELEASE
+
+
+ org.springframework.session
+ spring-session-data-redis
+
+
+ com.alibaba
+ fastjson
+ 1.2.32
+
+
+ org.apache.shiro
+ shiro-spring
+ 1.2.5
+
+
+ org.apache.shiro
+ shiro-ehcache
+ 1.2.5
+
+
+ cn.songxinqiang
+ com.baidu.ueditor
+ 1.1.2-edit-1.0
+
+
+ commons-codec
+ commons-codec
+
+
+ commons-fileupload
+ commons-fileupload
+ 1.3.1
+
+
+ commons-io
+ commons-io
+
+
+ com.alibaba
+ druid
+ 1.0.18
+
+
+ mysql
+ mysql-connector-java
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ com.aliyun
+ aliyun-java-sdk-dysmsapi
+ 1.0.0
+
+
+ com.aliyun
+ aliyun-java-sdk-core
+ 3.2.8
+
+
+ org.apache.commons
+ commons-email
+ 1.5
+
+
+ com.github.theborakompanioni
+ thymeleaf-extras-shiro
+ 1.2.1
+
+
+
+ com.bladejava
+ blade-patchca
+ 1.0.5
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ Camden.SR6
+ pom
+ import
+
+
+
+
+
+ oms
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
\ No newline at end of file
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/config/dao/MyMetaObjectHandler.java b/tamguo-modules-core/src/main/java/com/tamguo/config/dao/MyMetaObjectHandler.java
new file mode 100644
index 0000000..d5ef840
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/config/dao/MyMetaObjectHandler.java
@@ -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("更新的时候干点不可描述的事情");
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/config/dao/MybatisPlusConfig.java b/tamguo-modules-core/src/main/java/com/tamguo/config/dao/MybatisPlusConfig.java
new file mode 100644
index 0000000..47d0386
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/config/dao/MybatisPlusConfig.java
@@ -0,0 +1,93 @@
+package com.tamguo.config.dao;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import com.baomidou.mybatisplus.mapper.ISqlInjector;
+import com.baomidou.mybatisplus.mapper.LogicSqlInjector;
+import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
+import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
+import com.baomidou.mybatisplus.plugins.PerformanceInterceptor;
+import com.baomidou.mybatisplus.plugins.parser.ISqlParser;
+import com.baomidou.mybatisplus.plugins.parser.tenant.TenantHandler;
+import com.baomidou.mybatisplus.plugins.parser.tenant.TenantSqlParser;
+
+import net.sf.jsqlparser.expression.Expression;
+import net.sf.jsqlparser.expression.LongValue;
+
+@Configuration
+@MapperScan("com.tamguo.modules.*.dao*")
+public class MybatisPlusConfig {
+
+ @Bean
+ public PerformanceInterceptor performanceInterceptor() {
+ return new PerformanceInterceptor();
+ }
+
+ /**
+ * mybatis-plus分页插件
+ * 文档:http://mp.baomidou.com
+ */
+ @Bean
+ public PaginationInterceptor paginationInterceptor() {
+ PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+ paginationInterceptor.setLocalPage(true);// 开启 PageHelper 的支持
+ /*
+ * 【测试多租户】 SQL 解析处理拦截器
+ * 这里固定写成住户 1 实际情况你可以从cookie读取,因此数据看不到 【 麻花藤 】 这条记录( 注意观察 SQL )
+ */
+ List sqlParserList = new ArrayList<>();
+ TenantSqlParser tenantSqlParser = new TenantSqlParser();
+ tenantSqlParser.setTenantHandler(new TenantHandler() {
+ @Override
+ public Expression getTenantId() {
+ return new LongValue(1L);
+ }
+
+ @Override
+ public String getTenantIdColumn() {
+ return "course_id";
+ }
+
+ @Override
+ public boolean doTableFilter(String tableName) {
+ // 这里可以判断是否过滤表
+ return true;
+ }
+ });
+
+
+ sqlParserList.add(tenantSqlParser);
+ paginationInterceptor.setSqlParserList(sqlParserList);
+ // 以下过滤方式与 @SqlParser(filter = true) 注解等效
+// paginationInterceptor.setSqlParserFilter(new ISqlParserFilter() {
+// @Override
+// public boolean doFilter(MetaObject metaObject) {
+// MappedStatement ms = PluginUtils.getMappedStatement(metaObject);
+// // 过滤自定义查询此时无租户信息约束【 麻花藤 】出现
+// if ("com.baomidou.springboot.mapper.UserMapper.selectListBySQL".equals(ms.getId())) {
+// return true;
+// }
+// return false;
+// }
+// });
+ return paginationInterceptor;
+ }
+
+ @Bean
+ public MetaObjectHandler metaObjectHandler(){
+ return new MyMetaObjectHandler();
+ }
+
+ /**
+ * 注入sql注入器
+ */
+ @Bean
+ public ISqlInjector sqlInjector(){
+ return new LogicSqlInjector();
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/config/dao/SuperEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/config/dao/SuperEntity.java
new file mode 100644
index 0000000..6ed3e17
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/config/dao/SuperEntity.java
@@ -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> extends Model {
+
+ 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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/config/dao/SuperMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/config/dao/SuperMapper.java
new file mode 100644
index 0000000..6b8b4cf
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/config/dao/SuperMapper.java
@@ -0,0 +1,11 @@
+package com.tamguo.config.dao;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * 演示 mapper 父类,注意这个类不要让 mp 扫描到!!
+ */
+public interface SuperMapper extends BaseMapper {
+
+ // 这里可以放一些公共的方法
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysAreaMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysAreaMapper.java
new file mode 100644
index 0000000..206adfe
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysAreaMapper.java
@@ -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{
+
+ List listData(SysAreaCondition condition);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysCompanyMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysCompanyMapper.java
new file mode 100644
index 0000000..99ce9bb
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysCompanyMapper.java
@@ -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{
+
+ List listData(SysCompanyCondition condition);
+
+ SysCompanyEntity selectByCode(String code);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysMenuMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysMenuMapper.java
new file mode 100644
index 0000000..1d16364
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysMenuMapper.java
@@ -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{
+
+ List listData(SysMenuCondition condition);
+
+ List selectMenuByRoleId(String roleCode);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysOfficeMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysOfficeMapper.java
new file mode 100644
index 0000000..5b9727e
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysOfficeMapper.java
@@ -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{
+
+ List listData(SysOfficeCondition condition);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysPostMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysPostMapper.java
new file mode 100644
index 0000000..9e621b0
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysPostMapper.java
@@ -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{
+
+ List listData(SysPostCondition condition , Pagination page);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysRoleDataScopeMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysRoleDataScopeMapper.java
new file mode 100644
index 0000000..bbf8b5e
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysRoleDataScopeMapper.java
@@ -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{
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysRoleMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysRoleMapper.java
new file mode 100644
index 0000000..23c0f43
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysRoleMapper.java
@@ -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{
+
+ List listData(SysRoleCondition condition, Page page);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysRoleMenuMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysRoleMenuMapper.java
new file mode 100644
index 0000000..df2e239
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysRoleMenuMapper.java
@@ -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{
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserDataScopeMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserDataScopeMapper.java
new file mode 100644
index 0000000..c810093
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserDataScopeMapper.java
@@ -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{
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserMapper.java
new file mode 100644
index 0000000..e555d75
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserMapper.java
@@ -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{
+
+ List listData(SysUserCondition condition, Pagination page);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserPostMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserPostMapper.java
new file mode 100644
index 0000000..9905bbb
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserPostMapper.java
@@ -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{
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserRoleMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserRoleMapper.java
new file mode 100644
index 0000000..5d9b567
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/dao/SysUserRoleMapper.java
@@ -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{
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysAreaEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysAreaEntity.java
new file mode 100644
index 0000000..9f0228f
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysAreaEntity.java
@@ -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;
+ }
+}
\ No newline at end of file
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysCompanyEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysCompanyEntity.java
new file mode 100644
index 0000000..b66d743
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysCompanyEntity.java
@@ -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;
+ }
+
+}
\ No newline at end of file
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysMenuEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysMenuEntity.java
new file mode 100644
index 0000000..70a8c36
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysMenuEntity.java
@@ -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;
+ }
+
+}
\ No newline at end of file
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysOfficeEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysOfficeEntity.java
new file mode 100644
index 0000000..79240a1
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysOfficeEntity.java
@@ -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();
+ }
+
+}
\ No newline at end of file
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysPostEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysPostEntity.java
new file mode 100644
index 0000000..c6dd35e
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysPostEntity.java
@@ -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 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();
+ }
+
+}
\ No newline at end of file
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysRoleDataScopeEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysRoleDataScopeEntity.java
new file mode 100644
index 0000000..56219d2
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysRoleDataScopeEntity.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysRoleEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysRoleEntity.java
new file mode 100644
index 0000000..ef4013d
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysRoleEntity.java
@@ -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;
+ }
+
+}
\ No newline at end of file
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysRoleMenuEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysRoleMenuEntity.java
new file mode 100644
index 0000000..f3cbabb
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysRoleMenuEntity.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserDataScopeEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserDataScopeEntity.java
new file mode 100644
index 0000000..13e20b5
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserDataScopeEntity.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserEntity.java
new file mode 100644
index 0000000..5bf0791
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserEntity.java
@@ -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 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 getEmployeePosts() {
+ return employeePosts;
+ }
+
+ public void setEmployeePosts(List 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;
+ }
+
+
+}
\ No newline at end of file
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserPostEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserPostEntity.java
new file mode 100644
index 0000000..8b53c93
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserPostEntity.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserRoleEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserRoleEntity.java
new file mode 100644
index 0000000..0d515ef
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/SysUserRoleEntity.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysAreaCondition.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysAreaCondition.java
new file mode 100644
index 0000000..7313ba2
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysAreaCondition.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysCompanyCondition.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysCompanyCondition.java
new file mode 100644
index 0000000..8e4d149
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysCompanyCondition.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysMenuCondition.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysMenuCondition.java
new file mode 100644
index 0000000..e3902c4
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysMenuCondition.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysOfficeCondition.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysOfficeCondition.java
new file mode 100644
index 0000000..30b4c03
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysOfficeCondition.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysPostCondition.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysPostCondition.java
new file mode 100644
index 0000000..25b97f7
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysPostCondition.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysRoleCondition.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysRoleCondition.java
new file mode 100644
index 0000000..6c0926e
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysRoleCondition.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysUserCondition.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysUserCondition.java
new file mode 100644
index 0000000..4299d6b
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/condition/SysUserCondition.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysCompanyStatusEnum.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysCompanyStatusEnum.java
new file mode 100644
index 0000000..a12d577
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysCompanyStatusEnum.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysMenuStatusEnum.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysMenuStatusEnum.java
new file mode 100644
index 0000000..b9af8c0
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysMenuStatusEnum.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysOfficeStatusEnum.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysOfficeStatusEnum.java
new file mode 100644
index 0000000..806cb1c
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysOfficeStatusEnum.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysOfficeTypeEnum.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysOfficeTypeEnum.java
new file mode 100644
index 0000000..ede3be8
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysOfficeTypeEnum.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysPostStatusEnum.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysPostStatusEnum.java
new file mode 100644
index 0000000..f71da42
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysPostStatusEnum.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysPostTypeEnum.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysPostTypeEnum.java
new file mode 100644
index 0000000..63c02e4
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysPostTypeEnum.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysUserMgrTypeEnum.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysUserMgrTypeEnum.java
new file mode 100644
index 0000000..017159f
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysUserMgrTypeEnum.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysUserStatusEnum.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysUserStatusEnum.java
new file mode 100644
index 0000000..a997289
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysUserStatusEnum.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysUserTypeEnum.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysUserTypeEnum.java
new file mode 100644
index 0000000..8883ca5
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/model/enums/SysUserTypeEnum.java
@@ -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;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysAreaService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysAreaService.java
new file mode 100644
index 0000000..0664de0
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysAreaService.java
@@ -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{
+
+ List listData(SysAreaCondition condition);
+
+ JSONArray treeData(String excludeId);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysCompanyService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysCompanyService.java
new file mode 100644
index 0000000..c6a8664
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysCompanyService.java
@@ -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{
+
+ /** 公司树形结构*/
+ JSONArray treeData(String excludeId);
+
+ /** 查询公司列表*/
+ List listData(SysCompanyCondition condition);
+
+ /** 根据ID查询公司*/
+ SysCompanyEntity selectByCode(String code);
+
+ /** 新建公司*/
+ void save(SysCompanyEntity company);
+
+ /** 修改公司*/
+ void update(SysCompanyEntity company);
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysMenuService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysMenuService.java
new file mode 100644
index 0000000..0bfca67
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysMenuService.java
@@ -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{
+
+ /** 列表数据*/
+ List listData(SysMenuCondition condition);
+
+ /** 树形结构*/
+ JSONArray treeData(String excludeId);
+
+ /** 新增菜单*/
+ void save(SysMenuEntity menu);
+
+ /** 修改菜单*/
+ void update(SysMenuEntity menu);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysOfficeService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysOfficeService.java
new file mode 100644
index 0000000..8af421c
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysOfficeService.java
@@ -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{
+
+ List listData(SysOfficeCondition condition);
+
+ JSONArray treeData(String excludeId);
+
+ void save(SysOfficeEntity office);
+
+ void update(SysOfficeEntity office);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysPostService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysPostService.java
new file mode 100644
index 0000000..5063daf
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysPostService.java
@@ -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{
+
+ /** 查询列表*/
+ Page listData(SysPostCondition condition);
+
+ /** 添加数据*/
+ void add(SysPostEntity post);
+
+ /** 修改数据*/
+ void update(SysPostEntity post);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysRoleDataScopeService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysRoleDataScopeService.java
new file mode 100644
index 0000000..0ee8d4a
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysRoleDataScopeService.java
@@ -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{
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysRoleService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysRoleService.java
new file mode 100644
index 0000000..7fe192f
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysRoleService.java
@@ -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{
+
+ /** 列表查询*/
+ Page listData(SysRoleCondition condition);
+
+ /** 属性菜单*/
+ Map menuTreeData(String roleCode);
+
+ /** 分配功能权限*/
+ void allowMenuPermission(SysRoleEntity role);
+
+ /** 授权数据权限*/
+ void allowDataScope(SysRoleEntity role);
+
+ /** 角色树形结构*/
+ List treeDate(String userType);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysUserService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysUserService.java
new file mode 100644
index 0000000..7df970f
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/ISysUserService.java
@@ -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{
+
+ public SysUserEntity queryByLoginCode(String loginCode);
+
+ public Page 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 findUserRole(String userCode);
+
+ /** 用户数据权限*/
+ public List selectUserDataScope(String userCode);
+
+ /** 保存用户数据权限*/
+ public void saveUserDataScope(SysUserEntity user);
+
+ /** 停用账号*/
+ public Result disable(String userCode);
+
+ /** 激活账号*/
+ public Result enable(String userCode);
+
+ /** 删除用户*/
+ public Result delete(String userCode);
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysAreaServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysAreaServiceImpl.java
new file mode 100644
index 0000000..075068d
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysAreaServiceImpl.java
@@ -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 implements ISysAreaService{
+
+ @Autowired
+ SysAreaMapper sysAreaMapper;
+
+ @Override
+ public List listData(SysAreaCondition condition) {
+ return sysAreaMapper.listData(condition);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JSONArray treeData(String excludeId) {
+ List 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 areaList) {
+ if(areaList != null) {
+ JSONArray nodes = new JSONArray();
+ for(int i=0 ; i implements ISysCompanyService {
+
+ @Autowired
+ private SysCompanyMapper sysCompanyMapper;
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JSONArray treeData(String excludeId) {
+ List 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 listData(SysCompanyCondition condition) {
+ return sysCompanyMapper.listData(condition);
+ }
+
+ @Override
+ public SysCompanyEntity selectByCode(String code) {
+ return sysCompanyMapper.selectByCode(code);
+ }
+
+ private JSONArray turnZTreeData(List companyList) {
+ if(companyList != null) {
+ JSONArray nodes = new JSONArray();
+ for(int i=0 ; i 0) {
+ company.setTreeLeaf(false);
+ }else {
+ company.setTreeLeaf(true);
+ }
+ return company;
+ }
+
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysMenuServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysMenuServiceImpl.java
new file mode 100644
index 0000000..acb29f8
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysMenuServiceImpl.java
@@ -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 implements ISysMenuService {
+
+ @Autowired
+ SysMenuMapper sysMenuMapper;
+
+ @Override
+ public List listData(SysMenuCondition condition) {
+ return sysMenuMapper.listData(condition);
+ }
+
+ @Transactional(readOnly=true)
+ @SuppressWarnings("unchecked")
+ @Override
+ public JSONArray treeData(String excludeId) {
+ List 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 menus) {
+ if(menus != null) {
+ JSONArray nodes = new JSONArray();
+ for(int i=0 ; i 0) {
+ menu.setTreeLeaf(false);
+ }else {
+ menu.setTreeLeaf(true);
+ }
+ return menu;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysOfficeServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysOfficeServiceImpl.java
new file mode 100644
index 0000000..faba318
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysOfficeServiceImpl.java
@@ -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 implements ISysOfficeService {
+
+ @Autowired
+ private SysOfficeMapper sysOfficeMapper;
+
+ @Override
+ public List listData(SysOfficeCondition condition) {
+ return sysOfficeMapper.listData(condition);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JSONArray treeData(String excludeId) {
+ List 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 companyList) {
+ if(companyList != null) {
+ JSONArray nodes = new JSONArray();
+ for(int i=0 ; i 0) {
+ office.setTreeLeaf(false);
+ }else {
+ office.setTreeLeaf(true);
+ }
+ return office;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysPostServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysPostServiceImpl.java
new file mode 100644
index 0000000..16b2655
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysPostServiceImpl.java
@@ -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 implements ISysPostService{
+
+ @Autowired
+ private SysPostMapper sysPostMapper;
+
+ @Override
+ public Page listData(SysPostCondition condition) {
+ Page 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);
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleDataScopeServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleDataScopeServiceImpl.java
new file mode 100644
index 0000000..55cdf35
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleDataScopeServiceImpl.java
@@ -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 implements ISysRoleDataScopeService{
+
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleServiceImpl.java
new file mode 100644
index 0000000..2fbb3e8
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleServiceImpl.java
@@ -0,0 +1,130 @@
+package com.tamguo.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+
+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.plugins.Page;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.tamguo.modules.sys.dao.SysMenuMapper;
+import com.tamguo.modules.sys.dao.SysRoleDataScopeMapper;
+import com.tamguo.modules.sys.dao.SysRoleMapper;
+import com.tamguo.modules.sys.dao.SysRoleMenuMapper;
+import com.tamguo.modules.sys.model.SysMenuEntity;
+import com.tamguo.modules.sys.model.SysRoleDataScopeEntity;
+import com.tamguo.modules.sys.model.SysRoleEntity;
+import com.tamguo.modules.sys.model.SysRoleMenuEntity;
+import com.tamguo.modules.sys.model.condition.SysRoleCondition;
+import com.tamguo.modules.sys.service.ISysRoleService;
+
+@Service
+public class SysRoleServiceImpl extends ServiceImpl implements ISysRoleService {
+
+ @Autowired
+ private SysRoleMapper sysRoleMapper;
+ @Autowired
+ private SysMenuMapper sysMenuMapper;
+ @Autowired
+ private SysRoleMenuMapper sysRoleMenuMapper;
+ @Autowired
+ private SysRoleDataScopeMapper sysRoleDataScopeMapper;
+
+ @Transactional(readOnly=true)
+ @Override
+ public Page listData(SysRoleCondition condition) {
+ Page page = new Page<>(condition.getPageNo(), condition.getPageSize());
+ return page.setRecords(sysRoleMapper.listData(condition , page));
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map menuTreeData(String roleCode) {
+ List menus = sysMenuMapper.selectList(Condition.create().eq("is_show", "1"));
+ List roleMenus = sysMenuMapper.selectMenuByRoleId(roleCode);
+
+ JSONObject result = new JSONObject();
+
+ JSONObject menuInfo = transformZTree(menus);
+ result.put("menuMap", menuInfo);
+ result.put("roleMenuList", roleMenus);
+
+ return result;
+ }
+
+ private JSONObject transformZTree(List menus) {
+ JSONObject result = new JSONObject();
+ if(menus != null) {
+ JSONArray nodes = new JSONArray();
+ for(int i=0 ; i ");
+ if(!StringUtils.isEmpty(menu.getMenuHref())) {
+ node.put("name", menu.getMenuName() + " "+menu.getMenuHref()+" ");
+ }else if(!StringUtils.isEmpty(menu.getPermission())) {
+ node.put("name", menu.getMenuName() + " "+menu.getPermission()+" ");
+ }
+ node.put("pId", menu.getParentCode());
+ node.put("id", menu.getMenuCode());
+ node.put("title", menu.getMenuName());
+ nodes.add(node);
+ }
+ result.put("default", nodes);
+ }
+ return result;
+ }
+
+ @Transactional(readOnly=false)
+ @SuppressWarnings("unchecked")
+ @Override
+ public void allowMenuPermission(SysRoleEntity role) {
+ // 删除关联菜单
+ sysRoleMenuMapper.delete(Condition.create().eq("role_code", role.getRoleCode()));
+
+ if(!StringUtils.isEmpty(role.getRoleMenuListJson())) {
+ JSONArray roleMenus = JSONArray.parseArray(role.getRoleMenuListJson());
+ for(int i=0 ; i treeDate(String userType) {
+ return sysRoleMapper.selectList(Condition.create().eq("user_type", userType));
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysUserServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysUserServiceImpl.java
new file mode 100644
index 0000000..2b9bb12
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/service/impl/SysUserServiceImpl.java
@@ -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 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 listData(SysUserCondition condition) {
+ Page 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 userPostList = sysUserPostMapper.selectList(condition);
+
+ List postCodes = new LinkedList<>();
+ for(int i=0 ; i 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 employeePosts = user.getEmployeePosts();
+ for(int i=0 ; i employeePosts = user.getEmployeePosts();
+ for(int i=0 ; i findUserRole(String userCode) {
+ return sysUserRoleMapper.selectList(Condition.create().eq("user_code", userCode));
+ }
+
+ @SuppressWarnings("unchecked")
+ @Transactional(readOnly=true)
+ @Override
+ public List 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[] 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) {
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/CException.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/CException.java
new file mode 100644
index 0000000..f06ed68
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/CException.java
@@ -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);
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/DateUtil.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/DateUtil.java
new file mode 100644
index 0000000..6ecf88c
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/DateUtil.java
@@ -0,0 +1,524 @@
+package com.tamguo.modules.sys.utils;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+public final class DateUtil {
+
+ /**
+ * 正常日期格式化模板.
+ */
+ private static final SimpleDateFormat NORMAL_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+ private static final SimpleDateFormat NORMAL_DATE_FORMAT_YY_MM_DD = new SimpleDateFormat("yyyy-MM-dd");
+ private static final SimpleDateFormat NORMAL_DATE_FORMAT_YY_MM_DD_ = new SimpleDateFormat("yyyyMMdd");
+
+ private static final SimpleDateFormat NORMAL_DATE_FORMAT_YYMMDDHHMISS = new SimpleDateFormat("yyyyMMddHHmmss");
+
+ /**
+ * 正常日期格式化.
+ *
+ * @param date
+ * 日期距离1970年1月1日秒数
+ * @return 格式化后的日期(2011-11-24)
+ */
+ public static String dateFormatYYMMDD(long date) {
+ return NORMAL_DATE_FORMAT_YY_MM_DD.format(new Date(date * 1000));
+ }
+
+ /**
+ * 正常日期格式化.
+ *
+ * @param date
+ * 日期距离1970年1月1日秒数
+ * @return 格式化后的日期(20111124)
+ */
+
+ public static String getCurrentDateStr() {
+ return NORMAL_DATE_FORMAT_YY_MM_DD_.format(new Date());
+ }
+
+ public static String getCurrentDateYYYYMMDDStr() {
+ return NORMAL_DATE_FORMAT_YY_MM_DD.format(new Date());
+ }
+
+ public static String getNextDayYYYYMMDDStr() {
+ Calendar cal = Calendar.getInstance();
+ try {
+ cal.setTime(NORMAL_DATE_FORMAT_YY_MM_DD.parse(getCurrentTime()));
+ cal.add(Calendar.DATE, 1);
+ return NORMAL_DATE_FORMAT_YY_MM_DD.format(cal.getTime());
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public static long getNextDayYYYYMMDDLong() {
+ Calendar cal = Calendar.getInstance();
+ try {
+ cal.setTime(NORMAL_DATE_FORMAT_YY_MM_DD.parse(getCurrentTime()));
+ cal.add(Calendar.DATE, 1);
+ return cal.getTimeInMillis();
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ return 0l;
+ }
+
+ /**
+ * 正常日期格式化.
+ *
+ * @param date
+ * 日期距离1970年1月1日秒数
+ * @return 格式化后的日期(2011-11-24 16:46:38)
+ */
+ public static String dateFormat(long date) {
+ return NORMAL_DATE_FORMAT.format(new Date(date * 1000));
+ }
+
+ /**
+ * 正常日期格式化.
+ *
+ * @param date
+ * 日期距离1970年1月1日秒数
+ * @return 格式化后的日期(2011-11-24)
+ */
+ public static String dateFormatYYYYMMDD(long date) {
+ return NORMAL_DATE_FORMAT_YY_MM_DD.format(new Date(date * 1000));
+ }
+
+ /**
+ * 正常日期格式化.
+ *
+ * @param date
+ * 日期距离1970年1月1日秒数
+ * @return 格式化后的日期(2011-11-24 16:46:38)
+ */
+
+ public static String dateFormat(Date date) {
+ return NORMAL_DATE_FORMAT.format(date);
+ }
+
+ /**
+ * 正常日期格式化.
+ *
+ * @param date
+ * 日期距离1970年1月1日秒数
+ * @return 格式化后的日期(20111124164638)
+ */
+
+ public static String dateFormathhmmss(Date date) {
+ return NORMAL_DATE_FORMAT_YYMMDDHHMISS.format(date);
+ }
+
+ /**
+ * 正常日期格式化.
+ *
+ * @param date
+ * 日期距离1970年1月1日秒数
+ * @return 格式化后的日期(20111124164638)
+ */
+
+ public static String dateFormatYYYYMMDD(Date date) {
+ return NORMAL_DATE_FORMAT_YY_MM_DD_.format(date);
+ }
+
+ /**
+ * 正常日期格式化.
+ *
+ * @param date
+ * 日期距离1970年1月1日秒数
+ * @return 格式化后的日期(2011-11-24 16:46:38)
+ */
+
+ public static String getCurrentTime() {
+ return NORMAL_DATE_FORMAT_YY_MM_DD.format(new Date());
+ }
+
+ /**
+ * 获取当前距1970年1月1日秒数.
+ *
+ * @return 当前距1970年1月1日秒数.
+ */
+ public static Long getTime() {
+ return new Date().getTime() / 1000;
+ }
+
+ /**
+ * 获取当前距1970年1月1日秒数.
+ *
+ * @return 获取最近一周的秒数.
+ */
+ public static long getLastWeekTime() {
+ return new Date().getTime() / 1000 - 7 * 24 * 60 * 60;
+ }
+
+ /**
+ * 获取当前距1970年1月1日秒数.
+ *
+ * @return 获取最近一个月的秒数.
+ */
+ public static long getLastMonthTime() {
+ return new Date().getTime() / 1000 - 30 * 24 * 60 * 60;
+ }
+
+ /**
+ * 获取某年某月第一天.
+ *
+ * @return 日期格式如:2011-12-31 00:00:00 .
+ */
+ public static long getFirstDayOfMonth(String year, String month) {
+ Calendar cal = Calendar.getInstance();
+ cal.set(Calendar.YEAR, Integer.valueOf(year));
+ cal.set(Calendar.MONTH, Integer.valueOf(month) - 1);
+ cal.set(Calendar.DAY_OF_MONTH, cal.getMinimum(Calendar.DATE));
+ return parseDate(NORMAL_DATE_FORMAT_YY_MM_DD.format(cal.getTime()) + " 00:00:00").getTime() / 1000;
+ }
+
+ /**
+ * 获取某年某月最后一天.
+ *
+ * @return 日期格式如:2011-12-31 23:59:59 .
+ */
+ public static long getLastDayOfMonth(String year, String month) {
+ Calendar cal = Calendar.getInstance();
+ cal.set(Calendar.YEAR, Integer.valueOf(year));
+ cal.set(Calendar.MONTH, Integer.valueOf(month) - 1);
+ cal.set(Calendar.DAY_OF_MONTH, 1);
+ int value = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
+ cal.set(Calendar.DAY_OF_MONTH, value);
+ return parseDate(NORMAL_DATE_FORMAT_YY_MM_DD.format(cal.getTime()) + " 23:59:59").getTime() / 1000;
+ }
+
+ /**
+ * 解析字符串为Date.
+ *
+ * @param dateString
+ * 日期字符串 例如 2011-12-17 17:41:18.843 CST.
+ * @return 解析后的日期类型.若解析出错则返回null
+ */
+ public static Date parseDate(String dateStr) {
+ try {
+ return NORMAL_DATE_FORMAT.parse(dateStr);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * 正常日期格式化.
+ *
+ * @param date
+ * 日期距离1970年1月1日秒数
+ * @return 格式化后的日期()
+ */
+
+ public static long parseLong(String date) {
+ return parseDate(date).getTime() / 1000;
+ }
+
+ /**
+ * 日期格式转换为字符串格式
+ *
+ * @param date
+ * @return 格式化后的日期字符串
+ */
+ public static String parseString(Date date) {
+
+ return NORMAL_DATE_FORMAT_YY_MM_DD.format(date);
+ }
+
+ public static long getLastDayStartTime(long daytime) {
+ Calendar todayStart = Calendar.getInstance();
+ todayStart.setTimeInMillis(daytime * 1000);
+ todayStart.add(Calendar.DAY_OF_YEAR, -1);
+ todayStart.set(Calendar.HOUR_OF_DAY, 0);
+ todayStart.set(Calendar.MINUTE, 0);
+ todayStart.set(Calendar.SECOND, 0);
+ todayStart.set(Calendar.MILLISECOND, 0);
+ return todayStart.getTimeInMillis() / 1000;
+ }
+
+ public static long getLastDayEndTime(long daytime) {
+ Calendar todayEnd = Calendar.getInstance();
+ todayEnd.setTimeInMillis(daytime * 1000);
+ todayEnd.add(Calendar.DAY_OF_YEAR, -1);
+ todayEnd.set(Calendar.HOUR_OF_DAY, 23);
+ todayEnd.set(Calendar.MINUTE, 59);
+ todayEnd.set(Calendar.SECOND, 59);
+ todayEnd.set(Calendar.MILLISECOND, 999);
+ return todayEnd.getTimeInMillis() / 1000;
+ }
+
+ public static long getTime(long time) {
+ Calendar timeCalendar = Calendar.getInstance();
+ Calendar nowCalendar = Calendar.getInstance();
+ timeCalendar.setTimeInMillis(time * 1000);
+ timeCalendar.set(Calendar.HOUR_OF_DAY, nowCalendar.get(Calendar.HOUR_OF_DAY));
+ timeCalendar.set(Calendar.MINUTE, nowCalendar.get(Calendar.MINUTE));
+ timeCalendar.set(Calendar.SECOND, nowCalendar.get(Calendar.SECOND));
+ timeCalendar.set(Calendar.MILLISECOND, nowCalendar.get(Calendar.MILLISECOND));
+ return timeCalendar.getTimeInMillis() / 1000;
+ }
+
+ public static long getStartTime(long daytime) {
+ Calendar todayStart = Calendar.getInstance();
+ todayStart.setTimeInMillis(daytime * 1000);
+ // todayStart.add(Calendar.DAY_OF_YEAR, -1);
+ todayStart.set(Calendar.HOUR_OF_DAY, 0);
+ todayStart.set(Calendar.MINUTE, 0);
+ todayStart.set(Calendar.SECOND, 0);
+ todayStart.set(Calendar.MILLISECOND, 0);
+ return todayStart.getTime().getTime() / 1000;
+ }
+
+ public static long getEndTime(long daytime) {
+ Calendar todayEnd = Calendar.getInstance();
+ todayEnd.setTimeInMillis(daytime * 1000);
+ // todayEnd.add(Calendar.DAY_OF_YEAR, -1);
+ todayEnd.set(Calendar.HOUR_OF_DAY, 23);
+ todayEnd.set(Calendar.MINUTE, 59);
+ todayEnd.set(Calendar.SECOND, 59);
+ todayEnd.set(Calendar.MILLISECOND, 999);
+ return todayEnd.getTimeInMillis() / 1000;
+ }
+
+ /**
+ * 比较俩日期是否是同一天
+ *
+ * @param d1
+ * @param d2
+ * @return
+ */
+ public static boolean compareSameDate(Date d1, Date d2) {
+ Calendar c1 = Calendar.getInstance();
+ c1.setTime(d1);
+ Calendar c2 = Calendar.getInstance();
+ c2.setTime(d2);
+ boolean isSameYear = c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR);
+ boolean isSameMonth = isSameYear && c1.get(Calendar.MONTH) == c2.get(Calendar.MONTH);
+ boolean isSameDate = isSameMonth && c1.get(Calendar.DAY_OF_MONTH) == c2.get(Calendar.DAY_OF_MONTH);
+ return isSameDate;
+ }
+
+ /**
+ * 当月的第一天距1970年1月1日秒数.
+ *
+ * @param date
+ * @return long
+ * @author mengxm
+ */
+ public static final long firstMonthDayTime() {
+ Calendar cal = Calendar.getInstance();
+ cal.set(Calendar.DAY_OF_MONTH, 1);
+ return cal.getTime().getTime() / 1000;
+ }
+
+ /**
+ * 根据指定格式解析时间
+ *
+ * @param dateString
+ * @param fmtString
+ * @return Date
+ * @author mengxm
+ */
+ public static final Date parse(String dateString, String fmtString) {
+ Date date = null;
+ try {
+ DateFormat format = new SimpleDateFormat(fmtString);
+ date = format.parse(dateString);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ return date;
+ }
+
+ /** 比较提现前后时间间隔秒数 */
+ public static boolean getDatePoor(Date endDate, Date nowDate) {
+
+ // 获得两个时间的毫秒时间差异
+ System.out.println(endDate.getTime());
+ System.out.println(nowDate.getTime());
+ long diff = (endDate.getTime() - nowDate.getTime()) / 1000;
+ if (diff < 30) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * 当前时间加几天
+ *
+ * @param day
+ * 天数
+ * @return
+ */
+ public static long currentDateAddDay(int day) {
+ Calendar cal = Calendar.getInstance();
+ try {
+ cal.setTime(NORMAL_DATE_FORMAT_YY_MM_DD.parse(getCurrentTime()));
+ cal.add(Calendar.DATE, day); // add N days
+ return cal.getTimeInMillis() / 1000;
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ return 0l;
+ }
+
+ public static long dateAddDay(long dateLong, int day) {
+ Calendar cal = Calendar.getInstance();
+ Date d = new Date(dateLong * 1000);
+ cal.setTime(d);
+ cal.add(Calendar.DATE, day);
+ return cal.getTimeInMillis() / 1000;
+ }
+
+ /**
+ * 计算两个日期之间相差的天数
+ *
+ * @param smdate
+ * 较小的时间
+ * @param bdate
+ * 较大的时间
+ * @return 相差天数
+ * @throws ParseException
+ */
+ public static int daysBetween(Date smdate, Date bdate) {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ long between_days = 0L;
+ try {
+ smdate = sdf.parse(sdf.format(smdate));
+ bdate = sdf.parse(sdf.format(bdate));
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(smdate);
+ long time1 = cal.getTimeInMillis();
+ cal.setTime(bdate);
+ long time2 = cal.getTimeInMillis();
+ between_days = (time2 - time1) / (1000 * 3600 * 24);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ return Integer.parseInt(String.valueOf(between_days));
+ }
+
+ /** 日期转换为自定义格式输出 */
+ public static String DateToString(Date date, String formatType) {
+ if (date == null) {
+ return null;
+ }
+ if (formatType == null || "".equals(formatType)) {
+ return null;
+ }
+ String dateStr = "";
+ try {
+ SimpleDateFormat sdf = new SimpleDateFormat(formatType);
+ dateStr = sdf.format(date);
+ return dateStr;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ public static long getStartTimeCurrentDay() {
+ Calendar todayStart = Calendar.getInstance();
+ // todayStart.add(Calendar.DAY_OF_YEAR, -1);
+ todayStart.set(Calendar.HOUR_OF_DAY, 0);
+ todayStart.set(Calendar.MINUTE, 0);
+ todayStart.set(Calendar.SECOND, 0);
+ todayStart.set(Calendar.MILLISECOND, 0);
+ return todayStart.getTime().getTime() / 1000;
+ }
+
+ public static long getEndTimeCurrentDay() {
+ Calendar todayStart = Calendar.getInstance();
+ // todayStart.add(Calendar.DAY_OF_YEAR, -1);
+ todayStart.set(Calendar.HOUR_OF_DAY, 23);
+ todayStart.set(Calendar.MINUTE, 59);
+ todayStart.set(Calendar.SECOND, 59);
+ todayStart.set(Calendar.MILLISECOND, 59);
+ return todayStart.getTime().getTime() / 1000;
+ }
+
+ /** 日期转换为自定义格式输出 */
+ public static String fomatDate(Date date, String format) {
+ if (date == null) {
+ return "";
+ }
+ if (format == null || "".equals(format)) {
+ return "";
+ }
+ try {
+ SimpleDateFormat sdf = new SimpleDateFormat(format);
+ return sdf.format(date);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return "";
+
+ }
+ }
+
+ public static String getLastDayFmtYYYYMMDD() {
+ Calendar todayStart = Calendar.getInstance();
+ todayStart.add(Calendar.DAY_OF_YEAR, -1);
+ todayStart.set(Calendar.HOUR_OF_DAY, 0);
+ todayStart.set(Calendar.MINUTE, 0);
+ todayStart.set(Calendar.SECOND, 0);
+ todayStart.set(Calendar.MILLISECOND, 0);
+ return NORMAL_DATE_FORMAT_YY_MM_DD_.format(todayStart.getTime());
+ }
+
+ /**
+ * @Title: getDateFormat
+ * @Description: 日期格式化 yyyy-MM-dd
+ * @param str
+ * @return String
+ */
+ public static String getDateFormat(String str) {
+ return dateFormatYYMMDD(Long.parseLong(str));
+ }
+
+ /**
+ * @Title: getTimeFormat
+ * @Description: 时间格式化 yyyy-MM-dd HH:mm:ss
+ * @param str
+ * @return String
+ */
+ public static String getTimeFormat(String str) {
+ return dateFormat(Long.parseLong(str));
+ }
+
+ public static void main(String[] args) {
+
+ System.out.println(dateFormat(1441036802));
+ System.out.println(getFirstDayOfMonth("2015", "9"));
+ System.out.println(getLastDayOfMonth("2015", "8"));
+ System.out.println(dateFormat(getLastMonthTime()));
+ System.out.println(dateFormat(getLastWeekTime()));
+ System.out.println(parseLong("2017-01-01 00:00:00"));
+ System.out.println(getTime());
+ System.out.println(dateFormat(1451624155));
+ System.out.println(parse("20151222", "yyyyMMdd"));
+ Calendar c = Calendar.getInstance();
+ Date nowDate = c.getTime();
+ c.set(Calendar.MINUTE, -1);
+ Date endDate = c.getTime();
+ System.out.println("nowDate--" + nowDate + ";endDate--" + endDate);
+ System.out.println(getDatePoor(nowDate, endDate));
+ System.out.println(dateFormatYYYYMMDD(new Date()));
+
+ System.out.println("args = [" + DateUtil.currentDateAddDay(0) + "]");
+ System.out.println("args = [" + DateUtil.parse("2016-01-19", "yyyy-MM-dd").getTime() + "]");
+
+ System.out.println(getTime());
+ System.out.println(getEndTimeCurrentDay());
+
+ System.out.println(getEndTimeCurrentDay() - getTime());
+
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/DateUtils.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/DateUtils.java
new file mode 100644
index 0000000..6f94a90
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/DateUtils.java
@@ -0,0 +1,274 @@
+package com.tamguo.modules.sys.utils;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+public class DateUtils {
+ public static final String DEFAULT_PATTERN = "yyyy-MM-dd";
+
+ public static String getOneDayFromNow(int day, String pattern) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(new Date());
+ cal.add(Calendar.DAY_OF_MONTH, day);
+ SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+ return sdf.format(cal.getTime());
+ }
+
+ public static String getOneDayFromNow(int day) {
+ return DateUtils.getOneDayFromNow(day, DEFAULT_PATTERN);
+ }
+
+ /**
+ * 计算两个日期之间相差的天数
+ *
+ * @param smdate
+ * 较小的时间
+ * @param bdate
+ * 较大的时间
+ * @return 相差天数
+ * @throws ParseException
+ * @throws java.text.ParseException
+ */
+ public static int daysBetween(Date smdate, Date bdate)
+ throws ParseException {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ smdate = sdf.parse(sdf.format(smdate));
+ bdate = sdf.parse(sdf.format(bdate));
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(smdate);
+ long time1 = cal.getTimeInMillis();
+ cal.setTime(bdate);
+ long time2 = cal.getTimeInMillis();
+ long between_days = (time2 - time1) / (1000 * 3600 * 24);
+
+ return Integer.parseInt(String.valueOf(between_days));
+ }
+
+ public static void main(String[] args) throws ParseException {
+ System.out.println(daysBetween(null, null));
+ }
+
+ /**
+ * 英文简写(默认)如:2010-12-01
+ */
+ public static String FORMAT_SHORT = "yyyy-MM-dd";
+ /**
+ * 英文全称 如:2010-12-01 23:15:06
+ */
+ public static String FORMAT_LONG = "yyyy-MM-dd HH:mm:ss";
+ /**
+ * 精确到毫秒的完整时间 如:yyyy-MM-dd HH:mm:ss.S
+ */
+ public static String FORMAT_FULL = "yyyy-MM-dd HH:mm:ss.S";
+ /**
+ * 中文简写 如:2010年12月01日
+ */
+ public static String FORMAT_SHORT_CN = "yyyy年MM月dd";
+ /**
+ * 中文全称 如:2010年12月01日 23时15分06秒
+ */
+ public static String FORMAT_LONG_CN = "yyyy年MM月dd日 HH时mm分ss秒";
+ /**
+ * 精确到毫秒的完整中文时间
+ */
+ public static String FORMAT_FULL_CN = "yyyy年MM月dd日 HH时mm分ss秒SSS毫秒";
+
+ /**
+ * 获得默认的 date pattern
+ */
+ public static String getDatePattern() {
+ return FORMAT_LONG;
+ }
+
+ /**
+ * 根据预设格式返回当前日期
+ *
+ * @return
+ */
+ public static String getNow() {
+ return format(new Date());
+ }
+
+ /**
+ * 根据用户格式返回当前日期
+ *
+ * @param format
+ * @return
+ */
+ public static String getNow(String format) {
+ return format(new Date(), format);
+ }
+
+ /**
+ * 使用预设格式格式化日期
+ *
+ * @param date
+ * @return
+ */
+ public static String format(Date date) {
+ return format(date, getDatePattern());
+ }
+
+ /**
+ * 使用用户格式格式化日期
+ *
+ * @param date
+ * 日期
+ * @param pattern
+ * 日期格式
+ * @return
+ */
+ public static String format(Date date, String pattern) {
+ String returnValue = "";
+ if (date != null) {
+ SimpleDateFormat df = new SimpleDateFormat(pattern);
+ returnValue = df.format(date);
+ }
+ return (returnValue);
+ }
+
+ /**
+ * 使用用户格式格式化时间戳
+ *
+ * @param timestamp
+ * 时间戳
+ * @param pattern
+ * 日期格式
+ * @return
+ */
+ public static String format(String timestamp, String pattern) {
+ SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+ return sdf.format(new Date(Long.parseLong(timestamp)));
+ }
+
+ /**
+ * 使用预设格式提取字符串日期
+ *
+ * @param strDate
+ * 日期字符串
+ * @return
+ */
+ public static Date parse(String strDate) {
+ return parse(strDate, getDatePattern());
+ }
+
+ /**
+ * 使用用户格式提取字符串日期
+ *
+ * @param strDate
+ * 日期字符串
+ * @param pattern
+ * 日期格式
+ * @return
+ */
+ public static Date parse(String strDate, String pattern) {
+ SimpleDateFormat df = new SimpleDateFormat(pattern);
+ try {
+ return df.parse(strDate);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * 在日期上增加数个整月
+ *
+ * @param date
+ * 日期
+ * @param n
+ * 要增加的月数
+ * @return
+ */
+ public static Date addMonth(Date date, int n) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ cal.add(Calendar.MONTH, n);
+ return cal.getTime();
+ }
+
+ /**
+ * 在日期上增加天数
+ *
+ * @param date
+ * 日期
+ * @param n
+ * 要增加的天数
+ * @return
+ */
+ public static Date addDay(Date date, int n) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ cal.add(Calendar.DATE, n);
+ return cal.getTime();
+ }
+
+ /**
+ * 获取时间戳
+ */
+ public static String getTimeString() {
+ SimpleDateFormat df = new SimpleDateFormat(FORMAT_FULL);
+ Calendar calendar = Calendar.getInstance();
+ return df.format(calendar.getTime());
+ }
+
+ /**
+ * 获取日期年份
+ *
+ * @param date
+ * 日期
+ * @return
+ */
+ public static String getYear(Date date) {
+ return format(date).substring(0, 4);
+ }
+
+ /**
+ * 按默认格式的字符串距离今天的天数
+ *
+ * @param date
+ * 日期字符串
+ * @return
+ */
+ public static int countDays(String date) {
+ long t = Calendar.getInstance().getTime().getTime();
+ Calendar c = Calendar.getInstance();
+ c.setTime(parse(date));
+ long t1 = c.getTime().getTime();
+ return (int) (t / 1000 - t1 / 1000) / 3600 / 24;
+ }
+
+ /**
+ * 按用户格式字符串距离今天的天数
+ *
+ * @param date
+ * 日期字符串
+ * @param format
+ * 日期格式
+ * @return
+ */
+ public static int countDays(String date, String format) {
+ long t = Calendar.getInstance().getTime().getTime();
+ Calendar c = Calendar.getInstance();
+ c.setTime(parse(date, format));
+ long t1 = c.getTime().getTime();
+ return (int) (t / 1000 - t1 / 1000) / 3600 / 24;
+ }
+
+ public static String timeFormat(Date date, String format, Boolean flag, int beforeDay, int nowDay) {
+ if(date == null) {
+ date = new Date();
+ }
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ if(flag) {
+ cal.add(Calendar.DATE,-30);
+ } else {
+ cal.add(Calendar.DATE,0);
+ }
+ SimpleDateFormat sdf = new SimpleDateFormat(format);
+ return sdf.format(cal.getTime());
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ExceptionSupport.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ExceptionSupport.java
new file mode 100644
index 0000000..b5763eb
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ExceptionSupport.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/IdGen.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/IdGen.java
new file mode 100644
index 0000000..be66574
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/IdGen.java
@@ -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();
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Log4jHandler.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Log4jHandler.java
new file mode 100644
index 0000000..9b5f6c5
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Log4jHandler.java
@@ -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);
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/LogDebug.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/LogDebug.java
new file mode 100644
index 0000000..05917b1
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/LogDebug.java
@@ -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);
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/LogHandler.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/LogHandler.java
new file mode 100644
index 0000000..a6c8dc8
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/LogHandler.java
@@ -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);
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ObjectUtil.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ObjectUtil.java
new file mode 100644
index 0000000..e9d0d3b
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ObjectUtil.java
@@ -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);
+ }
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/RequestHelper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/RequestHelper.java
new file mode 100644
index 0000000..739342b
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/RequestHelper.java
@@ -0,0 +1,55 @@
+package com.tamguo.modules.sys.utils;
+
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class RequestHelper {
+ private static Logger logger = LoggerFactory.getLogger(RequestHelper.class);
+
+ /**
+ * 获取请求主机IP地址,如果通过代理进来,则透过防火墙获取真实IP地址;
+ *
+ * @param request
+ * @return
+ * @throws IOException
+ */
+ public final static String getIpAddress(HttpServletRequest request) {
+ // 获取请求主机IP地址,如果通过代理进来,则透过防火墙获取真实IP地址
+ String ip = request.getHeader("X-Forwarded-For");
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("Proxy-Client-IP");
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("WL-Proxy-Client-IP");
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("HTTP_CLIENT_IP");
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getRemoteAddr();
+ }
+ } else if (ip.length() > 15) {
+ String[] ips = ip.split(",");
+ for (int index = 0; index < ips.length; index++) {
+ String strIp = (String) ips[index];
+ if (!("unknown".equalsIgnoreCase(strIp))) {
+ ip = strIp;
+ break;
+ }
+ }
+ }
+ if (logger.isInfoEnabled()) {
+ logger.info("getIpAddress(HttpServletRequest) - Proxy-Client-IP - String ip=" + ip);
+ }
+ return ip;
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Result.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Result.java
new file mode 100644
index 0000000..5492e63
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Result.java
@@ -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 result = resultOfList(records, recordSum, rowsOfPage, userData);
+
+ return successResult(result);
+ }
+
+ public static Map resultOfList(Object records, Long recordSum, Long rowsOfPage) {
+ return resultOfList(records, recordSum, rowsOfPage, null);
+ }
+
+ public static Map resultOfList(Object Obj, Long records, Long rowsOfPage, Object userData) {
+ Map result = new HashMap();
+ result.put("rows", Obj);
+ result.put("records", records);
+ result.put("total", rowsOfPage);
+ if (null != userData) {
+ result.put("userdata", userData);
+ }
+ ;
+ return result;
+ }
+
+ public static Map jqGridResult(List> list, long totalCount, int pageSize, int currPage,
+ int totalPage) {
+ Map result = new HashMap();
+ 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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/SerializeTranscoder.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/SerializeTranscoder.java
new file mode 100644
index 0000000..4a11f39
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/SerializeTranscoder.java
@@ -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();
+ }
+ }
+ }
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Setting.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Setting.java
new file mode 100644
index 0000000..e1eb604
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Setting.java
@@ -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";
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ShaEncrypt.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ShaEncrypt.java
new file mode 100644
index 0000000..517a270
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ShaEncrypt.java
@@ -0,0 +1,68 @@
+package com.tamguo.modules.sys.utils;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+public class ShaEncrypt {
+
+ /**
+ * 传入文本内容,返回 SHA-256 串
+ *
+ * @param strText
+ * @return
+ */
+ public static String SHA256(final String strText) {
+ return SHA(strText, "SHA-256");
+ }
+
+ /**
+ * 传入文本内容,返回 SHA-512 串
+ *
+ * @param strText
+ * @return
+ */
+ public static String SHA512(final String strText) {
+ return SHA(strText, "SHA-512");
+ }
+
+ /**
+ * 字符串 SHA 加密
+ *
+ * @param strSourceText
+ * @return
+ */
+ private static String SHA(final String strText, final String strType) {
+ // 返回值
+ String strResult = null;
+
+ // 是否是有效字符串
+ if (strText != null && strText.length() > 0) {
+ try {
+ // SHA 加密开始
+ // 创建加密对象 并傳入加密類型
+ MessageDigest messageDigest = MessageDigest.getInstance(strType);
+ // 传入要加密的字符串
+ messageDigest.update(strText.getBytes());
+ // 得到 byte 類型结果
+ byte byteBuffer[] = messageDigest.digest();
+
+ // 將 byte 轉換爲 string
+ StringBuffer strHexString = new StringBuffer();
+ // 遍歷 byte buffer
+ for (int i = 0; i < byteBuffer.length; i++) {
+ String hex = Integer.toHexString(0xff & byteBuffer[i]);
+ if (hex.length() == 1) {
+ strHexString.append('0');
+ }
+ strHexString.append(hex);
+ }
+ // 得到返回結果
+ strResult = strHexString.toString();
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ }
+ }
+
+ return strResult;
+ }
+}
\ No newline at end of file
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ShiroUtils.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ShiroUtils.java
new file mode 100644
index 0000000..d2604ef
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/ShiroUtils.java
@@ -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;
+ }
+
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Status.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Status.java
new file mode 100644
index 0000000..c731d24
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Status.java
@@ -0,0 +1,5 @@
+package com.tamguo.modules.sys.utils;
+
+public enum Status {
+ SUCCESS , ERROR
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/TamguoConstant.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/TamguoConstant.java
new file mode 100644
index 0000000..df91baa
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/TamguoConstant.java
@@ -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";
+}
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Uploader.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Uploader.java
new file mode 100644
index 0000000..3c559d3
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/Uploader.java
@@ -0,0 +1,260 @@
+package com.tamguo.modules.sys.utils;
+
+import java.io.*;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.fileupload.*;
+import org.apache.commons.fileupload.FileUploadBase.InvalidContentTypeException;
+import org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException;
+import org.apache.commons.fileupload.util.*;
+import org.apache.commons.fileupload.servlet.*;
+import org.apache.commons.fileupload.FileItemIterator;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+
+import javax.servlet.http.HttpServletRequest;
+/**
+ * UEditor文件上传辅助类
+ *
+ */
+public class Uploader {
+ // 输出文件地址
+ private String url = "";
+ // 上传文件名
+ private String fileName = "";
+ // 状态
+ private String state = "";
+ // 文件类型
+ private String type = "";
+ // 原始文件名
+ private String originalName = "";
+ // 文件大小
+ private long size = 0;
+
+ private HttpServletRequest request = null;
+ private String title = "";
+
+ // 保存路径
+ private String savePath = "upload";
+ // 文件允许格式
+ private String[] allowFiles = { ".rar", ".doc", ".docx", ".zip", ".pdf",".txt", ".swf", ".wmv", ".gif", ".png", ".jpg", ".jpeg", ".bmp" };
+ // 文件大小限制,单位KB
+ private int maxSize = 10000;
+
+ private HashMap errorInfo = new HashMap();
+
+ public Uploader(HttpServletRequest request) {
+ this.request = request;
+ HashMap tmp = this.errorInfo;
+ tmp.put("SUCCESS", "SUCCESS"); //默认成功
+ tmp.put("NOFILE", "未包含文件上传域");
+ tmp.put("TYPE", "不允许的文件格式");
+ tmp.put("SIZE", "文件大小超出限制");
+ tmp.put("ENTYPE", "请求类型ENTYPE错误");
+ tmp.put("REQUEST", "上传请求异常");
+ tmp.put("IO", "IO异常");
+ tmp.put("DIR", "目录创建失败");
+ tmp.put("UNKNOWN", "未知错误");
+
+ }
+
+ public void upload() throws Exception {
+ boolean isMultipart = ServletFileUpload.isMultipartContent(this.request);
+ if (!isMultipart) {
+ this.state = this.errorInfo.get("NOFILE");
+ return;
+ }
+ DiskFileItemFactory dff = new DiskFileItemFactory();
+ String savePath = this.getFolder(this.savePath);
+ dff.setRepository(new File(savePath));
+ try {
+ ServletFileUpload sfu = new ServletFileUpload(dff);
+ sfu.setSizeMax(this.maxSize * 1024);
+ sfu.setHeaderEncoding("utf-8");
+ FileItemIterator fii = sfu.getItemIterator(this.request);
+ while (fii.hasNext()) {
+ FileItemStream fis = fii.next();
+ if (!fis.isFormField()) {
+ this.originalName = fis.getName().substring(fis.getName().lastIndexOf(System.getProperty("file.separator")) + 1);
+ if (!this.checkFileType(this.originalName)) {
+ this.state = this.errorInfo.get("TYPE");
+ continue;
+ }
+ this.fileName = this.getName(this.originalName);
+ this.type = this.getFileExt(this.fileName);
+ this.url = savePath + "/" + this.fileName;
+ BufferedInputStream in = new BufferedInputStream(fis.openStream());
+ File file = new File(this.getPhysicalPath(this.url));
+ FileOutputStream out = new FileOutputStream( file );
+ BufferedOutputStream output = new BufferedOutputStream(out);
+ Streams.copy(in, output, true);
+ this.state=this.errorInfo.get("SUCCESS");
+ this.size = file.length();
+ //UE中只会处理单张上传,完成后即退出
+ break;
+ } else {
+ String fname = fis.getFieldName();
+ //只处理title,其余表单请自行处理
+ if(!fname.equals("pictitle")){
+ continue;
+ }
+ BufferedInputStream in = new BufferedInputStream(fis.openStream());
+ BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+ StringBuffer result = new StringBuffer();
+ while (reader.ready()) {
+ result.append((char)reader.read());
+ }
+ this.title = new String(result.toString().getBytes(),"utf-8");
+ reader.close();
+
+ }
+ }
+ } catch (SizeLimitExceededException e) {
+ this.state = this.errorInfo.get("SIZE");
+ } catch (InvalidContentTypeException e) {
+ this.state = this.errorInfo.get("ENTYPE");
+ } catch (FileUploadException e) {
+ this.state = this.errorInfo.get("REQUEST");
+ } catch (Exception e) {
+ this.state = this.errorInfo.get("UNKNOWN");
+ }
+ }
+
+ /**
+ * 接受并保存以base64格式上传的文件
+ * @param fieldName
+ */
+ public void uploadBase64(String fieldName){
+ String savePath = this.getFolder(this.savePath);
+ String base64Data = this.request.getParameter(fieldName);
+ this.fileName = this.getName("test.png");
+ this.url = savePath + "/" + this.fileName;
+ try {
+ File outFile = new File(this.getPhysicalPath(this.url));
+ OutputStream ro = new FileOutputStream(outFile);
+ byte[] b = Base64.decodeBase64(base64Data);
+ for (int i = 0; i < b.length; ++i) {
+ if (b[i] < 0) {
+ b[i] += 256;
+ }
+ }
+ ro.write(b);
+ ro.flush();
+ ro.close();
+ this.state=this.errorInfo.get("SUCCESS");
+ } catch (Exception e) {
+ this.state = this.errorInfo.get("IO");
+ }
+ }
+
+ /**
+ * 文件类型判断
+ *
+ * @param fileName
+ * @return
+ */
+ private boolean checkFileType(String fileName) {
+ Iterator type = Arrays.asList(this.allowFiles).iterator();
+ while (type.hasNext()) {
+ String ext = type.next();
+ if (fileName.toLowerCase().endsWith(ext)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 获取文件扩展名
+ *
+ * @return string
+ */
+ private String getFileExt(String fileName) {
+ return fileName.substring(fileName.lastIndexOf("."));
+ }
+
+ /**
+ * 依据原始文件名生成新文件名
+ * @return
+ */
+ private String getName(String fileName) {
+ Random random = new Random();
+ return this.fileName = "" + random.nextInt(10000)
+ + System.currentTimeMillis() + this.getFileExt(fileName);
+ }
+
+ /**
+ * 根据字符串创建本地目录 并按照日期建立子目录返回
+ * @param path
+ * @return
+ */
+ private String getFolder(String path) {
+ SimpleDateFormat formater = new SimpleDateFormat("yyyyMMdd");
+ path += "/" + formater.format(new Date());
+ File dir = new File(this.getPhysicalPath(path));
+ if (!dir.exists()) {
+ try {
+ dir.mkdirs();
+ } catch (Exception e) {
+ this.state = this.errorInfo.get("DIR");
+ return "";
+ }
+ }
+ return path;
+ }
+
+ /**
+ * 根据传入的虚拟路径获取物理路径
+ *
+ * @param path
+ * @return
+ */
+ private String getPhysicalPath(String path) {
+ String servletPath = this.request.getServletPath();
+ String realPath = this.request.getSession().getServletContext()
+ .getRealPath(servletPath);
+ return new File(realPath).getParent() +"/" +path;
+ }
+
+ public void setSavePath(String savePath) {
+ this.savePath = savePath;
+ }
+
+ public void setAllowFiles(String[] allowFiles) {
+ this.allowFiles = allowFiles;
+ }
+
+ public void setMaxSize(int size) {
+ this.maxSize = size;
+ }
+
+ public long getSize() {
+ return this.size;
+ }
+
+ public String getUrl() {
+ return this.url;
+ }
+
+ public String getFileName() {
+ return this.fileName;
+ }
+
+ public String getState() {
+ return this.state;
+ }
+
+ public String getTitle() {
+ return this.title;
+ }
+
+ public String getType() {
+ return this.type;
+ }
+
+ public String getOriginalName() {
+ return this.originalName;
+ }
+}
+
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/UploaderMessage.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/UploaderMessage.java
new file mode 100644
index 0000000..3eeb74d
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/UploaderMessage.java
@@ -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 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 getErrorKys() {
+ return errorKys;
+ }
+
+ public void setErrorKys(ArrayList 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;
+ }
+
+
+}
+
+
+
+
diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/XMLConfiguration.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/XMLConfiguration.java
new file mode 100644
index 0000000..b7aab39
--- /dev/null
+++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/sys/utils/XMLConfiguration.java
@@ -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;
+ }
+}
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysAreaMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysAreaMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysAreaMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysAreaMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysCompanyMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysCompanyMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysCompanyMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysCompanyMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysMenuMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysMenuMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysMenuMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysMenuMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysOfficeMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysOfficeMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysOfficeMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysOfficeMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysPostMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysPostMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysPostMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysPostMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysRoleDataScopeMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysRoleDataScopeMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysRoleDataScopeMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysRoleDataScopeMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysRoleMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysRoleMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysRoleMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysRoleMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysRoleMenuMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysRoleMenuMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysRoleMenuMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysRoleMenuMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysUserDataScopeMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysUserDataScopeMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysUserDataScopeMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysUserDataScopeMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysUserMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysUserMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysUserMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysUserMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysUserPostMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysUserPostMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysUserPostMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysUserPostMapper.xml
diff --git a/tamguo-oms/src/main/resources/mappers/sys/SysUserRoleMapper.xml b/tamguo-modules-core/src/main/resources/mappers/sys/SysUserRoleMapper.xml
similarity index 100%
rename from tamguo-oms/src/main/resources/mappers/sys/SysUserRoleMapper.xml
rename to tamguo-modules-core/src/main/resources/mappers/sys/SysUserRoleMapper.xml
diff --git a/tamguo-oms/pom.xml b/tamguo-oms/pom.xml
index 0e42ddf..753a620 100644
--- a/tamguo-oms/pom.xml
+++ b/tamguo-oms/pom.xml
@@ -133,6 +133,12 @@
blade-patchca
1.0.5
+
+
+ com.tamguo
+ tamguo-modules-core
+ 1.0.0
+