|
|
|
@ -4,12 +4,6 @@ import (
|
|
|
|
|
"archive/zip"
|
|
|
|
|
"bytes"
|
|
|
|
|
"fmt"
|
|
|
|
|
mysql2 "git.oa00.com/go/mysql"
|
|
|
|
|
"github.com/corona10/goimagehash"
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
"golang.org/x/text/encoding/simplifiedchinese"
|
|
|
|
|
"golang.org/x/text/transform"
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
|
"image"
|
|
|
|
|
"image/jpeg"
|
|
|
|
|
"image/png"
|
|
|
|
@ -29,6 +23,13 @@ import (
|
|
|
|
|
"recook/tools"
|
|
|
|
|
"strconv"
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
mysql2 "git.oa00.com/go/mysql"
|
|
|
|
|
"github.com/corona10/goimagehash"
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
"golang.org/x/text/encoding/simplifiedchinese"
|
|
|
|
|
"golang.org/x/text/transform"
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Goods struct {
|
|
|
|
@ -231,7 +232,8 @@ func CalHash(model goods.RecookGoodsMainPhotoModel) (string, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (g *Goods) Sync(c *gin.Context) {
|
|
|
|
|
go SyncAllSku()
|
|
|
|
|
b := c.Query("brand")
|
|
|
|
|
go SyncAllSku(b)
|
|
|
|
|
c.String(200, "suc")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -240,7 +242,7 @@ func (g *Goods) Fix(c *gin.Context) {
|
|
|
|
|
c.String(200, "suc")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (g *Goods)AttrSync(c *gin.Context){
|
|
|
|
|
func (g *Goods) AttrSync(c *gin.Context) {
|
|
|
|
|
go AttrSync()
|
|
|
|
|
c.String(200, "suc")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|