Commit 31e50ade by 王昆

gsb

parent 6137a513
...@@ -68,6 +68,18 @@ class BpoSDPJApi { ...@@ -68,6 +68,18 @@ class BpoSDPJApi {
// console.log(url); // console.log(url);
// } // }
async sdpjCronTask() {
let ids = await this.ccashinfoSve.findUnNotifyIds();
console.log("------推送数据------", ids);
if (!ids || ids.length != 0) {
for (let id of ids) {
await this.notifyCash(id);
}
}
console.log("------推送数据------", ids);
return ids;
}
/** /**
* 生成二维码 * 生成二维码
* @param obj * @param obj
......
const system=require("../../system"); const system=require("../../system");
const Dao=require("../dao.base"); const Dao=require("../dao.base");
const moment = require("moment");
class CcashinfoDao extends Dao{ class CcashinfoDao extends Dao{
constructor(){ constructor(){
super(Dao.getModelName(CcashinfoDao)); super(Dao.getModelName(CcashinfoDao));
} }
async findUnNotifyIds() {
let date = moment().add(-485, 'minutes').format("YYYY-MM-DD HH:mm:ss");
let sql = "SELECT id FROM `c_cash_info` WHERE trade_status IN ('00', '02') AND notify_rs = '' AND app_id = '1289358457992232962' AND updated_at <= :date ORDER BY id DESC ";
let list = await this.customQuery(sql, {date: date});
return list;
}
} }
module.exports=CcashinfoDao; module.exports=CcashinfoDao;
...@@ -7,6 +7,9 @@ class CcashinfoService extends ServiceBase { ...@@ -7,6 +7,9 @@ class CcashinfoService extends ServiceBase {
this.ccashuserDao = system.getObject("db.ccashuserDao"); this.ccashuserDao = system.getObject("db.ccashuserDao");
} }
async findUnNotifyIds() {
return await this.dao.findUnNotifyIds();
}
/** /**
* fn:根据条件获取对象 * fn:根据条件获取对象
......
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