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 { ...@@ -12,7 +12,7 @@ class APIBase extends DocBase {
async isExistInNoAuthMainfest(gname, methodname) { async isExistInNoAuthMainfest(gname, methodname) {
var fullname = gname + "." + methodname; var fullname = gname + "." + methodname;
var lst = [ var lst = [
"rpt.rptApi" "rpt.saveRptHistory"
]; ];
var x = lst.indexOf(fullname); var x = lst.indexOf(fullname);
return x >= 0; return x >= 0;
......
...@@ -62,10 +62,13 @@ class RptAPI extends APIBase{ ...@@ -62,10 +62,13 @@ class RptAPI extends APIBase{
] ]
}*/ }*/
async saveRpt(pobj,query){ async saveRpt(pobj,query){
var x=await this.rptService.saveRpt(pobj); var x=await this.rptService.saveRpt(pobj);
return system.getResult(x); return system.getResult(x);
} }
async saveRptHistory(pobj,query){ async saveRptHistory(pobj,query){
console.log(JSON.stringify(pobj));
return {};
var x=await this.rptService.saveRptHistory(pobj); var x=await this.rptService.saveRptHistory(pobj);
return system.getResult(x); return system.getResult(x);
} }
......
...@@ -4,7 +4,6 @@ class RptTypeDao extends Dao{ ...@@ -4,7 +4,6 @@ class RptTypeDao extends Dao{
constructor(){ constructor(){
super(Dao.getModelName(RptTypeDao)); super(Dao.getModelName(RptTypeDao));
} }
} }
module.exports=RptTypeDao; module.exports=RptTypeDao;
const system=require("../../../system"); const system=require("../../../system");
const settings=require("../../../../config/settings"); const settings=require("../../../../config/settings");
const ServiceBase=require("../../sve.base") const ServiceBase=require("../../sve.base")
var WXPay = require('wx-pay');
const uuidv4 = require('uuid/v4'); const uuidv4 = require('uuid/v4');
class ApiTradeService extends ServiceBase{ class ApiTradeService extends ServiceBase{
constructor(){ constructor(){
......
...@@ -3,7 +3,7 @@ const ServiceBase=require("../../sve.base") ...@@ -3,7 +3,7 @@ const ServiceBase=require("../../sve.base")
const settings=require("../../../../config/settings") const settings=require("../../../../config/settings")
class RptTypeService extends ServiceBase{ class RptTypeService extends ServiceBase{
constructor(){ constructor(){
super("auth",ServiceBase.getDaoName(RptTypeService)); super("rpt",ServiceBase.getDaoName(RptTypeService));
this.redisClient=system.getObject("util.redisClient"); this.redisClient=system.getObject("util.redisClient");
} }
async saveRptHistory(hs){ async saveRptHistory(hs){
...@@ -81,8 +81,8 @@ class RptTypeService extends ServiceBase{ ...@@ -81,8 +81,8 @@ class RptTypeService extends ServiceBase{
//保存报表 //保存报表
await this.db.models.uploadrpt.bulkCreate(rpts,{transaction:t}); await this.db.models.uploadrpt.bulkCreate(rpts,{transaction:t});
try{ try{
rpts.forEach((rpt)=>{ rpts.forEach(async (rpt)=>{
await this.redisClient.notifyConsume("k8stask","docurls",rpt.rptdate+"~"+rpt.rpttypecode+"~"+rpt.urlpath); await this.redisClient.notifyConsume("k8stask","docurls",batchtemp.id+"~"+rpt.rptdate+"~"+rpt.rpttypecode+"~"+rpt.urlpath);
}); });
}catch(e){ }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