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
a855b85a
Commit
a855b85a
authored
Apr 14, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
97af5cb9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
31 deletions
+53
-31
center-channel/app/base/api/impl/opaction/opOrder.js
+16
-10
center-channel/app/base/service/app.base.js
+22
-10
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+6
-6
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
+0
-0
center-channel/app/base/utils/aliyunClient.js
+2
-0
center-channel/app/config/routes/api.js
+2
-2
center-channel/提示编码使用
+5
-3
No files found.
center-channel/app/base/api/impl/opaction/opOrder.js
View file @
a855b85a
...
...
@@ -6,6 +6,7 @@ class ProductAPI extends WEBBase {
super
();
this
.
utilsOpOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOpOrderSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
utilsTmAliyunSve
=
system
.
getObject
(
"service.utilsSve.utilsTmAliyunSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -27,20 +28,25 @@ class ProductAPI extends WEBBase {
pobj
.
requestId
=
req
.
requestId
;
var
opResult
=
null
;
switch
(
action_type
)
{
case
"
closeAliTrademarkApplication"
:
//关闭阿里自主申请actionBody:{product_id:产品id,parentCode:商标申请实例id
}
var
pushInterfaceResult
=
await
this
.
utilsOpOrderSve
.
getProductInterface
(
pobj
,
pobj
.
actionBody
.
product_id
);
case
"
opAliDingInterfaceManage"
:
//操作阿里钉钉接口管理---actionBody:{为阿里需要的参数
}
var
pushInterfaceResult
=
await
this
.
utilsOpOrderSve
.
getProductInterface
(
pobj
.
appInfo
,
pobj
.
product_id
);
if
(
pushInterfaceResult
.
status
!=
0
)
{
pobj
.
actionBody
.
product_info
.
interface_info
=
pushInterfaceResult
.
data
;
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"closeAliTmApply"
,
1
);
return
pushInterfaceResult
;
}
break
;
case
"checkTmNameByAli"
:
//检测商标名称是否合规
var
pushInterfaceResult
=
await
this
.
utilsOpOrderSve
.
getProductInterface
(
pobj
,
pobj
.
actionBody
.
product_id
);
if
(
pushInterfaceResult
.
status
!=
0
)
{
pobj
.
actionBody
.
product_info
.
interface_info
=
pushInterfaceResult
.
data
;
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"closeAliTmApply"
,
1
);
var
interface_list_temp
=
pushInterfaceResult
.
data
.
filter
(
f
=>
f
.
op_type
==
"createAliTmApply"
)
if
(
!
interface_list_temp
||
interface_list_temp
.
length
==
0
)
{
return
system
.
getResult
(
null
,
"暂无【createAliTmApply】的推送配置,100520"
);
}
pobj
.
interface_params
=
interface_list_temp
[
0
].
params
;
opResult
=
await
this
.
utilsTmAliyunSve
.
opAliDingInterfaceManage
(
pobj
);
break
;
// case "checkTmNameByAli"://检测商标名称是否合规
// var pushInterfaceResult = await this.utilsOpOrderSve.getProductInterface(pobj, pobj.actionBody.product_id);
// if (pushInterfaceResult.status != 0) {
// pobj.actionBody.product_info.interface_info = pushInterfaceResult.data;
// this.utilsPushSve.pushBusInfo(pobj, "closeAliTmApply", 1);
// }
// break;
case
"updateContacts"
:
//修改订单联系人
opResult
=
await
this
.
utilsOpOrderSve
.
updateContacts
(
pobj
,
pobj
.
actionBody
);
break
;
...
...
center-channel/app/base/service/app.base.js
View file @
a855b85a
...
...
@@ -81,10 +81,10 @@ class AppServiceBase {
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/
rest
PostUrl"
,
op
:
"service/app.base.js/
exec
PostUrl"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"
推送操作异常->rest
PostUrl"
,
optitle
:
pobj
.
opType
+
"
基类操作异常->exec
PostUrl"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
}
...
...
@@ -161,8 +161,8 @@ class AppServiceBase {
var
opType
=
pobj
.
opType
||
""
;
if
(
result
.
status
!=
0
)
{
this
.
pushlogSve
.
createFailLogDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
result
),
...
...
@@ -175,8 +175,8 @@ class AppServiceBase {
return
result
;
}
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"推送业务类型:"
+
opType
,
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
...
...
@@ -192,13 +192,13 @@ class AppServiceBase {
* @param {*} pobj
* @param {*} result
* @param {*} opTitleDesc
* @param {*} failType 错误类型,1为old-rpc推送失败日志,2为new-rpc推送失败日志,业务处理失败日志
* @param {*} failType 错误类型,1为old-rpc推送失败日志,2为new-rpc推送失败日志,业务处理失败日志
,3为失败日志记录
*/
async
disposePushResultFail
(
pobj
,
result
,
opTitleDesc
,
failType
)
{
//处理失败的结果信息--内部使用
var
opType
=
pobj
.
opType
||
""
;
this
.
pushlogSve
.
createFailLogDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
result
),
...
...
@@ -211,12 +211,24 @@ class AppServiceBase {
return
result
;
}
async
getAliossjavaFileUrl
(
pobj
,
params
)
{
//上传ali oss 文件调用
var
opType
=
pobj
.
opType
||
""
;
try
{
var
aliOssFileInfo
=
await
this
.
execPostUrl
(
params
,
settings
.
aliossjavaUrl
());
if
(
aliOssFileInfo
)
{
if
(
aliOssFileInfo
==
true
)
{
var
fileUrl
=
params
.
filedir
+
"/"
+
params
.
objectName
;
return
system
.
getResultSuccess
(
fileUrl
);
}
this
.
pushlogSve
.
createFailLogDb
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
content
:
JSON
.
stringify
(
params
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
aliOssFileInfo
),
clientIp
:
pobj
.
clientIp
||
""
,
failType
:
3
,
opTitle
:
opType
+
"aliossjava-upload阿里上传文件操作失败->getAliossjavaFileUrl"
,
pushNumber
:
1
});
return
system
.
getResult
(
null
,
"java ali oss upload fail"
);
}
catch
(
e
)
{
this
.
logCtl
.
error
({
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
a855b85a
...
...
@@ -488,13 +488,13 @@ class UtilsOrderService extends AppServiceBase {
// uappId: outTradeInfo[1],
// productId: outTradeInfo.length == 3 ? outTradeInfo[2] : 0
// }
opResult
.
data
=
{
orderNo
:
"TM36202004111014WcFs
"
,
uappId
:
36
,
productId
:
42
};
//
opResult.data = {
// orderNo: "TM36202004142002tEl6
",
//
uappId: 36,
//
productId: 42
//
};
//获取充值业务锁
await
this
.
cacheManager
[
"TlPayLocker"
].
init
(
opResult
.
data
.
orderNo
);
//---测试时放开
//
await this.cacheManager["TlPayLocker"].init(opResult.data.orderNo);//---测试时放开
var
locker
=
await
this
.
cacheManager
[
"TlPayLocker"
].
enter
(
opResult
.
data
.
orderNo
);
if
(
!
locker
||
locker
!=
"1"
)
{
this
.
logCtl
.
info
({
...
...
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
View file @
a855b85a
This diff is collapsed.
Click to expand it.
center-channel/app/base/utils/aliyunClient.js
View file @
a855b85a
...
...
@@ -88,6 +88,8 @@ class aliyunClient {
method
:
'GET'
,
// set the http method, default is GET
headers
:
{},
// set the http request headers
});
console
.
log
(
action
,
"action..........."
);
console
.
log
(
reqbody
,
"reqbody..........."
);
return
system
.
getResultSuccess
(
res
);
}
async
reqCustomByPost
(
obj
,
cbk
)
{
...
...
center-channel/app/config/routes/api.js
View file @
a855b85a
...
...
@@ -109,8 +109,8 @@ module.exports = function (app) {
}
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
var
lst
=
[
"tmConfirm"
,
"getNeedSolutionDetailByUser"
,
"submitIcpProgramme"
,
"submitIcpMaterial"
,
"acceptIcpPartnerNotification"
,
"abolishIcpProgramme"
,
var
lst
=
[
"tmConfirm"
,
"getNeedSolutionDetailByUser"
,
"submitIcpProgramme"
,
"submitIcpMaterial"
,
"acceptIcpPartnerNotification"
,
"abolishIcpProgramme"
,
"addOrder"
,
"getH5PayUrl"
,
"getOrderQrCode"
,
"queryOrderStatus"
,
"getOrderInfo"
,
"getOrderDeliveryInfo"
,
"getOrderDetails"
,
"getOrderDeliveryFlowInfo"
,
"getOrderDeliveryFlowList"
,
"getOrderLogInfo"
,
"updateContacts"
,
"updateTmOrder"
,
"delOrder"
,
"submitProgramme"
,
"getProgrammeListByUser"
,
"getProgrammeInfoByNeedNo"
,
"abolishProgramme"
,
"getAliPayInfo"
...
...
center-channel/提示编码使用
View file @
a855b85a
已经使用的
编码汇总:
已经使用的
编码汇总:
...
...
@@ -49,4 +49,6 @@
100480
100490
100500
100510
\ No newline at end of file
100510
100520
100530
\ No newline at end of file
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