Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
080f365a
Commit
080f365a
authored
Jan 14, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify for offline status
parent
f5246fcd
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
40 additions
and
19 deletions
+40
-19
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatMessageDao.java
+6
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatRoomDao.java
+19
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/MShopMember.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/RChatUnreadMessage.java
+0
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/RCollaborationMember.java
+0
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/RShopMemberGroup.java
+0
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TArchive.java
+0
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatMessage.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatRoom.java
+2
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TCollaborationDetail.java
+0
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatMessageDto.java
+3
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatRoomDto.java
+6
-1
ABVJE_Launcher_Android/assets/chat/public/js/chat-ui.js
+2
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatMessageDao.java
View file @
080f365a
...
...
@@ -54,6 +54,10 @@ public class ChatMessageDao extends AbstractDao {
if
(
column
!=
-
1
)
{
dto
.
savePath
=
cursor
.
getString
(
column
);
}
column
=
cursor
.
getColumnIndex
(
"insert_date"
);
if
(
column
!=
-
1
)
{
dto
.
savePath
=
cursor
.
getString
(
column
);
}
return
dto
;
}
...
...
@@ -63,11 +67,11 @@ public class ChatMessageDao extends AbstractDao {
}
public
void
insertChatMessage
(
ChatMessageDto
dto
)
{
insert
(
"insert into t_chat_message (chat_message_id, chat_room_id, shop_member_id, message, message_type, image_name, download_file_name, save_path) values (?,?,?,?,?,?,?,?)"
,
dto
.
getInsertValues
());
insert
(
"insert into t_chat_message (chat_message_id, chat_room_id, shop_member_id, message, message_type, image_name, download_file_name, save_path
, insert_date
) values (?,?,?,?,?,?,?,?)"
,
dto
.
getInsertValues
());
}
public
boolean
updateChatMessage
(
ChatMessageDto
dto
)
{
long
count
=
update
(
"update t_chat_message set chat_room_id=?, shop_member_id=?, message=?, message_type=?, image_name=?, download_file_name=?, save_path=? where chat_message_id=?"
,
dto
.
getUpdateValues
());
long
count
=
update
(
"update t_chat_message set chat_room_id=?, shop_member_id=?, message=?, message_type=?, image_name=?, download_file_name=?, save_path=?
, insert_date=?
where chat_message_id=?"
,
dto
.
getUpdateValues
());
return
count
>
0
;
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatRoomDao.java
View file @
080f365a
...
...
@@ -43,7 +43,25 @@ public class ChatRoomDao extends AbstractDao {
}
public
List
<
ChatRoomDto
>
getAllChatRoom
()
{
List
<
ChatRoomDto
>
list
=
rawQueryGetDtoList
(
"select * from t_chat_room"
,
null
,
ChatRoomDto
.
class
);
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
" SELECT "
);
sql
.
append
(
" cr.chat_room_id, "
);
sql
.
append
(
" cr.chat_room_name, "
);
sql
.
append
(
" cr.type, "
);
sql
.
append
(
" cr.favorite_register_date "
);
sql
.
append
(
" FROM "
);
sql
.
append
(
" t_chat_room AS cr "
);
sql
.
append
(
" INNER JOIN "
);
sql
.
append
(
" ( SELECT max(insert_date) insert_date, message, message_type FROM t_chat_message GROUP BY chat_room_id ) AS cm "
);
sql
.
append
(
" ON cr.chat_room_id = cm.chat_room_id "
);
sql
.
append
(
" INNER JOIN "
);
sql
.
append
(
" r_chat_room_shop_member AS rctsm "
);
sql
.
append
(
" ON cr.chat_room_id = rctsm.chat_room_id "
);
sql
.
append
(
" INNER JOIN "
);
sql
.
append
(
" m_shop_member AS sm "
);
sql
.
append
(
" ON rctsm.shop_menber_id = sm.shop_menber_id "
);
sql
.
append
(
" GROUP BY chat_room_id "
);
List
<
ChatRoomDto
>
list
=
rawQueryGetDtoList
(
sql
.
toString
(),
null
,
ChatRoomDto
.
class
);
return
list
;
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/MShopMember.java
View file @
080f365a
...
...
@@ -19,7 +19,7 @@ public class MShopMember extends SQLiteTableScript {
sql
.
append
(
" shop_member_id INTEGER NOT NULL "
);
sql
.
append
(
" , shop_member_name VARCHAR(64) "
);
sql
.
append
(
" , profile_url VARCHAR(64) "
);
sql
.
append
(
" , favorite_register_date
DATETIME
"
);
sql
.
append
(
" , favorite_register_date
VARCHAR(64)
"
);
sql
.
append
(
" , PRIMARY KEY (shop_member_id) "
);
sql
.
append
(
" ) "
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/RChatUnreadMessage.java
View file @
080f365a
...
...
@@ -20,8 +20,6 @@ public class RChatUnreadMessage extends SQLiteTableScript {
sql
.
append
(
" chat_message_id INTEGER NOT NULL "
);
sql
.
append
(
" , shop_member_id INTEGER NOT NULL "
);
sql
.
append
(
" , PRIMARY KEY (chat_message_id, shop_member_id) "
);
sql
.
append
(
" , FOREIGN KEY (shop_member_id) REFERENCES m_shop_member (shop_member_id) "
);
sql
.
append
(
" , FOREIGN KEY (chat_message_id) REFERENCES t_chat_message (chat_message_id) "
);
sql
.
append
(
" ) "
);
ddl
.
add
(
sql
.
toString
());
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/RCollaborationMember.java
View file @
080f365a
...
...
@@ -20,8 +20,6 @@ public class RCollaborationMember extends SQLiteTableScript {
sql
.
append
(
" collaboration_id INTEGER NOT NULL "
);
sql
.
append
(
" , shop_member_id INTEGER NOT NULL "
);
sql
.
append
(
" , PRIMARY KEY (collaboration_id, shop_member_id) "
);
sql
.
append
(
" , FOREIGN KEY (shop_member_id) REFERENCES m_shop_member (shop_member_id) "
);
sql
.
append
(
" , FOREIGN KEY (collaboration_id) REFERENCES t_collaboration (collaboration_id) "
);
sql
.
append
(
" ) "
);
ddl
.
add
(
sql
.
toString
());
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/RShopMemberGroup.java
View file @
080f365a
...
...
@@ -20,8 +20,6 @@ public class RShopMemberGroup extends SQLiteTableScript {
sql
.
append
(
" shop_member_id INTEGER NOT NULL "
);
sql
.
append
(
" , group_id INTEGER NOT NULL "
);
sql
.
append
(
" , PRIMARY KEY (shop_member_id, group_id) "
);
sql
.
append
(
" , FOREIGN KEY (shop_member_id) REFERENCES m_shop_member (shop_member_id) "
);
sql
.
append
(
" , FOREIGN KEY (group_id) REFERENCES m_group (group_id) "
);
sql
.
append
(
" ) "
);
ddl
.
add
(
sql
.
toString
());
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TArchive.java
View file @
080f365a
...
...
@@ -24,8 +24,6 @@ public class TArchive extends SQLiteTableScript {
sql
.
append
(
" , shop_member_id INTEGER NOT NULL "
);
sql
.
append
(
" , archive_save_path VARCHAR2 "
);
sql
.
append
(
" , PRIMARY KEY (archive_id)"
);
sql
.
append
(
" , FOREIGN KEY (collaboration_id) REFERENCES t_collaboration (collaboration_id) "
);
sql
.
append
(
" , FOREIGN KEY (shop_member_id) REFERENCES m_shop_member (shop_member_id) "
);
sql
.
append
(
" ) "
);
ddl
.
add
(
sql
.
toString
());
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatMessage.java
View file @
080f365a
...
...
@@ -24,6 +24,7 @@ public class TChatMessage extends SQLiteTableScript {
sql
.
append
(
" , image_name VARCHAR2 "
);
sql
.
append
(
" , download_file_name VARCHAR2 "
);
sql
.
append
(
" , save_path VARCHAR2 "
);
sql
.
append
(
" , insert_date VARCHAR2 "
);
sql
.
append
(
" , PRIMARY KEY (chat_message_id) "
);
sql
.
append
(
" ) "
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatRoom.java
View file @
080f365a
...
...
@@ -17,9 +17,9 @@ public class TChatRoom extends SQLiteTableScript {
sql
.
append
(
" create table t_chat_room ( "
);
sql
.
append
(
" chat_room_id INTEGER NOT NULL "
);
sql
.
append
(
" , chat_room_name VARCHAR2 "
);
sql
.
append
(
" , chat_room_name VARCHAR2
(64)
"
);
sql
.
append
(
" , type INTEGER NOT NULL "
);
sql
.
append
(
" , favorite_register_date
DATETIME
"
);
sql
.
append
(
" , favorite_register_date
VARCHAR2(64)
"
);
sql
.
append
(
" , PRIMARY KEY (chat_room_id) "
);
sql
.
append
(
" ) "
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TCollaborationDetail.java
View file @
080f365a
...
...
@@ -22,8 +22,6 @@ public class TCollaborationDetail extends SQLiteTableScript {
sql
.
append
(
" , collaboration_duration VARCHAR2(64) "
);
sql
.
append
(
" , chat_room_id INTEGER NOT NULL "
);
sql
.
append
(
" , PRIMARY KEY (collaboration_detial_id)"
);
sql
.
append
(
" , FOREIGN KEY (collaboration_id) REFERENCES t_collaboration (collaboration_id) "
);
sql
.
append
(
" , FOREIGN KEY (chat_room_id) REFERENCES t_chat_room (chat_room_id) "
);
sql
.
append
(
" ) "
);
ddl
.
add
(
sql
.
toString
());
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatMessageDto.java
View file @
080f365a
...
...
@@ -9,15 +9,16 @@ public class ChatMessageDto extends AbstractDto {
public
String
imageName
;
public
String
downloadFileName
;
public
String
savePath
;
public
String
insertDate
;
@Override
public
Object
[]
getInsertValues
()
{
return
new
Object
[]{
chatMessageId
,
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
};
return
new
Object
[]{
chatMessageId
,
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
};
}
@Override
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]{
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
chatMessageId
};
return
new
Object
[]{
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
,
chatMessageId
};
}
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatRoomDto.java
View file @
080f365a
package
jp
.
agentec
.
abook
.
abv
.
bl
.
dto
;
import
java.util.
Date
;
import
java.util.
List
;
public
class
ChatRoomDto
extends
AbstractDto
{
public
Integer
chatRoomId
;
public
String
chatRoomName
;
public
Integer
type
;
public
String
favoriteRegisterDate
;
public
Integer
unreadCnt
;
public
ChatMessageDto
message
;
public
List
<
ShopMemberDto
>
users
;
@Override
...
...
ABVJE_Launcher_Android/assets/chat/public/js/chat-ui.js
View file @
080f365a
...
...
@@ -816,12 +816,14 @@ CHAT_UI.refreshRoomList = function(rooms, activeRoomId = null){
// loadingIndicatorを表示しない
CHAT_UI
.
showLoadingIndicator
();
// 新しいチャットルームをタッチする場合、チャットルームの接続処理を実行
socket
.
emit
(
'joinRoom'
,
room
.
roomId
,
room
.
roomName
,
function
(){
CHAT
.
saveRoomInfo
(
room
.
roomId
,
room
.
roomName
);
$
(
'#messages'
).
html
(
''
);
// チャットルーム名を変更する
$
(
'.titleRoomName'
).
text
(
room
.
roomName
).
data
(
'roomName'
,
room
.
roomName
);
});
}
});
// チャットルームリストに追加する
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment