| | |
| | | </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> |