fix: 问题修复
This commit is contained in:
parent
8a4eedeffd
commit
87f1531d2c
@ -10,7 +10,7 @@ const TOKEN_EXPIRES = process.env.CONFIG_JWT_EXPIRE_TIME || "1d";
|
|||||||
|
|
||||||
let db = null;
|
let db = null;
|
||||||
// 自定义默认密码
|
// 自定义默认密码
|
||||||
const defaultPassword = "zytzyy6789";
|
const defaultPassword = "hnhlwyy123456789";
|
||||||
exports.main = async (event, mongodb, req) => {
|
exports.main = async (event, mongodb, req) => {
|
||||||
db = mongodb;
|
db = mongodb;
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
|
|||||||
@ -327,7 +327,8 @@ function getFailureNotificationText(task, error) {
|
|||||||
const action =
|
const action =
|
||||||
task.type === AUTOMATION_TYPES.OPEN_RX ? "自动开方" : "自动审方";
|
task.type === AUTOMATION_TYPES.OPEN_RX ? "自动开方" : "自动审方";
|
||||||
const reason = error && error.message ? error.message : "未知错误";
|
const reason = error && error.message ? error.message : "未知错误";
|
||||||
return `${action}失败:${reason}`;
|
// return `${action}失败:${reason}`;
|
||||||
|
return reason
|
||||||
}
|
}
|
||||||
|
|
||||||
async function sendFailureNotification(db, task, error) {
|
async function sendFailureNotification(db, task, error) {
|
||||||
@ -373,6 +374,7 @@ async function sendFailureNotification(db, task, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const notification = getFailureNotificationText(task, error);
|
const notification = getFailureNotificationText(task, error);
|
||||||
|
const ext = { reason: notification };
|
||||||
try {
|
try {
|
||||||
const result = await tencentIM(
|
const result = await tencentIM(
|
||||||
{
|
{
|
||||||
@ -385,9 +387,9 @@ async function sendFailureNotification(db, task, error) {
|
|||||||
{
|
{
|
||||||
MsgType: "TIMCustomElem",
|
MsgType: "TIMCustomElem",
|
||||||
MsgContent: {
|
MsgContent: {
|
||||||
Data: "AUTOMATIONFAIL",
|
Data: "AUTORXFAIL",
|
||||||
Desc: "notification",
|
Desc: "notification",
|
||||||
Ext: notification,
|
Ext: JSON.stringify(ext),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1166,7 +1166,7 @@ async function attempToSendPassMessage(rx, corpId) {
|
|||||||
{
|
{
|
||||||
MsgType: "TIMCustomElem",
|
MsgType: "TIMCustomElem",
|
||||||
MsgContent: {
|
MsgContent: {
|
||||||
Data: "AUDIPASS",
|
Data: "AUDITPASS",
|
||||||
Ext: JSON.stringify({
|
Ext: JSON.stringify({
|
||||||
id: rx._id,
|
id: rx._id,
|
||||||
orderId: rx.orderId,
|
orderId: rx.orderId,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user