Van333
2022-10-26 f7debb464a2d49b6e66b014cf2beef2a9c4bf98d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package api.dao;
 
import api.bean.AccessEntity;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
 
/**
 * @program: wog
 * @description:
 * @author: YSS
 * @create: 2020-09-25 14:44
 **/
@Mapper
@Repository
public interface AccessDao {
 
    @Select("select * from wog_user_access where access_key = #{accessKey} limit 1")
    AccessEntity selectAccessEntityByKey(@Param("accessKey") String accessKey);
 
    @Update("update wog_user_access set access_token = #{accessToken}, update_time = #{updateTime} where access_key = #{accessKey}")
    void update(AccessEntity accessEntity);
 
    @Select("select user_id from wog_user_access where access_token = #{token}")
    Long selectUserIdByToken(@Param("token")String accessToken);
 
    @Select("select role_id from sys_user_role where user_id = #{userId}")
    Long selectRoleIdByUserId(@Param("userId") Long userId);
 
    @Select("select ys7_account_id from wog_user_access where access_token = #{accessToken} limit 1")
    String selectYs7AccountIdByAccessToken(String accessToken);
 
    @Update("update wog_user_access set ys7_access_token = #{ys7AccessToken} where access_token = #{accessToken}")
    void setYs7Token(String ys7AccessToken,String accessToken);
}