Commit de4d5716 by 蒋勇

d

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