图片水印和合成图

This commit is contained in:
苏尹岚
2020-06-12 17:59:08 +08:00
parent ccc6fbb0e2
commit 90a55cc5c2
2 changed files with 10 additions and 4 deletions

View File

@@ -589,6 +589,8 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku, isQueryMidPric
t1.img,
t1.img2,
t1.img3,
t1.img_watermark,
t1.img_mix,
t1.status,
t1.is_spu,
t1.desc_img,
@@ -626,6 +628,8 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku, isQueryMidPric
t1.img,
t1.img2,
t1.img3,
t1.img_watermark,
t1.img_mix,
t1.status,
t1.is_spu,
t1.desc_img,
@@ -905,7 +909,7 @@ func UpdateSkuName(ctx *jxcontext.Context, nameID int, payload map[string]interf
}
}
globals.SugarLogger.Debugf("UpdateSkuName valid:%s", utils.Format4Output(valid, false))
for _, imgName := range []string{"img", "img2", "img3"} {
for _, imgName := range []string{"img", "img2", "img3", "img_watermark", "img_mix"} {
if valid[imgName] != nil {
if imgStr := utils.Interface2String(valid[imgName]); imgStr != "" {
_, err2 := datares.TryRegisterDataResource(ctx, skuName.Name, valid[imgName].(string), model.ImgTypeMain, true)

View File

@@ -168,9 +168,11 @@ type SkuName struct {
SpecUnit string `orm:"size(8)" json:"-"` // 为份必然为克这个主要作用只是用于确保SkuName的唯一性
Price int `json:"price"` // 单位为分标准价不为份的就为实际标准价为份的为每市斤价实际还要乘质量。todo 为份的确定必须有质量
Img string `orm:"size(512)" json:"img"`
Img2 string `orm:"size(512)" json:"img2"` // 第二张图片
Img3 string `orm:"size(512)" json:"img3"` //第三张图片
Img string `orm:"size(512)" json:"img"`
Img2 string `orm:"size(512)" json:"img2"` // 第二张图片
Img3 string `orm:"size(512)" json:"img3"` //第三张图片
ImgWatermark string `orm:"size(512)" json:"imgWatermark"` //图片水印
ImgMix string `orm:"size(512)" json:"imgMix"` //图片混合水印的图片
// ImgEbai string `orm:"size(255)" json:"imgEbai"` // 饿百图片地址
// ImgHashCode string `orm:"size(255);index" json:"img_hash_code"`