Ver código fonte

update: 消息通知

zoie 1 ano atrás
pai
commit
fb3829231c
2 arquivos alterados com 5 adições e 5 exclusões
  1. 3 3
      controllers/Leave.go
  2. 2 2
      controllers/Overtime.go

+ 3 - 3
controllers/Leave.go

@@ -156,7 +156,7 @@ func (c *LeaveController) Leave_Add() {
 	}
 
 	NatsServer.AddUserLogs(c.User.T_uuid, "我的请假", "添加", var_)
-	NatsServer.AddNews(T_approver, fmt.Sprintf("您有一条%s的请假审批待处理", c.User.T_name), conf.LeaveApprovalNewsUrl)
+	NatsServer.AddNews(T_approver, fmt.Sprintf("【请假审批】您有一条%s的请假审批待处理", c.User.T_name), conf.LeaveApprovalNewsUrl)
 
 	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: Id}
 	c.ServeJSON()
@@ -316,7 +316,7 @@ func (c *LeaveController) Leave_Approval() {
 	}
 
 	NatsServer.AddUserLogs(c.User.T_uuid, "我的请假", "审批", leave)
-	NatsServer.AddNews(leave.T_uid, "您的请假申请已通过", conf.MyLeaveNewsUrl)
+	NatsServer.AddNews(leave.T_uid, "【请假申请】您的请假申请已通过", conf.MyLeaveNewsUrl)
 
 	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: id}
 	c.ServeJSON()
@@ -394,7 +394,7 @@ func (c *LeaveController) Leave_Duration() {
 		s_h = 9
 		s_mm = 0
 	}
-	if e_h > 17 && e_mm > 30 {
+	if e_h >= 17 && e_mm > 30 {
 		// 结束时间晚于17:30点,到17:30点止
 		e_h = 17
 		e_mm = 30

+ 2 - 2
controllers/Overtime.go

@@ -113,7 +113,7 @@ func (c *OvertimeController) Overtime_Add() {
 	}
 
 	NatsServer.AddUserLogs(c.User.T_uuid, "我的加班", "添加", var_)
-	NatsServer.AddNews(T_approver, fmt.Sprintf("您有一条%s的加班审批待处理", c.User.T_name), conf.OvertimeApprovalNewsUrl)
+	NatsServer.AddNews(T_approver, fmt.Sprintf("【加班审批】您有一条%s的加班审批待处理", c.User.T_name), conf.OvertimeApprovalNewsUrl)
 
 	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: var_.Id}
 	c.ServeJSON()
@@ -228,7 +228,7 @@ func (c *OvertimeController) Overtime_Approval() {
 	}
 
 	NatsServer.AddUserLogs(c.User.T_uuid, "加班审批", "审批", leave)
-	NatsServer.AddNews(leave.T_uid, "您的加班申请已通过", conf.MyOvertimeNewsUrl)
+	NatsServer.AddNews(leave.T_uid, "【加班申请】您的加班申请已通过", conf.MyOvertimeNewsUrl)
 
 	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: id}
 	c.ServeJSON()