Explorar el Código

Revert "fix:整理代码,将一些链接到weekly库"

This reverts commit cb3fd91d910424acf4d8b73449c5016664072b69.
Roc hace 1 año
padre
commit
ce1e232485
Se han modificado 2 ficheros con 9 adiciones y 3 borrados
  1. 6 0
      models/product.go
  2. 3 3
      models/report.go

+ 6 - 0
models/product.go

@@ -0,0 +1,6 @@
+package models
+
+type Product struct {
+	ProductId   int    `description:"产品id"`
+	ProductName string `description:"产品名称"`
+}

+ 3 - 3
models/report.go

@@ -855,14 +855,14 @@ type YbPcSuncode struct {
 
 // GetYbPcSunCode 获取太阳码
 func GetYbPcSunCode(scene, page string) (item *YbPcSuncode, err error) {
-	o := orm.NewOrmUsingDB("weekly")
+	o := orm.NewOrmUsingDB("default")
 	sql := `SELECT * FROM yb_pc_suncode WHERE scene = ? AND code_page = ? `
 	err = o.Raw(sql, scene, page).QueryRow(&item)
 	return
 }
 
 func AddYbPcSunCode(item *YbPcSuncode) (err error) {
-	o := orm.NewOrmUsingDB("weekly")
+	o := orm.NewOrmUsingDB("default")
 	_, err = o.Insert(item)
 	return
 }
@@ -876,7 +876,7 @@ type YbSuncodePars struct {
 }
 
 func AddYbSuncodePars(item *YbSuncodePars) (err error) {
-	o := orm.NewOrmUsingDB("weekly")
+	o := orm.NewOrmUsingDB("default")
 	_, err = o.Insert(item)
 	return
 }