|
@@ -271,3 +271,51 @@ func UpdateYanxuanSpecialResourceData(sourceId int) {
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// 研选专栏审批记录
|
|
|
+func AddAddCygxYanxuanSpecialApprovalLog(user *models.WxUserItem, specialId, status int, reason string) {
|
|
|
+ var err error
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ go alarm_msg.SendAlarmMsg(fmt.Sprint("获取研选专栏用户信息失败,GetYanxuanSpecialAuthorInfo Err ", err, "userId", user.UserId), 2)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ detail, e := cygx.GetYanxuanSpecialBySpecialId(specialId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetYanxuanSpecialBySpecialId, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ specialAuthor, e := cygx.GetCygxYanxuanSpecialAuthorByUserId(detail.UserId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetCygxYanxuanSpecialAuthorByUserId, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ item := new(cygx.CygxYanxuanSpecialApprovalLog)
|
|
|
+ item.UserId = detail.UserId
|
|
|
+ item.Content = detail.Content
|
|
|
+ item.Tags = detail.Tags
|
|
|
+ item.ApprovalStatus = status
|
|
|
+ item.ImgUrl = detail.ImgUrl
|
|
|
+ item.DocUrl = detail.DocUrl
|
|
|
+ item.Reason = reason
|
|
|
+ item.Title = detail.Title
|
|
|
+ item.Type = detail.Type
|
|
|
+ item.CompanyTags = detail.CompanyTags
|
|
|
+ item.IndustryTags = detail.IndustryTags
|
|
|
+ item.YanxuanSpecialId = specialId
|
|
|
+ item.AdminName = user.RealName
|
|
|
+ item.AdminUserId = user.UserId
|
|
|
+ item.SpecialName = specialAuthor.SpecialName
|
|
|
+ item.NickName = specialAuthor.NickName
|
|
|
+ item.CreateTime = time.Now()
|
|
|
+ item.ModifyTime = time.Now()
|
|
|
+
|
|
|
+ e = cygx.AddCygxYanxuanSpecialApprovalLog(item)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("AddCygxYanxuanSpecialApprovalLog, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|