|
@@ -3,9 +3,9 @@
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!-- namespace必须指向DAO接口 -->
|
|
<!-- namespace必须指向DAO接口 -->
|
|
<mapper namespace="com.jpsoft.picc.modules.sys.dao.RoleDAO">
|
|
<mapper namespace="com.jpsoft.picc.modules.sys.dao.RoleDAO">
|
|
- <resultMap id="RoleMap" type="Role">
|
|
|
|
|
|
+ <resultMap id="RoleMap" type="com.jpsoft.picc.modules.sys.entity.Role">
|
|
<id property="id" column="id_"/>
|
|
<id property="id" column="id_"/>
|
|
- <result property="userName" column="name_"/>
|
|
|
|
|
|
+ <result property="name" column="name_"/>
|
|
<result property="description" column="description_"/>
|
|
<result property="description" column="description_"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
@@ -13,7 +13,7 @@
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
- <insert id="insert" parameterType="Role">
|
|
|
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.picc.modules.sys.entity.Role">
|
|
<!--
|
|
<!--
|
|
<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
select sys_guid() from dual
|
|
select sys_guid() from dual
|
|
@@ -25,7 +25,7 @@
|
|
values
|
|
values
|
|
(
|
|
(
|
|
#{id,jdbcType=VARCHAR}
|
|
#{id,jdbcType=VARCHAR}
|
|
- ,#{userName,jdbcType=VARCHAR}
|
|
|
|
|
|
+ ,#{name,jdbcType=VARCHAR}
|
|
,#{description,jdbcType=VARCHAR}
|
|
,#{description,jdbcType=VARCHAR}
|
|
,#{createTime,jdbcType= TIMESTAMP }
|
|
,#{createTime,jdbcType= TIMESTAMP }
|
|
,#{updateTime,jdbcType= TIMESTAMP }
|
|
,#{updateTime,jdbcType= TIMESTAMP }
|
|
@@ -38,11 +38,11 @@
|
|
<delete id="delete" parameterType="string">
|
|
<delete id="delete" parameterType="string">
|
|
delete from sys_role where id_=#{id,jdbcType=VARCHAR}
|
|
delete from sys_role where id_=#{id,jdbcType=VARCHAR}
|
|
</delete>
|
|
</delete>
|
|
- <update id="update" parameterType="Role">
|
|
|
|
|
|
+ <update id="update" parameterType="com.jpsoft.picc.modules.sys.entity.Role">
|
|
update sys_role
|
|
update sys_role
|
|
<set>
|
|
<set>
|
|
- <if test="userName!=null">
|
|
|
|
- name_=#{userName,jdbcType=VARCHAR},
|
|
|
|
|
|
+ <if test="name!=null">
|
|
|
|
+ name_=#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="description!=null">
|
|
<if test="description!=null">
|
|
description_=#{description,jdbcType=VARCHAR},
|
|
description_=#{description,jdbcType=VARCHAR},
|
|
@@ -87,7 +87,7 @@
|
|
and description_ like #{searchParams.roleDesc}
|
|
and description_ like #{searchParams.roleDesc}
|
|
</if>
|
|
</if>
|
|
<foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
<foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
- ${sort.userName} ${sort.order}
|
|
|
|
|
|
+ ${sort.name} ${sort.order}
|
|
</foreach>
|
|
</foreach>
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|