|
@@ -539,10 +539,10 @@ func (this *YanxuanSpecialController) Enable() {
|
|
go cygxService.SendWxMsgSpecialFollow(req.Id)
|
|
go cygxService.SendWxMsgSpecialFollow(req.Id)
|
|
go services.SendWxCategoryMsgSpecialFollow(req.Id)
|
|
go services.SendWxCategoryMsgSpecialFollow(req.Id)
|
|
}
|
|
}
|
|
- go cygxService.SendWxMsgSpecialAuthor(req.Id, req.Status) // 研选专栏审核完成时,给提交人发送模板消息
|
|
|
|
|
|
+ go cygxService.SendWxMsgSpecialAuthor(req.Id, req.Status) // 研选专栏审核完成时,给提交人发送模板消息
|
|
go services.SendWxCategoryMsgSpecialAuthor(req.Id, req.Status) // 研选专栏审核完成时,给提交人发送模板消息
|
|
go services.SendWxCategoryMsgSpecialAuthor(req.Id, req.Status) // 研选专栏审核完成时,给提交人发送模板消息
|
|
- go cygxService.UpdateYanxuanSpecialResourceData(req.Id) // 写入首页最新 cygx_resource_data 表
|
|
|
|
- go elastic.EsAddYanxuanSpecial(req.Id) // 写入es 综合搜索
|
|
|
|
|
|
+ go cygxService.UpdateYanxuanSpecialResourceData(req.Id) // 写入首页最新 cygx_resource_data 表
|
|
|
|
+ go elastic.EsAddYanxuanSpecial(req.Id) // 写入es 综合搜索
|
|
br.Msg = "审批成功"
|
|
br.Msg = "审批成功"
|
|
br.Ret = 200
|
|
br.Ret = 200
|
|
br.Success = true
|
|
br.Success = true
|
|
@@ -801,25 +801,46 @@ func (this *YanxuanSpecialController) ShowButton() {
|
|
}
|
|
}
|
|
|
|
|
|
resp := new(cygx.CygxYanxuanSpecialShowButton)
|
|
resp := new(cygx.CygxYanxuanSpecialShowButton)
|
|
- configCode := utils.TPL_MSG_NEI_RONG_ZU
|
|
|
|
- cnfNeiRong, err := cygx.GetConfigByCode(configCode)
|
|
|
|
|
|
+ //configCode := utils.TPL_MSG_NEI_RONG_ZU
|
|
|
|
+ //cnfNeiRong, err := cygx.GetConfigByCode(configCode)
|
|
|
|
+ //if err != nil {
|
|
|
|
+ // br.Msg = "获取失败"
|
|
|
|
+ // br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
|
|
+ // return
|
|
|
|
+ //}
|
|
|
|
+ ////汪洋王芳手机号
|
|
|
|
+ //configCode = utils.TPL_MSG_WANG_FANG_WANG_YANG
|
|
|
|
+ //cnfWang, err := cygx.GetConfigByCode(configCode)
|
|
|
|
+ //if err != nil {
|
|
|
|
+ // br.Msg = "获取失败"
|
|
|
|
+ // br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
|
|
+ // return
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //文章管理专栏是否可见
|
|
|
|
+ cnfArticle, err := cygx.GetConfigByCode(utils.YANXUAN_SPECIAL_ARTICLE_BUTTON_MOBILE)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取失败"
|
|
br.Msg = "获取失败"
|
|
br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- //汪洋王芳手机号
|
|
|
|
- configCode = utils.TPL_MSG_WANG_FANG_WANG_YANG
|
|
|
|
- cnfWang, err := cygx.GetConfigByCode(configCode)
|
|
|
|
|
|
+ articleMobileSlice := strings.Split(cnfArticle.ConfigValue, ",")
|
|
|
|
+ if utils.InArrayByStr(articleMobileSlice, sysUser.Mobile) || sysUser.Role == utils.ROLE_TYPE_CODE_ADMIN {
|
|
|
|
+ resp.IsShowYanXuanSpecial = true
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //作者管理专栏是否可见
|
|
|
|
+ cnfAuthor, err := cygx.GetConfigByCode(utils.YANXUAN_SPECIAL_AUTHOR_BUTTON_MOBILE)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取失败"
|
|
br.Msg = "获取失败"
|
|
br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- //作者管理栏,只有内容组、汪洋、王芳、超管可见
|
|
|
|
- if strings.Contains(cnfNeiRong.ConfigValue, sysUser.Mobile) || strings.Contains(cnfWang.ConfigValue, sysUser.Mobile) || sysUser.Role == utils.ROLE_TYPE_CODE_ADMIN {
|
|
|
|
|
|
+ authorMobileSlice := strings.Split(cnfAuthor.ConfigValue, ",")
|
|
|
|
+ if utils.InArrayByStr(authorMobileSlice, sysUser.Mobile) || sysUser.Role == utils.ROLE_TYPE_CODE_ADMIN {
|
|
resp.IsShowSpecialAuthor = true
|
|
resp.IsShowSpecialAuthor = true
|
|
}
|
|
}
|
|
|
|
+
|
|
br.Data = resp
|
|
br.Data = resp
|
|
br.Ret = 200
|
|
br.Ret = 200
|
|
br.Success = true
|
|
br.Success = true
|