feat: add sign check for PC QR code payment

This commit is contained in:
RockYang
2024-05-22 17:47:53 +08:00
parent 962de0183c
commit b8e0d7760b
8 changed files with 95 additions and 20 deletions

View File

@@ -89,9 +89,13 @@ func (h *ChatModelHandler) Save(c *gin.Context) {
func (h *ChatModelHandler) List(c *gin.Context) {
session := h.DB.Session(&gorm.Session{})
enable := h.GetBool(c, "enable")
platform := h.GetTrim(c, "platform")
if enable {
session = session.Where("enabled", enable)
}
if platform != "" {
session = session.Where("platform", platform)
}
var items []model.ChatModel
var cms = make([]vo.ChatModel, 0)
res := session.Order("sort_num ASC").Find(&items)