Commit 72cf8bbb by 庄冰

seque

parent f93cdadd
...@@ -33,12 +33,12 @@ class Template extends APIBase { ...@@ -33,12 +33,12 @@ class Template extends APIBase {
pobj.clientIp = req.clientIp; pobj.clientIp = req.clientIp;
pobj.xctx = req.xctx; pobj.xctx = req.xctx;
switch (action_type) { switch (action_type) {
case "editTemplateContent"://修改模板内容 // case "editTemplateContent"://修改模板内容
opResult = await this.templateinfoSve.editTemplateContent(pobj); // opResult = await this.templateinfoSve.editTemplateContent(pobj);
break; // break;
case "findOneByCode"://模板查询 // case "findOneByCode"://模板查询
opResult = await this.templateinfoSve.getTemplateInfoByCode(pobj); // opResult = await this.templateinfoSve.getTemplateInfoByCode(pobj);
break; // break;
case "getTemplateAndLinkInfo"://根据链接参数获取模板链接信息 case "getTemplateAndLinkInfo"://根据链接参数获取模板链接信息
console.log("getTemplateAndLinkInfo+++++++++++++++++++++++++++"); console.log("getTemplateAndLinkInfo+++++++++++++++++++++++++++");
console.log(JSON.stringify(pobj)); console.log(JSON.stringify(pobj));
...@@ -47,9 +47,9 @@ class Template extends APIBase { ...@@ -47,9 +47,9 @@ class Template extends APIBase {
case "submitFormRecord"://提交表单记录 case "submitFormRecord"://提交表单记录
opResult = await this.formsubmitrecordSve.submitFormRecord(pobj); opResult = await this.formsubmitrecordSve.submitFormRecord(pobj);
break; break;
case "pushFormInfo2Fq"://推送需求表单信息至蜂擎 // case "pushFormInfo2Fq"://推送需求表单信息至蜂擎
opResult = await this.formsubmitrecordSve.pushFormInfo2Fq(); // opResult = await this.formsubmitrecordSve.pushFormInfo2Fq();
break; // break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -10,6 +10,7 @@ class FormsubmitrecordService extends ServiceBase { ...@@ -10,6 +10,7 @@ class FormsubmitrecordService extends ServiceBase {
this.forminfoDao = system.getObject("db.configmag.forminfoDao"); this.forminfoDao = system.getObject("db.configmag.forminfoDao");
this.formitemDao = system.getObject("db.configmag.formitemDao"); this.formitemDao = system.getObject("db.configmag.formitemDao");
this.fqUtilsSve = system.getObject("service.common.fqUtilsSve"); this.fqUtilsSve = system.getObject("service.common.fqUtilsSve");
this.execClient = system.getObject("util.execClient");
} }
/** /**
...@@ -76,9 +77,35 @@ class FormsubmitrecordService extends ServiceBase { ...@@ -76,9 +77,35 @@ class FormsubmitrecordService extends ServiceBase {
// if(ab.push_status==1){ // if(ab.push_status==1){
// addObj.push_status=1; // addObj.push_status=1;
// } // }
await this.dao.create(addObj);//创建记录 var createRes = await this.dao.create(addObj);//创建记录
this.pushNeed2Queue(createRes.id);
return system.getResultSuccess(); return system.getResultSuccess();
} }
//推送需求至队列
async pushNeed2Queue(id){
try {
if(!id){
return;
}
var url = "http://sytxpublic-msgq-service/api/queueAction/producer/springBoard";
var obj = {
"actionType": "produceData",// Y 功能名称
"actionBody": {
"pushUrl": "https://mmc.gongsibao.com/external/action/template/springBoard",// Y 推送地址
"actionType": "pushMarketplatFormInfo2Fq",// Y 推送地址接收时的功能名称
"identifyCode": "marketplat-pushneed2fq",// Y 操作的业务标识
"messageBody": { // Y 推送的业务消息,必须有一项对象属性值
"id":id
}
}
};
await this.execClient.execPost(obj, url);
} catch (e) {
console.log(e,"pushNeed2Queue++++++++++++++++++++++++++++++++++++")
}
}
/** /**
* 参数校验 * 参数校验
* @param {*} formitems 表单项 * @param {*} formitems 表单项
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment