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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
30 deletions
+57
-30
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
+40
-15
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) => {
...
@@ -12,14 +12,11 @@ module.exports = (db, DataTypes) => {
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
logLevel
),
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
logLevel
),
defaultValue
:
"info"
,
defaultValue
:
"info"
,
},
},
op
:
DataTypes
.
STRING
,
op
:
DataTypes
.
STRING
(
4000
)
,
content
:
DataTypes
.
STRING
(
5000
),
content
:
DataTypes
.
STRING
(
5000
),
resultInfo
:
DataTypes
.
TEXT
(
'long'
),
resultInfo
:
DataTypes
.
TEXT
(
'long'
),
clientIp
:
DataTypes
.
STRING
,
clientIp
:
DataTypes
.
STRING
,
agent
:
{
agent
::
DataTypes
.
STRING
(
500
),
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
},
opTitle
:
DataTypes
.
TEXT
,
opTitle
:
DataTypes
.
TEXT
,
},
{
},
{
paranoid
:
false
,
//假的删除
paranoid
:
false
,
//假的删除
...
...
center-channel/app/base/db/models/common/pushlog.js
View file @
e802cbd6
...
@@ -12,11 +12,11 @@ module.exports = (db, DataTypes) => {
...
@@ -12,11 +12,11 @@ module.exports = (db, DataTypes) => {
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
logLevel
),
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
logLevel
),
defaultValue
:
"info"
,
defaultValue
:
"info"
,
},
},
op
:
DataTypes
.
STRING
,
op
:
DataTypes
.
STRING
(
4000
)
,
content
:
DataTypes
.
TEXT
,
content
:
DataTypes
.
TEXT
,
resultInfo
:
DataTypes
.
TEXT
(
'long'
),
resultInfo
:
DataTypes
.
TEXT
(
'long'
),
returnTypeName
:
DataTypes
.
STRING
,
returnTypeName
:
DataTypes
.
STRING
,
returnType
:
{
returnType
:
{
type
:
DataTypes
.
ENUM
,
type
:
DataTypes
.
ENUM
,
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
push_return_type
),
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
push_return_type
),
set
:
function
(
val
)
{
set
:
function
(
val
)
{
...
@@ -26,10 +26,7 @@ module.exports = (db, DataTypes) => {
...
@@ -26,10 +26,7 @@ module.exports = (db, DataTypes) => {
defaultValue
:
"0"
,
defaultValue
:
"0"
,
},
//数据推送返回结果类型 push_return_type:{"0":"失败","1":"成功"}
},
//数据推送返回结果类型 push_return_type:{"0":"失败","1":"成功"}
clientIp
:
DataTypes
.
STRING
,
clientIp
:
DataTypes
.
STRING
,
agent
:
{
agent
:
DataTypes
.
STRING
(
500
),
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
},
opTitle
:
DataTypes
.
STRING
(
500
),
opTitle
:
DataTypes
.
STRING
(
500
),
},
{
},
{
paranoid
:
false
,
//假的删除
paranoid
:
false
,
//假的删除
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
e802cbd6
...
@@ -418,11 +418,18 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -418,11 +418,18 @@ class UtilsOrderService extends AppServiceBase {
var
opResult
=
await
this
.
restPostUrl
(
parmas
,
url
);
var
opResult
=
await
this
.
restPostUrl
(
parmas
,
url
);
if
(
opResult
.
status
==
0
)
{
if
(
opResult
.
status
==
0
)
{
opResult
.
data
.
appInfo
=
{
opResult
.
data
.
appInfo
=
{
uapp_id
:
appInfo
.
uapp_id
,
uapp_key
:
appInfo
.
uapp_key
,
app_code
:
appInfo
.
app_code
,
app_code
:
appInfo
.
app_code
,
app_name
:
appInfo
.
app_name
app_name
:
appInfo
.
app_name
};
};
await
this
.
utilsPushSve
.
pushInfo
(
opResult
.
data
,
"pushBusiness"
);
opResult
.
data
.
userInfo
=
{
await
this
.
utilsPushSve
.
pushInfo
(
opResult
.
data
,
"pushOrder"
);
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
;
opResult
.
data
=
null
;
return
opResult
;
return
opResult
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
e802cbd6
...
@@ -5,6 +5,7 @@ const AppServiceBase = require("../../app.base");
...
@@ -5,6 +5,7 @@ const AppServiceBase = require("../../app.base");
class
UtilsPushService
extends
AppServiceBase
{
class
UtilsPushService
extends
AppServiceBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
};
};
async
pushInfo
(
actionBody
,
opType
)
{
async
pushInfo
(
actionBody
,
opType
)
{
var
interface_list
=
actionBody
.
product_info
.
interface_info
;
var
interface_list
=
actionBody
.
product_info
.
interface_info
;
...
@@ -18,26 +19,50 @@ class UtilsPushService extends AppServiceBase {
...
@@ -18,26 +19,50 @@ class UtilsPushService extends AppServiceBase {
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
const
element
=
interface_list_temp
[
index
];
const
element
=
interface_list_temp
[
index
];
var
refOpResult
=
this
.
reflexAction
(
element
,
actionBody
);
var
refOpResult
=
this
.
reflexAction
(
element
,
actionBody
);
}
}
}
}
async
reflexAction
(
interface_info
,
pobj
)
{
async
reflexAction
(
interface_info
,
pobj
)
{
var
refResult
=
null
;
var
refResult
=
null
;
if
(
interface_info
.
interface_type
==
"bd"
)
{
try
{
if
(
!
interface_info
.
method_name
)
{
if
(
interface_info
.
interface_type
==
"bd"
)
{
return
system
.
getResult
(
null
,
"产品接口参数信息有误,100350"
);
if
(
!
interface_info
.
method_name
)
{
}
//操作的方法名称
return
system
.
getResult
(
null
,
"产品接口参数信息有误,100350"
);
var
invokeObj
=
system
.
getObject
(
interface_info
.
interface_url
);
}
//操作的方法名称
if
(
!
invokeObj
[
interface_info
.
method_name
])
{
var
invokeObj
=
system
.
getObject
(
interface_info
.
interface_url
);
return
system
.
getResult
(
null
,
"产品接口参数方法信息有误,100360"
);
if
(
!
invokeObj
[
interface_info
.
method_name
])
{
return
system
.
getResult
(
null
,
"产品接口参数方法信息有误,100360"
);
}
pobj
.
interface_params
=
interface_info
.
params
;
var
params
=
[
pobj
];
refResult
=
await
invokeObj
[
interface_info
.
method_name
].
apply
(
invokeObj
,
params
);
}
}
pobj
.
interface_params
=
interface_info
.
params
;
else
if
(
interface_info
.
interface_type
==
"yc"
)
{
var
params
=
[
pobj
];
if
(
!
interface_info
.
interface_url
)
{
refResult
=
await
invokeObj
[
interface_info
.
method_name
].
apply
(
invokeObj
,
params
);
return
system
.
getResult
(
null
,
"产品接口interface_url参数不能为空,100370"
);
}
}
else
if
(
interface_info
.
interface_type
==
"yc"
)
{
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
:
"数据推送异常"
,
});
}
}
return
refResult
;
}
}
}
}
module
.
exports
=
UtilsPushService
;
module
.
exports
=
UtilsPushService
;
center-channel/提示编码使用
View file @
e802cbd6
已经使用的
编码汇总:
已经使用的
编码汇总:
...
@@ -35,3 +35,4 @@
...
@@ -35,3 +35,4 @@
100340
100340
100350
100350
100360
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