Commit de4d5716 by 蒋勇

d

parent 163c89fe
...@@ -140,7 +140,7 @@ class RptTypeService extends ServiceBase{ ...@@ -140,7 +140,7 @@ class RptTypeService extends ServiceBase{
} }
})); }));
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>sended..........."); console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>sended..........."+batchid);
self.redisClient.delete("batch"+batchid); self.redisClient.delete("batch"+batchid);
//改变批的状态为解析完毕 //改变批的状态为解析完毕
batch.batchstatuscode="calc"; batch.batchstatuscode="calc";
...@@ -185,20 +185,23 @@ class RptTypeService extends ServiceBase{ ...@@ -185,20 +185,23 @@ class RptTypeService extends ServiceBase{
async updateTaskRptUrl(upinfo){ async updateTaskRptUrl(upinfo){
await this.db.models.uploadbatch.update({"wordrpturl":upinfo.rptUrl},{ where: { id: upinfo.batchid }}); await this.db.models.uploadbatch.update({"wordrpturl":upinfo.rptUrl},{ where: { id: upinfo.batchid }});
var batchobj=await this.models.uploadbatch.findByPk(upinfo.batchid); var batchobj=await this.models.uploadbatch.findByPk(upinfo.batchid);
//调用扣费接口 if(batchobj.userid && batchobj.userid!=""){
var url=""; //调用扣费接口
var uid=batchobj.userid; var url="";
if(settings.env=="dev"){ var uid=batchobj.userid;
url="https://icompanytest.gongsibao.com?uid="+uid; if(settings.env=="dev"){
}else{ url="https://icompanytest.gongsibao.com?uid="+uid;
url="https://icompany.gongsibao.com?uid="+uid; }else{
} url="https://icompany.gongsibao.com?uid="+uid;
request(url, function(error, response, body) {
console.log(body);
if (!error && response.statusCode == 200) {
console.log(body);
} }
}); request(url, function(error, response, body) {
console.log(body);
if (!error && response.statusCode == 200) {
console.log(body);
}
});
}
return {}; return {};
} }
//返回 //返回
......
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