Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
31e50ade
Commit
31e50ade
authored
Aug 03, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
6137a513
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
bpo-web/app/base/api/impl/bpoSDPJApi.js
+12
-0
bpo-web/app/base/db/impl/ccashinfoDao.js
+8
-0
bpo-web/app/base/service/impl/ccashinfoSve.js
+3
-0
No files found.
bpo-web/app/base/api/impl/bpoSDPJApi.js
View file @
31e50ade
...
@@ -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
...
...
bpo-web/app/base/db/impl/ccashinfoDao.js
View file @
31e50ade
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
;
bpo-web/app/base/service/impl/ccashinfoSve.js
View file @
31e50ade
...
@@ -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:根据条件获取对象
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment