eight
2024-08-13 7660fe12273a6b132256a2fa83ca1b11d6b2381f
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
35
36
37
38
39
40
41
42
43
44
45
46
package cn.lihu.jh.module.system.api.social;
 
import cn.lihu.jh.module.system.api.social.dto.SocialUserBindReqDTO;
import cn.lihu.jh.module.system.api.social.dto.SocialUserRespDTO;
import cn.lihu.jh.module.system.api.social.dto.SocialUserUnbindReqDTO;
import cn.lihu.jh.module.system.api.social.dto.SocialWxQrcodeReqDTO;
import cn.lihu.jh.module.system.service.social.SocialUserService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
 
import javax.annotation.Resource;
 
/**
 * 社交用户的 API 实现类
 *
 * @author 芋道源码
 */
@Service
@Validated
public class SocialUserApiImpl implements SocialUserApi {
 
    @Resource
    private SocialUserService socialUserService;
 
    @Override
    public String bindSocialUser(SocialUserBindReqDTO reqDTO) {
        return socialUserService.bindSocialUser(reqDTO);
    }
 
    @Override
    public void unbindSocialUser(SocialUserUnbindReqDTO reqDTO) {
        socialUserService.unbindSocialUser(reqDTO.getUserId(), reqDTO.getUserType(),
                reqDTO.getSocialType(), reqDTO.getOpenid());
    }
 
    @Override
    public SocialUserRespDTO getSocialUserByUserId(Integer userType, Long userId, Integer socialType) {
        return socialUserService.getSocialUserByUserId(userType, userId, socialType);
    }
 
    @Override
    public SocialUserRespDTO getSocialUserByCode(Integer userType, Integer socialType, String code, String state) {
       return socialUserService.getSocialUserByCode(userType, socialType, code, state);
    }
 
}