浏览代码

feat:xiugai

wangchuanjin 1 年之前
父节点
当前提交
d5e44048bc

+ 1 - 1
pushfollowent/public/util.go

@@ -19,7 +19,7 @@ const (
 )
 
 var (
-	InfoSaveFields = []string{"_id", "area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "winner", "s_winner", "href", "infoformat", "budget", "bidamount"}
+	InfoSaveFields = []string{"_id", "area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "winner", "s_winner", "href", "infoformat", "budget", "bidamount", "projectname"}
 	MyLock         = &Lock{
 		Key:   "push",
 		Push:  "pushfollowent_push_lock",

+ 6 - 2
pushfollowent/push/job/pushjob.go

@@ -182,8 +182,12 @@ func (p *PushJob) sendWeixin(u *FollowInfo) bool {
 	}
 	keyword1_value := suffix1 + util.ShortenTxt(20, suffix1+suffix2, u.Follows[0].EntName) + suffix2
 	firstSubtype, _ := u.Follows[0].Infos[0]["subtype"].(string)
-	suffix3 := fmt.Sprintf("发布了%s公告", firstSubtype)
-	keyword2_value := util.ShortenTxt(20, suffix3, u.Follows[0].EntName) + suffix3
+	suffix3 := fmt.Sprintf("更新了%s公告", firstSubtype)
+	projectName, _ := u.Follows[0].Infos[0]["projectname"].(string)
+	if projectName == "" {
+		projectName, _ = u.Follows[0].Infos[0]["title"].(string)
+	}
+	keyword2_value := util.ShortenTxt(20, suffix3, projectName) + suffix3
 	tmplData := map[string]*qrpc.TmplItem{
 		"keyword1": &qrpc.TmplItem{
 			Value: keyword1_value,

+ 1 - 4
pushfollowproject/push/job/pushjob.go

@@ -170,15 +170,12 @@ func (p *PushJob) sendWeixin(u *FollowInfo) bool {
 	}
 	suffix2 += fmt.Sprintf("有%d条新的项目公告", len(u.Follows[0].Infos))
 	projectName := u.Follows[0].ProjectName
-	if projectName == "" {
-		projectName = u.Follows[0].ProjectCode
-	}
 	if projectName == "" {
 		projectName = u.Follows[0].Title
 	}
 	keyword1_value := suffix1 + util.ShortenTxt(20, suffix1+suffix2, projectName) + suffix2
 	firstSubtype, _ := u.Follows[0].Infos[0]["subtype"].(string)
-	suffix3 := fmt.Sprintf("发布了%s公告", firstSubtype)
+	suffix3 := fmt.Sprintf("更新了%s公告", firstSubtype)
 	keyword2_value := util.ShortenTxt(20, suffix3, projectName) + suffix3
 	tmplData := map[string]*qrpc.TmplItem{
 		"keyword1": &qrpc.TmplItem{

+ 6 - 2
pushownermonitor/push/job/pushjob.go

@@ -185,8 +185,12 @@ func (p *PushJob) sendWeixin(u *ownermonitor.OwnerMonitorInfo) bool {
 	}
 	keyword1_value := suffix1 + util.ShortenTxt(20, suffix1+suffix2, u.OwnerMonitors[0].EntName) + suffix2
 	firstSubtype, _ := u.OwnerMonitors[0].Infos[0]["subtype"].(string)
-	suffix3 := fmt.Sprintf("发布了%s公告", firstSubtype)
-	keyword2_value := util.ShortenTxt(20, suffix3, u.OwnerMonitors[0].EntName) + suffix3
+	suffix3 := fmt.Sprintf("更新了%s公告", firstSubtype)
+	projectName, _ := u.OwnerMonitors[0].Infos[0]["projectname"].(string)
+	if projectName == "" {
+		projectName, _ = u.OwnerMonitors[0].Infos[0]["title"].(string)
+	}
+	keyword2_value := util.ShortenTxt(20, suffix3, projectName) + suffix3
 	tmplData := map[string]*qrpc.TmplItem{
 		"keyword1": &qrpc.TmplItem{
 			Value: keyword1_value,