returnrawQueryGetDtoList("select * from m_group where group_relation_id in (select group_relation_id from r_content_group where content_id = "+contentId+") order by group_id",null,GroupDto.class);
}
publicList<String>getMyGroupPathList(){
StringBuffersql=newStringBuffer();
sql.append(" SELECT ");
sql.append(" CASE WHEN (grandparentgroup.group_name IS NOT NULL) THEN grandparentgroup.group_name || ' / ' || parentgroup.group_name || ' / ' || mygroup.group_name ");
sql.append(" WHEN (parentgroup.group_name IS NOT NULL) THEN parentgroup.group_name || ' / ' || mygroup.group_name ");
sql.append(" ELSE mygroup.group_name ");
sql.append(" END AS group_path_list ");
sql.append(" FROM m_group mygroup ");
sql.append(" LEFT JOIN m_group parentgroup on mygroup.parent_group_id = parentgroup.group_id ");
sql.append(" LEFT JOIN m_group grandparentgroup on parentgroup.parent_group_id = grandparentgroup.group_id ");
list=rawQueryGetDtoList("select * from m_group mg where (mg.group_id = ?) UNION select * from m_group mg where (mg.parent_group_id = ?)",newString[]{""+baseId,""+parentId},GroupDto.class);
returnlist;
}
publicList<GroupDto>getGroupTree(IntegergroupId){
List<GroupDto>list;
StringBuffersql=newStringBuffer();
sql.append(" WITH group_loop AS ");
sql.append(" ( ");
sql.append(" SELECT 1 rownum,group_id,group_name,parent_group_id,user_group_flg from m_group where group_id = ? ");
sql.append(" INNER JOIN r_shop_member_group AS rsmg ");
sql.append(" ON sm.shop_member_id = rsmg.shop_member_id ");
sql.append(" WHERE rsmg.group_id IN (SELECT group_id FROM m_shop_member INNER JOIN r_shop_member_group ON m_shop_member.shop_member_id = r_shop_member_group.shop_member_id WHERE self_flg = 1 GROUP BY group_id)");
sql.append(" AND sm.self_flg != 1 ");
sql.append(" ORDER BY sm.shop_member_name DESC ");