| | |
| | | |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaPrivilege"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table ba_priviledge--> |
| | | <!--@Table ba_privilege--> |
| | | <result column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="num" jdbcType="INTEGER" property="num" /> |
| | | <result column="name" jdbcType="VARCHAR" property="name" /> |
| | |
| | | <select id="selectAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from ba_priviledge |
| | | from ba_privilege |
| | | </select> |
| | | |
| | | <select id="selectPrivilegeByUserId" resultType="Integer"> |
| | | select p.num |
| | | from ba_priviledge p |
| | | from ba_privilege p |
| | | inner join ba_role_privilege rp on p.id = rp.privilegeId |
| | | inner join ba_user_role ur on rp.roleId = ur.roleId |
| | | inner join ba_role r on ur.roleId = r.id |
| | |
| | | |
| | | <select id="selectPrivilegeByRoleId" resultType="Integer"> |
| | | select p.num |
| | | from ba_priviledge p |
| | | from ba_privilege p |
| | | inner join ba_role_privilege rp on p.id = rp.privilegeId |
| | | <if test="roleId != null"> |
| | | where rp.roleId = #{roleId, jdbcType=BIGINT} |
| | | </if> |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaPrivilege"> |
| | | <insert id="putin" parameterType="com.dy.pipIrrGlobal.pojoBa.BaPrivilege"> |
| | | <!--@mbg.generated--> |
| | | insert into ba_priviledge (id, num, name, type |
| | | ) |
| | | insert into ba_privilege (<include refid="Base_Column_List" />) |
| | | values (#{id,jdbcType=BIGINT}, |
| | | #{num,jdbcType=INTEGER}, |
| | | #{name,jdbcType=VARCHAR}, |
| | |
| | | |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaPrivilege"> |
| | | <!--@mbg.generated--> |
| | | insert into ba_priviledge |
| | | insert into ba_privilege |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |