提交 c786af0e 编写于 作者: 张磊's avatar 张磊

add yqy qrcode

上级 135b7374
......@@ -41,7 +41,7 @@
<workItem from="1663643165481" duration="27032000" />
<workItem from="1664431534287" duration="9077000" />
<workItem from="1664518482030" duration="497000" />
<workItem from="1665200004917" duration="5519000" />
<workItem from="1665200004917" duration="11873000" />
</task>
<servers />
</component>
......@@ -49,10 +49,13 @@
<option name="version" value="3" />
</component>
<component name="WindowStateProjectService">
<state x="714" y="231" width="598" height="490" key="find.popup" timestamp="1663765797634">
<screen x="0" y="23" width="1680" height="945" />
<state x="714" y="233" width="598" height="550" key="find.popup" timestamp="1665650440913">
<screen x="0" y="23" width="1680" height="952" />
</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@0.23.1680.945" timestamp="1665642648545" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
......@@ -63,6 +66,12 @@
<properties lambdaOrdinal="-1" />
<option name="timeStamp" value="1" />
</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>
</breakpoint-manager>
</component>
......
......@@ -21,7 +21,7 @@ app.use(express.static(path.join(__dirname, 'public')));
app.all('*', function (req, res, next) {
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-Credentials", true);
res.header("X-Powered-By",' 3.2.1')
......
......@@ -5,9 +5,10 @@ const {pica_db} = require('../src/connectionMysql');
/* GET home page. */
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) => {
console.log('err', err);
console.log('result', result);
// console.log('result', result);
if (result == null || result.length === 0) {
return;
}
......
......@@ -4,7 +4,7 @@ var router = express.Router();
const schedule = require('node-schedule');
const TaskServer = require('../src/taskServer');
const {v4: uuidv4} = require('uuid');
const client = require('../src/connectionRedis');
// const client = require('../src/connectionRedis');
const {pica_db} = require('../src/connectionMysql');
const taskServer = require('../src/taskServer');
const dayjs = require("dayjs");
......@@ -19,15 +19,19 @@ router.get('/', function (req, res, next) {
router.post('/getTcmPayList', async (req, res) => {
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}`
pica_db.query(tcmOrderQuery, (err, result) => {
console.log('err---', err);
console.log('result', result);
console.log('result--', result);
if (result == null || result.length === 0) {
res.json({
code: 200,
message: "操作成功",
data: []
});
return;
}
// res.send({message: 'success'});
res.json({
code: 200,
message: "操作成功",
......@@ -133,18 +137,18 @@ router.get('/healthPing', function (req, res) {
res.send({message: '成功'});
});
router.get('/setData', function (req, res) {
client.hSet('testing:alan', 'name', 'alan').then(result => {
res.send({message: 'success'});
}).catch(e => {
console.log(e);
})
})
router.get('/getData', function (req, res) {
client.hGet('testing:alan', 'name').then(result => {
res.send({message: 'success'});
})
})
// router.get('/setData', function (req, res) {
// client.hSet('testing:alan', 'name', 'alan').then(result => {
// res.send({message: 'success'});
// }).catch(e => {
// console.log(e);
// })
// })
//
// router.get('/getData', function (req, res) {
// client.hGet('testing:alan', 'name').then(result => {
// res.send({message: 'success'});
// })
// })
module.exports = router;
/**
* @name: connectionMysql
* @author: alan
* @date: 2022-09-13 18:26
* @description:connectionMysql
* @update: 2022-09-13 18:26
*/
const mysql = require('mysql');
var logger = require('morgan');
const user_yongchao = {
user: 'xuyongchao',
password:'a+A123465',
......
/**
* @name: connectionRedis
* @author: alan
* @date: 2022-09-15 14:41
* @description:connectionRedis
* @update: 2022-09-15 14:41
*/
const redis = require('redis');
console.log('--redis', redis);
var RDS_PORT = 6379;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册