From 7fb014c7021011fdaefeabb0775b0603922d7023 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 10 Oct 2024 15:01:26 +0800 Subject: [PATCH] 1 --- app/db/db_store.go | 6 +++--- app/db/model/community_team_store_qrcode.go | 2 +- app/store/svc/svc_qrcode.go | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/db/db_store.go b/app/db/db_store.go index 41f84aa..eb18171 100644 --- a/app/db/db_store.go +++ b/app/db/db_store.go @@ -37,9 +37,9 @@ func GetStore(eg *xorm.Engine, arg map[string]string) []map[string]string { if arg["store_id"] != "" { where += " and uid = '" + arg["store_id"] + "'" } - if arg["city"] != "" { - where += " and city like '%" + arg["city"] + "%'" - } + //if arg["city"] != "" { + // where += " and city like '%" + arg["city"] + "%'" + //} if arg["province_id"] != "" { where += " and province_id = '" + arg["province_id"] + "'" } diff --git a/app/db/model/community_team_store_qrcode.go b/app/db/model/community_team_store_qrcode.go index e66cecf..5690b9e 100644 --- a/app/db/model/community_team_store_qrcode.go +++ b/app/db/model/community_team_store_qrcode.go @@ -3,7 +3,7 @@ package model type CommunityTeamStoreQrcode struct { Id int `json:"id" xorm:"not null pk autoincr INT(11)"` Uid int `json:"uid" xorm:"default 0 INT(11)"` - TableNum int `json:"table_num" xorm:"default 0 INT(11)"` + TableNum string `json:"table_num" xorm:"VARCHAR(255)"` Type int `json:"type" xorm:"default 0 INT(11)"` IsUse int `json:"is_use" xorm:"default 0 INT(11)"` Name string `json:"name" xorm:"VARCHAR(255)"` diff --git a/app/store/svc/svc_qrcode.go b/app/store/svc/svc_qrcode.go index 1968c8e..9de3e05 100644 --- a/app/store/svc/svc_qrcode.go +++ b/app/store/svc/svc_qrcode.go @@ -16,7 +16,7 @@ import ( func QrcodePayStyle(c *gin.Context) { eg := svc.MasterDb(c) user := svc.GetUser(c) - m, _ := SysModDataBySkipIdentifier(c, "pub.flutter.o2o_store_qrcode_style") + m, _ := SysModDataBySkipIdentifier(c, "pub.flutter.community_store_qrcode_style") bytes := utils.MarshalJSONCamelCase2JsonSnakeCase(m.Data) m.Data = string(bytes) fmt.Println(m.Data) @@ -65,7 +65,7 @@ func Qrcode(c *gin.Context) { for _, v := range *cate { tmp := map[string]string{ "id": utils.IntToStr(v.Id), - "table_num": utils.IntToStr(v.TableNum), + "table_num": v.TableNum, "name": v.Name, "is_use": utils.IntToStr(v.IsUse), "qrcode": "", @@ -92,14 +92,14 @@ func QrcodeSave(c *gin.Context) { user := svc.GetUser(c) if arg["id"] != "" { data := db.GetStoreQrcodeById(svc.MasterDb(c), arg["id"]) - data.TableNum = utils.StrToInt(arg["table_num"]) + data.TableNum = arg["table_num"] data.Name = arg["name"] data.IsUse = utils.StrToInt(arg["is_use"]) svc.MasterDb(c).Where("id=?", data.Id).Update(data) } else { data := &model.CommunityTeamStoreQrcode{ Uid: user.Info.Uid, - TableNum: utils.StrToInt(arg["table_num"]), + TableNum: arg["table_num"], IsUse: utils.StrToInt(arg["is_use"]), Name: arg["name"], }