Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjj_api
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data_server
gjj_api
Commits
18b23285
Commit
18b23285
authored
Jul 17, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gjjapi
parent
448b7b07
Pipeline
#11008
passed with stage
in 10 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
182 additions
and
2 deletions
+182
-2
cusdata.js
app/model/nodegjj/cusdata.js
+77
-0
gjjStatus.js
app/model/nodegjj/gjjStatus.js
+80
-0
order.js
app/service/order.js
+1
-0
config.local.js
config/config.local.js
+11
-0
config.prod.js
config/config.prod.js
+13
-2
No files found.
app/model/nodegjj/cusdata.js
0 → 100644
View file @
18b23285
'use strict'
;
module
.
exports
=
app
=>
{
const
{
DataTypes
}
=
app
.
Sequelize
;
const
cusDatas
=
app
.
nodemodel
.
define
(
'cusDatas'
,
{
id
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
false
,
autoIncrement
:
true
,
primaryKey
:
true
,
field
:
'id'
,
},
orderSn
:
{
type
:
DataTypes
.
STRING
(
255
),
allowNull
:
false
,
field
:
'orderSn'
,
},
appkey
:
{
type
:
DataTypes
.
STRING
(
255
),
allowNull
:
false
,
field
:
'appkey'
,
},
type
:
{
type
:
DataTypes
.
STRING
(
255
),
allowNull
:
true
,
defaultValue
:
'gjjAPI'
,
field
:
'type'
,
},
date
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
,
defaultValue
:
app
.
Sequelize
.
literal
(
'CURRENT_TIMESTAMP'
),
field
:
'date'
,
},
// text1: {
// type: DataTypes.STRING(255),
// allowNull: true,
// defaultValue: '',
// field: 'text1',
// },
// text2: {
// type: DataTypes.STRING(255),
// allowNull: true,
// defaultValue: '',
// field: 'text2',
// },
// text3: {
// type: DataTypes.STRING(255),
// allowNull: true,
// defaultValue: '',
// field: 'text3',
// },
// text4: {
// type: DataTypes.STRING(255),
// allowNull: true,
// defaultValue: '',
// field: 'text4',
// },
// date1: {
// type: DataTypes.DATE,
// allowNull: true,
// field: 'date1',
// },
// date2: {
// type: DataTypes.DATE,
// allowNull: true,
// field: 'date2',
// },
},
{
tableName
:
'cus_data'
,
timestamps
:
false
,
});
return
cusDatas
;
};
app/model/nodegjj/gjjStatus.js
0 → 100644
View file @
18b23285
'use strict'
;
module
.
exports
=
app
=>
{
const
{
DataTypes
}
=
app
.
Sequelize
;
const
gjjStatus
=
app
.
nodemodel
.
define
(
'gjjStatus'
,
{
orderId
:
{
type
:
DataTypes
.
STRING
(
255
),
allowNull
:
false
,
primaryKey
:
true
,
field
:
'orderId'
,
},
taskId
:
{
type
:
DataTypes
.
STRING
(
255
),
allowNull
:
false
,
defaultValue
:
''
,
field
:
'taskId'
,
},
cityId
:
{
type
:
DataTypes
.
STRING
(
10
),
allowNull
:
true
,
defaultValue
:
''
,
field
:
'text1'
,
},
appkey
:
{
type
:
DataTypes
.
STRING
(
50
),
allowNull
:
false
,
field
:
'appkey'
,
},
notifyUrl
:
{
type
:
DataTypes
.
STRING
(
500
),
allowNull
:
true
,
defaultValue
:
''
,
field
:
'callbackUrl'
,
},
status
:
{
type
:
DataTypes
.
STRING
(
20
),
allowNull
:
true
,
defaultValue
:
''
,
field
:
'status'
,
},
note
:
{
type
:
DataTypes
.
STRING
(
8000
),
allowNull
:
true
,
defaultValue
:
''
,
field
:
'note'
,
get
()
{
const
note
=
this
.
getDataValue
(
'note'
);
if
(
note
)
{
try
{
return
JSON
.
parse
(
note
);
}
catch
(
error
)
{
return
{};
}
}
return
{};
},
set
(
val
)
{
this
.
setDataValue
(
'note'
,
JSON
.
stringify
(
val
));
},
},
created_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
false
,
defaultValue
:
app
.
Sequelize
.
literal
(
'CURRENT_TIMESTAMP'
),
field
:
'createDate'
,
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
false
,
defaultValue
:
app
.
Sequelize
.
literal
(
'CURRENT_TIMESTAMP'
),
field
:
'updateDate'
,
},
},
{
tableName
:
'gjj_status'
,
});
return
gjjStatus
;
};
app/service/order.js
View file @
18b23285
...
...
@@ -21,6 +21,7 @@ class OrderService extends Service {
async
create
(
params
)
{
const
{
ctx
}
=
this
;
await
ctx
.
model
.
TaskStatus
.
create
(
params
);
await
ctx
.
nodemodel
.
GjjStatus
.
create
(
params
);
return
;
}
...
...
config/config.local.js
View file @
18b23285
...
...
@@ -85,6 +85,17 @@ module.exports = () => {
datasources
:
[{
// 东八时区
timezone
:
'+08:00'
,
delegate
:
'nodemodel'
,
baseDir
:
'model/nodegjj'
,
dialect
:
'mysql'
,
host
:
'rm-bp1272001633qc0x9o.mysql.rds.aliyuncs.com'
,
database
:
'nodetest'
,
username
:
'hexin'
,
password
:
'gYUHszn9#q'
,
port
:
3306
,
},
{
// 东八时区
timezone
:
'+08:00'
,
delegate
:
'model'
,
baseDir
:
'model'
,
dialect
:
'mysql'
,
...
...
config/config.prod.js
View file @
18b23285
...
...
@@ -90,11 +90,22 @@ module.exports = () => {
datasources
:
[{
// 东八时区
timezone
:
'+08:00'
,
delegate
:
'nodemodel'
,
baseDir
:
'model/nodegjj'
,
dialect
:
'mysql'
,
host
:
process
.
env
.
MYSQL_PACHONG_HOST
||
'rm-bp1272001633qc0x9.mysql.rds.aliyuncs.com'
,
database
:
process
.
env
.
MYSQL_NODE_SERVER_DB_NAME
||
'node_gjj'
,
username
:
process
.
env
.
MYSQL_USER
||
'hexin'
,
password
:
process
.
env
.
MYSQL_PWD
||
'gYUHszn9#q'
,
port
:
process
.
env
.
MYSQL_PORT
||
3306
,
},
{
// 东八时区
timezone
:
'+08:00'
,
delegate
:
'model'
,
baseDir
:
'model'
,
dialect
:
'mysql'
,
host
:
process
.
env
.
MYSQL_PACHONG_HOST
||
'rm-bp1272001633qc0x9
o
.mysql.rds.aliyuncs.com'
,
database
:
process
.
env
.
MYSQL_DATA_SERVER_DB_NAME
||
'data_service_
dev
'
,
host
:
process
.
env
.
MYSQL_PACHONG_HOST
||
'rm-bp1272001633qc0x9.mysql.rds.aliyuncs.com'
,
database
:
process
.
env
.
MYSQL_DATA_SERVER_DB_NAME
||
'data_service_
pro
'
,
username
:
process
.
env
.
MYSQL_USER
||
'hexin'
,
password
:
process
.
env
.
MYSQL_PWD
||
'gYUHszn9#q'
,
port
:
process
.
env
.
MYSQL_PORT
||
3306
,
...
...
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