diff --git a/code/rest/matter_dao.go b/code/rest/matter_dao.go index ab1abab..0bd6920 100644 --- a/code/rest/matter_dao.go +++ b/code/rest/matter_dao.go @@ -462,13 +462,13 @@ func (this *MatterDao) SoftDelete(matter *Matter) { } //soft delete from db. - db := core.CONTEXT.GetDB().Model(&Matter{}).Where("uuid = ?", matter.Uuid).Update(map[string]interface{}{"deleted": 1, "delete_time": time.Now()}) + db := core.CONTEXT.GetDB().Model(&Matter{}).Where("uuid = ?", matter.Uuid).Update(map[string]interface{}{"deleted": true, "delete_time": time.Now()}) this.PanicError(db.Error) } else { //soft delete from db. - db := core.CONTEXT.GetDB().Model(&Matter{}).Where("uuid = ?", matter.Uuid).Update(map[string]interface{}{"deleted": 1, "delete_time": time.Now()}) + db := core.CONTEXT.GetDB().Model(&Matter{}).Where("uuid = ?", matter.Uuid).Update(map[string]interface{}{"deleted": true, "delete_time": time.Now()}) this.PanicError(db.Error) //no need to delete its image cache. diff --git a/code/support/tank_context.go b/code/support/tank_context.go index e6a2530..a6c8f2b 100644 --- a/code/support/tank_context.go +++ b/code/support/tank_context.go @@ -77,7 +77,7 @@ func (this *TankContext) OpenDb() { core.LOGGER.Panic("failed to connect mysql database") } - //whether open the db log. (only true when debug) + //whether open the db sql log. (only true when debug) this.db.LogMode(false) }