org.openea.eap.module.system.api.social.SocialUserApiImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eap-module-system-api-impl Show documentation
Show all versions of eap-module-system-api-impl Show documentation
system 模块下,我们放通用业务,支撑上层的核心业务。
例如说:用户、部门、权限、数据字典等等
The newest version!
package org.openea.eap.module.system.api.social;
import org.openea.eap.framework.common.pojo.CommonResult;
import org.openea.eap.module.system.api.social.dto.SocialUserBindReqDTO;
import org.openea.eap.module.system.api.social.dto.SocialUserRespDTO;
import org.openea.eap.module.system.api.social.dto.SocialUserUnbindReqDTO;
import org.openea.eap.module.system.service.social.SocialUserService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import static org.openea.eap.framework.common.pojo.CommonResult.success;
@RestController // 提供 RESTful API 接口,给 Feign 调用
@Validated
public class SocialUserApiImpl implements SocialUserApi {
@Resource
private SocialUserService socialUserService;
@Override
public CommonResult bindSocialUser(SocialUserBindReqDTO reqDTO) {
return success(socialUserService.bindSocialUser(reqDTO));
}
@Override
public CommonResult unbindSocialUser(SocialUserUnbindReqDTO reqDTO) {
socialUserService.unbindSocialUser(reqDTO.getUserId(), reqDTO.getUserType(),
reqDTO.getSocialType(), reqDTO.getOpenid());
return success(true);
}
@Override
public CommonResult getSocialUserByUserId(Integer userType, Long userId, Integer socialType) {
return success(socialUserService.getSocialUserByUserId(userType, userId, socialType));
}
@Override
public CommonResult getSocialUserByCode(Integer userType, Integer socialType, String code, String state) {
return success(socialUserService.getSocialUserByCode(userType, socialType, code, state));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy