🎨 改进代码样式

This commit is contained in:
github-actions[bot]
2021-12-13 13:15:16 +00:00
parent 3fba704c77
commit 6b4045db45
7 changed files with 7 additions and 11 deletions

View File

@@ -237,7 +237,6 @@ func (vdb *VtbDB) GetVtbList() (uidList []string) {
logrus.Println(fc)
if err := db.Debug().Model(&FirstCategory{}).Where("first_category_uid = ?", fc.FirstCategoryUid).First(&fc).Error; err != nil {
if gorm.IsRecordNotFoundError(err) {
db.Debug().Model(&FirstCategory{}).Create(&fc) // newUser not user
}
@@ -330,7 +329,6 @@ func (vdb *VtbDB) StoreVtb(uid string) {
if err := db.Debug().Model(&ThirdCategory{}).Where("first_category_uid = ? and second_category_index = ? and third_category_index = ?",
uid, secondIndex, thirdIndex).First(&tc).Error; err != nil {
if gorm.IsRecordNotFoundError(err) {
db.Debug().Model(&ThirdCategory{}).Create(&tc) // newUser not user
}