Commit 9534665c by Kim Peace

Merge branch 'communication/develop_43526_onuma' into 'communication/develop'

JavaScriptのインタフェース名変更に対応した。

See merge request !186
parents 357051a0 702306a7
...@@ -93,6 +93,16 @@ public interface ABookCommConstants { ...@@ -93,6 +93,16 @@ public interface ABookCommConstants {
String FILE = "file"; String FILE = "file";
String COLLABORATION = "collaboration"; String COLLABORATION = "collaboration";
} }
String SHOP_NAME = "shopName";
String LANGUAGE_CODE = "languageCode";
String SID = "sid";
String ROOM_ID_UPPERCASE_D = "roomID";
String CHAT_URL = "chatURL";
String CMS_URL = "cmsURL";
String IS_ONLINE = "isOnline";
String IS_MOBILE = "isMobile";
String PLATFORM = "platform";
String COLLABORATION_TYPE = "collaborationType";
} }
interface FLAG { interface FLAG {
...@@ -150,4 +160,12 @@ public interface ABookCommConstants { ...@@ -150,4 +160,12 @@ public interface ABookCommConstants {
} }
String FILE_SAVE_PATH = "/data/user/0/jp.co.agentec.abookplus.check/files/"; String FILE_SAVE_PATH = "/data/user/0/jp.co.agentec.abookplus.check/files/";
String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public_new/chat.html";
String CHAT_PAGE_URL = "file:///android_asset/chat/public_new/chat.html";
String CHAT_ROOM_PAGE_URL = "file:///android_asset/chat/public_new/chat_room.html";
String COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration.html";
String DEFAULT_CHECKSUM = "0000000000";
String PLATFORM_NAME = "android";
} }
...@@ -68,9 +68,9 @@ public class ChatGroupDao extends AbstractCommunicationDao { ...@@ -68,9 +68,9 @@ public class ChatGroupDao extends AbstractCommunicationDao {
sql.append(" ELSE mygroup.group_name "); sql.append(" ELSE mygroup.group_name ");
sql.append(" END AS group_path_list "); sql.append(" END AS group_path_list ");
sql.append(" FROM m_chat_group mygroup "); sql.append(" FROM m_chat_group mygroup ");
sql.append(" LEFT JOIN m_chat_group parentgroup on mygroup.parent_group_id = parentgroup.group_id "); sql.append(" LEFT JOIN m_chat_group parentgroup ON mygroup.parent_group_id = parentgroup.group_id ");
sql.append(" LEFT JOIN m_chat_group grandparentgroup on parentgroup.parent_group_id = grandparentgroup.group_id "); sql.append(" LEFT JOIN m_chat_group grandparentgroup ON parentgroup.parent_group_id = grandparentgroup.group_id ");
sql.append(" WHERE mygroup.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)"); sql.append(" WHERE mygroup.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)");
return rawQueryGetStringList(sql.toString(), null); return rawQueryGetStringList(sql.toString(), null);
} }
...@@ -82,11 +82,11 @@ public class ChatGroupDao extends AbstractCommunicationDao { ...@@ -82,11 +82,11 @@ public class ChatGroupDao extends AbstractCommunicationDao {
sql.append(" ELSE usergroup.group_name "); sql.append(" ELSE usergroup.group_name ");
sql.append(" END AS group_path, usergroup.group_id "); sql.append(" END AS group_path, usergroup.group_id ");
sql.append(" FROM m_chat_group usergroup "); sql.append(" FROM m_chat_group usergroup ");
sql.append(" LEFT JOIN m_chat_group parentgroup on usergroup.parent_group_id = parentgroup.group_id "); sql.append(" LEFT JOIN m_chat_group parentgroup ON usergroup.parent_group_id = parentgroup.group_id ");
sql.append(" LEFT JOIN m_chat_group grandparentgroup on parentgroup.parent_group_id = grandparentgroup.group_id "); sql.append(" LEFT JOIN m_chat_group grandparentgroup ON parentgroup.parent_group_id = grandparentgroup.group_id ");
sql.append(" WHERE usergroup.group_id IN "); sql.append(" WHERE usergroup.group_id IN ");
sql.append(" (SELECT group_id "); 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 "); sql.append(" FROM m_shop_member sm INNER JOIN r_shop_member_group rsmg ON sm.shop_member_id = rsmg.shop_member_id ");
sql.append(" WHERE sm.shop_member_id = ? ) "); sql.append(" WHERE sm.shop_member_id = ? ) ");
return rawQueryGetDtoList(sql.toString(), new String[] { "" + shopMemberId}, ChatGroupDto.class); return rawQueryGetDtoList(sql.toString(), new String[] { "" + shopMemberId}, ChatGroupDto.class);
} }
...@@ -156,11 +156,11 @@ public class ChatGroupDao extends AbstractCommunicationDao { ...@@ -156,11 +156,11 @@ public class ChatGroupDao extends AbstractCommunicationDao {
} }
public ChatGroupDto getGroup(int groupId) { public ChatGroupDto getGroup(int groupId) {
return rawQueryGetDto("select * from m_chat_group where group_id = " + groupId, null, ChatGroupDto.class); return rawQueryGetDto("SELECT * FROM m_chat_group WHERE group_id = " + groupId, null, ChatGroupDto.class);
} }
public List<ChatGroupDto> getFavoriteGroup() { public List<ChatGroupDto> getFavoriteGroup() {
return rawQueryGetDtoList("select * from m_chat_group where favorite_register_date IS NOT NULL ORDER BY favorite_register_date ", null, ChatGroupDto.class); return rawQueryGetDtoList("SELECT * FROM m_chat_group WHERE favorite_register_date IS NOT NULL ORDER BY favorite_register_date ", null, ChatGroupDto.class);
} }
public List<ChatGroupDto> getGroupByName(String[] keywords) { public List<ChatGroupDto> getGroupByName(String[] keywords) {
...@@ -187,10 +187,10 @@ public class ChatGroupDao extends AbstractCommunicationDao { ...@@ -187,10 +187,10 @@ public class ChatGroupDao extends AbstractCommunicationDao {
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" WITH group_loop AS "); sql.append(" WITH group_loop AS ");
sql.append(" ( "); sql.append(" ( ");
sql.append(" SELECT 1 rownum, group_id, group_name, parent_group_id from m_chat_group where group_id = ? "); sql.append(" SELECT 1 rownum, group_id, group_name, parent_group_id FROM m_chat_group WHERE group_id = ? ");
sql.append(" UNION ALL "); sql.append(" UNION ALL ");
sql.append(" SELECT rownum+1 rownum, parent.group_id, parent.group_name, parent.parent_group_id "); sql.append(" SELECT rownum+1 rownum, parent.group_id, parent.group_name, parent.parent_group_id ");
sql.append(" FROM group_loop inner join m_chat_group parent on parent.group_id = group_loop.parent_group_id "); sql.append(" FROM group_loop inner JOIN m_chat_group parent ON parent.group_id = group_loop.parent_group_id ");
sql.append(" ) "); sql.append(" ) ");
sql.append(" SELECT * FROM group_loop ORDER BY group_loop.rownum DESC "); sql.append(" SELECT * FROM group_loop ORDER BY group_loop.rownum DESC ");
...@@ -200,24 +200,24 @@ public class ChatGroupDao extends AbstractCommunicationDao { ...@@ -200,24 +200,24 @@ public class ChatGroupDao extends AbstractCommunicationDao {
public List<ChatGroupDto> getGroupChildList(int parentId) { public List<ChatGroupDto> getGroupChildList(int parentId) {
List<ChatGroupDto> list; List<ChatGroupDto> list;
list = rawQueryGetDtoList("select * from m_chat_group mg where (mg.parent_group_id = ?) ORDER BY group_name", new String[]{""+ parentId}, ChatGroupDto.class); list = rawQueryGetDtoList("SELECT * FROM m_chat_group mg WHERE (mg.parent_group_id = ?) ORDER BY group_name", new String[]{""+ parentId}, ChatGroupDto.class);
return list; return list;
} }
public ChatGroupDto getRootGroup() { public ChatGroupDto getRootGroup() {
return rawQueryGetDto("select * from m_chat_group mg where (mg.parent_group_id = 0)",null, ChatGroupDto.class); return rawQueryGetDto("SELECT * FROM m_chat_group mg WHERE (mg.parent_group_id = 0)",null, ChatGroupDto.class);
} }
public ChatGroupDto getParentGroup(Integer childGroupId) { public ChatGroupDto getParentGroup(Integer childGroupId) {
return rawQueryGetDto("select parent.* from m_chat_group parent inner join m_chat_group child on child.parent_group_id = parent.group_id where child.group_id = ?", new String[]{""+ childGroupId}, ChatGroupDto.class); return rawQueryGetDto("SELECT parent.* FROM m_chat_group parent INNER JOIN m_chat_group child ON child.parent_group_id = parent.group_id WHERE child.group_id = ?", new String[]{""+ childGroupId}, ChatGroupDto.class);
} }
public boolean isExistParent(int baseId) { public boolean isExistParent(int baseId) {
return rawQueryGetInt("select * from m_chat_group where parent_group_id = " + baseId, null) > 0; return rawQueryGetInt("SELECT * FROM m_chat_group WHERE parent_group_id = " + baseId, null) > 0;
} }
public List<ChatGroupDto> getMyGroups() { public List<ChatGroupDto> getMyGroups() {
return rawQueryGetDtoList("select * from m_chat_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, ChatGroupDto.class); return rawQueryGetDtoList("SELECT * FROM m_chat_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, ChatGroupDto.class);
} }
public void insertGroupList(List<ChatGroupDto> groupList) { public void insertGroupList(List<ChatGroupDto> groupList) {
...@@ -277,13 +277,13 @@ public class ChatGroupDao extends AbstractCommunicationDao { ...@@ -277,13 +277,13 @@ public class ChatGroupDao extends AbstractCommunicationDao {
public void deleteGroupList(List<ChatGroupDto> groupList) { public void deleteGroupList(List<ChatGroupDto> groupList) {
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" delete from m_chat_group "); sql.append(" DELETE FROM m_chat_group ");
sql.append(" WHERE group_id = ? "); sql.append(" WHERE group_id = ? ");
try { try {
beginTransaction(); beginTransaction();
for (ChatGroupDto groupDto : groupList) { for (ChatGroupDto groupDto : groupList) {
update(sql.toString(), new Object[] { groupDto.groupId }); update(sql.toString(), new Object[] { groupDto.groupId });
update("delete from r_shop_member_group where group_id = ? ", new Object[] { groupDto.groupId }); update("DELETE FROM r_shop_member_group WHERE group_id = ? ", new Object[] { groupDto.groupId });
} }
commit(); commit();
} catch (Exception e) { } catch (Exception e) {
...@@ -292,6 +292,4 @@ public class ChatGroupDao extends AbstractCommunicationDao { ...@@ -292,6 +292,4 @@ public class ChatGroupDao extends AbstractCommunicationDao {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
} }
...@@ -187,7 +187,7 @@ public class ChatMessageDao extends AbstractCommunicationDao { ...@@ -187,7 +187,7 @@ public class ChatMessageDao extends AbstractCommunicationDao {
} }
public void insertChatMessage(ChatMessageDto dto) { public void insertChatMessage(ChatMessageDto dto) {
insert("insert or replace into t_chat_message (chat_message_id, chat_room_id, shop_member_id, login_id, message, message_type, image_name, download_file_name, save_path, insert_date, unread_count) values (?,?,?,?,?,?,?,?,?,?,?)", dto.getInsertValues()); insert("INSERT OR replace INTO t_chat_message (chat_message_id, chat_room_id, shop_member_id, login_id, message, message_type, image_name, download_file_name, save_path, insert_date, unread_count) VALUES (?,?,?,?,?,?,?,?,?,?,?)", dto.getInsertValues());
} }
public void insertChatMessage(List<ChatMessageDto> chatMessageDtoList) { public void insertChatMessage(List<ChatMessageDto> chatMessageDtoList) {
...@@ -205,15 +205,15 @@ public class ChatMessageDao extends AbstractCommunicationDao { ...@@ -205,15 +205,15 @@ public class ChatMessageDao extends AbstractCommunicationDao {
} }
public boolean updateChatMessage(ChatMessageDto dto) { public boolean updateChatMessage(ChatMessageDto dto) {
long count = update("update t_chat_message set chat_room_id=?, shop_member_id=?, login_id=?,message=?, message_type=?, image_name=?, download_file_name=?, save_path=?, insert_date=?, unread_count where chat_message_id=?", dto.getUpdateValues()); long count = update("UPDATE t_chat_message SET chat_room_id=?, shop_member_id=?, login_id=?,message=?, message_type=?, image_name=?, download_file_name=?, save_path=?, insert_date=?, unread_count WHERE chat_message_id=?", dto.getUpdateValues());
return count > 0; return count > 0;
} }
public void updatUnreadCount(List<ChatMessageDto> messageDtoList, String roomId) { public void updatUnreadCount(List<ChatMessageDto> messageDtoList, String roomId) {
beginTransaction(); beginTransaction();
update("update t_chat_message set unread_count = 0 where chat_room_id=?", new String[]{"" + roomId}); update("UPDATE t_chat_message SET unread_count = 0 WHERE chat_room_id=?", new String[]{"" + roomId});
for (ChatMessageDto messageDto : messageDtoList) { for (ChatMessageDto messageDto : messageDtoList) {
update("update t_chat_message set unread_count = ? where chat_message_id=?", new String[]{"" + messageDto.unreadCount, "" + messageDto.chatMessageId}); update("UPDATE t_chat_message SET unread_count = ? WHERE chat_message_id=?", new String[]{"" + messageDto.unreadCount, "" + messageDto.chatMessageId});
} }
commit(); commit();
} }
......
...@@ -2,16 +2,12 @@ package jp.agentec.abook.abv.bl.data.dao; ...@@ -2,16 +2,12 @@ package jp.agentec.abook.abv.bl.data.dao;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.common.db.Cursor; import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.ChatRoomDto;
import jp.agentec.abook.abv.bl.dto.MemberInfoDto;
import jp.agentec.abook.abv.bl.dto.ShopMemberDto; import jp.agentec.abook.abv.bl.dto.ShopMemberDto;
import jp.agentec.adf.util.CollectionUtil; import jp.agentec.adf.util.CollectionUtil;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
...@@ -58,22 +54,22 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -58,22 +54,22 @@ public class ShopMemberDao extends AbstractCommunicationDao {
} }
public List<ShopMemberDto> getAllShopMember() { public List<ShopMemberDto> getAllShopMember() {
List<ShopMemberDto> list = rawQueryGetDtoList("select * from m_shop_member", null, ShopMemberDto.class); List<ShopMemberDto> list = rawQueryGetDtoList("SELECT * FROM m_shop_member", null, ShopMemberDto.class);
return list; return list;
} }
public ShopMemberDto getShopMember(int shopMemberId) { public ShopMemberDto getShopMember(int shopMemberId) {
return rawQueryGetDto("select * from m_shop_member where shop_member_id=?", new String[]{""+ shopMemberId}, ShopMemberDto.class); return rawQueryGetDto("SELECT * FROM m_shop_member WHERE shop_member_id=?", new String[]{""+ shopMemberId}, ShopMemberDto.class);
} }
public void insertShopMember(ShopMemberDto dto) { public void insertShopMember(ShopMemberDto dto) {
try { try {
beginTransaction(); beginTransaction();
insert("insert or replace into m_shop_member (shop_member_id, shop_member_name, login_id, profile_url, self_flg, favorite_register_date) values (?,?,?,?,?,(select favorite_register_date from m_shop_member where shop_member_id = ?))", dto.getInsertValues()); insert("INSERT OR REPLACE INTO m_shop_member (shop_member_id, shop_member_name, login_id, profile_url, self_flg, favorite_register_date) VALUES (?,?,?,?,?,(SELECT favorite_register_date FROM m_shop_member WHERE shop_member_id = ?))", dto.getInsertValues());
if (dto.groupIdList != null && dto.groupIdList.size() > 0) { if (dto.groupIdList != null && dto.groupIdList.size() > 0) {
update(" delete from r_shop_member_group WHERE shop_member_id = ? ", new Integer[]{dto.shopMemberId}); update(" DELETE FROM r_shop_member_group WHERE shop_member_id = ? ", new Integer[]{dto.shopMemberId});
for (Integer groupId : dto.groupIdList) { for (Integer groupId : dto.groupIdList) {
insert("insert or replace into r_shop_member_group (shop_member_id, group_id) values ("+dto.shopMemberId+",?)", new Integer[]{groupId}); insert("INSERT OR REPLACE INTO r_shop_member_group (shop_member_id, group_id) VALUES ("+dto.shopMemberId+",?)", new Integer[]{groupId});
} }
} }
commit(); commit();
...@@ -89,10 +85,10 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -89,10 +85,10 @@ public class ShopMemberDao extends AbstractCommunicationDao {
try { try {
beginTransaction(); beginTransaction();
for (ShopMemberDto dto : dtoList) { for (ShopMemberDto dto : dtoList) {
insert("insert or replace into m_shop_member (shop_member_id, shop_member_name, login_id, profile_url, self_flg, favorite_register_date) values (?,?,?,?,?, (select favorite_register_date from m_shop_member where shop_member_id = ?))", dto.getInsertValues()); insert("INSERT OR REPLACE INTO m_shop_member (shop_member_id, shop_member_name, login_id, profile_url, self_flg, favorite_register_date) VALUES (?,?,?,?,?, (SELECT favorite_register_date FROM m_shop_member WHERE shop_member_id = ?))", dto.getInsertValues());
if (dto.groupIdList == null) { continue; } if (dto.groupIdList == null) { continue; }
for (Integer groupId : dto.groupIdList) { for (Integer groupId : dto.groupIdList) {
insert("insert or replace into r_shop_member_group (shop_member_id, group_id) values ("+dto.shopMemberId+",?)", new Integer[]{groupId}); insert("INSERT OR REPLACE INTO r_shop_member_group (shop_member_id, group_id) VALUES ("+dto.shopMemberId+",?)", new Integer[]{groupId});
} }
} }
commit(); commit();
...@@ -107,9 +103,9 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -107,9 +103,9 @@ public class ShopMemberDao extends AbstractCommunicationDao {
public void insertShopMemberGroupRelation(Integer groupId, List<ShopMemberDto> dtoList) { public void insertShopMemberGroupRelation(Integer groupId, List<ShopMemberDto> dtoList) {
try { try {
update("delete from r_shop_member_group where group_id = ? ", new Object[] { groupId }); update("DELETE FROM r_shop_member_group WHERE group_id = ? ", new Object[] { groupId });
for (ShopMemberDto dto : dtoList) { for (ShopMemberDto dto : dtoList) {
insert("insert or replace into r_shop_member_group (shop_member_id, group_id) values ("+dto.shopMemberId+",?)", new Integer[]{groupId}); insert("INSERT OR REPLACE INTO r_shop_member_group (shop_member_id, group_id) VALUES ("+dto.shopMemberId+",?)", new Integer[]{groupId});
} }
} catch (Exception e) { } catch (Exception e) {
rollback(); rollback();
...@@ -120,11 +116,11 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -120,11 +116,11 @@ public class ShopMemberDao extends AbstractCommunicationDao {
} }
public ShopMemberDto getMyInfo() { public ShopMemberDto getMyInfo() {
return rawQueryGetDto("select * from m_shop_member where self_flg = 1", null, ShopMemberDto.class); return rawQueryGetDto("SELECT * FROM m_shop_member WHERE self_flg = 1", null, ShopMemberDto.class);
} }
public void resetSelfFlg() { public void resetSelfFlg() {
update("update m_shop_member set self_flg = 0", new String[]{}); update("UPDATE m_shop_member SET self_flg = 0", new String[]{});
} }
public List<ShopMemberDto> getUserInRoom(Integer chatRoomId) { public List<ShopMemberDto> getUserInRoom(Integer chatRoomId) {
...@@ -196,7 +192,7 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -196,7 +192,7 @@ public class ShopMemberDao extends AbstractCommunicationDao {
} }
public List<ShopMemberDto> getfavoriteUserList() { public List<ShopMemberDto> getfavoriteUserList() {
return rawQueryGetDtoList("select * from m_shop_member where favorite_register_date NOT NULL", null, ShopMemberDto.class); return rawQueryGetDtoList("SELECT * FROM m_shop_member WHERE favorite_register_date NOT NULL", null, ShopMemberDto.class);
} }
public List<ShopMemberDto> getfavoriteUserListNotInRoom(Integer roomId) { public List<ShopMemberDto> getfavoriteUserListNotInRoom(Integer roomId) {
...@@ -257,7 +253,7 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -257,7 +253,7 @@ public class ShopMemberDao extends AbstractCommunicationDao {
sql.append(" m_shop_member AS sm "); sql.append(" m_shop_member AS sm ");
sql.append(" INNER JOIN r_shop_member_group AS rsmg "); sql.append(" INNER JOIN r_shop_member_group AS rsmg ");
sql.append(" ON sm.shop_member_id = rsmg.shop_member_id "); 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 sm inner join r_shop_member_group rmg on sm.shop_member_id = rmg.shop_member_id where sm.self_flg = 1) "); sql.append("WHERE rsmg.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) ");
sql.append(" AND sm.self_flg != 1 "); sql.append(" AND sm.self_flg != 1 ");
ArrayList<String> whereSqlList = new ArrayList<String>(); ArrayList<String> whereSqlList = new ArrayList<String>();
for (String keyword : keywords) { for (String keyword : keywords) {
...@@ -286,7 +282,7 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -286,7 +282,7 @@ public class ShopMemberDao extends AbstractCommunicationDao {
sql.append(" m_shop_member AS sm "); sql.append(" m_shop_member AS sm ");
sql.append(" INNER JOIN r_shop_member_group AS rsmg "); sql.append(" INNER JOIN r_shop_member_group AS rsmg ");
sql.append(" ON sm.shop_member_id = rsmg.shop_member_id "); 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 sm inner join r_shop_member_group rmg on sm.shop_member_id = rmg.shop_member_id where sm.self_flg = 1)"); sql.append(" WHERE rsmg.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)");
sql.append(" AND sm.self_flg != 1"); sql.append(" AND sm.self_flg != 1");
sql.append(" AND sm.shop_member_id NOT IN (SELECT shop_member_id FROM r_chat_room_shop_member WHERE chat_room_id = ?)"); sql.append(" AND sm.shop_member_id NOT IN (SELECT shop_member_id FROM r_chat_room_shop_member WHERE chat_room_id = ?)");
ArrayList<String> whereSqlList = new ArrayList<String>(); ArrayList<String> whereSqlList = new ArrayList<String>();
...@@ -389,12 +385,12 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -389,12 +385,12 @@ public class ShopMemberDao extends AbstractCommunicationDao {
} }
public boolean updateShopMember(ShopMemberDto dto) { public boolean updateShopMember(ShopMemberDto dto) {
long count = update("update m_shop_member set shop_member_name=?, profile_url=? where shop_member_id=?", dto.getUpdateValues()); long count = update("UPDATE m_shop_member SET shop_member_name=?, profile_url=? WHERE shop_member_id=?", dto.getUpdateValues());
return count > 0; return count > 0;
} }
public boolean deleteShopMember(ShopMemberDto dto) { public boolean deleteShopMember(ShopMemberDto dto) {
long count = update("delete from m_shop_member where shop_member_id=?", new String[] {"" + dto.shopMemberId}); long count = update("DELETE FROM m_shop_member WHERE shop_member_id=?", new String[] {"" + dto.shopMemberId});
return count > 0; return count > 0;
} }
...@@ -402,9 +398,9 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -402,9 +398,9 @@ public class ShopMemberDao extends AbstractCommunicationDao {
try { try {
beginTransaction(); beginTransaction();
for (ShopMemberDto dto : dtoList) { for (ShopMemberDto dto : dtoList) {
update("delete from r_shop_member_group where shop_member_id=?", new String[] {"" + dto.shopMemberId}); update("DELETE FROM r_shop_member_group WHERE shop_member_id=?", new String[] {"" + dto.shopMemberId});
update("delete from r_chat_room_shop_member where shop_member_id=?", new String[] {"" + dto.shopMemberId}); update("DELETE FROM r_chat_room_shop_member WHERE shop_member_id=?", new String[] {"" + dto.shopMemberId});
update("delete from m_shop_member where shop_member_id=?", new String[] {"" + dto.shopMemberId}); update("DELETE FROM m_shop_member WHERE shop_member_id=?", new String[] {"" + dto.shopMemberId});
} }
commit(); commit();
} catch (Exception e) { } catch (Exception e) {
...@@ -417,7 +413,7 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -417,7 +413,7 @@ public class ShopMemberDao extends AbstractCommunicationDao {
} }
public boolean updateFavoriteUser(ShopMemberDto dto) { public boolean updateFavoriteUser(ShopMemberDto dto) {
long count = update("update m_shop_member set favorite_register_date=? where shop_member_id=?", new Object[]{dto.favoriteRegisterDate, dto.shopMemberId}); long count = update("UPDATE m_shop_member SET favorite_register_date=? WHERE shop_member_id=?", new Object[]{dto.favoriteRegisterDate, dto.shopMemberId});
return count > 0; return count > 0;
} }
...@@ -427,7 +423,7 @@ public class ShopMemberDao extends AbstractCommunicationDao { ...@@ -427,7 +423,7 @@ public class ShopMemberDao extends AbstractCommunicationDao {
ShopMemberDto favoriteUserDto= new ShopMemberDto(); ShopMemberDto favoriteUserDto= new ShopMemberDto();
favoriteUserDto.shopMemberId = shopMemberId; favoriteUserDto.shopMemberId = shopMemberId;
favoriteUserDto.favoriteRegisterDate = DateTimeUtil.toString_yyyyMMddHHmmss_none(new Date(System.currentTimeMillis())); favoriteUserDto.favoriteRegisterDate = DateTimeUtil.toString_yyyyMMddHHmmss_none(new Date(System.currentTimeMillis()));
update("update m_shop_member set favorite_register_date=? where shop_member_id=?", new Object[]{favoriteUserDto.favoriteRegisterDate, favoriteUserDto.shopMemberId}); update("UPDATE m_shop_member SET favorite_register_date=? WHERE shop_member_id=?", new Object[]{favoriteUserDto.favoriteRegisterDate, favoriteUserDto.shopMemberId});
} }
commit(); commit();
} }
......
...@@ -1490,9 +1490,11 @@ ...@@ -1490,9 +1490,11 @@
<string name="msg_destroy_exist_collaboration">進行中の協業が存在します。既存協業を終了し、新しい協業を開始してもよろしいですか</string> <string name="msg_destroy_exist_collaboration">進行中の協業が存在します。既存協業を終了し、新しい協業を開始してもよろしいですか</string>
<string name="not_found_camera">利用可能なカメラを見つかりませんでした。</string> <string name="not_found_camera">利用可能なカメラを見つかりませんでした。</string>
<string name="error_fail_record">レコーディングに失敗しました。管理者にお問い合わせしてください。</string> <string name="error_fail_record">レコーディングに失敗しました。管理者にお問い合わせしてください。</string>
<!-- 連続作業 --> <!-- 連続作業 -->
<string name="msg_error_all_process_delete">全削除の送信に失敗しました。</string> <string name="msg_error_all_process_delete">全削除の送信に失敗しました。</string>
<string name="msg_ozd_file_could_not_opened">帳票ファイルを開くことができませんでした。</string> <string name="msg_ozd_file_could_not_opened">帳票ファイルを開くことができませんでした。</string>
<!-- Communication 会議室 -->
<string name="msg_error_favorites_100_over">お気に入りは最大100件までです。</string>
<string name="msg_eroor_network_offline">接続しているネットワークがありません。</string>
<string name="msg_error_connection_error_meeting_room">会議室サーバに接続できませんでした。</string>
</resources> </resources>
...@@ -1498,4 +1498,8 @@ ...@@ -1498,4 +1498,8 @@
<string name="not_found_camera">사용 가능한 카메라 기기를 찾을수 없습니다.</string> <string name="not_found_camera">사용 가능한 카메라 기기를 찾을수 없습니다.</string>
<string name="msg_destroy_exist_collaboration">진행중인 협업이 존재합니다. 기존 협업을 종료하고 새로운 협업을 시작 하시겠습니까?</string> <string name="msg_destroy_exist_collaboration">진행중인 협업이 존재합니다. 기존 협업을 종료하고 새로운 협업을 시작 하시겠습니까?</string>
<string name="error_fail_record">레코드에 실패했습니다. 관리자에게 문의해주세요.</string> <string name="error_fail_record">레코드에 실패했습니다. 관리자에게 문의해주세요.</string>
<!-- Communication 会議室 -->
<string name="msg_error_favorites_100_over">즐겨찾기는 최대 100개까지 입니다.</string>
<string name="msg_eroor_network_offline">연결된 네트워크가 없습니다.</string>
<string name="msg_error_connection_error_meeting_room">회의실 서버에 연결할 수 없습니다.</string>
</resources> </resources>
\ No newline at end of file
...@@ -1495,4 +1495,8 @@ ...@@ -1495,4 +1495,8 @@
<string name="not_found_camera">Not found camera device.</string> <string name="not_found_camera">Not found camera device.</string>
<string name="msg_destroy_exist_collaboration">Ongoing collaboration exist. Do you want to terminate exist collaboration and start new?</string> <string name="msg_destroy_exist_collaboration">Ongoing collaboration exist. Do you want to terminate exist collaboration and start new?</string>
<string name="error_fail_record">Recording failed. Please contact the administrator.</string> <string name="error_fail_record">Recording failed. Please contact the administrator.</string>
<!-- Communication 会議室 -->
<string name="msg_error_favorites_100_over">You can have up to 100 favorites.</string>
<string name="msg_eroor_network_offline">There is no network connected.</string>
<string name="msg_error_connection_error_meeting_room">Could not connect to the meeting room server.</string>
</resources> </resources>
...@@ -6,49 +6,14 @@ ...@@ -6,49 +6,14 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/background" > android:background="@color/background" >
<!--
<RelativeLayout
android:id="@+id/toolbar_layout"
style="@style/OperationSearchToolBar"
android:layout_height="50dp"
android:layout_width="match_parent">
<TextView
android:id="@+id/title"
style="@style/DialogToolBarTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/chat"
android:textColor="@color/edt_text"
android:textSize="18sp" />
<ImageButton
android:id="@+id/chat_close_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/ic_operation_close"/>
</RelativeLayout>
-->
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" > android:orientation="vertical" >
<jp.agentec.abook.abv.ui.home.view.ChatWebView
<WebView android:id="@+id/chatWebview"
android:id="@+id/chatWebview2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
package jp.agentec.abook.abv.ui.viewer.activity; package jp.agentec.abook.abv.ui.viewer.activity;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
import android.net.Uri; import android.net.Uri;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
...@@ -16,45 +10,11 @@ import android.widget.ProgressBar; ...@@ -16,45 +10,11 @@ import android.widget.ProgressBar;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Callback;
import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentObjectLogLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVAuthenticatedActivity; import jp.agentec.abook.abv.ui.common.activity.ABVAuthenticatedActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper; import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.ContentViewHelper;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
public class CommunicationWebViewActivity extends ABVAuthenticatedActivity { public class CommunicationWebViewActivity extends ABVAuthenticatedActivity {
private static final String TAG = "CommunicationWebViewActivity"; private static final String TAG = "CommunicationWebViewActivity";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment