-
70 70 sql.append(" FROM m_chat_group mygroup "); 71 71 sql.append(" LEFT JOIN m_chat_group parentgroup on mygroup.parent_group_id = parentgroup.group_id "); 72 72 sql.append(" LEFT JOIN m_chat_group grandparentgroup on parentgroup.parent_group_id = grandparentgroup.group_id "); 73 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)"); 73 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)"); -
Master
[nits]
SELECT
,FROM
,ON
も大文字でお願いします。 -
-
-
156 156 } 157 157 158 158 public ChatGroupDto getGroup(int groupId) { 159 return rawQueryGetDto("select * from m_chat_group where group_id = " + groupId, null, ChatGroupDto.class); 159 return rawQueryGetDto("SELECT * from m_chat_group WHERE group_id = " + groupId, null, ChatGroupDto.class); -
Master
[nits]
from
も大文字でお願いします。 -
-
-
208 return rawQueryGetDto("SELECT * FROM m_chat_group mg WHERE (mg.parent_group_id = 0)",null, ChatGroupDto.class); 209 209 } 210 210 211 211 public ChatGroupDto getParentGroup(Integer childGroupId) { 212 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); 212 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); 213 213 } 214 214 215 215 public boolean isExistParent(int baseId) { 216 return rawQueryGetInt("select * from m_chat_group where parent_group_id = " + baseId, null) > 0; 216 return rawQueryGetInt("SELECT * FROM m_chat_group WHERE parent_group_id = " + baseId, null) > 0; 217 217 } 218 218 219 219 public List<ChatGroupDto> getMyGroups() { 220 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); 220 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); -
Master
[nits] 真ん中の
from
、on
も大文字でお願いします。 -
-
-
205 205 } 206 206 207 207 public boolean updateChatMessage(ChatMessageDto dto) { 208 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()); 208 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()); -
Master
[nits]
set
も大文字でお願いします。 -
-
-
257 253 sql.append(" m_shop_member AS sm "); 258 254 sql.append(" INNER JOIN r_shop_member_group AS rsmg "); 259 255 sql.append(" ON sm.shop_member_id = rsmg.shop_member_id "); 260 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) "); 256 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) "); -
Master
[nits]
on
-
-
-
36 public class ChatData { 37 private Context context; 38 public String sid; 39 public String roomName; 40 public String loginId; 41 public String shopName; 42 public Integer shopMemberId; 43 private boolean isOnline; 44 public String groupId; 45 public Long roomId; 46 public String roomType; 47 private String strCollaborationType; 48 private String beforeRoomType; 49 public Integer joinMeetingId; 50 private boolean isMobile; 51 // 0:協業生成, 1:協業参加 -
Master
[nits] 2もあります。DMルームの参加者ではない人が協業から招待されたら
2
(invite)状態になると思います。 -
Master
コメントを削除しました。
-
-
-
202 RoomListJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).getRoomList(sid); 203 communicationLogic.insertChatRoomList(resultJson.roomList); 204 } 205 206 /** 207 * 208 * @param changeRoomName 209 * @throws NetworkDisconnectedException 210 * @throws AcmsException 211 */ 212 public void changeRoomName(String changeRoomName) throws NetworkDisconnectedException, AcmsException { 213 ChangeRoomNameJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).changeRoomName(sid, changeRoomName, roomId.intValue()); 214 if (resultJson.status != 200) { return; } 215 216 communicationLogic.updateChatRoomName(changeRoomName, roomId.intValue()); 217 //joinRoom(roomId.toString(), changeRoomName); -
Master
[nits] コードのコメントアウトはその理由などをコメントなどに残すか、削除してください。
-
Master
コメントアウトしたコードを削除しました。
-
-
-
235 SharedPreferences.Editor editor = pref.edit(); 236 editor.putString(ABookCommConstants.KEY.ARCHIVE_UPDATED_DATE, resultJson.archiveLastUpdateDate); 237 editor.commit(); 238 } 239 240 public void updateArchiveDetail(String archiveId) throws NetworkDisconnectedException, AcmsException { 241 ArchiveDto archiveDto = communicationLogic.getArchive(Integer.parseInt(archiveId)); 242 RoomJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).getRoom(sid, archiveDto.roomId.toString()); 243 archiveDto.roomName = resultJson.chatRoomDto.chatRoomName; 244 communicationLogic.updateArchiveDetial(archiveDto); 245 } 246 247 public void joinCollaboration(String collaborationType, String meetingId) throws NetworkDisconnectedException, AcmsException { 248 joinMeetingId = Integer.parseInt(meetingId); 249 collaborationJoinFlg = ABookCommConstants.FLAG.COLLABORATION_JOIN_FLG.JOIN; 250 AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).joinCollaboration(sid, roomId.intValue()); -
Master
[want] 関数型関数の実行は
.
の後に改行していただくと読みやすくなります。// not preferred AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).joinCollaboration(sid, roomId.intValue()); // preferred AcmsClient .getInstance(ABVEnvironment.getInstance().networkAdapter) .joinCollaboration(sid, roomId.intValue());
-
-
-
275 private void updateFavoriteGroup() throws NetworkDisconnectedException, AcmsException { 276 GetFavoriteGroupJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).getFavoriteGroup(sid); 277 communicationLogic.updateFavoriteGroup(resultJson.favoriteGroupIds); 278 } 279 280 private void updateAllGroupInfo() throws NetworkDisconnectedException, AcmsException { 281 updateGroupInfoFromServer(); 282 } 283 284 public void updateFavoriteInfo() throws NetworkDisconnectedException, AcmsException { 285 updateFavoriteUser(); 286 updateFavoriteGroup(); 287 } 288 289 public void updateGroupInfoFromServer() throws NetworkDisconnectedException, AcmsException { 290 ArrayList<String> checkSumList = new ArrayList<String>(); -
Master
[must] 宣言されていますが、使われてないです。 不要なものであれば、削除をお願いします。
-
Master
ChatWebViewActivity にある同じメソッドを削除して ChatDataのメソッドを使用するように修正しました。
-
-
-
366 jsonObj.put(ABookCommConstants.KEY.SHOP_MEMBER_ID, shopMemberId); 367 jsonObj.put(ABookCommConstants.KEY.LANGUAGE_CODE, languageCode); 368 return jsonObj.toString(); 369 } 370 public String getRoomInfo() { 371 JSONObject jsonObj = new JSONObject(); 372 jsonObj.put(ABookCommConstants.KEY.ROOM_ID_UPPERCASE_D, roomId); 373 jsonObj.put(ABookCommConstants.KEY.ROOM_NAME, roomName); 374 jsonObj.put(ABookCommConstants.KEY.ROOM_TYPE, roomType); 375 return jsonObj.toString(); 376 } 377 378 public String getDeviceInfo() { 379 JSONObject jsonObj = new JSONObject(); 380 jsonObj.put(ABookCommConstants.KEY.IS_MOBILE, isMobile); 381 jsonObj.put(ABookCommConstants.KEY.PLATFORM, "android"); -
Master
[must]
"android"
ハードコーディングはなるべく控えていただきたいです。private final staticなどで宣言して使ってください。 -
Master
ABookCommConstantsにPLATFORM_NAME="android"を追加しました。
-
-
-
47 settings.setAllowFileAccessFromFileURLs(true); 48 settings.setSaveFormData(false); 49 settings.setAllowUniversalAccessFromFileURLs(true); 50 if (Logger.isDebugEnabled()) { 51 setWebContentsDebuggingEnabled(true); //デバッグモード(chromeからinspect可) 52 } 53 this.chatData = chatData; 54 } 55 56 @JavascriptInterface 57 public void saveVisitRoomInfo(String roomId, String roomName) { 58 chatActivity.saveVisitRoomInfo(roomId, roomName); 59 } 60 61 @JavascriptInterface 62 public void getLoginParameter() { -
Master
[nits] jsでなくなったので、削除お願いします。
-
Master
削除しました。
-
-
-
57 public void saveVisitRoomInfo(String roomId, String roomName) { 58 chatActivity.saveVisitRoomInfo(roomId, roomName); 59 } 60 61 @JavascriptInterface 62 public void getLoginParameter() { 63 post(new Runnable() { 64 @Override 65 public void run() { 66 chatActivity.getLogin(); 67 } 68 }); 69 } 70 71 @JavascriptInterface 72 public void getGlobalParameter() { -
Master
[nits] jsでなくなったので、削除お願いします。
-
Master
削除しました
-
-
-
77 } 78 }); 79 } 80 81 @JavascriptInterface 82 public void goHome() { 83 post(new Runnable() { 84 @Override 85 public void run() { 86 chatActivity.backToHome(); 87 } 88 }); 89 } 90 91 @JavascriptInterface 92 public void openOperationRelatedContent() { -
169 public void changeRoomName(String changeRoomName) throws NetworkDisconnectedException, AcmsException { 170 chatActivity.changeRoomName(changeRoomName); 171 } 172 173 @JavascriptInterface 174 public void joinRoom(String joinRoomId, String joinRoomName) { 175 chatActivity.joinRoom(joinRoomId, joinRoomName); 176 } 177 178 @JavascriptInterface 179 public void roomDisplayOff() { 180 chatActivity.roomDisplayOff(); 181 } 182 183 @JavascriptInterface 184 public void inviteUsers(String userIds, boolean isCollaboration) throws NetworkDisconnectedException, AcmsException { -
Master
[nits] jsのコードを見たら、いつも
isCollaboration
をfalseに送っています。確認後、削除しても良いのであれば、パラメータの削除をお願いいたします。 -
Master
パラメータを削除しました。
-
-
-
425 public int createContentView() { 426 return chatActivity.createContentView(); 427 } 428 429 @JavascriptInterface 430 public void startContentView() throws InterruptedException { 431 chatActivity.startContentView(); 432 } 433 434 @JavascriptInterface 435 public void joinMeetingRoom(int newMeetingId) throws InterruptedException { 436 chatActivity.joinMeetingRoom(newMeetingId); 437 } 438 439 @JavascriptInterface 440 public void startPipMode() { -
Master
[nits]
startPipMode
->startPIPMode
-
Master
修正しました。
-
-
-
478 encodedVideo.delete(); 479 } 480 } 481 482 @JavascriptInterface 483 public void setHostRequestFlg(int hostRequestFlg) { 484 chatData.setHostRequestFlg(hostRequestFlg); 485 } 486 487 @JavascriptInterface 488 public int getHostRequestFlg() { 489 return chatData.getHostRequestFlg(); 490 } 491 492 @JavascriptInterface 493 public void finishPip() { -
Master
[nits]
finishPip
->finishPIP
-
Master
修正しました。
-
-
-
Toggle commit list
-
merged
Toggle commit list