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
e802cbd6
Commit
e802cbd6
authored
Mar 05, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
66a59673
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
16 deletions
+43
-16
center-channel/app/base/db/models/common/oplog.js
+2
-5
center-channel/app/base/db/models/common/pushlog.js
+4
-7
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+9
-2
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+26
-1
center-channel/提示编码使用
+2
-1
No files found.
center-channel/app/base/db/models/common/oplog.js
View file @
e802cbd6
...
...
@@ -12,14 +12,11 @@ module.exports = (db, DataTypes) => {
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
logLevel
),
defaultValue
:
"info"
,
},
op
:
DataTypes
.
STRING
,
op
:
DataTypes
.
STRING
(
4000
)
,
content
:
DataTypes
.
STRING
(
5000
),
resultInfo
:
DataTypes
.
TEXT
(
'long'
),
clientIp
:
DataTypes
.
STRING
,
agent
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
},
agent
::
DataTypes
.
STRING
(
500
),
opTitle
:
DataTypes
.
TEXT
,
},
{
paranoid
:
false
,
//假的删除
...
...
center-channel/app/base/db/models/common/pushlog.js
View file @
e802cbd6
...
...
@@ -12,11 +12,11 @@ module.exports = (db, DataTypes) => {
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
logLevel
),
defaultValue
:
"info"
,
},
op
:
DataTypes
.
STRING
,
op
:
DataTypes
.
STRING
(
4000
)
,
content
:
DataTypes
.
TEXT
,
resultInfo
:
DataTypes
.
TEXT
(
'long'
),
returnTypeName
:
DataTypes
.
STRING
,
returnType
:
{
returnTypeName
:
DataTypes
.
STRING
,
returnType
:
{
type
:
DataTypes
.
ENUM
,
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
push_return_type
),
set
:
function
(
val
)
{
...
...
@@ -26,10 +26,7 @@ module.exports = (db, DataTypes) => {
defaultValue
:
"0"
,
},
//数据推送返回结果类型 push_return_type:{"0":"失败","1":"成功"}
clientIp
:
DataTypes
.
STRING
,
agent
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
},
agent
:
DataTypes
.
STRING
(
500
),
opTitle
:
DataTypes
.
STRING
(
500
),
},
{
paranoid
:
false
,
//假的删除
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
e802cbd6
...
...
@@ -418,11 +418,18 @@ class UtilsOrderService extends AppServiceBase {
var
opResult
=
await
this
.
restPostUrl
(
parmas
,
url
);
if
(
opResult
.
status
==
0
)
{
opResult
.
data
.
appInfo
=
{
uapp_id
:
appInfo
.
uapp_id
,
uapp_key
:
appInfo
.
uapp_key
,
app_code
:
appInfo
.
app_code
,
app_name
:
appInfo
.
app_name
};
await
this
.
utilsPushSve
.
pushInfo
(
opResult
.
data
,
"pushBusiness"
);
await
this
.
utilsPushSve
.
pushInfo
(
opResult
.
data
,
"pushOrder"
);
opResult
.
data
.
userInfo
=
{
channel_userid
:
opResult
.
data
.
order_info
.
channelUserId
,
channel_username
:
opResult
.
data
.
order_info
.
channelUserId
,
channel_nickname
:
opResult
.
data
.
order_info
.
channelUserId
};
this
.
utilsPushSve
.
pushInfo
(
opResult
.
data
,
"pushBusiness"
);
this
.
utilsPushSve
.
pushInfo
(
opResult
.
data
,
"pushOrder"
);
}
opResult
.
data
=
null
;
return
opResult
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
e802cbd6
...
...
@@ -5,6 +5,7 @@ const AppServiceBase = require("../../app.base");
class
UtilsPushService
extends
AppServiceBase
{
constructor
()
{
super
();
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
};
async
pushInfo
(
actionBody
,
opType
)
{
var
interface_list
=
actionBody
.
product_info
.
interface_info
;
...
...
@@ -22,6 +23,7 @@ class UtilsPushService extends AppServiceBase {
}
async
reflexAction
(
interface_info
,
pobj
)
{
var
refResult
=
null
;
try
{
if
(
interface_info
.
interface_type
==
"bd"
)
{
if
(
!
interface_info
.
method_name
)
{
return
system
.
getResult
(
null
,
"产品接口参数信息有误,100350"
);
...
...
@@ -35,9 +37,32 @@ class UtilsPushService extends AppServiceBase {
refResult
=
await
invokeObj
[
interface_info
.
method_name
].
apply
(
invokeObj
,
params
);
}
else
if
(
interface_info
.
interface_type
==
"yc"
)
{
if
(
!
interface_info
.
interface_url
)
{
return
system
.
getResult
(
null
,
"产品接口interface_url参数不能为空,100370"
);
}
refResult
=
await
this
.
restPostUrl
(
pobj
,
interface_info
.
interface_url
);
}
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
op
:
"推送的接口信息:"
+
JSON
.
stringify
(
interface_info
),
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
refResult
?
JSON
.
stringify
(
refResult
)
||
""
,
returnType
:
'1'
,
opTitle
:
"数据推送成功"
,
});
return
refResult
;
}
catch
(
e
)
{
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
op
:
"推送的接口信息:"
+
JSON
.
stringify
(
interface_info
),
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
JSON
.
stringify
(
e
.
stack
),
returnType
:
'0'
,
opTitle
:
"数据推送异常"
,
});
}
}
}
module
.
exports
=
UtilsPushService
;
center-channel/提示编码使用
View file @
e802cbd6
已经使用的
编码汇总:
已经使用的
编码汇总:
...
...
@@ -35,3 +35,4 @@
100340
100350
100360
100370
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