@@ -76,38 +72,6 @@ public class GroupDao extends AbstractDao {
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 ");
sql.append(" CASE WHEN (grandparentgroup.group_name IS NOT NULL) THEN grandparentgroup.group_name || ' / ' || parentgroup.group_name || ' / ' || usergroup.group_name ");
sql.append(" WHEN (parentgroup.group_name IS NOT NULL) THEN parentgroup.group_name || ' / ' || usergroup.group_name ");
sql.append(" ELSE usergroup.group_name ");
sql.append(" END AS group_path, usergroup.group_id ");
sql.append(" FROM m_group usergroup ");
sql.append(" LEFT JOIN m_group parentgroup on usergroup.parent_group_id = parentgroup.group_id ");
sql.append(" LEFT JOIN m_group grandparentgroup on parentgroup.parent_group_id = grandparentgroup.group_id ");
sql.append(" WHERE usergroup.group_id IN ");
sql.append(" (SELECT group_id ");
sql.append(" FROM m_shop_member sm INNER JOIN r_shop_member_group rsmg on sm.shop_member_id = rsmg.shop_member_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 = ? ");
returnrawQueryGetDto("select parent.* from m_group parent inner join m_group child on child.parent_group_id = parent.group_id where child.group_id = ?",newString[]{""+childGroupId},GroupDto.class);
}
publicbooleanisExistParent(intbaseId){
returnrawQueryGetInt("select * from m_group where parent_group_id = "+baseId,null)>0;
}
publicList<GroupDto>getUserGroups(){
returnrawQueryGetDtoList("select * from m_group where user_group_flg = 1 ORDER BY group_name",null,GroupDto.class);
}
publicList<GroupDto>getMyGroups(){
returnrawQueryGetDtoList("select * from m_group where group_id IN (select group_id from m_shop_member sm inner join r_shop_member_group rmg on sm.shop_member_id = rmg.shop_member_id where sm.self_flg = 1) ORDER BY group_name ASC",null,GroupDto.class);
returnrawQueryGetDtoList("select * from m_group where user_group_flg = 1",null,GroupDto.class);
}
/**
...
...
@@ -599,95 +512,4 @@ public class GroupDao extends AbstractDao {