1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <!--
- 这个文件是自动生成的。
- 不要修改此文件。所有改动将在下次重新自动生成时丢失。
- -->
- <mapper namespace="com.ym.mec.auth.dal.dao.SysOauthClientDetailsDao">
-
- <resultMap type="com.ym.mec.auth.api.entity.SysOauthClientDetails" id="SysOauthClientDetails">
- <result column="client_id" property="clientId" />
- <result column="resource_ids" property="resourceIds" />
- <result column="client_secret" property="clientSecret" />
- <result column="scope" property="scope" />
- <result column="authorized_grant_types" property="authorizedGrantTypes" />
- <result column="web_server_redirect_uri" property="webServerRedirectUri" />
- <result column="authorities" property="authorities" />
- <result column="access_token_validity" property="accessTokenValidity" />
- <result column="refresh_token_validity" property="refreshTokenValidity" />
- <result column="additional_information" property="additionalInformation" />
- <result column="autoapprove" property="autoapprove" />
- </resultMap>
-
- <!-- 根据主键查询一条记录 -->
- <select id="get" resultMap="SysOauthClientDetails" >
- SELECT * FROM sys_oauth_client_details WHERE client_id = #{clientId}
- </select>
-
- <!-- 全查询 -->
- <select id="findAll" resultMap="SysOauthClientDetails">
- SELECT * FROM sys_oauth_client_details ORDER BY client_id
- </select>
-
- <!-- 向数据库增加一条记录 -->
- <insert id="insert" parameterType="com.ym.mec.auth.api.entity.SysOauthClientDetails" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
- <!--
- <selectKey resultClass="int" keyProperty="id" >
- SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
- </selectKey>
- -->
- INSERT INTO sys_oauth_client_details (client_id,resource_ids,client_secret,scope,authorized_grant_types,web_server_redirect_uri,authorities,access_token_validity,refresh_token_validity,additional_information,autoapprove) VALUES(#{clientId},#{resourceIds},#{clientSecret},#{scope},#{authorizedGrantTypes},#{webServerRedirectUri},#{authorities},#{accessTokenValidity},#{refreshTokenValidity},#{additionalInformation},#{autoapprove})
- </insert>
-
- <!-- 根据主键查询一条记录 -->
- <update id="update" parameterType="com.ym.mec.auth.api.entity.SysOauthClientDetails">
- UPDATE sys_oauth_client_details SET additional_information = #{additionalInformation},access_token_validity = #{accessTokenValidity},autoapprove = #{autoapprove},scope = #{scope},web_server_redirect_uri = #{webServerRedirectUri},authorized_grant_types = #{authorizedGrantTypes},client_secret = #{clientSecret},resource_ids = #{resourceIds},client_id = #{clientId},authorities = #{authorities},refresh_token_validity = #{refreshTokenValidity} WHERE client_id = #{clientId}
- </update>
-
- <!-- 根据主键删除一条记录 -->
- <delete id="delete" >
- DELETE FROM sys_oauth_client_details WHERE client_id = #{clientId}
- </delete>
-
- <!-- 分页查询 -->
- <select id="queryPage" resultMap="SysOauthClientDetails" parameterType="map">
- SELECT * FROM sys_oauth_client_details ORDER BY client_id <include refid="global.limit"/>
- </select>
-
- <!-- 查询当前表的总记录数 -->
- <select id="queryCount" resultType="int">
- SELECT COUNT(*) FROM sys_oauth_client_details
- </select>
- </mapper>
|