app实习不通过发送站内信
__OBgNRqm1iNU27jK0rkk
__OBgNRqm1iNU27jK0rkk
published
UTF-8
post
/SercuritysendMessage
json
"+jsonStr)
var json = JSON.parse(jsonStr);
var senderid = json["senderid"];//发送者id
var reciverid = json["reciverid"];//接收者id
var reaseon = json["reaseon"];//不通过原因
var day1 = json["day"];//实习日期
//var day=format(day1,"yyyy-MM-dd HH:mm:ss")
var subject="您【"+day1+"】提交的实习记录保安公司审核不通过!";
println("--------------------------------------->"+senderid)
if (isNotNull(senderid) && isNotNull(reciverid)) {
var content = "";
var texts ="";
texts += "您【"+day1+"】提交的实习记录保安公司审核不通过,不通过原因:【"+reaseon+"】" ;
var appAvatar = "https://bcxin-saas-prod.obs.cn-north-1.myhuaweicloud.com:443/upload%2F2021-11-01%2F1635755240828768236.png";
var title = "";
var titleImg = "";
var actionName = "";
var actionUrl = "";
content += "appName=" + appName + "&&;" ; //应用名称
content += "appId=" + appId + "&&;" ; //应用id
content += "appAvatar=" + appAvatar + "&&;" ; //应用图标
content += "title=" + title + "&&;" ; //标题
content += "titleImg=" + titleImg + "&&;" ; //标题图标
content += "actionName=" + actionName + "&&;" ; //操作名称
content += "actionUrl=" + actionUrl + "&&;" ; //操作链接
content += "content=" + texts + "";
/*try{
sendMessage(senderid,reciverid,subject,content);
}catch(e){
result.put("msg", "站内信错误");
}*/
sendMessage(senderid,reciverid,subject,content);
println("站内信发送结束")
result.put("type", "send");
result.put("msg", "success");
result.put("code", "0");
} else {
result.put("code", "-1");
result.put("msg", "id不能为空");
}
return result;
})()]]>