Commit 9daff9e1 by Lee Munkyeong

ルーム開設API修正。

parent 99e916bc
...@@ -603,8 +603,8 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -603,8 +603,8 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws NetworkDisconnectedException * @throws NetworkDisconnectedException
* @throws AcmsException * @throws AcmsException
*/ */
public CreatedRoomJSON createRoom(String sid, String roomType, String inviteMemberIds, String newRoomName) throws NetworkDisconnectedException, AcmsException { public CreatedRoomJSON createRoom(String sid, String roomType, String inviteMemberIds, String newRoomName, String memberName) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetChatRooms, new CreateRoomParameters(sid, AcmsApis.RoomCmds.createRoom, roomType, inviteMemberIds, newRoomName)); HttpResponse response = send(AcmsApis.ApigetChatRooms, new CreateRoomParameters(sid, AcmsApis.RoomCmds.createRoom, roomType, inviteMemberIds, newRoomName, memberName));
CreatedRoomJSON json = new CreatedRoomJSON(response.httpResponseBody); CreatedRoomJSON json = new CreatedRoomJSON(response.httpResponseBody);
return json; return json;
} }
......
...@@ -19,6 +19,8 @@ public class CreateRoomParameters extends HttpParameterObject { ...@@ -19,6 +19,8 @@ public class CreateRoomParameters extends HttpParameterObject {
private String roomType; private String roomType;
private String inviteMemberIds; private String inviteMemberIds;
private String newRoomName; private String newRoomName;
private String memberName;
/** /**
* {@link CreateRoomParameters} のインスタンスを初期化します。 * {@link CreateRoomParameters} のインスタンスを初期化します。
* @param sid ログインした時のセッションIDです。 * @param sid ログインした時のセッションIDです。
...@@ -34,12 +36,13 @@ public class CreateRoomParameters extends HttpParameterObject { ...@@ -34,12 +36,13 @@ public class CreateRoomParameters extends HttpParameterObject {
* @param cmd Apiリクエストに必要なコマンド(ABOOK COMM専用)。 * @param cmd Apiリクエストに必要なコマンド(ABOOK COMM専用)。
* @since 1.0.0 * @since 1.0.0
*/ */
public CreateRoomParameters(String sid, String cmd, String roomType, String inviteMemberIds, String newRoomName) { public CreateRoomParameters(String sid, String cmd, String roomType, String inviteMemberIds, String newRoomName, String memberName) {
this.sid = sid; this.sid = sid;
this.cmd = cmd; this.cmd = cmd;
this.roomType = roomType; this.roomType = roomType;
this.inviteMemberIds = inviteMemberIds; this.inviteMemberIds = inviteMemberIds;
this.newRoomName = newRoomName; this.newRoomName = newRoomName;
this.memberName = memberName;
} }
/** /**
...@@ -71,4 +74,8 @@ public class CreateRoomParameters extends HttpParameterObject { ...@@ -71,4 +74,8 @@ public class CreateRoomParameters extends HttpParameterObject {
public String getNewRoomName() { public String getNewRoomName() {
return newRoomName; return newRoomName;
} }
public String getMemberName() {
return memberName;
}
} }
...@@ -299,6 +299,11 @@ public class CommunicationLogic extends AbstractLogic { ...@@ -299,6 +299,11 @@ public class CommunicationLogic extends AbstractLogic {
groupDao.deleteGroupList(deleteGroupList); groupDao.deleteGroupList(deleteGroupList);
} }
public ShopMemberDto getMyShopMemberDto() {
ShopMemberDto myInfo = shopMemberDao.getMyInfo();
return myInfo;
}
public void deleteChatRoomList() { public void deleteChatRoomList() {
chatRoomDao.deleteChatRoom(); chatRoomDao.deleteChatRoom();
} }
......
...@@ -92,6 +92,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -92,6 +92,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
private String shopName; private String shopName;
private boolean isOnline; private boolean isOnline;
private Long roomId; private Long roomId;
private Integer shopMemberId;
public AlertDialog myAlertDialog; public AlertDialog myAlertDialog;
...@@ -135,6 +136,9 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -135,6 +136,9 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
Logger.d("DEVICE_NOT_CONNECTED_NETWORK:"); Logger.d("DEVICE_NOT_CONNECTED_NETWORK:");
} }
shopMemberId = communicationLogic.getMyShopMemberDto().shopMemberId;
mChatWebView = findViewById(R.id.chatWebview2); mChatWebView = findViewById(R.id.chatWebview2);
mChatWebView.setOverScrollMode(View.OVER_SCROLL_NEVER); //オーバースクロールしない。 mChatWebView.setOverScrollMode(View.OVER_SCROLL_NEVER); //オーバースクロールしない。
mChatWebView.setVerticalScrollBarEnabled(false); //スクロールバーを消す。 mChatWebView.setVerticalScrollBarEnabled(false); //スクロールバーを消す。
...@@ -720,7 +724,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -720,7 +724,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
@JavascriptInterface @JavascriptInterface
public void createChatRoom(String roomType, String userIdList, String encodedRoomName) throws NetworkDisconnectedException, AcmsException { public void createChatRoom(String roomType, String userIdList, String encodedRoomName) throws NetworkDisconnectedException, AcmsException {
CreatedRoomJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).createRoom(sid, roomType, userIdList, encodedRoomName); CreatedRoomJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).createRoom(sid, roomType, userIdList, encodedRoomName, loginId);
communicationLogic.insertChatRoom(resultJson.chatRoomDto); communicationLogic.insertChatRoom(resultJson.chatRoomDto);
final Integer chatRoomId = resultJson.chatRoomDto.chatRoomId; final Integer chatRoomId = resultJson.chatRoomDto.chatRoomId;
final String chatRoomName = resultJson.chatRoomDto.chatRoomName; final String chatRoomName = resultJson.chatRoomDto.chatRoomName;
...@@ -779,11 +783,10 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -779,11 +783,10 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
} }
@JavascriptInterface @JavascriptInterface
public String getGroupInfo(String groupId) throws NetworkDisconnectedException, AcmsException { public String getGroupInfo(String groupId) {
String groupInfoStr = communicationLogic.getGroupSearchData(Integer.parseInt(groupId)); String groupInfoStr = communicationLogic.getGroupSearchData(Integer.parseInt(groupId));
return groupInfoStr; return groupInfoStr;
} }
} }
/** /**
......
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