@Query(value="select * from app where account =?1 and name = ?2 and del_flag is not true",nativeQuery=true)
AppfindByNameNotDel(Longaccount,Stringname);
@Query(value="select * from app where sync_ddb is false and del_flag is not true",nativeQuery=true)
List<App>findNotSyncAppDebug();
@Query(value="select * from app where token = ?1 limit 1",nativeQuery=true)
AppfindOneByAppToken(Stringtoken);
@Query(value="select * from app where id in ?1",nativeQuery=true)
List<App>findByIds(List<Long>ids);
@Query(value="SELECT DISTINCT t2.* FROM campaign t0 JOIN channel t1 ON t0.channel = t1.id JOIN app t2 ON t0.app = t2.id WHERE t0.del_flag is not true and (t1.type!='ry_coop' or t1.type is NULL) and t1.category = 'ADVERTISING' and t2.id in ?1 and t2.platform = ?2 and t2.del_flag is not TRUE",nativeQuery=true)
@Query(value="SELECT DISTINCT t2.* FROM campaign t0 JOIN channel t1 ON t0.channel = t1.id JOIN app t2 ON t0.app = t2.id WHERE t0.del_flag is not true and (t1.type!='ry_coop' or t1.type is NULL) and t1.category = 'ADVERTISING' and t2.id = ?1",nativeQuery=true)
AppfindAppFromOnelink(Longappid);
@Query(value="select * from app where appkey in ?1",nativeQuery=true)
List<App>findByAppkeys(List<String>appkeys);
@Query(value="select * from app a join auth b on a.id = b.app where b.account = ?1 and b.create_account in (select id from account where root_parent = ?2) ",nativeQuery=true)
@Query(value="select * from app a join auth b on a.id = b.app where b.account = ?1 ",nativeQuery=true)
List<App>findAuthApp(LongsubAccountId);
@Query(value="select platform from app where id = ?1",nativeQuery=true)
StringfindPlatformByAppId(LongappId);
@Query(value="select categoryname from category where categoryid=(select game_genre from app where id=?1);",nativeQuery=true)
StringfindGameCategoryByAppID(LongappId);
@Query(value="select categoryname from category where categoryid=(select app_genre from app where id=?1);",nativeQuery=true)
StringfindAppGenreNameByAppID(Longid);
@Query(value="select DISTINCT a.* from app a right join data_auth d on a.id = d.app where d.account = ?1 and d.app in ?2 and d.channel = ?3 and (d.all_campaign is true or d.channel_permit is true)",nativeQuery=true)
@Query(value="select create_account from app where appkey=?1",nativeQuery=true)
StringfindCreateAccountByAppkey(StringappKey);
@Query(value="select DISTINCT a.* from app a right join data_auth d on a.id = d.app where d.account = ?1 and d.channel = ?2 and (d.all_campaign is true or d.channel_permit is true)",nativeQuery=true)
List<App>listApps(LongaccountId,LongchannelId);
@Query(value="select appkey from app where account in ?1",nativeQuery=true)