Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
N
node-pica-charts
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.frontend
node-pica-charts
提交
c786af0e
提交
c786af0e
编写于
10月 13, 2022
作者:
张磊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add yqy qrcode
上级
135b7374
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
37 行增加
和
36 行删除
+37
-36
workspace.xml
.idea/workspace.xml
+12
-3
app.js
app.js
+1
-1
index.js
routes/index.js
+2
-1
users.js
routes/users.js
+21
-17
connectionMysql.js
src/connectionMysql.js
+1
-7
connectionRedis.js
src/connectionRedis.js
+0
-7
未找到文件。
.idea/workspace.xml
浏览文件 @
c786af0e
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<workItem
from=
"1663643165481"
duration=
"27032000"
/>
<workItem
from=
"1663643165481"
duration=
"27032000"
/>
<workItem
from=
"1664431534287"
duration=
"9077000"
/>
<workItem
from=
"1664431534287"
duration=
"9077000"
/>
<workItem
from=
"1664518482030"
duration=
"497000"
/>
<workItem
from=
"1664518482030"
duration=
"497000"
/>
<workItem
from=
"1665200004917"
duration=
"
5519
000"
/>
<workItem
from=
"1665200004917"
duration=
"
11873
000"
/>
</task>
</task>
<servers
/>
<servers
/>
</component>
</component>
...
@@ -49,10 +49,13 @@
...
@@ -49,10 +49,13 @@
<option
name=
"version"
value=
"3"
/>
<option
name=
"version"
value=
"3"
/>
</component>
</component>
<component
name=
"WindowStateProjectService"
>
<component
name=
"WindowStateProjectService"
>
<state
x=
"714"
y=
"23
1"
width=
"598"
height=
"490"
key=
"find.popup"
timestamp=
"1663765797634
"
>
<state
x=
"714"
y=
"23
3"
width=
"598"
height=
"550"
key=
"find.popup"
timestamp=
"1665650440913
"
>
<screen
x=
"0"
y=
"23"
width=
"1680"
height=
"9
45
"
/>
<screen
x=
"0"
y=
"23"
width=
"1680"
height=
"9
52
"
/>
</state>
</state>
<state
x=
"714"
y=
"232"
width=
"598"
height=
"548"
key=
"find.popup/0.-1417.2560.1417/0.23.1680.949@0.23.1680.949"
timestamp=
"1665647489582"
/>
<state
x=
"714"
y=
"233"
width=
"598"
height=
"550"
key=
"find.popup/0.-1417.2560.1417/0.23.1680.952@0.23.1680.952"
timestamp=
"1665650440913"
/>
<state
x=
"714"
y=
"231"
width=
"598"
height=
"490"
key=
"find.popup/0.23.1680.945/-2560.-367.2560.1417@0.23.1680.945"
timestamp=
"1663765797634"
/>
<state
x=
"714"
y=
"231"
width=
"598"
height=
"490"
key=
"find.popup/0.23.1680.945/-2560.-367.2560.1417@0.23.1680.945"
timestamp=
"1663765797634"
/>
<state
x=
"714"
y=
"231"
width=
"598"
height=
"490"
key=
"find.popup/0.23.1680.945@0.23.1680.945"
timestamp=
"1665642648545"
/>
</component>
</component>
<component
name=
"XDebuggerManager"
>
<component
name=
"XDebuggerManager"
>
<breakpoint-manager>
<breakpoint-manager>
...
@@ -63,6 +66,12 @@
...
@@ -63,6 +66,12 @@
<properties
lambdaOrdinal=
"-1"
/>
<properties
lambdaOrdinal=
"-1"
/>
<option
name=
"timeStamp"
value=
"1"
/>
<option
name=
"timeStamp"
value=
"1"
/>
</line-breakpoint>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
type=
"javascript"
>
<url>
file://$PROJECT_DIR$/app.js
</url>
<line>
25
</line>
<properties
lambdaOrdinal=
"-1"
/>
<option
name=
"timeStamp"
value=
"2"
/>
</line-breakpoint>
</breakpoints>
</breakpoints>
</breakpoint-manager>
</breakpoint-manager>
</component>
</component>
...
...
app.js
浏览文件 @
c786af0e
...
@@ -21,7 +21,7 @@ app.use(express.static(path.join(__dirname, 'public')));
...
@@ -21,7 +21,7 @@ app.use(express.static(path.join(__dirname, 'public')));
app
.
all
(
'*'
,
function
(
req
,
res
,
next
)
{
app
.
all
(
'*'
,
function
(
req
,
res
,
next
)
{
res
.
header
(
"Access-Control-Allow-Origin"
,
"*"
);
res
.
header
(
"Access-Control-Allow-Origin"
,
"*"
);
res
.
header
(
"Access-Control-Allow-Headers"
,
"
X-Requested-With, token
"
);
res
.
header
(
"Access-Control-Allow-Headers"
,
"
*
"
);
res
.
header
(
"Access-Control-Allow-Methods"
,
"PUT,POST,GET,DELETE,OPTIONS"
);
res
.
header
(
"Access-Control-Allow-Methods"
,
"PUT,POST,GET,DELETE,OPTIONS"
);
res
.
header
(
"Access-Control-Allow-Credentials"
,
true
);
res
.
header
(
"Access-Control-Allow-Credentials"
,
true
);
res
.
header
(
"X-Powered-By"
,
' 3.2.1'
)
res
.
header
(
"X-Powered-By"
,
' 3.2.1'
)
...
...
routes/index.js
浏览文件 @
c786af0e
...
@@ -5,9 +5,10 @@ const {pica_db} = require('../src/connectionMysql');
...
@@ -5,9 +5,10 @@ const {pica_db} = require('../src/connectionMysql');
/* GET home page. */
/* GET home page. */
router
.
get
(
'/'
,
function
(
req
,
res
,
next
)
{
router
.
get
(
'/'
,
function
(
req
,
res
,
next
)
{
console
.
log
(
'------'
,
req
);
pica_db
.
query
(
'select *from pica.w_reward_pay_record order by id desc'
,
(
err
,
result
)
=>
{
pica_db
.
query
(
'select *from pica.w_reward_pay_record order by id desc'
,
(
err
,
result
)
=>
{
console
.
log
(
'err'
,
err
);
console
.
log
(
'err'
,
err
);
console
.
log
(
'result'
,
result
);
//
console.log('result', result);
if
(
result
==
null
||
result
.
length
===
0
)
{
if
(
result
==
null
||
result
.
length
===
0
)
{
return
;
return
;
}
}
...
...
routes/users.js
浏览文件 @
c786af0e
...
@@ -4,7 +4,7 @@ var router = express.Router();
...
@@ -4,7 +4,7 @@ var router = express.Router();
const
schedule
=
require
(
'node-schedule'
);
const
schedule
=
require
(
'node-schedule'
);
const
TaskServer
=
require
(
'../src/taskServer'
);
const
TaskServer
=
require
(
'../src/taskServer'
);
const
{
v4
:
uuidv4
}
=
require
(
'uuid'
);
const
{
v4
:
uuidv4
}
=
require
(
'uuid'
);
const
client
=
require
(
'../src/connectionRedis'
);
//
const client = require('../src/connectionRedis');
const
{
pica_db
}
=
require
(
'../src/connectionMysql'
);
const
{
pica_db
}
=
require
(
'../src/connectionMysql'
);
const
taskServer
=
require
(
'../src/taskServer'
);
const
taskServer
=
require
(
'../src/taskServer'
);
const
dayjs
=
require
(
"dayjs"
);
const
dayjs
=
require
(
"dayjs"
);
...
@@ -19,15 +19,19 @@ router.get('/', function (req, res, next) {
...
@@ -19,15 +19,19 @@ router.get('/', function (req, res, next) {
router
.
post
(
'/getTcmPayList'
,
async
(
req
,
res
)
=>
{
router
.
post
(
'/getTcmPayList'
,
async
(
req
,
res
)
=>
{
let
{
beginDate
,
endDate
}
=
req
.
body
;
let
{
beginDate
,
endDate
}
=
req
.
body
;
const
hasDate
=
beginDate
?
`where
timestamp(created_time) between
${
beginDate
}
and
${
endDate
}
`
:
''
;
const
hasDate
=
beginDate
?
`where
created_time >= \'
${
beginDate
}
\' and created_time <= \'
${
endDate
}
\'
`
:
''
;
const
tcmOrderQuery
=
`select * from pica.w_reward_pay_record
${
hasDate
}
`
const
tcmOrderQuery
=
`select * from pica.w_reward_pay_record
${
hasDate
}
`
pica_db
.
query
(
tcmOrderQuery
,
(
err
,
result
)
=>
{
pica_db
.
query
(
tcmOrderQuery
,
(
err
,
result
)
=>
{
console
.
log
(
'err---'
,
err
);
console
.
log
(
'err---'
,
err
);
console
.
log
(
'result'
,
result
);
console
.
log
(
'result
--
'
,
result
);
if
(
result
==
null
||
result
.
length
===
0
)
{
if
(
result
==
null
||
result
.
length
===
0
)
{
res
.
json
({
code
:
200
,
message
:
"操作成功"
,
data
:
[]
});
return
;
return
;
}
}
// res.send({message: 'success'});
res
.
json
({
res
.
json
({
code
:
200
,
code
:
200
,
message
:
"操作成功"
,
message
:
"操作成功"
,
...
@@ -133,18 +137,18 @@ router.get('/healthPing', function (req, res) {
...
@@ -133,18 +137,18 @@ router.get('/healthPing', function (req, res) {
res
.
send
({
message
:
'成功'
});
res
.
send
({
message
:
'成功'
});
});
});
router
.
get
(
'/setData'
,
function
(
req
,
res
)
{
//
router.get('/setData', function (req, res) {
client
.
hSet
(
'testing:alan'
,
'name'
,
'alan'
).
then
(
result
=>
{
//
client.hSet('testing:alan', 'name', 'alan').then(result => {
res
.
send
({
message
:
'success'
});
//
res.send({message: 'success'});
}).
catch
(
e
=>
{
//
}).catch(e => {
console
.
log
(
e
);
//
console.log(e);
})
//
})
})
//
})
//
router
.
get
(
'/getData'
,
function
(
req
,
res
)
{
//
router.get('/getData', function (req, res) {
client
.
hGet
(
'testing:alan'
,
'name'
).
then
(
result
=>
{
//
client.hGet('testing:alan', 'name').then(result => {
res
.
send
({
message
:
'success'
});
//
res.send({message: 'success'});
})
//
})
})
//
})
module
.
exports
=
router
;
module
.
exports
=
router
;
src/connectionMysql.js
浏览文件 @
c786af0e
/**
* @name: connectionMysql
* @author: alan
* @date: 2022-09-13 18:26
* @description:connectionMysql
* @update: 2022-09-13 18:26
*/
const
mysql
=
require
(
'mysql'
);
const
mysql
=
require
(
'mysql'
);
var
logger
=
require
(
'morgan'
);
const
user_yongchao
=
{
const
user_yongchao
=
{
user
:
'xuyongchao'
,
user
:
'xuyongchao'
,
password
:
'a+A123465'
,
password
:
'a+A123465'
,
...
...
src/connectionRedis.js
浏览文件 @
c786af0e
/**
* @name: connectionRedis
* @author: alan
* @date: 2022-09-15 14:41
* @description:connectionRedis
* @update: 2022-09-15 14:41
*/
const
redis
=
require
(
'redis'
);
const
redis
=
require
(
'redis'
);
console
.
log
(
'--redis'
,
redis
);
console
.
log
(
'--redis'
,
redis
);
var
RDS_PORT
=
6379
;
var
RDS_PORT
=
6379
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录