aa
This commit is contained in:
@@ -2011,13 +2011,17 @@ func ShareUnionLink(ctx *jxcontext.Context, jobID, shareType, linkType, resource
|
||||
}
|
||||
}
|
||||
userBind.UnionID = sid
|
||||
//dao.CreateEntity(db, userBind)
|
||||
dao.CreateEntity(db, userBind)
|
||||
}
|
||||
//2、分享链接
|
||||
if handler != nil {
|
||||
var bindImg *model.UserUnionBindImg
|
||||
if isImg {
|
||||
if userBind.UnionImg != "" {
|
||||
return userBind.UnionImg, err
|
||||
bindImg, _ = dao.GetUserUnionBindImg(db, userBind.UnionID, job.UnionActID)
|
||||
if bindImg != nil {
|
||||
if bindImg.UnionImg != "" {
|
||||
return bindImg.UnionImg, err
|
||||
}
|
||||
}
|
||||
}
|
||||
if link, err = handler.ShareUnionLink(ctx, linkType, utils.Str2Int(job.UnionActID), sid, userID, resourceType, goodsID); err == nil {
|
||||
@@ -2029,11 +2033,16 @@ func ShareUnionLink(ctx *jxcontext.Context, jobID, shareType, linkType, resource
|
||||
link += "?imageslim"
|
||||
//id为0表示要新增
|
||||
if userBind.ID == 0 {
|
||||
userBind.UnionImg = link
|
||||
dao.CreateEntity(db, userBind)
|
||||
bindImgAdd := &model.UserUnionBindImg{
|
||||
UnionID: sid,
|
||||
ActID: job.UnionActID,
|
||||
UnionImg: link,
|
||||
}
|
||||
dao.WrapAddIDCULDEntity(bindImgAdd, ctx.GetUserName())
|
||||
dao.CreateEntity(db, bindImgAdd)
|
||||
} else {
|
||||
userBind.UnionImg = link
|
||||
dao.UpdateEntity(db, userBind, "UnionImg")
|
||||
bindImg.UnionImg = link
|
||||
dao.UpdateEntity(db, bindImg, "UnionImg")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user