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
5379e727
Commit
5379e727
authored
Apr 12, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/#477_未読数追加。' into 'features/abcomm_sp6'
未読数追加。 See merge request
!103
parents
23f72ea8
13ffbb78
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
6 deletions
+16
-6
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/MessageInfoListJSON.java
+2
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatMessageDao.java
+8
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatMessage.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatMessageDto.java
+3
-4
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
+2
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/MessageInfoListJSON.java
View file @
5379e727
...
...
@@ -48,6 +48,8 @@ public class MessageInfoListJSON extends AcmsCommonJSON {
chatMessageDto
.
chatMessageId
=
messageInfoJSON
.
getInt
(
ABookCommConstants
.
KEY
.
MESSAGE_ID
);
chatMessageDto
.
message
=
messageInfoJSON
.
getString
(
ABookCommConstants
.
KEY
.
MESSAGE
);
chatMessageDto
.
messageType
=
messageInfoJSON
.
getInt
(
ABookCommConstants
.
KEY
.
MESSAGE_TYPE
);
chatMessageDto
.
unreadCount
=
messageInfoJSON
.
getInt
(
ABookCommConstants
.
KEY
.
UNREAD_COUNT
);
if
(
messageInfoJSON
.
has
(
ABookCommConstants
.
KEY
.
TIME
))
{
chatMessageDto
.
insertDate
=
DateTimeUtil
.
millToDateString
(
messageInfoJSON
.
getJSONObject
(
ABookCommConstants
.
KEY
.
TIME
).
getLong
(
ABookCommConstants
.
KEY
.
TIME
));
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatMessageDao.java
View file @
5379e727
...
...
@@ -72,6 +72,10 @@ public class ChatMessageDao extends AbstractDao {
if
(
column
!=
-
1
)
{
dto
.
selfFlg
=
cursor
.
getInt
(
column
);
}
column
=
cursor
.
getColumnIndex
(
"unread_count"
);
if
(
column
!=
-
1
)
{
dto
.
unreadCount
=
cursor
.
getInt
(
column
);
}
return
dto
;
}
...
...
@@ -90,6 +94,7 @@ public class ChatMessageDao extends AbstractDao {
sql
.
append
(
" ,sm.shop_member_name "
);
sql
.
append
(
" ,sm.profile_url "
);
sql
.
append
(
" ,sm.self_flg "
);
sql
.
append
(
" ,cm.unread_count "
);
sql
.
append
(
" FROM "
);
sql
.
append
(
" t_chat_message AS cm "
);
sql
.
append
(
" INNER JOIN "
);
...
...
@@ -116,6 +121,7 @@ public class ChatMessageDao extends AbstractDao {
sql
.
append
(
" ,sm.shop_member_name "
);
sql
.
append
(
" ,sm.profile_url "
);
sql
.
append
(
" ,sm.self_flg "
);
sql
.
append
(
" ,cm.unread_count "
);
sql
.
append
(
" FROM "
);
sql
.
append
(
" t_chat_message AS cm "
);
sql
.
append
(
" INNER JOIN "
);
...
...
@@ -143,7 +149,7 @@ public class ChatMessageDao extends AbstractDao {
}
public
void
insertChatMessage
(
ChatMessageDto
dto
)
{
insert
(
"insert or replace 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
());
insert
(
"insert or replace 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
, unread_count) values (?,
?,?,?,?,?,?,?,?,?)"
,
dto
.
getInsertValues
());
}
public
void
insertChatMessage
(
List
<
ChatMessageDto
>
chatMessageDtoList
)
{
...
...
@@ -161,7 +167,7 @@ public class ChatMessageDao extends AbstractDao {
}
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=?, insert_date=? 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=?
, unread_count
where chat_message_id=?"
,
dto
.
getUpdateValues
());
return
count
>
0
;
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatMessage.java
View file @
5379e727
...
...
@@ -22,6 +22,7 @@ public class TChatMessage extends SQLiteTableScript {
sql
.
append
(
" , message VARCHAR2 "
);
sql
.
append
(
" , message_type INTEGER "
);
sql
.
append
(
" , image_name VARCHAR2 "
);
sql
.
append
(
" , unread_count INTEGER "
);
sql
.
append
(
" , download_file_name VARCHAR2 "
);
sql
.
append
(
" , save_path VARCHAR2 "
);
sql
.
append
(
" , insert_date VARCHAR2(64)"
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatMessageDto.java
View file @
5379e727
package
jp
.
agentec
.
abook
.
abv
.
bl
.
dto
;
import
java.util.Date
;
public
class
ChatMessageDto
extends
AbstractDto
{
public
Integer
chatMessageId
;
public
Integer
chatRoomId
;
...
...
@@ -15,15 +13,16 @@ public class ChatMessageDto extends AbstractDto {
public
String
shopMemberName
;
public
String
profileUrl
;
public
Integer
selfFlg
;
public
Integer
unreadCount
;
@Override
public
Object
[]
getInsertValues
()
{
return
new
Object
[]
{
chatMessageId
,
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
};
return
new
Object
[]
{
chatMessageId
,
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
,
unreadCount
};
}
@Override
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
,
chatMessageId
};
return
new
Object
[]
{
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
,
unreadCount
,
chatMessageId
};
}
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
5379e727
...
...
@@ -116,6 +116,7 @@ public class CommunicationLogic extends AbstractLogic {
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
INSERT_DATE
,
chatMessageDto
.
insertDate
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
PROFILE_URL
,
chatMessageDto
.
profileUrl
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
SELF_FLG
,
chatMessageDto
.
selfFlg
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
UNREAD_COUNT
,
chatMessageDto
.
unreadCount
);
JSONObject
jsonObject
=
new
JSONObject
(
chatMessageMap
);
resultJsonArray
.
put
(
jsonObject
);
}
...
...
@@ -138,6 +139,7 @@ public class CommunicationLogic extends AbstractLogic {
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
INSERT_DATE
,
chatMessageDto
.
insertDate
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
PROFILE_URL
,
chatMessageDto
.
profileUrl
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
SELF_FLG
,
chatMessageDto
.
selfFlg
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
UNREAD_COUNT
,
chatMessageDto
.
unreadCount
);
JSONObject
jsonObject
=
new
JSONObject
(
chatMessageMap
);
resultJsonArray
.
put
(
jsonObject
);
}
...
...
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