🐛 Fix daily sign batch list query issue

This commit is contained in:
LittleSheep 2024-09-07 19:12:42 +08:00
parent 3ce5ef6617
commit d4ed047ed7
2 changed files with 5 additions and 5 deletions

8
.idea/workspace.xml generated
View File

@ -4,9 +4,9 @@
<option name="autoReloadType" value="ALL" /> <option name="autoReloadType" value="ALL" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix auto maintain range missing models"> <list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix date formatting issue on daily signing">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/internal/services/sign.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/sign.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/pkg/internal/server/api/sign_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/sign_api.go" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -153,7 +153,6 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value=":sparkles: Use capital to deal with links" />
<MESSAGE value=":bug: Fix internal token audience update isn't fully applied" /> <MESSAGE value=":bug: Fix internal token audience update isn't fully applied" />
<MESSAGE value=":arrow_up: Implement list user relative grpc function" /> <MESSAGE value=":arrow_up: Implement list user relative grpc function" />
<MESSAGE value=":alien: Change avatar and banner id to string" /> <MESSAGE value=":alien: Change avatar and banner id to string" />
@ -178,7 +177,8 @@
<MESSAGE value=":bug: Fix daily check issue" /> <MESSAGE value=":bug: Fix daily check issue" />
<MESSAGE value=":sparkles: Can get today's daily sign record" /> <MESSAGE value=":sparkles: Can get today's daily sign record" />
<MESSAGE value=":bug: Fix auto maintain range missing models" /> <MESSAGE value=":bug: Fix auto maintain range missing models" />
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix auto maintain range missing models" /> <MESSAGE value=":bug: Fix date formatting issue on daily signing" />
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix date formatting issue on daily signing" />
</component> </component>
<component name="VgoProject"> <component name="VgoProject">
<settings-migrated>true</settings-migrated> <settings-migrated>true</settings-migrated>

View File

@ -19,7 +19,7 @@ func listDailySignRecord(c *fiber.Ctx) error {
var count int64 var count int64
if err := database.C. if err := database.C.
Model(&models.Account{}). Model(&models.SignRecord{}).
Where("account_id = ?", user.ID). Where("account_id = ?", user.ID).
Count(&count).Error; err != nil { Count(&count).Error; err != nil {
return fiber.NewError(fiber.StatusInternalServerError, err.Error()) return fiber.NewError(fiber.StatusInternalServerError, err.Error())