禁止已发放二维码回退待用

This commit is contained in:
yml
2026-06-18 09:59:06 +08:00
parent 58e071d157
commit 7934141ba2
4 changed files with 143 additions and 10 deletions
@@ -97,6 +97,10 @@ func (h *Handler) UpdateQrCodeHandler(c *gin.Context) {
c.JSON(http.StatusNotFound, gin.H{"error": "二维码不存在"})
return
}
if err == ErrQrCodeCannotReenable {
c.JSON(http.StatusBadRequest, gin.H{"error": "已发放的二维码不能改回待用"})
return
}
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}