|
@@ -832,17 +832,6 @@ func IsShowAppointmentByadminSet(IsCanAppointmentMinutes int) (isShowAppointment
|
|
|
|
|
|
|
|
|
func DoActivityOnenIdWxTemplateMsg(activityId int) (err error) {
|
|
|
-
|
|
|
- cacheKey := fmt.Sprint("Source:ADMIN", "_ActivityId:", activityId)
|
|
|
- isExist := utils.Rc.IsExist(cacheKey)
|
|
|
- if isExist {
|
|
|
- return err
|
|
|
- }
|
|
|
- setNX := utils.Rc.SetNX(cacheKey, activityId, time.Minute*10)
|
|
|
- if !setNX {
|
|
|
- go alarm_msg.SendAlarmMsg("发送模版消息失败,10分钟之内的活动二次编辑不重复推送,设置Redis Key 过期时间失败:key"+cacheKey, 3)
|
|
|
- return err
|
|
|
- }
|
|
|
var weekday string
|
|
|
weekday = time.Now().Weekday().String()
|
|
|
if weekday == "Sunday" {
|
|
@@ -866,6 +855,22 @@ func DoActivityOnenIdWxTemplateMsg(activityId int) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ if activityInfo.VisibleRange == 1 {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ cacheKey := fmt.Sprint("Source:ADMIN", "_ActivityId:", activityId)
|
|
|
+ isExist := utils.Rc.IsExist(cacheKey)
|
|
|
+ if isExist {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ setNX := utils.Rc.SetNX(cacheKey, activityId, time.Minute*10)
|
|
|
+ if !setNX {
|
|
|
+ go alarm_msg.SendAlarmMsg("发送模版消息失败,10分钟之内的活动二次编辑不重复推送,设置Redis Key 过期时间失败:key"+cacheKey, 3)
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
var chartPermissionIds string
|
|
|
var chartPermissionName string
|
|
|
|