Commit c0a58918 by Lee Munkyeong

コードレビュー対応。

parent 71204431
...@@ -542,7 +542,7 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -542,7 +542,7 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws AcmsException * @throws AcmsException
*/ */
public RoomListJSON getRoomList(String sid) throws NetworkDisconnectedException, AcmsException { public RoomListJSON getRoomList(String sid) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetChatRooms, new AcmsParameters(sid,AcmsApis.RoomCmds.getRoomList)); HttpResponse response = send(AcmsApis.ApigetChatRooms, new AcmsParameters(sid, AcmsApis.RoomCmds.getRoomList));
RoomListJSON json = new RoomListJSON(response.httpResponseBody); RoomListJSON json = new RoomListJSON(response.httpResponseBody);
return json; return json;
...@@ -557,13 +557,13 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -557,13 +557,13 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws AcmsException * @throws AcmsException
*/ */
public MyInfoJSON getMyInfo(String sid) throws NetworkDisconnectedException, AcmsException { public MyInfoJSON getMyInfo(String sid) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetUser, new AcmsParameters(sid,AcmsApis.UserCmds.getMyInfo)); HttpResponse response = send(AcmsApis.ApigetUser, new AcmsParameters(sid, AcmsApis.UserCmds.getMyInfo));
MyInfoJSON json = new MyInfoJSON(response.httpResponseBody); MyInfoJSON json = new MyInfoJSON(response.httpResponseBody);
return json; return json;
} }
public MyInfoJSON getNameCard(String sid,String shopMemberId) throws NetworkDisconnectedException, AcmsException { public MyInfoJSON getNameCard(String sid, String shopMemberId) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetUser, new GetNameCardParameters(sid,AcmsApis.UserCmds.getNameCard,shopMemberId)); HttpResponse response = send(AcmsApis.ApigetUser, new GetNameCardParameters(sid, AcmsApis.UserCmds.getNameCard, shopMemberId));
MyInfoJSON json = new MyInfoJSON(response.httpResponseBody); MyInfoJSON json = new MyInfoJSON(response.httpResponseBody);
return json; return json;
} }
...@@ -576,8 +576,8 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -576,8 +576,8 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws NetworkDisconnectedException * @throws NetworkDisconnectedException
* @throws AcmsException * @throws AcmsException
*/ */
public GroupListJSON getGroupInfo(String sid,String groupId,String updatedDate) throws NetworkDisconnectedException, AcmsException { public GroupListJSON getGroupInfo(String sid, String groupId, String updatedDate) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetUser, new GetGroupInfoParameters(sid,AcmsApis.UserCmds.getGroupInfo,groupId,updatedDate)); HttpResponse response = send(AcmsApis.ApigetUser, new GetGroupInfoParameters(sid, AcmsApis.UserCmds.getGroupInfo, groupId, updatedDate));
GroupListJSON json = new GroupListJSON(response.httpResponseBody); GroupListJSON json = new GroupListJSON(response.httpResponseBody);
return json; return json;
} }
...@@ -591,7 +591,7 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -591,7 +591,7 @@ public class AcmsClient implements AcmsClientResponseListener {
* @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) 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));
CreatedRoomJSON json = new CreatedRoomJSON(response.httpResponseBody); CreatedRoomJSON json = new CreatedRoomJSON(response.httpResponseBody);
return json; return json;
} }
...@@ -605,7 +605,7 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -605,7 +605,7 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws AcmsException * @throws AcmsException
*/ */
public MessageInfoListJSON getMessages(String sid, String roomId) throws NetworkDisconnectedException, AcmsException { public MessageInfoListJSON getMessages(String sid, String roomId) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetMessage, new GetMessagesParameters(sid,AcmsApis.MessageCmds.getMessages,roomId,"0")); HttpResponse response = send(AcmsApis.ApigetMessage, new GetMessagesParameters(sid, AcmsApis.MessageCmds.getMessages, roomId,"0"));
MessageInfoListJSON json = new MessageInfoListJSON(response.httpResponseBody); MessageInfoListJSON json = new MessageInfoListJSON(response.httpResponseBody);
return json; return json;
} }
......
...@@ -64,7 +64,7 @@ public class ShopMemberDao extends AbstractDao { ...@@ -64,7 +64,7 @@ public class ShopMemberDao extends AbstractDao {
insert("insert or replace into m_shop_member (shop_member_id, shop_member_name, profile_url, favorite_register_date, self_flg) values (?,?,?,?,?)", dto.getInsertValues()); insert("insert or replace into m_shop_member (shop_member_id, shop_member_name, profile_url, favorite_register_date, self_flg) values (?,?,?,?,?)", dto.getInsertValues());
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+",?)", dto.getGroupIds()); insert("insert or replace into r_shop_member_group (shop_member_id, group_id) values ("+dto.shopMemberId+",?)", new Integer[] {groupId});
} }
commit(); commit();
} catch (Exception e) { } catch (Exception e) {
...@@ -82,7 +82,7 @@ public class ShopMemberDao extends AbstractDao { ...@@ -82,7 +82,7 @@ public class ShopMemberDao extends AbstractDao {
insert("insert or replace into m_shop_member (shop_member_id, shop_member_name, profile_url, favorite_register_date, self_flg) values (?,?,?,?,?)", dto.getInsertValues()); insert("insert or replace into m_shop_member (shop_member_id, shop_member_name, profile_url, favorite_register_date, self_flg) values (?,?,?,?,?)", 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+",?)", dto.getGroupIds()); insert("insert or replace into r_shop_member_group (shop_member_id, group_id) values ("+dto.shopMemberId+",?)", new Integer[] {groupId});
} }
} }
commit(); commit();
......
...@@ -68,7 +68,12 @@ public abstract class HttpParameterObject extends ADFObject { ...@@ -68,7 +68,12 @@ public abstract class HttpParameterObject extends ADFObject {
Object value = method.invoke(this); Object value = method.invoke(this);
if (value != null) { if (value != null) {
sb.append(URLEncoder.encode(value.toString(), encoding).replace("+", "%20")); if (propertyName.equals("groupIds")) {
sb.append(value);
} else {
sb.append(URLEncoder.encode(value.toString(), encoding).replace("+", "%20"));
}
} }
sb.append(DelimiterKeyKey); sb.append(DelimiterKeyKey);
......
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