Search in sources :

Example 1 with PersonalServiceAuthenticationExample

use of com.itrus.portal.db.PersonalServiceAuthenticationExample in project portal by ixinportal.

the class AppServiceExtImpl method selectServiceObjectByAppServiceId.

/**
 * 得到对应的服务配置
 * @param appId
 * 			应用id
 * @return
 */
public Object selectServiceObjectByAppServiceId(Long appId) {
    AppServiceAuthenticationExample appServiceAuthenticationExample = new AppServiceAuthenticationExample();
    AppServiceAuthenticationExample.Criteria aec = appServiceAuthenticationExample.createCriteria();
    aec.andAppServiceEqualTo(appId);
    AppServiceAuthentication appServiceAuthentication = sqlSession.selectOne("com.itrus.portal.db.AppServiceAuthenticationMapper.selectByExample", appServiceAuthenticationExample);
    if (appServiceAuthentication != null) {
        return appServiceAuthentication;
    }
    PersonalServiceAuthenticationExample personalServiceAuthenticationExample = new PersonalServiceAuthenticationExample();
    PersonalServiceAuthenticationExample.Criteria pec = personalServiceAuthenticationExample.createCriteria();
    pec.andAppServiceEqualTo(appId);
    PersonalServiceAuthentication personalServiceAuthentication = sqlSession.selectOne("com.itrus.portal.db.PersonalServiceAuthenticationMapper.selectByExample", personalServiceAuthenticationExample);
    if (personalServiceAuthentication != null) {
        return personalServiceAuthentication;
    }
    return null;
}
Also used : AppServiceAuthentication(com.itrus.portal.db.AppServiceAuthentication) PersonalServiceAuthentication(com.itrus.portal.db.PersonalServiceAuthentication) PersonalServiceAuthenticationExample(com.itrus.portal.db.PersonalServiceAuthenticationExample) AppServiceAuthenticationExample(com.itrus.portal.db.AppServiceAuthenticationExample)

Aggregations

AppServiceAuthentication (com.itrus.portal.db.AppServiceAuthentication)1 AppServiceAuthenticationExample (com.itrus.portal.db.AppServiceAuthenticationExample)1 PersonalServiceAuthentication (com.itrus.portal.db.PersonalServiceAuthentication)1 PersonalServiceAuthenticationExample (com.itrus.portal.db.PersonalServiceAuthenticationExample)1