|
@@ -328,7 +328,7 @@ func (this *YanxuanSpecialController) Save() {
|
|
|
br.Msg = "请至少输入一个标签"
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ isApprovalPersonnel := req.IsApprovalPersonnel
|
|
|
item := models.CygxYanxuanSpecial{
|
|
|
Id: req.Id,
|
|
|
UserId: sysUser.UserId,
|
|
@@ -348,6 +348,16 @@ func (this *YanxuanSpecialController) Save() {
|
|
|
} else {
|
|
|
item.Status = 2
|
|
|
}
|
|
|
+ // 如果是审批人员操作的那么就是修改内容,加审批通过
|
|
|
+ if isApprovalPersonnel {
|
|
|
+ item.Status = 3
|
|
|
+ //校验是否属于审核人员
|
|
|
+ if !services.CheckYxSpecialIsApprovalPersonnel(sysUser.Mobile) {
|
|
|
+ br.Msg = "操作失败"
|
|
|
+ br.ErrMsg = "操作失败,该账号不属于审核人员:" + sysUser.Mobile
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
specialId := 0
|
|
|
|
|
@@ -369,10 +379,17 @@ func (this *YanxuanSpecialController) Save() {
|
|
|
specialId = req.Id
|
|
|
}
|
|
|
|
|
|
- if req.DoType == 2 {
|
|
|
- go services.SendReviewTemplateMsgAdmin(specialId)
|
|
|
+ if isApprovalPersonnel {
|
|
|
go services.UpdateYanxuanSpecialResourceData(specialId) // 写入首页最新 cygx_resource_data 表
|
|
|
go services.EsAddYanxuanSpecial(specialId) // 写入es 综合搜索
|
|
|
+ go services.SendWxMsgSpecialFollow(req.Id) //研选专栏有新内容审核通过时,给关注此专栏的客户发送模板消息
|
|
|
+ go services.SendWxMsgSpecialAuthor(req.Id, 2) //研选专栏审核完成时,给提交人发送模板消息
|
|
|
+ } else {
|
|
|
+ if req.DoType == 2 {
|
|
|
+ go services.SendReviewTemplateMsgAdmin(specialId)
|
|
|
+ go services.UpdateYanxuanSpecialResourceData(specialId) // 写入首页最新 cygx_resource_data 表
|
|
|
+ go services.EsAddYanxuanSpecial(specialId) // 写入es 综合搜索
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
br.Ret = 200
|