Эх сурвалжийг харах

feat:删除剑鱼币提醒

wangchuanjin 1 жил өмнө
parent
commit
535f85b1bb

+ 0 - 35
resourceBrushLibrary/config.json

@@ -43,9 +43,6 @@
   "limitTimeActivity": "08:00",
   "checkPointExpire":"00:01",
   "checkPointExpirePool":5,
-  "pointExpireBefore":15,
-  "pointSoonExpireTip":"08:30",
-  "pointExpiredTip":"09:00",
   "messages":{
 	"taskExpire":{
 		"title":"做任务赚好礼挑战即将过期",
@@ -54,38 +51,6 @@
 		"appid":"10000",
 		"pcUrl":"/home/work-bench/app/points/earn",
 		"mobileUrl":"/jy_mobile/points/earn"
-	},
-	"pointSoonExpire":{
-		"title":"剑鱼币即将到期提醒",
-		"content":"%d天有%d剑鱼币即将到期",
-		"msgType":1,
-		"appid":"10000",
-		"pcUrl":"/home/work-bench/app/points",
-		"mobileUrl":"/jy_mobile/points/my_points",
-		"customWxTpl":{
-			"tplId":"",
-			"tmplData":{
-				"thing19":{
-					"value":"您的剑鱼币即将过期,请记得及时使用。"
-				}
-			}
-		}
-	},
-	"pointExpired":{
-		"title":"剑鱼币已到期提醒",
-		"content":"您有%d剑鱼币已到期",
-		"msgType":1,
-		"appid":"10000",
-		"pcUrl":"/home/work-bench/app/points",
-		"mobileUrl":"/jy_mobile/points/my_points",
-		"customWxTpl":{
-			"tplId":"",
-			"tmplData":{
-				"thing19":{
-					"value":"您的剑鱼币已过期。"
-				}
-			}
-		}
 	}
   }
 }

+ 1 - 6
resourceBrushLibrary/config/config.go

@@ -50,13 +50,8 @@ type config struct {
 	LimitTimeActivity    string
 	CheckPointExpire     string
 	CheckPointExpirePool int
-	PointExpireBefore    int
-	PointSoonExpireTip   string
-	PointExpiredTip      string
 	Messages             struct {
-		TaskExpire      *MsgConf
-		PointSoonExpire *MsgConf
-		PointExpired    *MsgConf
+		TaskExpire *MsgConf
 	}
 }
 

+ 1 - 1
resourceBrushLibrary/entity/limitTimeActivity.go

@@ -62,7 +62,7 @@ func (l *LimitTimeActivity) Run() {
 				})
 			}(BsonIdToSId((*u)["_id"]))
 			return true
-		}, `select user_id from integral_task where end_time>=? and end_time<?`, date.FormatDate(&start, date.Date_Full_Layout), date.FormatDate(&end, date.Date_Full_Layout))
+		}, `select user_id from integral_task where success_status=0 and end_time>=? and end_time<?`, date.FormatDate(&start, date.Date_Full_Layout), date.FormatDate(&end, date.Date_Full_Layout))
 		wait.Wait()
 	})
 }

+ 0 - 82
resourceBrushLibrary/entity/point.go

@@ -1,19 +1,13 @@
 package entity
 
 import (
-	"fmt"
 	"log"
 	. "resourceBrushLibrary/config"
-	. "resourceBrushLibrary/rpc"
-	"strconv"
 	"sync"
 	"time"
 
-	"app.yhyue.com/moapp/MessageCenter/rpc/type/message"
 	util "app.yhyue.com/moapp/jybase/common"
 	date "app.yhyue.com/moapp/jybase/date"
-	. "app.yhyue.com/moapp/jybase/mongodb"
-	. "bp.jydev.jianyu360.cn/BaseService/pushpkg/p"
 )
 
 type Point struct {
@@ -41,80 +35,4 @@ func (p *Point) Run() {
 		}, `select appId,userId,timePoints,endDate from integral_solde where timePoints>0 and end_time=?`, date.FormatDate(&end, date.Date_Short_Layout))
 		wait.Wait()
 	})
