Commit 8d738de4 authored by mahui's avatar mahui

Merge remote-tracking branch 'origin/master'

parents 474788ed 90b114d9
package web package web
import ( import (
"fmt"
"gitee.com/zjlsliupei/ghelp" "gitee.com/zjlsliupei/ghelp"
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response" "github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
"github.com/flipped-aurora/gin-vue-admin/server/request" "github.com/flipped-aurora/gin-vue-admin/server/request"
...@@ -29,7 +30,7 @@ func GetToiletList(c *gin.Context) { ...@@ -29,7 +30,7 @@ func GetToiletList(c *gin.Context) {
func GetToiletDetail(c *gin.Context) { func GetToiletDetail(c *gin.Context) {
var arg request.GetId var arg request.GetId
_ = c.ShouldBindJSON(&arg) _ = c.ShouldBindJSON(&arg)
fmt.Println(c.ShouldBindJSON(&arg))
if data, err := toiletService.GetToiletDetail(arg); err != nil { if data, err := toiletService.GetToiletDetail(arg); err != nil {
response.FailWithMessage(err.Error(), c) response.FailWithMessage(err.Error(), c)
} else { } else {
......
...@@ -7,5 +7,5 @@ type Toilet struct { ...@@ -7,5 +7,5 @@ type Toilet struct {
} }
type GetId struct { type GetId struct {
ID string `json:"id"` ID int `json:"id"`
} }
...@@ -61,7 +61,7 @@ func (qshPartolService *QshPartolService) GetQshPartolInfoList(info adminReq.Qsh ...@@ -61,7 +61,7 @@ func (qshPartolService *QshPartolService) GetQshPartolInfoList(info adminReq.Qsh
db = db.Where("type = ?", info.Type) db = db.Where("type = ?", info.Type)
} }
if info.ToiletId != 0 { if info.ToiletId != 0 {
db = db.Where("toilet_id = ?", info.Toilet) db = db.Where("toilet_id = ?", info.ToiletId)
} }
err = db.Count(&total).Error err = db.Count(&total).Error
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment