Commit acc21972 by Lee Munkyeong

Merge branch 'features/abcomm_sp5' into 'features/abcomm_sp5_chat_UI'

# Conflicts:
#   ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
#   ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
parents 6b396084 8d3bc5b8
...@@ -6,7 +6,7 @@ package jp.agentec.abook.abv.bl.common.constant; ...@@ -6,7 +6,7 @@ package jp.agentec.abook.abv.bl.common.constant;
public interface ABookCommConstants { public interface ABookCommConstants {
String TAG ="ABookComm"; String TAG = "ABookComm";
//AbookComm専用の共通インターフェース //AbookComm専用の共通インターフェース
interface KEY { interface KEY {
......
...@@ -555,7 +555,7 @@ public class GroupDao extends AbstractDao { ...@@ -555,7 +555,7 @@ public class GroupDao extends AbstractDao {
} }
public GroupDto getParentGroup(Integer childGroupId) { public GroupDto getParentGroup(Integer childGroupId) {
return rawQueryGetDto("select parent.* from m_group parent inner join m_group child on child.parent_group_id = parent.group_id where child.group_id = ?",new String[]{""+ childGroupId}, GroupDto.class); return rawQueryGetDto("select parent.* from m_group parent inner join m_group child on child.parent_group_id = parent.group_id where child.group_id = ?", new String[]{""+ childGroupId}, GroupDto.class);
} }
public boolean isExistParent(int baseId) { public boolean isExistParent(int baseId) {
......
...@@ -379,10 +379,10 @@ public class CommunicationLogic extends AbstractLogic { ...@@ -379,10 +379,10 @@ public class CommunicationLogic extends AbstractLogic {
GroupDto parentGroup = groupDao.getParentGroup(targetGroupId); GroupDto parentGroup = groupDao.getParentGroup(targetGroupId);
if (parentGroup != null) { if (parentGroup != null) {
groupSearchData.put(ABookCommConstants.KEY.PARENT_GROUP_ID,parentGroup.groupId); groupSearchData.put(ABookCommConstants.KEY.PARENT_GROUP_ID, parentGroup.groupId);
} }
if (rootGroup != null) { if (rootGroup != null) {
groupSearchData.put(ABookCommConstants.KEY.ROOT_GROUP_ID,rootGroup.groupId); groupSearchData.put(ABookCommConstants.KEY.ROOT_GROUP_ID, rootGroup.groupId);
} }
//グループ //グループ
......
...@@ -872,7 +872,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -872,7 +872,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
@JavascriptInterface @JavascriptInterface
public void addFavoriteUser(String shopMemberId) throws NetworkDisconnectedException, AcmsException { public void addFavoriteUser(String shopMemberId) throws NetworkDisconnectedException, AcmsException {
boolean result = insertFavoriteUser(shopMemberId); boolean result = insertFavoriteUser(shopMemberId);
if (result) { if (!result) { return; }
mChatWebView.post(new Runnable() { mChatWebView.post(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -880,7 +880,6 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -880,7 +880,6 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
} }
}); });
} }
}
@JavascriptInterface @JavascriptInterface
public void removeFavoriteUser(String shopMemberId) throws NetworkDisconnectedException, AcmsException { public void removeFavoriteUser(String shopMemberId) throws NetworkDisconnectedException, AcmsException {
...@@ -947,7 +946,8 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -947,7 +946,8 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
} }
private void updateUserInfoFromServer(String shopMemberId) throws NetworkDisconnectedException, AcmsException { private void updateUserInfoFromServer(String shopMemberId) throws NetworkDisconnectedException, AcmsException {
MyInfoJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).getNameCard(sid,shopMemberId); MyInfoJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter)
.getNameCard(sid, shopMemberId);
communicationLogic.insertShopMember(resultJson.shopMemberDto); communicationLogic.insertShopMember(resultJson.shopMemberDto);
} }
...@@ -961,7 +961,8 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -961,7 +961,8 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
} }
private boolean deleteFavoriteUser(String shopMemberId) throws NetworkDisconnectedException, AcmsException { private boolean deleteFavoriteUser(String shopMemberId) throws NetworkDisconnectedException, AcmsException {
boolean result = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).deleteFavoriteUser(sid,Integer.parseInt(shopMemberId)); boolean result = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter)
.deleteFavoriteUser(sid, Integer.parseInt(shopMemberId));
if (result) { if (result) {
List<Integer> deleteFavoriteList = new ArrayList<Integer>(); List<Integer> deleteFavoriteList = new ArrayList<Integer>();
deleteFavoriteList.add(Integer.parseInt(shopMemberId)); deleteFavoriteList.add(Integer.parseInt(shopMemberId));
...@@ -971,18 +972,21 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -971,18 +972,21 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
} }
private boolean insertFavoriteGroup(String groupId) throws NetworkDisconnectedException, AcmsException { private boolean insertFavoriteGroup(String groupId) throws NetworkDisconnectedException, AcmsException {
boolean result = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).insertFavoriteGroup(sid,Integer.parseInt(groupId)); boolean result = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter)
.insertFavoriteGroup(sid, Integer.parseInt(groupId));
return result; return result;
} }
private boolean deleteFavoriteGroup(String groupId) throws NetworkDisconnectedException, AcmsException { private boolean deleteFavoriteGroup(String groupId) throws NetworkDisconnectedException, AcmsException {
boolean result = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).deleteFavoriteGroup(sid,Integer.parseInt(groupId)); boolean result = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter)
if (result) { .deleteFavoriteGroup(sid, Integer.parseInt(groupId));
if (!result) { return false; }
List<Integer> deleteFavoriteList = new ArrayList<Integer>(); List<Integer> deleteFavoriteList = new ArrayList<Integer>();
deleteFavoriteList.add(Integer.parseInt(groupId)); deleteFavoriteList.add(Integer.parseInt(groupId));
communicationLogic.deleteavoriteGroup(deleteFavoriteList); communicationLogic.deleteavoriteGroup(deleteFavoriteList);
} return true;
return result;
} }
private void updateGroupInfoFromServer(String groupIds) throws NetworkDisconnectedException, AcmsException { private void updateGroupInfoFromServer(String groupIds) throws NetworkDisconnectedException, AcmsException {
......
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