Commit 259e877d by Lee Munkyeong

DBデータ型変更

parent 181ebe40
......@@ -9,6 +9,8 @@ import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
import jp.agentec.abook.abv.bl.dto.ChatMessageDto;
import jp.agentec.abook.abv.bl.dto.ChatRoomDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
public class RoomListJSON extends AcmsCommonJSON {
private static final String Body = "body";
......@@ -64,6 +66,11 @@ public class RoomListJSON extends AcmsCommonJSON {
//TODO Change InsertDate Type
chatMessageDto.insertDate = lastMessageInfoJSON.getString(MessageInsertDate);
if (lastMessageInfoJSON.has(MessageInsertDate)) {
chatMessageDto.insertDate = DateTimeUtil.toDate(lastMessageInfoJSON.getString(MessageInsertDate), DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
chatMessageDto.shopMemberId = lastMessageInfoJSON.getInt(ShopMemberId);
chatMessageDto.chatMessageId = lastMessageInfoJSON.getInt(MessageId);
......
......@@ -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 VARCHAR(64) ");
sql.append(" , favorite_register_date DATETIME ");
sql.append(" , PRIMARY KEY (shop_member_id) ");
sql.append(" ) ");
......
......@@ -24,7 +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(" , insert_date DATETIME");
sql.append(" , PRIMARY KEY (chat_message_id) ");
sql.append(" ) ");
......
......@@ -21,7 +21,7 @@ public class TChatRoom extends SQLiteTableScript {
sql.append(" , type INTEGER NOT NULL ");
sql.append(" , unread_count INTEGER ");
sql.append(" , user_count INTEGER ");
sql.append(" , favorite_register_date VARCHAR2(64) ");
sql.append(" , favorite_register_date DATETIME ");
sql.append(" , PRIMARY KEY (chat_room_id) ");
sql.append(" ) ");
......
package jp.agentec.abook.abv.bl.dto;
import java.util.Date;
public class ChatMessageDto extends AbstractDto {
public Integer chatMessageId;
public Integer chatRoomId;
......@@ -9,7 +11,7 @@ public class ChatMessageDto extends AbstractDto {
public String imageName;
public String downloadFileName;
public String savePath;
public String insertDate;
public Date insertDate;
@Override
public Object[] getInsertValues() {
......
package jp.agentec.abook.abv.bl.dto;
import java.util.Date;
import java.util.List;
public class ChatRoomDto extends AbstractDto {
......@@ -7,12 +8,12 @@ public class ChatRoomDto extends AbstractDto {
public Integer chatRoomId;
public String chatRoomName;
public Integer type;
public String favoriteRegisterDate;
public Date favoriteRegisterDate;
public Integer unreadCount;
public Integer userCount;
public String message;
public Integer messageType;
public String insertDate;
public Date insertDate;
public ChatMessageDto lastMessageInfo;
@Override
......
......@@ -6,7 +6,7 @@ public class ShopMemberDto extends AbstractDto {
public Integer shopMemberId;
public String shopMemberName;
public String profileUrl;
public String favoriteRegisterDate;
public Date favoriteRegisterDate;
@Override
public Object[] getInsertValues() {
......
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