This commit is contained in:
laodaming
2023-08-17 15:54:03 +08:00
parent 5bde276c6d
commit 784d8f2624
2 changed files with 1 additions and 6 deletions

View File

@@ -58,9 +58,6 @@ func (m *FsUserMaterialModel) RowSelectBuilder(selectData []string) *gorm.DB {
// 获取最新记录
func (m *FsUserMaterialModel) FindLatestOne(ctx context.Context, userId int64, guestId int64) (resp FsUserMaterial, err error) {
if userId == 0 && guestId == 0 {
return FsUserMaterial{}, nil
}
db := m.db.WithContext(ctx).Model(&FsUserMaterial{}).
Where("`user_id` = ? and `guest_id` = ?", userId, guestId).
Order("id DESC")