Commit c0a58918 by Lee Munkyeong

コードレビュー対応。

parent 71204431
......@@ -542,7 +542,7 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws 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);
return json;
......@@ -557,13 +557,13 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws 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);
return json;
}
public MyInfoJSON getNameCard(String sid,String shopMemberId) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetUser, new GetNameCardParameters(sid,AcmsApis.UserCmds.getNameCard,shopMemberId));
public MyInfoJSON getNameCard(String sid, String shopMemberId) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApigetUser, new GetNameCardParameters(sid, AcmsApis.UserCmds.getNameCard, shopMemberId));
MyInfoJSON json = new MyInfoJSON(response.httpResponseBody);
return json;
}
......@@ -576,8 +576,8 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws NetworkDisconnectedException
* @throws 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));
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));
GroupListJSON json = new GroupListJSON(response.httpResponseBody);
return json;
}
......@@ -591,7 +591,7 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws 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);
return json;
}
......@@ -605,7 +605,7 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws 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);
return json;
}
......
......@@ -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());
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();
} catch (Exception e) {
......@@ -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());
if (dto.groupIdList == null) { continue; }
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();
......
......@@ -68,7 +68,12 @@ public abstract class HttpParameterObject extends ADFObject {
Object value = method.invoke(this);
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);
......
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