Commit aa1372b4 by 蒋勇

d

parent 23f2ec45
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/main.js"
}
]
}
\ No newline at end of file
......@@ -12,7 +12,7 @@ class APIBase extends DocBase {
async isExistInNoAuthMainfest(gname, methodname) {
var fullname = gname + "." + methodname;
var lst = [
"rpt.rptApi"
"rpt.saveRptHistory"
];
var x = lst.indexOf(fullname);
return x >= 0;
......
......@@ -62,10 +62,13 @@ class RptAPI extends APIBase{
]
}*/
async saveRpt(pobj,query){
var x=await this.rptService.saveRpt(pobj);
return system.getResult(x);
}
async saveRptHistory(pobj,query){
console.log(JSON.stringify(pobj));
return {};
var x=await this.rptService.saveRptHistory(pobj);
return system.getResult(x);
}
......
......@@ -4,7 +4,6 @@ class RptTypeDao extends Dao{
constructor(){
super(Dao.getModelName(RptTypeDao));
}
}
module.exports=RptTypeDao;
const system=require("../../../system");
const settings=require("../../../../config/settings");
const ServiceBase=require("../../sve.base")
var WXPay = require('wx-pay');
const uuidv4 = require('uuid/v4');
class ApiTradeService extends ServiceBase{
constructor(){
......
......@@ -3,7 +3,7 @@ const ServiceBase=require("../../sve.base")
const settings=require("../../../../config/settings")
class RptTypeService extends ServiceBase{
constructor(){
super("auth",ServiceBase.getDaoName(RptTypeService));
super("rpt",ServiceBase.getDaoName(RptTypeService));
this.redisClient=system.getObject("util.redisClient");
}
async saveRptHistory(hs){
......@@ -81,8 +81,8 @@ class RptTypeService extends ServiceBase{
//保存报表
await this.db.models.uploadrpt.bulkCreate(rpts,{transaction:t});
try{
rpts.forEach((rpt)=>{
await this.redisClient.notifyConsume("k8stask","docurls",rpt.rptdate+"~"+rpt.rpttypecode+"~"+rpt.urlpath);
rpts.forEach(async (rpt)=>{
await this.redisClient.notifyConsume("k8stask","docurls",batchtemp.id+"~"+rpt.rptdate+"~"+rpt.rpttypecode+"~"+rpt.urlpath);
});
}catch(e){
//需要记录要清理的批号历史数据
......
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