fix obj_msg_vault_v
This commit is contained in:
parent
73cc862f8b
commit
cebde84271
6
sql.go
6
sql.go
@ -583,17 +583,19 @@ func initDB() {
|
||||
log.Println("initDB : code_obj_sub_type populated ...")
|
||||
|
||||
_, err = db.Exec(`CREATE VIEW obj_msg_vault_v AS
|
||||
SELECT om.sender_user_id user_id
|
||||
,om.chat_id
|
||||
SELECT obm.sender_user_id user_id
|
||||
,obm.chat_id
|
||||
,om.obj_sub_type_id msg_type_id
|
||||
,omi.item_id
|
||||
,oi.obj_sub_type_id item_type_id
|
||||
,omi.quantity
|
||||
FROM obj om
|
||||
,obj_msg obm
|
||||
,obj oi
|
||||
,obj_msg_item omi
|
||||
WHERE om.obj_type_id = ` + strconv.Itoa(objTypeMessage) + `
|
||||
AND om.obj_sub_type_id in (` + strconv.Itoa(objSubTypeMessageWithdrawRcv) + `, ` + strconv.Itoa(objSubTypeMessageGDepositAck) + `)
|
||||
AND obm.obj_id = om.id
|
||||
AND omi.obj_id = o.id
|
||||
AND oi.id = omi.item_id
|
||||
ORDER BY om.sender_user_id ASC
|
||||
|
Loading…
Reference in New Issue
Block a user