Commit 7b5de3db authored by 黄瑜's avatar 黄瑜

初次提交

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="dao" />
<module name="domain" />
<module name="service" />
<module name="web" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dao" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/domain" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/service" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/web" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$/web" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
## 此项目为奶业APP后台服务项目
### 1.特殊需求说明
### 2.开发说明
#### 2.1 开发使用的数据库配置路径
> web/src/main/filters/dev.properties
修改此文件下的配置,即可更换数据库连接
#### 2.2 开发者需要自行导入excel的jar包
>jar包中实现了一句代码导入导出excel
```
mvn install:install-file -Dfile=docs/jar/excel-1.1.1-SNAPSHOT.jar -DgroupId=excel -DartifactId=excel -Dversion=1.1.1-SNAPSHOT -Dpackaging=jar
```
>jar项目维护在gitlab.haomo-studio.com上的excel-jar的项目
>使用请看的demo请看:web/src/main/test/com/haomostudio/SpringMVCTemplate/test/Test.java
*.iml
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.haomostudio.SpringMVCTemplate</groupId>
<artifactId>SpringMVCTemplate</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>dao</artifactId>
<packaging>jar</packaging>
<name>dao</name>
<description>dao</description>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.haomostudio.SpringMVCTemplate</groupId>
<artifactId>domain</artifactId>
<version>${SpringMVCTemplate.domain.version}</version>
</dependency>
</dependencies>
<build>
<finalName>dao</finalName>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>
package com.haomostudio.SpringMVCTemplate.dao;
import com.haomostudio.SpringMVCTemplate.po.TesDepartment;
import com.haomostudio.SpringMVCTemplate.po.TesDepartmentExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
public interface TesDepartmentMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
long countByExample(TesDepartmentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByExample(TesDepartmentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insert(TesDepartment record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insertSelective(TesDepartment record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesDepartment> selectByExampleWithRowbounds(TesDepartmentExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesDepartment> selectByExample(TesDepartmentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
TesDepartment selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExampleSelective(@Param("record") TesDepartment record, @Param("example") TesDepartmentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExample(@Param("record") TesDepartment record, @Param("example") TesDepartmentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKeySelective(TesDepartment record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKey(TesDepartment record);
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.dao;
import com.haomostudio.SpringMVCTemplate.po.TesMenuGroup;
import com.haomostudio.SpringMVCTemplate.po.TesMenuGroupExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
public interface TesMenuGroupMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
long countByExample(TesMenuGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByExample(TesMenuGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insert(TesMenuGroup record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insertSelective(TesMenuGroup record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesMenuGroup> selectByExampleWithRowbounds(TesMenuGroupExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesMenuGroup> selectByExample(TesMenuGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
TesMenuGroup selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExampleSelective(@Param("record") TesMenuGroup record, @Param("example") TesMenuGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExample(@Param("record") TesMenuGroup record, @Param("example") TesMenuGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKeySelective(TesMenuGroup record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKey(TesMenuGroup record);
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.dao;
import com.haomostudio.SpringMVCTemplate.po.TesMenu;
import com.haomostudio.SpringMVCTemplate.po.TesMenuExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
public interface TesMenuMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
long countByExample(TesMenuExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByExample(TesMenuExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insert(TesMenu record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insertSelective(TesMenu record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesMenu> selectByExampleWithRowbounds(TesMenuExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesMenu> selectByExample(TesMenuExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
TesMenu selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExampleSelective(@Param("record") TesMenu record, @Param("example") TesMenuExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExample(@Param("record") TesMenu record, @Param("example") TesMenuExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKeySelective(TesMenu record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKey(TesMenu record);
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.dao;
import com.haomostudio.SpringMVCTemplate.po.TesMenuModule;
import com.haomostudio.SpringMVCTemplate.po.TesMenuModuleExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
public interface TesMenuModuleMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
long countByExample(TesMenuModuleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByExample(TesMenuModuleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insert(TesMenuModule record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insertSelective(TesMenuModule record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesMenuModule> selectByExampleWithRowbounds(TesMenuModuleExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesMenuModule> selectByExample(TesMenuModuleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
TesMenuModule selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExampleSelective(@Param("record") TesMenuModule record, @Param("example") TesMenuModuleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExample(@Param("record") TesMenuModule record, @Param("example") TesMenuModuleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKeySelective(TesMenuModule record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKey(TesMenuModule record);
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.dao;
import com.haomostudio.SpringMVCTemplate.po.TesRole;
import com.haomostudio.SpringMVCTemplate.po.TesRoleExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
public interface TesRoleMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
long countByExample(TesRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByExample(TesRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insert(TesRole record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insertSelective(TesRole record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesRole> selectByExampleWithRowbounds(TesRoleExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesRole> selectByExample(TesRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
TesRole selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExampleSelective(@Param("record") TesRole record, @Param("example") TesRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExample(@Param("record") TesRole record, @Param("example") TesRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKeySelective(TesRole record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKey(TesRole record);
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.dao;
import com.haomostudio.SpringMVCTemplate.po.TesUser;
import com.haomostudio.SpringMVCTemplate.po.TesUserExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
public interface TesUserMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
long countByExample(TesUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByExample(TesUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insert(TesUser record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insertSelective(TesUser record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesUser> selectByExampleWithRowbounds(TesUserExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TesUser> selectByExample(TesUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
TesUser selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExampleSelective(@Param("record") TesUser record, @Param("example") TesUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExample(@Param("record") TesUser record, @Param("example") TesUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKeySelective(TesUser record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_USER
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKey(TesUser record);
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.dao;
import com.haomostudio.SpringMVCTemplate.po.TestRoleGroup;
import com.haomostudio.SpringMVCTemplate.po.TestRoleGroupExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
public interface TestRoleGroupMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
long countByExample(TestRoleGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByExample(TestRoleGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insert(TestRoleGroup record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int insertSelective(TestRoleGroup record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TestRoleGroup> selectByExampleWithRowbounds(TestRoleGroupExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
List<TestRoleGroup> selectByExample(TestRoleGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
TestRoleGroup selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExampleSelective(@Param("record") TestRoleGroup record, @Param("example") TestRoleGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByExample(@Param("record") TestRoleGroup record, @Param("example") TestRoleGroupExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKeySelective(TestRoleGroup record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TEST_ROLE_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
int updateByPrimaryKey(TestRoleGroup record);
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.dao.common;
/**
* Created by shidaizhoukan on 2017/3/16.
*/
public class Constants {
public static final char UNDERLINE = '_';
public final static String SCRIPT_PATH = "/scripts";
public final static String FORMFILE_PATH = "/form";
public final static String AVATAR_PATH = "/upload/user/avatar";
public final static String SEAFILE_COMMON_LIB = "common";
public final static String AFTER_SALES_SEAFILE_LIB = "/afterSales";
public final static String SEAFILE_LOGISTICS_DIR = "/logistics";
public final static String FILING_TENDER_SEAFILE_LIB = "/filingTender";
public static final String COLUMN_ID = "ID";
public static final String COLUMN_SCENE_INSTANCE_ID = "SCENE_INSTANCE_ID";
public static final String COLUMN_FORM_INSTANCE_ID = "FORM_INSTANCE_ID";
public static final String COLUMN_CREATE_TIME = "CREATE_TIME";
public static final String COLUMN_UPDATE_TIME = "UPDATE_TIME";
/**
* 表单引擎自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_FORM_ENGINE = "T_";
/**
* 用户自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_USER = "U_";
/**
* 部门自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_DEPARTMENT = "D_";
/**
* 客户自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_CUSTOMER = "C_";
/**
* 物料自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_MATERIAL = "M_";
/**
* 业务场景自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_SCENE = "S_";
/**
* 报修单的编号标识,和编号长度
*/
public static final String REPAIR_ORDER_NO_TYPE = "Repair_OrderNo_Type";
public static final int REPAIR_ORDER_NO_LENGTH = 4;
// 报备编号
public static final String FILING_NO_TYPE = "FILING_NO_TYPE";
public static class UserQueryConditionType {
public static final String afterSalesCallCenterQuery = "afterSalesCallCenterQuery";
}
public static class FilingHandleStatus {
// 打开
public static final String Active = "A";
// 确定(可以被合同使用)
public static final String Confirm = "C";
// 关闭/办结(手动作废)
public static final String End = "E";
// 超时
public static final String Overtime = "O";
// 待办
public static final String Wait = "W";
// 已办
public static final String Pass = "P";
// 跳过
public static final String Skip = "S";
// 中标
public static final String ZhongBiao = "O";
// 未中标
public static final String WeizhongBiao = "X";
}
}
package com.haomostudio.SpringMVCTemplate.dao.common.util;
import com.haomostudio.SpringMVCTemplate.dao.impl.DataBaseDao;
import org.springframework.util.StringUtils;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Created by shidaizhoukan on 2017/3/16.
*/
public class DataBaseOperationUtils {
public static final String DB_TYPE_ORACLE = "oracle";
public static final String DB_TYPE_MYSQL = "mysql";
public static final String DATA_TYPE_VARCHAR2 = "varchar2";
public static final String DATA_TYPE_TIMESTAMP = "timestamp";
public static final String DATA_TYPE_INT = "number(11, 0)";
public static final String DATA_TYPE_FLOAT = "FLOAT";
public static final String DATA_TYPE_DOUBLE = "FLOAT";
public static final String DATA_TYPE_NUMBER = "NUMBER";
public static final SimpleDateFormat ORACLE_SDF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
public static List<String> getPropertyName(Object obj) {
ArrayList list = new ArrayList();
Field[] fs = obj.getClass().getDeclaredFields();
Field[] var7 = fs;
int var6 = fs.length;
for(int var5 = 0; var5 < var6; ++var5) {
Field f = var7[var5];
list.add(f.getName());
}
return list;
}
public static Object[] GetObjectArgs(Map<String, Object> map, String dbType) {
Map<String, Object> params = new LinkedHashMap<>();
for (Map.Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (DB_TYPE_ORACLE.equals(dbType) && (value instanceof Date)) {
value = ORACLE_SDF.format((Date)value);
}
params.put(key, value);
}
return params.values().toArray();
}
public static List<Object[]> GetObjectArgs(List<Map<String, Object>> maps, String dbType) {
List<Object[]> rets = new ArrayList<>();
Map<String, Object> params = new LinkedHashMap<>();
for (Map<String, Object> map : maps) {
for (Map.Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (DB_TYPE_ORACLE.equals(dbType) && (value instanceof Date)) {
value = ORACLE_SDF.format((Date) value);
}
params.put(key, value);
}
rets.add(params.values().toArray());
}
return rets;
}
public static String GetNames(Map<String, Object> map, String operation, String dbType) {
String columns = "";
try {
if(DataBaseDao.INSERT.equals(operation)) {
String params = "(";
columns = "(";
for(Map.Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
columns = columns + (DB_TYPE_ORACLE.equals(dbType)? key.toUpperCase() + ",":"`" + key + "`,");
if (DB_TYPE_ORACLE.equals(dbType) && (value instanceof Date)) {
params = params + "to_date(?,'YYYY-MM-DD HH24:MI:SS'),";
} else {
params = params + "?,";
}
}
if(!"(".equals(columns)) {
columns = columns.substring(0, columns.length() - 1);
}
if(!"(".equals(params)) {
params = params.substring(0, params.length() - 1);
}
columns = columns + ")";
params = params + ")";
return columns + " VALUES" + params;
}
if(DataBaseDao.UPDATE.equals(operation)) {
for(Map.Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if ("ID".equals(key)) {
continue;
}
columns = columns + (DB_TYPE_ORACLE.equals(dbType)? key.toUpperCase() + "":"`" + key + "`");
if (DB_TYPE_ORACLE.equals(dbType) && (value instanceof Date)) {
columns = columns + "=to_date(?,'YYYY-MM-DD HH24:MI:SS'),";
} else {
columns = columns + "=?,";
}
}
if(columns.substring(columns.length() - 1, columns.length()).equals(",")) {
columns = columns.substring(0, columns.length() - 1);
}
columns = columns + " WHERE ID=?";
}
if (DataBaseDao.DELETE.equals(operation)) {
for(String key : map.keySet()) {
columns = columns + (DB_TYPE_ORACLE.equals(dbType)? key.toUpperCase() + "=? AND ":"`" + key + "`=? AND ");
}
if(columns.endsWith(" AND ")) {
columns = columns.substring(0, columns.length() - 5);
}
}
} catch (Exception var9) {
var9.printStackTrace();
}
return columns;
}
public static String getInSQL(String params, String flag) {
String tempStr = params.replace(flag, ",");
String[] tempStrArr = tempStr.split(",");
String InSQL = "";
for(int i = 0; i < tempStrArr.length; ++i) {
InSQL = InSQL + "?,";
}
if(!"".equals(InSQL)) {
InSQL = InSQL.substring(0, InSQL.length() - 1);
}
return InSQL;
}
public static List<Object> getInArgs(String params, String flag, String dataType) {
String tempStr = params.replace(flag, ",");
String[] tempStrArr = tempStr.split(",");
ArrayList obj = new ArrayList();
int i;
if("varchar".equalsIgnoreCase(dataType) || "varchar2".equalsIgnoreCase(dataType) || "blob".equalsIgnoreCase(dataType)) {
for(i = 0; i < tempStrArr.length; ++i) {
obj.add(tempStrArr[i]);
}
} else if("integer".equals(dataType)) {
for(i = 0; i < tempStrArr.length; ++i) {
obj.add(Integer.valueOf(Integer.parseInt(tempStrArr[i])));
}
}
return obj;
}
private static String getDataType(int type) {
switch (type) {
case 1:
return DATA_TYPE_VARCHAR2;
case 2:
return DATA_TYPE_VARCHAR2;
case 3:
return DATA_TYPE_TIMESTAMP;
case 4:
return DATA_TYPE_TIMESTAMP;
case 5:
return DATA_TYPE_VARCHAR2;
case 6:
return DATA_TYPE_VARCHAR2;
case 7:
return DATA_TYPE_VARCHAR2;
case 8:
return DATA_TYPE_VARCHAR2;
case 9:
return DATA_TYPE_INT;
case 10:
// return DATA_TYPE_DOUBLE;
return DATA_TYPE_NUMBER;
case 11:
return DATA_TYPE_VARCHAR2;
case 12:
return DATA_TYPE_VARCHAR2;
default:
return DATA_TYPE_VARCHAR2;
}
}
public static String getMySQLTableName(String prefix, String tableName) {
return "`" + getFinalTableName(prefix, tableName) + "`";
}
public static String getOracleTableName(String prefix, String tableName) {
return getFinalTableName(prefix, tableName).toUpperCase();
}
private static String getFinalTableName(String prefix, String tableName) {
String finalName = "";
if (!StringUtils.isEmpty(prefix)) {
finalName += prefix.trim();
finalName += tableName.trim().toUpperCase();
} else {
finalName += tableName.trim().toLowerCase();
}
return finalName;
}
}
package com.haomostudio.SpringMVCTemplate.dao.impl;
import java.util.List;
import java.util.Map;
/**
* Created by shidaizhoukan on 2017/3/16.
*/
public interface DataBaseDao {
String START = "start";
String LIMIT = "limit";
String UPDATE = "UPDATE";
String INSERT = "INSERT";
String DELETE = "DELETE";
int queryForInt(String sql, List<Object> params);
boolean executeSQL(String sql);
int update(String tableNamePrefix, String tableName, Map<String, Object> map);
int insert(String tableNamePrefix, String tableName, Map<String, Object> map);
int inserts(String tableNamePrefix, String tableName, List<Map<String, Object>> maps);
int delete(String tableNamePrefix, String tableName, Map<String, Object> map);
boolean executeSQL(String sql, List<Object> params);
Map<String, Object> executeQuerySQL(String sql);
List<Map<String, Object>> executeListSQL(String sql);
void executeSingleSQL(String sql);
List<Map<String, Object>> getTableData(String tableNamePrefix, String tableName, Map<String, Object> params);
int getTableDataCount(String tableNamePrefix, String tableName, Map<String, Object> params);
int getColumnNotNullCount(String tableNamePrefix, String tableName, String columnName);
int getColumnNotZeroCount(String tableNamePrefix, String tableName, String columnName);
}
package com.haomostudio.SpringMVCTemplate.dao.impl;
import com.haomostudio.SpringMVCTemplate.dao.common.Constants;
import com.haomostudio.SpringMVCTemplate.dao.common.util.DataBaseOperationUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import javax.sql.DataSource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by shidaizhoukan on 2017/3/16.
*/
@Repository(value = "databaseDao")
public class OracleDataBaseDaoImpl implements DataBaseDao {
public static final String PAGINATION_PREFIX = "select * from (select row_.*, rownum rownum_ from(";
public static final String PAGINATION_SUFFIX = ")row_ where rownum <= ?) where rownum_ > ?";
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private DataSource dataSource;
public List<Map<String, Object>> queryForList(String sql, List<Object> params) {
try {
List e = params.size() > 0 ? this.getJdbcTemplate().queryForList(sql, params.toArray()) :
this.getJdbcTemplate().queryForList(sql);
return e;
} catch (Exception var4) {
var4.printStackTrace();
return new ArrayList<>();
}
}
@Override
public int queryForInt(String sql, List<Object> params) {
try {
if (null == params) {
params = new ArrayList<>();
}
logger.debug("executeSQL:{}\r\nparams:{}", sql, params);
return params.size() > 0 ? this.getJdbcTemplate().queryForObject(sql, params.toArray(),Integer.class) :
this.getJdbcTemplate().queryForObject(sql,Integer.class);
} catch (Exception var4) {
var4.printStackTrace();
return 0;
}
}
@Override
public boolean executeSQL(String sql) {
logger.debug("executeSQL:{}", sql);
String[] sqlList = sql.split(";");
JdbcTemplate jdbcTemplate = this.getJdbcTemplate();
for (String s : sqlList) {
jdbcTemplate.execute(s);
}
return true;
}
@Override
public int update(String tableNamePrefix, String tableName, Map<String, Object> map) {
try {
//保证ID是最后一个字段
String id = (String) map.get(Constants.COLUMN_ID);
map.remove(Constants.COLUMN_ID);
map.put(Constants.COLUMN_ID, id);
String sql = "UPDATE " + DataBaseOperationUtils.getOracleTableName(tableNamePrefix, tableName) + " SET "
+ DataBaseOperationUtils.GetNames(map, UPDATE, DataBaseOperationUtils.DB_TYPE_ORACLE);
logger.debug("update sql:{}\r\nparams:{}", sql, map);
int row = this.getJdbcTemplate().update(sql, DataBaseOperationUtils.GetObjectArgs(map, DataBaseOperationUtils.DB_TYPE_ORACLE));
return row;
} catch (Exception var4) {
var4.printStackTrace();
throw var4;
}
}
public int insert(String tableNamePrefix, String tableName, Map<String, Object> map) {
try {
String sql = "INSERT INTO " + DataBaseOperationUtils.getOracleTableName(tableNamePrefix, tableName) + " "
+ DataBaseOperationUtils.GetNames(map, INSERT, DataBaseOperationUtils.DB_TYPE_ORACLE);
logger.debug("insert sql:{}\r\nparams:{}", sql, map);
int ID = this.getJdbcTemplate().update(sql, DataBaseOperationUtils.GetObjectArgs(map, DataBaseOperationUtils.DB_TYPE_ORACLE));
return ID;
} catch (Exception var4) {
var4.printStackTrace();
throw var4;
}
}
public int inserts(String tableNamePrefix, String tableName, List<Map<String, Object>> maps) {
try {
String sql = "INSERT INTO " + DataBaseOperationUtils.getOracleTableName(tableNamePrefix, tableName) + " "
+ DataBaseOperationUtils.GetNames(maps.get(0), INSERT, DataBaseOperationUtils.DB_TYPE_ORACLE);
logger.debug("inserts sql:{}\r\nparams:{}", sql, maps);
int[] ints = this.getJdbcTemplate().batchUpdate(sql, DataBaseOperationUtils.GetObjectArgs(maps, DataBaseOperationUtils.DB_TYPE_ORACLE));
return 0;
} catch (Exception var4) {
var4.printStackTrace();
throw var4;
}
}
@Override
public int delete(String tableNamePrefix, String tableName, Map<String, Object> map) {
try {
String sql = "DELETE FROM " + DataBaseOperationUtils.getOracleTableName(tableNamePrefix, tableName) + " WHERE "
+ DataBaseOperationUtils.GetNames(map, DELETE, DataBaseOperationUtils.DB_TYPE_ORACLE);
logger.debug("delete sql:{}\r\nparams:{}", sql, map);
int rows = this.getJdbcTemplate().update(sql, DataBaseOperationUtils.GetObjectArgs(map, DataBaseOperationUtils.DB_TYPE_ORACLE));
return rows;
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
@Override
public boolean executeSQL(String sql, List<Object> params) {
logger.debug("executeSQL:{}\r\nparams:{}", sql, params);
int status = this.getJdbcTemplate().update(sql, params.toArray());
return status > 0;
}
@Override
public Map<String, Object> executeQuerySQL(String sql) {
logger.debug("executeQuerySQL:{}", sql);
return this.getJdbcTemplate().queryForMap(sql);
}
public List<Map<String, Object>> executeListSQL(String sql) {
logger.debug("executeListSQL:{}", sql);
return this.getJdbcTemplate().queryForList(sql);
}
@Override
public void executeSingleSQL(String sql) {
logger.debug("executeSingleSQL:{}", sql);
this.getJdbcTemplate().execute(sql);
}
@Override
public List<Map<String, Object>> getTableData(String tableNamePrefix, String tableName, Map<String, Object> params) {
return null;
}
@Override
public int getTableDataCount(String tableNamePrefix, String tableName, Map<String, Object> params) {
return 0;
}
@Override
public int getColumnNotNullCount(String tableNamePrefix, String tableName, String columnName) {
return 0;
}
@Override
public int getColumnNotZeroCount(String tableNamePrefix, String tableName, String columnName) {
return 0;
}
private JdbcTemplate getJdbcTemplate() {
return new JdbcTemplate(dataSource);
}
}
#!/bin/bash
#rsync -avz web/target/SpringMVCTemplate.war member@tentop.com.cn:/opt/tomcat8/webapps/SpringMVCTemplate.war
#rsync -avz web/target/SpringMVCTemplate.war member@haomo-tech.com:/data/tomcat/webapps/SpringMVCTemplate.war
rsync -avz -e "ssh -p12322" web/target/SpringMVCTemplate.war haomo@haomo-studio.com:/opt/hm_tomcat/webapps
\ No newline at end of file
This diff is collapsed.
# 本模板的实验性特性
本文档将对潜在的第三方组件进行研究,以决定是否将其引入本模板库
## modelmapper
地址:
http://modelmapper.org/
特性:
## Query DSL
特性:
支持标准的Query DSL语言,从而使得本模板更具有通用性
参考:
http://www.jianshu.com/p/6d210f0e7577
## Apache Shiro
特性:
企业级的安全框架, 非常适合各类大中小型的应用
参考:
http://blog.csdn.net/jadyer/article/details/12208847
http://www.chengxuyuans.com/javabase/96878.html
https://shiro.apache.org/webapp-tutorial.html
http://qtdebug.com/spring-web/16.%20Shiro%20%E9%85%8D%E7%BD%AE%E7%BC%93%E5%AD%98.html
## Spring Security
特性:
比Shiro复杂不少, 建议在非常复杂的情况下使用
*.iml
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.haomostudio.SpringMVCTemplate</groupId>
<artifactId>SpringMVCTemplate</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>domain</artifactId>
<packaging>jar</packaging>
<name>domain</name>
<description>domain</description>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<finalName>domain</finalName>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>
package com.haomostudio.SpringMVCTemplate.common.domain;
/**
*
*/
public class Column {
private String name;
private String dataType;
private int length;
private boolean isNull;
private boolean isKey;
private boolean autoIncrement;
private Integer decimalPlace;
public Integer getDecimalPlace() { return decimalPlace; }
public void setDecimalPlace(Integer decimalPlace) { this.decimalPlace = decimalPlace; }
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public boolean isNull() {
return isNull;
}
public void setIsNull(boolean isNull) {
this.isNull = isNull;
}
public boolean isKey() {
return isKey;
}
public void setIsKey(boolean isKey) {
this.isKey = isKey;
}
public boolean isAutoIncrement() {
return autoIncrement;
}
public void setAutoIncrement(boolean autoIncrement) {
this.autoIncrement = autoIncrement;
}
}
package com.haomostudio.SpringMVCTemplate.common.domain;
/**
* Created by macam on 16/4/15.
*/
public enum ColumnOperator {
equal("eq", "="),
neq("neq", "<>"),
lt("lt", "<"),
lte("lte", "<="),
gt("gt", ">"),
gte("gte", ">="),
like("like", "like"),
isNull("is null", "is null"),
isNotNull("is not null", "is not null");
private String operatorName;
private String dbOperator;
ColumnOperator(String operatorName, String dbOperator) {
this.operatorName = operatorName;
this.dbOperator = dbOperator;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public String getDbOperator() {
return dbOperator;
}
public void setDbOperator(String dbOperator) {
this.dbOperator = dbOperator;
}
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.common.util;
import org.apache.commons.beanutils.BeanUtils;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public class BeanHelper<T> {
private final Class<T> clazz;
public BeanHelper(Class<T> clazz) {
this.clazz = clazz;
}
public List<T> convert(List<Map<String, Object>> mapList) {
try {
ArrayList e = new ArrayList();
Iterator var4 = mapList.iterator();
while(var4.hasNext()) {
Map map = (Map)var4.next();
Object tempClass = this.clazz.newInstance();
this.setValue(tempClass, map);
e.add(tempClass);
}
return e;
} catch (Exception var6) {
return null;
}
}
public int setValue(Object bean, Map<?, ?> map) throws Exception {
int cnt = 0;
if(bean != null && map != null) {
Iterator names = map.keySet().iterator();
while(names.hasNext()) {
String name = (String)names.next();
if(name != null) {
Object value = map.get(name);
this.setProperty(bean, name, value);
++cnt;
}
}
return cnt;
} else {
return cnt;
}
}
public void setProperty(Object bean, String name, Object value) throws Exception {
try {
BeanUtils.copyProperty(bean, name, value);
} catch (Exception var5) {
throw new Exception("Set Value Error, Value: " + value.toString() + " Fields: " + name + ", Reason:/r/n" + var5, var5);
}
}
}
package com.haomostudio.SpringMVCTemplate.common.util;
/**
* Created by Administrator on 2016/2/27.
*/
public class Constants {
public static final char UNDERLINE = '_';
public final static String SCRIPT_PATH = "/scripts";
public final static String FORMFILE_PATH = "/form";
public final static String AVATAR_PATH = "/upload/user/avatar";
public final static String SEAFILE_COMMON_LIB = "common";
public final static String AFTER_SALES_SEAFILE_LIB = "/afterSales";
public final static String SEAFILE_LOGISTICS_DIR = "/logistics";
public final static String FILING_TENDER_SEAFILE_LIB = "/filingTender";
public static final String COLUMN_ID = "ID";
public static final String COLUMN_SCENE_INSTANCE_ID = "SCENE_INSTANCE_ID";
public static final String COLUMN_FORM_INSTANCE_ID = "FORM_INSTANCE_ID";
public static final String COLUMN_CREATE_TIME = "CREATE_TIME";
public static final String COLUMN_UPDATE_TIME = "UPDATE_TIME";
/**
* 表单引擎自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_FORM_ENGINE = "T_";
/**
* 用户自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_USER = "U_";
/**
* 部门自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_DEPARTMENT = "D_";
/**
* 客户自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_CUSTOMER = "C_";
/**
* 物料自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_MATERIAL = "M_";
/**
* 业务场景自定义表名前缀
*/
public static final String TABLE_NAME_PREFIX_SCENE = "S_";
/**
* 报修单的编号标识,和编号长度
*/
public static final String REPAIR_ORDER_NO_TYPE = "Repair_OrderNo_Type";
public static final int REPAIR_ORDER_NO_LENGTH = 4;
// 报备编号
public static final String FILING_NO_TYPE = "FILING_NO_TYPE";
public static class UserQueryConditionType {
public static final String afterSalesCallCenterQuery = "afterSalesCallCenterQuery";
}
public static class FilingHandleStatus {
// 打开
public static final String Active = "A";
// 确定(可以被合同使用)
public static final String Confirm = "C";
// 关闭/办结(手动作废)
public static final String End = "E";
// 超时
public static final String Overtime = "O";
// 待办
public static final String Wait = "W";
// 已办
public static final String Pass = "P";
// 跳过
public static final String Skip = "S";
// 中标
public static final String ZhongBiao = "O";
// 未中标
public static final String WeizhongBiao = "X";
}
}
package com.haomostudio.SpringMVCTemplate.common.util;
import com.alibaba.fastjson.JSONObject;
import com.haomostudio.SpringMVCTemplate.common.domain.Column;
import org.springframework.util.StringUtils;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class DataBaseOperationUtils {
public static final String DB_TYPE_ORACLE = "oracle";
public static final String DB_TYPE_MYSQL = "mysql";
public static final String DATA_TYPE_VARCHAR = "varchar";
public static final String DATA_TYPE_TIMESTAMP = "timestamp";
public static final String DATA_TYPE_TEXT = "text";
public static final String DATA_TYPE_INT = "int";
public static final String DATA_TYPE_FLOAT = "float";
public static final String DATA_TYPE_DOUBLE = "double";
public static List<String> getPropertyName(Object obj) {
ArrayList list = new ArrayList();
Field[] fs = obj.getClass().getDeclaredFields();
Field[] var7 = fs;
int var6 = fs.length;
for(int var5 = 0; var5 < var6; ++var5) {
Field f = var7[var5];
list.add(f.getName());
}
return list;
}
public static Object[] GetObjectArgs(Map<String, Object> map) {
return map.values().toArray();
}
public static String GetNames(Map<String, Object> map, String operation, String dbType) {
String columns = "";
try {
if("INSERT".equals(operation)) {
String params = "(";
columns = "(";
for(String key : map.keySet()) {
columns = columns + (DB_TYPE_ORACLE.equals(dbType)?"\"" + key + "\",":"`" + key + "`,");
params = params + "?,";
}
if(!"(".equals(columns)) {
columns = columns.substring(0, columns.length() - 1);
}
if(!"(".equals(params)) {
params = params.substring(0, params.length() - 1);
}
columns = columns + ")";
params = params + ")";
return columns + " VALUES" + params;
}
if("UPDATE".equals(operation)) {
for(String key : map.keySet()) {
if ("ID".equals(key)) {
continue;
}
columns = columns + (DB_TYPE_ORACLE.equals(dbType)?"\"" + key + "\"=?,":"`" + key + "`=?,");
}
if(columns.substring(columns.length() - 1, columns.length()).equals(",")) {
columns = columns.substring(0, columns.length() - 1);
}
columns = columns + " WHERE ID=?";
}
if ("DELETE".equals(operation)) {
for(String key : map.keySet()) {
columns = columns + (DB_TYPE_ORACLE.equals(dbType)?"\"" + key + "\"=? AND ":"`" + key + "`=? AND ");
}
if(columns.endsWith(" AND ")) {
columns = columns.substring(0, columns.length() - 5);
}
}
} catch (Exception var9) {
var9.printStackTrace();
}
return columns;
}
public static String getDataType(Column tc) {
if (tc.getLength() != 0) {
return tc.getDataType() + "(" + tc.getLength() + ")";
} else {
return tc.getDataType();
}
}
public static String getIsNull(Column tc) {
if (tc.isKey() && tc.isAutoIncrement()) {
return "NOT NULL AUTO_INCREMENT";
}
if ("timestamp".equals(tc.getDataType())) {
if(tc.getName().equals(Constants.COLUMN_CREATE_TIME)){
return "DEFAULT CURRENT_TIMESTAMP";
}else{
return "NULL DEFAULT NULL";
}
}
if (tc.isNull()) {
return "DEFAULT NULL";
} else {
return "NOT NULL";
}
}
public static String getPrimaryKey(List<Column> ltc) {
String pk = "PRIMARY KEY (";
for (Column tc : ltc) {
if (tc.isKey()) {
pk += "`" + tc.getName() + "`,";
}
}
if ("PRIMARY KEY (".equals(pk)) {
return "";
} else {
return pk.substring(0, pk.length() - 1) + ")";
}
}
public static String getInSQL(String params, String flag) {
String tempStr = params.replace(flag, ",");
String[] tempStrArr = tempStr.split(",");
String InSQL = "";
for(int i = 0; i < tempStrArr.length; ++i) {
InSQL = InSQL + "?,";
}
if(!"".equals(InSQL)) {
InSQL = InSQL.substring(0, InSQL.length() - 1);
}
return InSQL;
}
public static List<Object> getInArgs(String params, String flag, String dataType) {
String tempStr = params.replace(flag, ",");
String[] tempStrArr = tempStr.split(",");
ArrayList obj = new ArrayList();
int i;
if("varchar".equalsIgnoreCase(dataType) || "varchar2".equalsIgnoreCase(dataType) || "blob".equalsIgnoreCase(dataType)) {
for(i = 0; i < tempStrArr.length; ++i) {
obj.add(tempStrArr[i]);
}
} else if("integer".equals(dataType)) {
for(i = 0; i < tempStrArr.length; ++i) {
obj.add(Integer.valueOf(Integer.parseInt(tempStrArr[i])));
}
}
return obj;
}
/**
*
* Get Column
*
* additionals JSON格式
* {
'type': 1, // 字段类型
'options': [], // 可选项
'constraint': { // 字段约束
'text_length': 32, // 对于文本类型有效
'decimal': {
'is_currency': false, // 是否是货币
'decimal_place': 2 // 小数点位数
}
}
}
*
* @param columnName
* @param additionals
* @return
*/
public static Column getColumn(String columnName, String additionals) {
Column column = new Column();
column.setName(columnName);
if (null == additionals) {
column.setDataType(DATA_TYPE_VARCHAR);
column.setLength(128);
} else {
JSONObject jsonObject = JSONObject.parseObject(additionals);
String type = getDataType(jsonObject.getInteger("type"));
column.setDataType(type);
JSONObject constraint = jsonObject.getJSONObject("constraint");
if (DATA_TYPE_VARCHAR.equals(type) || DATA_TYPE_TEXT.equals(type)) {
Integer textLength = constraint.getInteger("text_length");
column.setLength(textLength);
} else if (DATA_TYPE_FLOAT.equals(type) || DATA_TYPE_DOUBLE.equals(type)) {
JSONObject decimal = constraint.getJSONObject("decimal");
Boolean isCurrency = decimal.getBoolean("is_currency");
Integer decimalPlace = decimal.getInteger("decimal_place");
}
}
if (Constants.COLUMN_ID.equals(columnName)) {
column.setIsKey(true);
}
if (Constants.COLUMN_ID.equals(columnName) || Constants.COLUMN_CREATE_TIME.equals(columnName) || Constants.COLUMN_FORM_INSTANCE_ID.equals(columnName)) {
column.setIsNull(false);
} else {
column.setIsNull(true);
}
return column;
}
private static String getDataType(int type) {
switch (type) {
case 1:
return DATA_TYPE_TEXT;
case 2:
return DATA_TYPE_VARCHAR;
case 3:
return DATA_TYPE_TIMESTAMP;
case 4:
return DATA_TYPE_TIMESTAMP;
case 5:
return DATA_TYPE_VARCHAR;
case 6:
return DATA_TYPE_VARCHAR;
case 7:
return DATA_TYPE_VARCHAR;
case 8:
return DATA_TYPE_VARCHAR;
case 9:
return DATA_TYPE_INT;
case 10:
return DATA_TYPE_DOUBLE;
case 11:
return DATA_TYPE_VARCHAR;
case 12:
return DATA_TYPE_VARCHAR;
default:
return DATA_TYPE_VARCHAR;
}
}
public static String getMySQLTableName(String prefix, String tableName) {
return "`" + getFinalTableName(prefix, tableName) + "`";
}
public static String getOracleTableName(String prefix, String tableName) {
return "\"" + getFinalTableName(prefix, tableName) + "\"";
}
private static String getFinalTableName(String prefix, String tableName) {
String finalName = "";
if (!StringUtils.isEmpty(prefix)) {
finalName += prefix.trim();
finalName += tableName.trim().toUpperCase();
} else {
finalName += tableName.trim().toLowerCase();
}
return finalName;
}
}
package com.haomostudio.SpringMVCTemplate.common.util;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.*;
public class SuperBeanHelper<T> {
private final Class<T> clazz;
public SuperBeanHelper(Class<T> clazz) {
this.clazz = clazz;
}
public List<String> getPropertyName(Object obj) {
ArrayList list = new ArrayList();
Field[] fs = obj.getClass().getDeclaredFields();
Field[] var7 = fs;
int var6 = fs.length;
for(int var5 = 0; var5 < var6; ++var5) {
Field f = var7[var5];
list.add(f.getName());
}
return list;
}
public List<T> convert(List<Map<String, Object>> res) {
ArrayList list = new ArrayList();
try {
Iterator var4 = res.iterator();
while(var4.hasNext()) {
Map e = (Map)var4.next();
Object tempClass = this.clazz.newInstance();
List propertyName = this.getPropertyName(tempClass);
for(int i = 0; i < propertyName.size(); ++i) {
Field f = tempClass.getClass().getDeclaredField(((String)propertyName.get(i)).toString());
f.setAccessible(true);
try {
if(f.getType().getName().equals("int")) {
f.set(tempClass, Integer.valueOf(Integer.parseInt(e.get(((String)propertyName.get(i)).toString().trim()).toString())));
} else if(f.getType().getName().equals("java.util.Date")) {
SimpleDateFormat e1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date d = e1.parse(e.get(((String)propertyName.get(i)).toString().trim()).toString());
f.set(tempClass, d);
} else {
f.set(tempClass, e.get(((String)propertyName.get(i)).toString().trim()));
}
} catch (Exception var11) {
System.out.println(var11.getMessage());
}
}
list.add(tempClass);
}
} catch (Exception var12) {
System.out.println(var12.getMessage());
}
return list;
}
}
package com.haomostudio.SpringMVCTemplate.po;
import java.util.Date;
public class TesDepartment {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_DEPARTMENT.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_DEPARTMENT.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_DEPARTMENT.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_DEPARTMENT.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date lastUpdateTime;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_DEPARTMENT.ID
*
* @return the value of TES_DEPARTMENT.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_DEPARTMENT.ID
*
* @param id the value for TES_DEPARTMENT.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_DEPARTMENT.NAME
*
* @return the value of TES_DEPARTMENT.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_DEPARTMENT.NAME
*
* @param name the value for TES_DEPARTMENT.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setName(String name) {
this.name = name;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_DEPARTMENT.CREATE_TIME
*
* @return the value of TES_DEPARTMENT.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_DEPARTMENT.CREATE_TIME
*
* @param createTime the value for TES_DEPARTMENT.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_DEPARTMENT.LAST_UPDATE_TIME
*
* @return the value of TES_DEPARTMENT.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getLastUpdateTime() {
return lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_DEPARTMENT.LAST_UPDATE_TIME
*
* @param lastUpdateTime the value for TES_DEPARTMENT.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setLastUpdateTime(Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_DEPARTMENT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", createTime=").append(createTime);
sb.append(", lastUpdateTime=").append(lastUpdateTime);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.po;
import java.util.Date;
public class TesMenu {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU.URL
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String url;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU.GROUP_ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String groupId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU.SORT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Integer sort;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date lastUpdateTime;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU.ID
*
* @return the value of TES_MENU.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU.ID
*
* @param id the value for TES_MENU.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU.NAME
*
* @return the value of TES_MENU.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU.NAME
*
* @param name the value for TES_MENU.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setName(String name) {
this.name = name;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU.URL
*
* @return the value of TES_MENU.URL
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getUrl() {
return url;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU.URL
*
* @param url the value for TES_MENU.URL
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setUrl(String url) {
this.url = url;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU.GROUP_ID
*
* @return the value of TES_MENU.GROUP_ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getGroupId() {
return groupId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU.GROUP_ID
*
* @param groupId the value for TES_MENU.GROUP_ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setGroupId(String groupId) {
this.groupId = groupId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU.SORT
*
* @return the value of TES_MENU.SORT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Integer getSort() {
return sort;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU.SORT
*
* @param sort the value for TES_MENU.SORT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setSort(Integer sort) {
this.sort = sort;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU.CREATE_TIME
*
* @return the value of TES_MENU.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU.CREATE_TIME
*
* @param createTime the value for TES_MENU.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU.LAST_UPDATE_TIME
*
* @return the value of TES_MENU.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getLastUpdateTime() {
return lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU.LAST_UPDATE_TIME
*
* @param lastUpdateTime the value for TES_MENU.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setLastUpdateTime(Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", url=").append(url);
sb.append(", groupId=").append(groupId);
sb.append(", sort=").append(sort);
sb.append(", createTime=").append(createTime);
sb.append(", lastUpdateTime=").append(lastUpdateTime);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.po;
import java.util.Date;
public class TesMenuGroup {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_GROUP.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_GROUP.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_GROUP.SORT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String sort;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_GROUP.MODULE_ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String moduleId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_GROUP.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_GROUP.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date lastUpdateTime;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_GROUP.ID
*
* @return the value of TES_MENU_GROUP.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_GROUP.ID
*
* @param id the value for TES_MENU_GROUP.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_GROUP.NAME
*
* @return the value of TES_MENU_GROUP.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_GROUP.NAME
*
* @param name the value for TES_MENU_GROUP.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setName(String name) {
this.name = name;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_GROUP.SORT
*
* @return the value of TES_MENU_GROUP.SORT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getSort() {
return sort;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_GROUP.SORT
*
* @param sort the value for TES_MENU_GROUP.SORT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setSort(String sort) {
this.sort = sort;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_GROUP.MODULE_ID
*
* @return the value of TES_MENU_GROUP.MODULE_ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getModuleId() {
return moduleId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_GROUP.MODULE_ID
*
* @param moduleId the value for TES_MENU_GROUP.MODULE_ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setModuleId(String moduleId) {
this.moduleId = moduleId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_GROUP.CREATE_TIME
*
* @return the value of TES_MENU_GROUP.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_GROUP.CREATE_TIME
*
* @param createTime the value for TES_MENU_GROUP.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_GROUP.LAST_UPDATE_TIME
*
* @return the value of TES_MENU_GROUP.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getLastUpdateTime() {
return lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_GROUP.LAST_UPDATE_TIME
*
* @param lastUpdateTime the value for TES_MENU_GROUP.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setLastUpdateTime(Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_GROUP
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", sort=").append(sort);
sb.append(", moduleId=").append(moduleId);
sb.append(", createTime=").append(createTime);
sb.append(", lastUpdateTime=").append(lastUpdateTime);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.po;
import java.util.Date;
public class TesMenuModule {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_MODULE.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_MODULE.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_MODULE.SORT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Integer sort;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_MODULE.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_MENU_MODULE.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date lastUpdateTime;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_MODULE.ID
*
* @return the value of TES_MENU_MODULE.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_MODULE.ID
*
* @param id the value for TES_MENU_MODULE.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_MODULE.NAME
*
* @return the value of TES_MENU_MODULE.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_MODULE.NAME
*
* @param name the value for TES_MENU_MODULE.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setName(String name) {
this.name = name;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_MODULE.SORT
*
* @return the value of TES_MENU_MODULE.SORT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Integer getSort() {
return sort;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_MODULE.SORT
*
* @param sort the value for TES_MENU_MODULE.SORT
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setSort(Integer sort) {
this.sort = sort;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_MODULE.CREATE_TIME
*
* @return the value of TES_MENU_MODULE.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_MODULE.CREATE_TIME
*
* @param createTime the value for TES_MENU_MODULE.CREATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_MENU_MODULE.LAST_UPDATE_TIME
*
* @return the value of TES_MENU_MODULE.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getLastUpdateTime() {
return lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_MENU_MODULE.LAST_UPDATE_TIME
*
* @param lastUpdateTime the value for TES_MENU_MODULE.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setLastUpdateTime(Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_MENU_MODULE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", sort=").append(sort);
sb.append(", createTime=").append(createTime);
sb.append(", lastUpdateTime=").append(lastUpdateTime);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.po;
import java.util.Date;
public class TesRole {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_ROLE.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_ROLE.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_ROLE.DESCRIPTION
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String description;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_ROLE.MENU_ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private String menuId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_ROLE.CREATE_DATE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date createDate;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TES_ROLE.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
private Date lastUpdateTime;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_ROLE.ID
*
* @return the value of TES_ROLE.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_ROLE.ID
*
* @param id the value for TES_ROLE.ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_ROLE.NAME
*
* @return the value of TES_ROLE.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_ROLE.NAME
*
* @param name the value for TES_ROLE.NAME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setName(String name) {
this.name = name;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_ROLE.DESCRIPTION
*
* @return the value of TES_ROLE.DESCRIPTION
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getDescription() {
return description;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_ROLE.DESCRIPTION
*
* @param description the value for TES_ROLE.DESCRIPTION
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setDescription(String description) {
this.description = description;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_ROLE.MENU_ID
*
* @return the value of TES_ROLE.MENU_ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public String getMenuId() {
return menuId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_ROLE.MENU_ID
*
* @param menuId the value for TES_ROLE.MENU_ID
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setMenuId(String menuId) {
this.menuId = menuId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_ROLE.CREATE_DATE
*
* @return the value of TES_ROLE.CREATE_DATE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getCreateDate() {
return createDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_ROLE.CREATE_DATE
*
* @param createDate the value for TES_ROLE.CREATE_DATE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TES_ROLE.LAST_UPDATE_TIME
*
* @return the value of TES_ROLE.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public Date getLastUpdateTime() {
return lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TES_ROLE.LAST_UPDATE_TIME
*
* @param lastUpdateTime the value for TES_ROLE.LAST_UPDATE_TIME
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
public void setLastUpdateTime(Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TES_ROLE
*
* @mbg.generated Mon Oct 08 10:08:33 CST 2018
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", description=").append(description);
sb.append(", menuId=").append(menuId);
sb.append(", createDate=").append(createDate);
sb.append(", lastUpdateTime=").append(lastUpdateTime);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.haomostudio.SpringMVCTemplate.vo;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.haomostudio.SpringMVCTemplate.po.TesDepartment;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class TesDepartmentVO {
@JsonProperty("includes")
private Map<String, Object> includes;
@JsonProperty("refers")
private Map<String, List<Object>> refers;
@JsonProperty("relates")
private Map<String, List<Object>> relates;
private TesDepartment superior;
public TesDepartment getSuperior() {
return superior;
}
public TesDepartmentVO(TesDepartment superior) {
this.superior = superior;
this.includes = new HashMap<>();
this.refers = new HashMap<>();
this.relates = new HashMap<>();
}
public void setSuperior(TesDepartment superior) {
this.superior = superior;
}
public void setIncludes(Map<String, Object> includes) {
this.includes = includes;
}
public Map<String, Object> getIncludes() {
return this.includes;
}
public void setRefers(Map<String, List<Object>> refers) {
this.refers = refers;
}
public Map<String, List<Object>> getRefers() {
return this.refers;
}
public void setRelates(Map<String, List<Object>> relates) {
this.relates = relates;
}
public Map<String, List<Object>> getRelates() {
return this.relates;
}
}
This diff is collapsed.
## po、vo、pojo的区别,以及创建放置
### 1. PO(persistant object) 持久对象
在o/r 映射的时候出现的概念,如果没有o/r映射,就没有这个概念存在了.通常对应数据模型(数据库),本身还有部分业务逻辑的处理.可以看成是与数据库中的表相映射的java对象.最简单的PO就是对应数据库中某个表中的一条记录,多个记录可以用PO的集合.PO中应该不包含任何对数据库的操作.
> 放置跟数据库对应的实体类
### 2. VO(value object) 值对象
通常用于业务层之间的数据传递,和PO一样也是仅仅包含数据而已.但应是抽象出的业务对象,可以和表对应,也可以不,这根据业务的需要.个人觉得同DTO(数据传输对象),在web上传递.
> 跟po对应的包装类
### 3. POJO(plain ordinary java object) 简单无规则java对象
纯的传统意义的java对象.就是说在一些Object/Relation Mapping工具中,能够做到维护数据库表记录的persisent object完全是一个符合Java Bean规范的纯Java对象,没有增加别的属性和方法.我的理解就是最基本的Java Bean,只有属性字段及setter和getter方法!.
> 存放我们自己创建简单无须的类,例如导出excel配置的实体类。
\ No newline at end of file
This diff is collapsed.
#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Tue Oct 09 14:15:37 CST 2018
antlr-2.7.7.jar>aliyun-repository=
antlr-2.7.7.pom>aliyun-repository=
83cd2cd674a217ade95a4bb83a8a14f351f48bd0 /home/maven/repository-staging/to-ibiblio/maven2/antlr/antlr/2.7.7/antlr-2.7.7.jar
This diff is collapsed.
52f15b99911ab8b8bc8744675f5cf1994a626fb8 /home/maven/repository-staging/to-ibiblio/maven2/antlr/antlr/2.7.7/antlr-2.7.7.pom
5128a2b0efbba460a1178d07773618e0986ea152 aopalliance-1.0.pom
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment