@@ -3,10 +3,14 @@ package hdl | |||||
import ( | import ( | ||||
"applet/app/e" | "applet/app/e" | ||||
"applet/app/svc" | "applet/app/svc" | ||||
"applet/app/utils" | |||||
"fmt" | |||||
"github.com/gin-gonic/gin" | "github.com/gin-gonic/gin" | ||||
) | ) | ||||
func Demo(c *gin.Context) { | func Demo(c *gin.Context) { | ||||
mediumId := utils.GenerateUniqueRandomNumbers(8) | |||||
fmt.Println(mediumId) | |||||
var args interface{} | var args interface{} | ||||
err := c.ShouldBindJSON(&args) | err := c.ShouldBindJSON(&args) | ||||
if err != nil { | if err != nil { | ||||
@@ -21,9 +21,9 @@ func GetMasterId(c *gin.Context) (masterId string) { | |||||
//TODO::通过域名查找masterId | //TODO::通过域名查找masterId | ||||
host := c.Request.Host | host := c.Request.Host | ||||
userAppDomainDb := implement.NewUserAppDomainDb(db.Db) | userAppDomainDb := implement.NewUserAppDomainDb(db.Db) | ||||
userAppDomain, err := userAppDomainDb.GetMediumAppDomainByHost(host) | |||||
userAppDomain, err := userAppDomainDb.GetAppDomainByHost(host) | |||||
if err != nil { | if err != nil { | ||||
e.OutErr(c, e.ERR_DB_ORM, err) | |||||
e.OutErr(c, e.ERR_DB_ORM, err)it a | |||||
return | return | ||||
} | } | ||||
if userAppDomain == nil { | if userAppDomain == nil { | ||||
@@ -5,7 +5,7 @@ go 1.18 | |||||
//replace code.fnuoos.com/zhimeng/model.git => E:/company/ad/models | //replace code.fnuoos.com/zhimeng/model.git => E:/company/ad/models | ||||
require ( | require ( | ||||
code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240822024421-0129770e24d7 | |||||
code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240822030431-bf682f937fb0 | |||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 | github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 | ||||
github.com/boombuler/barcode v1.0.1 | github.com/boombuler/barcode v1.0.1 | ||||
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5 | github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5 | ||||