|
|
@@ -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"], |
|
|
|
} |
|
|
|