代码优化
parent
723558ffdf
commit
7d778beb58
|
@ -6,11 +6,16 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="test" value="true"/>
|
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/main/java=UTF-8
|
||||||
|
encoding//src/main/resources=UTF-8
|
||||||
|
encoding//src/test/java=UTF-8
|
||||||
|
encoding/<project>=UTF-8
|
|
@ -0,0 +1,9 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.8
|
|
@ -0,0 +1,4 @@
|
||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
|
@ -1,7 +1,5 @@
|
||||||
package com.kdayun.demo.controller;
|
package com.kdayun.demo.controller;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -17,7 +15,7 @@ import com.kdayun.z1.core.base.RetVo;
|
||||||
import com.kdayun.z1.core.base.RetVo.retstate;
|
import com.kdayun.z1.core.base.RetVo.retstate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业微信
|
* 演示Contoller
|
||||||
*
|
*
|
||||||
* @author gk
|
* @author gk
|
||||||
*
|
*
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.kdayun.demo.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.kdayun.z1.core.base.BaseEntity;
|
||||||
|
|
||||||
|
public class CoreRole extends BaseEntity{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String RWID;
|
||||||
|
|
||||||
|
private String OBJCODE;
|
||||||
|
|
||||||
|
private String OBJNAME;
|
||||||
|
|
||||||
|
private String DES;
|
||||||
|
|
||||||
|
private Integer VISIBILITY;
|
||||||
|
|
||||||
|
private Integer ROLELEV;
|
||||||
|
|
||||||
|
private BigDecimal SYS_SORT;
|
||||||
|
|
||||||
|
public String getRWID() {
|
||||||
|
return RWID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRWID(String RWID) {
|
||||||
|
this.RWID = RWID == null ? null : RWID.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOBJCODE() {
|
||||||
|
return OBJCODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOBJCODE(String OBJCODE) {
|
||||||
|
this.OBJCODE = OBJCODE == null ? null : OBJCODE.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOBJNAME() {
|
||||||
|
return OBJNAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOBJNAME(String OBJNAME) {
|
||||||
|
this.OBJNAME = OBJNAME == null ? null : OBJNAME.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDES() {
|
||||||
|
return DES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDES(String DES) {
|
||||||
|
this.DES = DES == null ? null : DES.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVISIBILITY() {
|
||||||
|
return VISIBILITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVISIBILITY(Integer VISIBILITY) {
|
||||||
|
this.VISIBILITY = VISIBILITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getROLELEV() {
|
||||||
|
return ROLELEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setROLELEV(Integer ROLELEV) {
|
||||||
|
this.ROLELEV = ROLELEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getSYS_SORT() {
|
||||||
|
return SYS_SORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSYS_SORT(BigDecimal SYS_SORT) {
|
||||||
|
this.SYS_SORT = SYS_SORT;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.kdayun.demo.mapper;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.kdayun.demo.entity.CoreRole;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface CoreRoleMapper {
|
||||||
|
int deleteByPrimaryKey(String RWID);
|
||||||
|
|
||||||
|
int insert(CoreRole record);
|
||||||
|
|
||||||
|
int insertSelective(CoreRole record);
|
||||||
|
|
||||||
|
CoreRole selectByPrimaryKey(String RWID);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(CoreRole record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(CoreRole record);
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,51 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
|
||||||
|
<generatorConfiguration>
|
||||||
|
<context id="default" targetRuntime="MyBatis3">
|
||||||
|
<!--optional,旨在创建class时,对注释进行控制-->
|
||||||
|
<commentGenerator>
|
||||||
|
<property name="suppressDate" value="true" />
|
||||||
|
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
|
||||||
|
<property name="suppressAllComments" value="true" />
|
||||||
|
</commentGenerator>
|
||||||
|
<!--jdbc的数据库连接-->
|
||||||
|
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3706/dev?useSSL=false&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai" userId="zl" password="zl123456zl">
|
||||||
|
</jdbcConnection>
|
||||||
|
<!--非必须,类型处理器,在数据库类型和java类型之间的转换控制-->
|
||||||
|
<javaTypeResolver>
|
||||||
|
<!-- 默认情况下数据库中的 decimal,bigInt 在 Java 对应是 sql 下的 BigDecimal 类 -->
|
||||||
|
<!-- 不是 double 和 long 类型 -->
|
||||||
|
<!-- 使用常用的基本类型代替 sql 包下的引用类型 -->
|
||||||
|
<property name="forceBigDecimals" value="false" />
|
||||||
|
</javaTypeResolver>
|
||||||
|
<!-- targetPackage:生成的实体类所在的包 -->
|
||||||
|
<!-- targetProject:生成的实体类所在的硬盘位置 -->
|
||||||
|
<javaModelGenerator targetPackage="com.kdayun.demo.entity" targetProject="kdayun-demo">
|
||||||
|
<!-- 是否允许子包 -->
|
||||||
|
<property name="enableSubPackages" value="false" />
|
||||||
|
<!-- 是否对modal添加构造函数 -->
|
||||||
|
<property name="constructorBased" value="true" />
|
||||||
|
<!-- 是否清理从数据库中查询出的字符串左右两边的空白字符 -->
|
||||||
|
<property name="trimStrings" value="true" />
|
||||||
|
<!-- 建立modal对象是否不可改变 即生成的modal对象不会有setter方法,只有构造方法 -->
|
||||||
|
<property name="immutable" value="false" />
|
||||||
|
</javaModelGenerator>
|
||||||
|
|
||||||
|
<!-- targetPackage 和 targetProject:生成的 mapper 文件的包和位置 -->
|
||||||
|
<sqlMapGenerator targetPackage="com.kdayun.demo.mapper" targetProject="kdayun-demo">
|
||||||
|
<!-- 针对数据库的一个配置,是否把 schema 作为字包名 -->
|
||||||
|
<property name="enableSubPackages" value="false" />
|
||||||
|
</sqlMapGenerator>
|
||||||
|
<!-- targetPackage 和 targetProject:生成的 interface 文件的包和位置 -->
|
||||||
|
<javaClientGenerator type="XMLMAPPER" targetPackage="com.kdayun.demo.mapper" targetProject="kdayun-demo">
|
||||||
|
<!-- 针对 oracle 数据库的一个配置,是否把 schema 作为字包名 -->
|
||||||
|
<property name="enableSubPackages" value="false" />
|
||||||
|
</javaClientGenerator>
|
||||||
|
|
||||||
|
<!--这里配置需要生成代码的表 -->
|
||||||
|
<!--注意!注意!注意! 由于为了保证前后台的字段名一致性需要使用<property name="useActualColumnNames" value="true"/> 来保证生成实体与数据库一致.这里牺牲了java的实体的驼峰规范-->
|
||||||
|
<table tableName="core_role" domainObjectName="CoreRole" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false">
|
||||||
|
<property name="useActualColumnNames" value="true"/>
|
||||||
|
</table>
|
||||||
|
</context>
|
||||||
|
</generatorConfiguration>
|
Loading…
Reference in New Issue