于紫祥_1901
2020-08-12 f718fb9c06fa75b65870a3f5ef2fea10054009aa
src/main/resources/mapper/AccountRoleMapper.xml
@@ -49,32 +49,4 @@
        </where>
    </sql>
    <select id="getAccountRoleList" resultMap="BaseResultMap">
        select
        ar.*,
        a.account_name,
        r.role_name
        from account_role ar
        left join account a on ar.account_id = a.id
        left join role r on ar.role_id = r.id
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
        <if test="orderByClause != null">
            order by ${orderByClause}
        </if>
    </select>
    <update id="updateByPrimaryKey" parameterType="com.moral.entity.AccountRole" >
        update account_role
        set account_id = #{accountId,jdbcType=INTEGER},
        role_id = #{roleId,jdbcType=INTEGER}
        where id = #{id,jdbcType=INTEGER}
    </update>
    <delete id="deleteByPrimaryKeyOwn" parameterType="java.lang.Integer" >
        delete from account_role
        where id = #{id,jdbcType=INTEGER}
    </delete>
</mapper>