-	//积分即将到期
-	util.SimpleCrontab(false, Config.PointSoonExpireTip, func() {
-		p.expire(1)
-	})
-	//积分已到期
-	util.SimpleCrontab(false, Config.PointExpiredTip, func() {
-		p.expire(2)
-	})
-}
-
-func (p *Point) expire(t int) {
-	var c *MsgConf
-	var end time.Time
-	if t == 1 {
-		c = Config.Messages.PointSoonExpire
-		end = time.Now().AddDate(0, 0, Config.PointExpireBefore)
-	} else {
-		c = Config.Messages.PointExpired
-		end = time.Now().AddDate(0, 0, -1)
-	}
-	pool := make(chan bool, Config.CheckPointExpirePool)
-	wait := &sync.WaitGroup{}
-	Mysql_Point.SelectByBath(1, func(l *[]map[string]interface{}) bool {
-		pool <- true
-		wait.Add(1)
-		go func(userId, end_time string, timePoints int) {
-			defer util.Catch()
-			defer func() {
-				<-pool
-				wait.Done()
-			}()
-			wxUrl, appUrl := "/front/sess/", "/jyapp/free/sess/"
-			mgoUserId := userId
-			if !IsObjectIdHex(userId) {
-				mgoUserId = ""
-			}
-			urlAppend := Se.EncodeString(userId+","+util.If(IsObjectIdHex(userId), "_id", "positionId").(string)+","+strconv.Itoa(int(time.Now().Unix()))+",") + "__" + Se.EncodeString(c.MobileUrl)
-			wxUrl += urlAppend
-			appUrl += urlAppend
-			content := ""
-			if t == 1 {
-				content = fmt.Sprintf(c.Content, Config.PointExpireBefore, timePoints)
-			} else {
-				content = fmt.Sprintf(c.Content, timePoints)
-			}
-			tmplData := map[string]*message.TmplItem{
-				"thing1": &message.TmplItem{
-					Value: c.Title,
-				},
-				"thing2": &message.TmplItem{
-					Value: content,
-				},
-				"thing3": &message.TmplItem{
-					Value: end_time,
-				},
-				"thing4": c.CustomWxTpl.TmplData["thing19"],
-			}
-			SendMsg(&message.MultipleSaveMsgReq{
-				UserIds:    mgoUserId,
-				Title:      c.Title,
-				Content:    content,
-				MsgType:    c.MsgType,
-				Link:       c.PcUrl + "," + c.MobileUrl + "," + c.MobileUrl,
-				Appid:      c.Appid,
-				AppPushUrl: appUrl,
-				WxPushUrl:  Config.Webdomain + wxUrl,
-				IosPushUrl: appUrl,
-				CustomWxTpl: &message.CustomWxTpl{
-					TplId:    c.CustomWxTpl.TplId,
-					TmplData: tmplData,
-				},
-			})
-		}(util.ObjToString((*l)[0]["userId"]), util.ObjToString((*l)[0]["end_time"]), util.IntAll((*l)[0]["timePoints"]))
-		return true
-	}, `select userId,timePoints,end_time from integral_solde where timePoints>0 and end_time=?`, date.FormatDate(&end, date.Date_Short_Layout))
-	wait.Wait()
 }

+ 1 - 1
resourceBrushLibrary/go.mod

@@ -6,7 +6,7 @@ require (
 	app.yhyue.com/moapp/MessageCenter v0.0.0-20231026080417-49f63bf75554
 	app.yhyue.com/moapp/jyResourcesCenter v0.0.0-20231024011103-8a2aacdbbd3e
 	app.yhyue.com/moapp/jybase v0.0.0-20231011022039-fa0f75e5282f
-	bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743
+	bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20231027034538-be5fd3ef2b25
 	github.com/zeromicro/go-zero v1.5.5
 )
 

+ 2 - 2
resourceBrushLibrary/go.sum

@@ -13,8 +13,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20231011022039-fa0f75e5282f/go.mod h1:Hv9U/7oH
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
 bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.mod h1:Yj4oabIGItuMoF0BXYLz2XAnF581kxgXBrvlUtIJrkI=
 bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
-bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743 h1:7IaukyEAbMvgEv3/TiHlw7lzWPoksE4tVa1ap16RC9Q=
-bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743/go.mod h1:1SQIPPL5Ya5BzQdByFKtTkXrXTWBv+PDqWIhNknLnZw=
+bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20231027034538-be5fd3ef2b25 h1:tPHMRRMwqZX7imVss8xUqvhwFwwLAvvvwHrofRn+Tsw=
+bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20231027034538-be5fd3ef2b25/go.mod h1:1SQIPPL5Ya5BzQdByFKtTkXrXTWBv+PDqWIhNknLnZw=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220420075831-0b59892e9982/go.mod h1:wsHNO91h37H+xE4ZNny0yd7mtpODeDJxbVYhIRMR+qw=