|
@@ -6,8 +6,6 @@
|
|
<result column="NAME" property="name" jdbcType="VARCHAR" />
|
|
<result column="NAME" property="name" jdbcType="VARCHAR" />
|
|
<result column="CODE" property="code" jdbcType="VARCHAR" />
|
|
<result column="CODE" property="code" jdbcType="VARCHAR" />
|
|
<result column="REMARK" property="remark" jdbcType="VARCHAR" />
|
|
<result column="REMARK" property="remark" jdbcType="VARCHAR" />
|
|
- <result column="STATUS" property="status" jdbcType="CHAR" />
|
|
|
|
- <result column="PHONE" property="phone" jdbcType="VARCHAR" />
|
|
|
|
<result column="CREATE_TIME" property="createTime" jdbcType="OTHER" />
|
|
<result column="CREATE_TIME" property="createTime" jdbcType="OTHER" />
|
|
<result column="UPDATE_TIME" property="updateTime" jdbcType="OTHER" />
|
|
<result column="UPDATE_TIME" property="updateTime" jdbcType="OTHER" />
|
|
<result column="STATE" property="state" jdbcType="CHAR" />
|
|
<result column="STATE" property="state" jdbcType="CHAR" />
|
|
@@ -19,21 +17,17 @@
|
|
</delete>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.xt.js.gkaq.frame.model.RoleModel" >
|
|
<insert id="insert" parameterType="com.xt.js.gkaq.frame.model.RoleModel" >
|
|
insert into AQ_BASIC_FRAME_ROLE (ID, NAME, CODE,
|
|
insert into AQ_BASIC_FRAME_ROLE (ID, NAME, CODE,
|
|
- REMARK, STATUS, PHONE,
|
|
|
|
- CREATE_TIME, UPDATE_TIME, STATE,
|
|
|
|
- SORTNO)
|
|
|
|
|
|
+ REMARK, CREATE_TIME, UPDATE_TIME,
|
|
|
|
+ STATE, SORTNO)
|
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
|
- #{remark,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{phone,jdbcType=VARCHAR},
|
|
|
|
- #{createTime,jdbcType=OTHER}, #{updateTime,jdbcType=OTHER}, #{state,jdbcType=CHAR},
|
|
|
|
- #{sortno,jdbcType=DECIMAL})
|
|
|
|
|
|
+ #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=OTHER}, #{updateTime,jdbcType=OTHER},
|
|
|
|
+ #{state,jdbcType=CHAR}, #{sortno,jdbcType=DECIMAL})
|
|
</insert>
|
|
</insert>
|
|
<update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.frame.model.RoleModel" >
|
|
<update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.frame.model.RoleModel" >
|
|
update AQ_BASIC_FRAME_ROLE
|
|
update AQ_BASIC_FRAME_ROLE
|
|
set NAME = #{name,jdbcType=VARCHAR},
|
|
set NAME = #{name,jdbcType=VARCHAR},
|
|
CODE = #{code,jdbcType=VARCHAR},
|
|
CODE = #{code,jdbcType=VARCHAR},
|
|
REMARK = #{remark,jdbcType=VARCHAR},
|
|
REMARK = #{remark,jdbcType=VARCHAR},
|
|
- STATUS = #{status,jdbcType=CHAR},
|
|
|
|
- PHONE = #{phone,jdbcType=VARCHAR},
|
|
|
|
CREATE_TIME = #{createTime,jdbcType=OTHER},
|
|
CREATE_TIME = #{createTime,jdbcType=OTHER},
|
|
UPDATE_TIME = #{updateTime,jdbcType=OTHER},
|
|
UPDATE_TIME = #{updateTime,jdbcType=OTHER},
|
|
STATE = #{state,jdbcType=CHAR},
|
|
STATE = #{state,jdbcType=CHAR},
|
|
@@ -41,12 +35,21 @@
|
|
where ID = #{id,jdbcType=VARCHAR}
|
|
where ID = #{id,jdbcType=VARCHAR}
|
|
</update>
|
|
</update>
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
- select ID, NAME, CODE, REMARK, STATUS, PHONE, CREATE_TIME, UPDATE_TIME, STATE, SORTNO
|
|
|
|
|
|
+ select ID, NAME, CODE, REMARK, CREATE_TIME, UPDATE_TIME, STATE, SORTNO
|
|
from AQ_BASIC_FRAME_ROLE
|
|
from AQ_BASIC_FRAME_ROLE
|
|
where ID = #{id,jdbcType=VARCHAR}
|
|
where ID = #{id,jdbcType=VARCHAR}
|
|
</select>
|
|
</select>
|
|
<select id="selectAll" resultMap="BaseResultMap" >
|
|
<select id="selectAll" resultMap="BaseResultMap" >
|
|
- select ID, NAME, CODE, REMARK, STATUS, PHONE, CREATE_TIME, UPDATE_TIME, STATE, SORTNO
|
|
|
|
|
|
+ select ID, NAME, CODE, REMARK, CREATE_TIME, UPDATE_TIME, STATE, SORTNO
|
|
from AQ_BASIC_FRAME_ROLE
|
|
from AQ_BASIC_FRAME_ROLE
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="selectByUserId" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
|
+ SELECT R.ID, R.NAME, R.CODE, R.REMARK, R.CREATE_TIME, R.UPDATE_TIME, R.STATE, R.SORTNO
|
|
|
|
+ FROM AQ_BASIC_FRAME_ROLE R
|
|
|
|
+ WHERE EXISTS(
|
|
|
|
+ SELECT 1
|
|
|
|
+ FROM AQ_BASIC_FRAME_USER_GROUP UG JOIN AQ_BASIC_FRAME_GROUP G ON UG.GROUP_ID=G.ID
|
|
|
|
+ WHERE UG.USER_ID=#{userId,jdbcType=VARCHAR} AND G.ROLE=R.ID AND UG.STATE='1' AND G.STATE='1'
|
|
|
|
+ )
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|