Finish the delete feature.

This commit is contained in:
lishuang
2020-06-21 00:04:11 +08:00
parent 601c60fca7
commit 3fb1d874d5
14 changed files with 212 additions and 4 deletions

View File

@ -385,6 +385,13 @@ func (this *MatterDao) Delete(matter *Matter) {
}
}
func (this *MatterDao) DeleteByUserUuid(userUuid string) {
db := core.CONTEXT.GetDB().Where("user_uuid = ?", userUuid).Delete(Matter{})
this.PanicError(db.Error)
}
func (this *MatterDao) CountBetweenTime(startTime time.Time, endTime time.Time) int64 {
var count int64
db := core.CONTEXT.GetDB().Model(&Matter{}).Where("create_time >= ? AND create_time <= ?", startTime, endTime).Count(&count)