...
|
...
|
@@ -14,37 +14,15 @@ |
|
|
<result column="departmentId" jdbcType="VARCHAR" property="departmentid" />
|
|
|
<result column="mq_code" jdbcType="VARCHAR" property="mqcode" />
|
|
|
</resultMap>
|
|
|
<resultMap id="TreeWithPermResultMap" type="com.tianbo.warehouse.model.ROLE">
|
|
|
<id column="role_id" jdbcType="INTEGER" property="roleId" />
|
|
|
<result column="role_name" jdbcType="VARCHAR" property="roleName" />
|
|
|
<result column="role_sign" jdbcType="VARCHAR" property="roleSign" />
|
|
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
|
|
<result column="type" jdbcType="VARCHAR" property="type" />
|
|
|
<result column="parentId" jdbcType="INTEGER" property="parentid" />
|
|
|
<result column="rsort" jdbcType="INTEGER" property="rsort" />
|
|
|
<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" />
|
|
|
<resultMap id="TreeWithPermResultMap" type="com.tianbo.warehouse.model.ROLE" extends="BaseResultMap">
|
|
|
<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>
|
|
|
<resultMap id="TreeWithResultMap" type="com.tianbo.warehouse.model.ROLE">
|
|
|
<id column="role_id" jdbcType="INTEGER" property="roleId" />
|
|
|
<result column="role_name" jdbcType="VARCHAR" property="roleName" />
|
|
|
<result column="role_sign" jdbcType="VARCHAR" property="roleSign" />
|
|
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
|
|
<result column="type" jdbcType="VARCHAR" property="type" />
|
|
|
<result column="parentId" jdbcType="INTEGER" property="parentid" />
|
|
|
<result column="rsort" jdbcType="INTEGER" property="rsort" />
|
|
|
<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" />
|
|
|
<resultMap id="TreeWithResultMap" type="com.tianbo.warehouse.model.ROLE" extends="BaseResultMap">
|
|
|
<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,
|
|
|
role_id, role_name, role_sign, description, `type`, parentId, rsort, customs_reg_code,
|
|
|
business_license, departmentId, mq_code
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
...
|
...
|
@@ -53,7 +31,7 @@ |
|
|
from role
|
|
|
where role_id = #{roleId,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<select id="selectByParentId" parameterType="java.lang.Integer" resultMap="TreeWithResultMap">
|
|
|
<select id="selectByParentId" parameterType="java.lang.Integer" resultMap="TreeWithPermResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from role
|
...
|
...
|
|