|
@@ -12,12 +12,13 @@ const { max } = require('moment');
|
|
|
const feishu_write_table_token_url = 'https://open.feishu.cn/open-apis/auth/v3/app_access_token/internal'
|
|
|
const feishu_write_table_data_url = 'https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/shtcnp6zbrsep1Sz3Cvk7NXRpDg/values_batch_update'
|
|
|
const feishu_insert_table_url = 'https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/shtcnp6zbrsep1Sz3Cvk7NXRpDg/insert_dimension_range'
|
|
|
-const reportTime = '08:00:00'
|
|
|
+const reportTime = '02:00:00'
|
|
|
|
|
|
//########################################### 出入金数据统计 ########################################
|
|
|
|
|
|
const http_request_get = async (data) => {
|
|
|
var host = account_config.STATISTICS_URL
|
|
|
+ // host = 'https://api.denetme.net/denet/wallet/stat/getMoneyStat?date='
|
|
|
var path = data
|
|
|
var url = host + path
|
|
|
logger.log('http_request_get', url)
|
|
@@ -530,14 +531,16 @@ function timeoutFunc(config, func) {
|
|
|
|
|
|
config.runNow && func()
|
|
|
|
|
|
- let nowTime = new Date().getTime()
|
|
|
+ let nowTime = new Date(utils.getCurrentDate()).getTime()
|
|
|
+ // nowTime = new Date().getTime()
|
|
|
|
|
|
let timePoints = config.time.split(':').map(i => parseInt(i))
|
|
|
|
|
|
- let recent = new Date().setHours(...timePoints)
|
|
|
+ let recent = new Date(utils.getCurrentDate()).setHours(...timePoints)
|
|
|
|
|
|
recent >= nowTime || (recent += 24 * 3600000)
|
|
|
|
|
|
+ console.log('timeoutFunc-------------------', nowTime, timePoints, recent)
|
|
|
setTimeout(() => {
|
|
|
|
|
|
func()
|
|
@@ -696,6 +699,7 @@ timeoutFunc({
|
|
|
report2FeishuTable()
|
|
|
}
|
|
|
})
|
|
|
+// logger.info('getAllBalance ', getAllBalance())
|
|
|
module.exports = {
|
|
|
getStatisticsInfo
|
|
|
}
|