Jelajahi Sumber

update:消息通知

zoie 1 tahun lalu
induk
melakukan
1706412b7d
3 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 3 0
      conf/app.conf
  2. 3 0
      conf/config.go
  3. 1 1
      controllers/Salary.go

+ 3 - 0
conf/app.conf

@@ -32,3 +32,6 @@ Qiniu_AccessKey = -8ezB_d-8-eUFTMvhOGbGzgeQRPeKQnaQ3DBcUxo
 Qiniu_SecretKey = KFhkYxTAJ2ZPN3ZS3euTsfWk8-C92rKgkhAMkDRN
 Qiniu_BUCKET = baozhida-erp
 Qiniu_Url = https://erposs.baozhida.cn/
+
+# 消息通知路由
+MySalaryNewsUrl = "/salaryMy"

+ 3 - 0
conf/config.go

@@ -29,3 +29,6 @@ var Qiniu_AccessKey, _ = beego.AppConfig.String("Qiniu_AccessKey")
 var Qiniu_SecretKey, _ = beego.AppConfig.String("Qiniu_SecretKey")
 var Qiniu_BUCKET, _ = beego.AppConfig.String("Qiniu_BUCKET")
 var OssQiniu, _ = beego.AppConfig.String("OssQiniu")
+
+// 消息通知路由
+var MySalaryNewsUrl, _ = beego.AppConfig.String("MySalaryNewsUrl")

+ 1 - 1
controllers/Salary.go

@@ -259,7 +259,7 @@ func (c *SalaryController) Send_Salary() {
 
 	NatsServer.AddUserLogs(c.User.T_uuid, "薪资管理", "发送工资条", id)
 	if salary.T_State == 1 {
-		NatsServer.AddNews(salary.T_uid, fmt.Sprintf("您的%s年%s月工资条已送达,请查收!", year, month), "/salaryMy")
+		NatsServer.AddNews(salary.T_uid, fmt.Sprintf("【工资条】您的%s年%s月工资条已送达,请查收!", year, month), conf.MySalaryNewsUrl)
 	}
 
 	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_id}