完善样例工程
parent
7d778beb58
commit
b7e831b0e2
|
@ -18,7 +18,6 @@
|
||||||
</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">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.kdayun.z1.core.base.BaseEntity;
|
import com.kdayun.z1.core.base.BaseEntity;
|
||||||
|
|
||||||
public class CoreRole extends BaseEntity{
|
public class DemoEntity extends BaseEntity{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
|
@ -1,20 +0,0 @@
|
||||||
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,20 @@
|
||||||
|
package com.kdayun.demo.mapper;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.kdayun.demo.entity.DemoEntity;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface DemoMapper {
|
||||||
|
int deleteByPrimaryKey(String RWID);
|
||||||
|
|
||||||
|
int insert(DemoMapper record);
|
||||||
|
|
||||||
|
int insertSelective(DemoMapper record);
|
||||||
|
|
||||||
|
DemoMapper selectByPrimaryKey(String RWID);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(DemoMapper record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(DemoMapper record);
|
||||||
|
}
|
|
@ -0,0 +1,117 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.kdayun.demo.mapper.DemoMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.kdayun.demo.entity.DemoEntity">
|
||||||
|
<id column="RWID" jdbcType="VARCHAR" property="RWID" />
|
||||||
|
<result column="OBJCODE" jdbcType="VARCHAR" property="OBJCODE" />
|
||||||
|
<result column="OBJNAME" jdbcType="VARCHAR" property="OBJNAME" />
|
||||||
|
<result column="DES" jdbcType="VARCHAR" property="DES" />
|
||||||
|
<result column="VISIBILITY" jdbcType="INTEGER" property="VISIBILITY" />
|
||||||
|
<result column="ROLELEV" jdbcType="INTEGER" property="ROLELEV" />
|
||||||
|
<result column="SYS_SORT" jdbcType="DECIMAL" property="SYS_SORT" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
RWID, OBJCODE, OBJNAME, DES, VISIBILITY, ROLELEV, SYS_SORT
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from core_role
|
||||||
|
where RWID = #{RWID,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from core_role
|
||||||
|
where RWID = #{RWID,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.kdayun.demo.entity.DemoEntity">
|
||||||
|
insert into core_role (RWID, OBJCODE, OBJNAME,
|
||||||
|
DES, VISIBILITY, ROLELEV,
|
||||||
|
SYS_SORT)
|
||||||
|
values (#{RWID,jdbcType=VARCHAR}, #{OBJCODE,jdbcType=VARCHAR}, #{OBJNAME,jdbcType=VARCHAR},
|
||||||
|
#{DES,jdbcType=VARCHAR}, #{VISIBILITY,jdbcType=INTEGER}, #{ROLELEV,jdbcType=INTEGER},
|
||||||
|
#{SYS_SORT,jdbcType=DECIMAL})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.kdayun.demo.entity.DemoEntity">
|
||||||
|
insert into core_role
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="RWID != null">
|
||||||
|
RWID,
|
||||||
|
</if>
|
||||||
|
<if test="OBJCODE != null">
|
||||||
|
OBJCODE,
|
||||||
|
</if>
|
||||||
|
<if test="OBJNAME != null">
|
||||||
|
OBJNAME,
|
||||||
|
</if>
|
||||||
|
<if test="DES != null">
|
||||||
|
DES,
|
||||||
|
</if>
|
||||||
|
<if test="VISIBILITY != null">
|
||||||
|
VISIBILITY,
|
||||||
|
</if>
|
||||||
|
<if test="ROLELEV != null">
|
||||||
|
ROLELEV,
|
||||||
|
</if>
|
||||||
|
<if test="SYS_SORT != null">
|
||||||
|
SYS_SORT,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="RWID != null">
|
||||||
|
#{RWID,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="OBJCODE != null">
|
||||||
|
#{OBJCODE,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="OBJNAME != null">
|
||||||
|
#{OBJNAME,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="DES != null">
|
||||||
|
#{DES,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="VISIBILITY != null">
|
||||||
|
#{VISIBILITY,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="ROLELEV != null">
|
||||||
|
#{ROLELEV,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="SYS_SORT != null">
|
||||||
|
#{SYS_SORT,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.kdayun.demo.entity.DemoEntity">
|
||||||
|
update core_role
|
||||||
|
<set>
|
||||||
|
<if test="OBJCODE != null">
|
||||||
|
OBJCODE = #{OBJCODE,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="OBJNAME != null">
|
||||||
|
OBJNAME = #{OBJNAME,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="DES != null">
|
||||||
|
DES = #{DES,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="VISIBILITY != null">
|
||||||
|
VISIBILITY = #{VISIBILITY,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="ROLELEV != null">
|
||||||
|
ROLELEV = #{ROLELEV,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="SYS_SORT != null">
|
||||||
|
SYS_SORT = #{SYS_SORT,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where RWID = #{RWID,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.kdayun.demo.entity.DemoEntity">
|
||||||
|
update core_role
|
||||||
|
set OBJCODE = #{OBJCODE,jdbcType=VARCHAR},
|
||||||
|
OBJNAME = #{OBJNAME,jdbcType=VARCHAR},
|
||||||
|
DES = #{DES,jdbcType=VARCHAR},
|
||||||
|
VISIBILITY = #{VISIBILITY,jdbcType=INTEGER},
|
||||||
|
ROLELEV = #{ROLELEV,jdbcType=INTEGER},
|
||||||
|
SYS_SORT = #{SYS_SORT,jdbcType=DECIMAL}
|
||||||
|
where RWID = #{RWID,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue