...
|
...
|
@@ -12,12 +12,13 @@ |
|
|
<result column="customs_reg_code" jdbcType="VARCHAR" property="customsRegCode" />
|
|
|
<result column="business_license" jdbcType="VARCHAR" property="businessLicense" />
|
|
|
<result column="departmentId" jdbcType="VARCHAR" property="departmentid" />
|
|
|
<result column="mq_code" jdbcType="VARCHAR" property="mqcode" />
|
|
|
<collection column="role_id" javaType="java.util.ArrayList" ofType="com.tianbo.warehouse.model.PERMISSION" property="permissions" select="com.tianbo.warehouse.dao.PERMISSIONMapper.getRolePermisson" />
|
|
|
<collection column="role_id" property="children" select="selectByParentId" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
role_id, role_name, role_sign, description, type, parentId, rsort, customs_reg_code,
|
|
|
business_license, departmentId
|
|
|
business_license, departmentId, mq_code
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
...
|
...
|
@@ -39,11 +40,11 @@ |
|
|
insert into role (role_id, role_name, role_sign,
|
|
|
description, type, parentId,
|
|
|
rsort, customs_reg_code, business_license,
|
|
|
departmentId)
|
|
|
departmentId, mq_code)
|
|
|
values (#{roleId,jdbcType=INTEGER}, #{roleName,jdbcType=VARCHAR}, #{roleSign,jdbcType=VARCHAR},
|
|
|
#{description,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{parentid,jdbcType=INTEGER},
|
|
|
#{rsort,jdbcType=INTEGER}, #{customsRegCode,jdbcType=VARCHAR}, #{businessLicense,jdbcType=VARCHAR},
|
|
|
#{departmentid,jdbcType=VARCHAR})
|
|
|
#{departmentid,jdbcType=VARCHAR},#{mqcode,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.tianbo.warehouse.model.ROLE">
|
|
|
insert into role
|
...
|
...
|
@@ -78,6 +79,9 @@ |
|
|
<if test="departmentid != null">
|
|
|
departmentId,
|
|
|
</if>
|
|
|
<if test="mqcode != null">
|
|
|
mq_code,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="roleId != null">
|
...
|
...
|
@@ -110,6 +114,9 @@ |
|
|
<if test="departmentid != null">
|
|
|
#{departmentid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="mqcode != null">
|
|
|
#{mqcode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.ROLE">
|
...
|
...
|
@@ -142,6 +149,9 @@ |
|
|
<if test="departmentid != null">
|
|
|
departmentId = #{departmentid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="mqcode != null">
|
|
|
mq_code = #{mqcode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where role_id = #{roleId,jdbcType=INTEGER}
|
|
|
</update>
|
...
|
...
|
@@ -155,7 +165,8 @@ |
|
|
rsort = #{rsort,jdbcType=INTEGER},
|
|
|
customs_reg_code = #{customsRegCode,jdbcType=VARCHAR},
|
|
|
business_license = #{businessLicense,jdbcType=VARCHAR},
|
|
|
departmentId = #{departmentid,jdbcType=VARCHAR}
|
|
|
departmentId = #{departmentid,jdbcType=VARCHAR},
|
|
|
mq_code = #{mqcode,jdbcType=VARCHAR},
|
|
|
where role_id = #{roleId,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
...
|
...
|
|