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
aa8bfd4f
Commit
aa8bfd4f
authored
Sep 20, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
a79ae5c0
cab499a8
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
287 additions
and
89 deletions
+287
-89
center-channel/app/base/api/impl/action/patentQuery.js
+1
-0
center-channel/app/base/api/impl/nmaction/name.js
+16
-0
center-channel/app/base/api/impl/payment/paymentApi.js
+3
-3
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+66
-36
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+71
-15
center-channel/app/base/service/impl/utilsSve/utilsTmOrderCallSve.js
+19
-0
center-channel/app/base/utils/aliyunClient.js
+1
-1
center-channel/app/config/settings.js
+15
-0
center-channel/app/front/entry/public/apidoc/patentDesc/patent.md
+72
-0
center-channel/app/front/entry/public/apidoc/paymentDesc/payment.md
+23
-34
No files found.
center-channel/app/base/api/impl/action/patentQuery.js
View file @
aa8bfd4f
...
@@ -46,6 +46,7 @@ class PatentQueryAPI extends WEBBase {
...
@@ -46,6 +46,7 @@ class PatentQueryAPI extends WEBBase {
case
"CommomSearchbyInventor"
:
//根据发明人查询聚合
case
"CommomSearchbyInventor"
:
//根据发明人查询聚合
case
"CommomSearchbyFilingno"
:
//根据申请号查询聚合
case
"CommomSearchbyFilingno"
:
//根据申请号查询聚合
case
"CommomSearchbyPubno"
:
//根据公开号查询聚合
case
"CommomSearchbyPubno"
:
//根据公开号查询聚合
case
"AffairsearchbyFilingno"
:
//根据申请号查询并根据法律状态日期排序
opResult
=
await
this
.
patentSve
.
opReqResult
(
pobj
,
req
);
opResult
=
await
this
.
patentSve
.
opReqResult
(
pobj
,
req
);
break
;
break
;
default
:
default
:
...
...
center-channel/app/base/api/impl/nmaction/name.js
View file @
aa8bfd4f
...
@@ -8,6 +8,7 @@ class NameAPI extends WEBBase{
...
@@ -8,6 +8,7 @@ class NameAPI extends WEBBase{
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
centerCacheUrl
=
settings
.
centerCacheUrl
();
this
.
centerCacheUrl
=
settings
.
centerCacheUrl
();
this
.
aliGetNamesjavaUrl
=
settings
.
aliGetNamesjavaUrl
();
}
}
/**
/**
* 接口跳转-POST请求
* 接口跳转-POST请求
...
@@ -36,6 +37,9 @@ class NameAPI extends WEBBase{
...
@@ -36,6 +37,9 @@ class NameAPI extends WEBBase{
case
"getNameDetail"
:
//详情
case
"getNameDetail"
:
//详情
opResult
=
await
this
.
getNameDetail
(
pobj
);
opResult
=
await
this
.
getNameDetail
(
pobj
);
break
;
break
;
case
"getNames"
:
//详情
opResult
=
await
this
.
getNames
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
@@ -131,6 +135,18 @@ class NameAPI extends WEBBase{
...
@@ -131,6 +135,18 @@ class NameAPI extends WEBBase{
}
}
return
system
.
getResult
(
null
,
'try again'
);
return
system
.
getResult
(
null
,
'try again'
);
}
}
async
getNames
(
pobj
,
actionBody
){
let
rtn
=
await
this
.
restClient
.
execPost
(
actionBody
,
this
.
aliGetNamesjavaUrl
);
if
(
!
rtn
.
stdout
)
{
return
system
.
getResultFail
();
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
)
{
return
system
.
getResultSuccess
(
result
);
}
return
system
.
getResultFail
(
result
);
}
}
}
const
cacheJson
=
{
const
cacheJson
=
{
...
...
center-channel/app/base/api/impl/payment/paymentApi.js
View file @
aa8bfd4f
...
@@ -39,9 +39,9 @@ class PaymentAPI extends WEBBase {
...
@@ -39,9 +39,9 @@ class PaymentAPI extends WEBBase {
case
"queryOrderStatus"
:
//通联支付查询
case
"queryOrderStatus"
:
//通联支付查询
opResult
=
await
this
.
utilsOrderSve
.
queryOrderStatus
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOrderSve
.
queryOrderStatus
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getQrCode"
:
//获取pc端支付二维码--不跟订单关联
//
case "getQrCode"://获取pc端支付二维码--不跟订单关联
opResult
=
await
this
.
utilsOrderSve
.
getQrCode
(
pobj
,
pobj
.
actionBody
);
//
opResult = await this.utilsOrderSve.getQrCode(pobj, pobj.actionBody);
break
;
//
break;
case
"queryOrder"
:
//通联支付查询
case
"queryOrder"
:
//通联支付查询
opResult
=
await
this
.
utilsOrderSve
.
queryOrder
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOrderSve
.
queryOrder
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
aa8bfd4f
...
@@ -51,6 +51,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -51,6 +51,7 @@ class UtilsNeedService extends AppServiceBase {
pobj
.
actionBody
.
type
=
"ali.tmd"
;
pobj
.
actionBody
.
type
=
"ali.tmd"
;
}
}
if
(
pobj
.
actionBody
.
description
.
indexOf
(
"备#"
)
<
0
)
{
if
(
pobj
.
actionBody
.
description
.
indexOf
(
"备#"
)
<
0
)
{
pobj
.
actionBody
.
level
=
"A"
;
pobj
.
actionBody
.
level
=
"A"
;
}
else
{
}
else
{
...
@@ -64,6 +65,10 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -64,6 +65,10 @@ class UtilsNeedService extends AppServiceBase {
}
}
}
}
if
(
pobj
.
actionBody
.
phone
==
"17319425791"
){
pobj
.
actionBody
.
level
=
"F"
;
}
pobj
.
actionType
=
"submitNeed"
;
pobj
.
actionType
=
"submitNeed"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -617,6 +622,10 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -617,6 +622,10 @@ class UtilsNeedService extends AppServiceBase {
async
needBatchUpload
(
pobj
,
actionBody
)
{
async
needBatchUpload
(
pobj
,
actionBody
)
{
var
BizIds
=
""
;
var
BizIds
=
""
;
var
demands
=
[];
var
demands
=
[];
// 声明两个数组 用来走后四步用
var
npobj
=
[];
var
spobj
=
[];
// 遍历生成阿里需求 并把bizId 填充进数组
for
(
var
i
=
0
;
i
<
actionBody
.
demands
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
actionBody
.
demands
.
length
;
i
++
)
{
// 第一步
// 第一步
// 地区转换
// 地区转换
...
@@ -633,29 +642,18 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -633,29 +642,18 @@ class UtilsNeedService extends AppServiceBase {
Channel
:
"gsb"
,
Channel
:
"gsb"
,
Token
:
"gsb"
,
Token
:
"gsb"
,
}
}
// 4.1 提交阿里需求
var
aliResult
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIcpIntention"
,
reqbody
:
obj
,
apiVersion
:
"2019-05-08"
});
var
aliResult
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIcpIntention"
,
reqbody
:
obj
,
apiVersion
:
"2019-05-08"
});
console
.
log
(
"needBatchUpload-aliResult"
,
aliResult
)
console
.
log
(
"needBatchUpload-aliResult"
,
aliResult
)
if
(
aliResult
.
status
!=
0
)
{
// 整合前端需要的数据1
// 统计失败次数
BizIds
+=
aliResult
.
data
.
BizId
+
","
;
}
npobj
.
push
({
// 第二步
"intentionBizId"
:
aliResult
.
data
.
BizId
,
// 创建企服通需求单
"type"
:
this
.
bizTypeChange
(
actionBody
.
demands
[
i
].
type
),
var
objString
=
JSON
.
stringify
(
pobj
);
"description"
:
actionBody
.
demands
[
i
].
description
,
var
npobj
=
JSON
.
parse
(
objString
);
"mobile"
:
actionBody
.
demands
[
i
].
contactMobile
npobj
.
actionBody
=
{
})
intentionBizId
:
aliResult
.
data
.
BizId
,
spobj
.
push
({
type
:
this
.
bizTypeChange
(
actionBody
.
demands
[
i
].
type
),
description
:
actionBody
.
demands
[
i
].
description
,
mobile
:
actionBody
.
demands
[
i
].
contactMobile
}
var
opResult
=
await
this
.
submitNeed
(
npobj
,
npobj
.
actionBody
);
console
.
log
(
"needBatchUpload-opResult"
,
opResult
)
// 第三步
// 提交Icp注册方案
var
sobjString
=
JSON
.
stringify
(
pobj
);
var
spobj
=
JSON
.
parse
(
sobjString
);
spobj
.
actionType
=
"submitIcpProgramme"
;
spobj
.
actionBody
=
{
"needNo"
:
aliResult
.
data
.
BizId
,
//渠道需求号
"needNo"
:
aliResult
.
data
.
BizId
,
//渠道需求号
"solutionContent"
:{
"solutionContent"
:{
// submitIcpProgramme需要的类型转换 ICP许可证 = icpsq/EDI许可证 = edisq
// submitIcpProgramme需要的类型转换 ICP许可证 = icpsq/EDI许可证 = edisq
...
@@ -668,44 +666,63 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -668,44 +666,63 @@ class UtilsNeedService extends AppServiceBase {
"Note"
:
actionBody
.
demands
[
i
].
description
"Note"
:
actionBody
.
demands
[
i
].
description
}
}
}
}
})
if
(
aliResult
.
status
!=
0
)
{
// 统计失败次数
}
}
}
var
subRes
=
await
this
.
qcCenterOrderSve
.
submitIcpProgramme
(
spobj
);
// 判断数据是否符合 执行后四步 的条件
if
(
npobj
.
length
!=
actionBody
.
demands
.
length
||
spobj
.
length
!=
actionBody
.
demands
.
length
)
{
return
system
.
getResultFail
(
-
5018
,
"提交阿里需求失败"
);
}
// 睡3秒 意义:等待阿里异步分配成功。如果不等待则提交方案会失败 无法生成支付链接,需求状态错误
await
this
.
sleep
(
3000
)
// 遍历 执行后面步骤 创建企服需求单(提交方案需要)。提交方案。需求沟通提交
for
(
var
i
=
0
;
i
<
actionBody
.
demands
.
length
;
i
++
)
{
// 第二步
// 创建企服通需求单
var
objString1
=
JSON
.
stringify
(
pobj
);
var
obj1
=
JSON
.
parse
(
objString1
);
obj1
.
actionBody
=
npobj
[
i
];
var
opResult
=
await
this
.
submitNeed
(
obj1
,
obj1
.
actionBody
);
console
.
log
(
"needBatchUpload-opResult"
,
opResult
)
// 第三步
// 提交Icp注册方案
// 程序执行比异步分配需求快,所以写成两个循环
var
objString2
=
JSON
.
stringify
(
pobj
);
var
obj2
=
JSON
.
parse
(
objString2
);
obj2
.
actionType
=
"submitIcpProgramme"
;
obj2
.
actionBody
=
spobj
[
i
];
var
subRes
=
await
this
.
qcCenterOrderSve
.
submitIcpProgramme
(
obj2
);
console
.
log
(
"----------------------------------start"
);
console
.
log
(
"----------------------------------start"
);
console
.
log
(
"needBatchUpload-res"
,
subRes
)
console
.
log
(
"needBatchUpload-res"
,
subRes
)
console
.
log
(
"----------------------------------end"
);
console
.
log
(
"----------------------------------end"
);
// 第四步
// 第四步
// 需求沟通记录接口
// 需求沟通记录接口
var
writeRes
=
await
this
.
writeCommunicationLog
({
actionBody
:{
intentionBizId
:
"20200804200124000001"
,
note
:
"测试反馈"
}});
var
writeRes
=
await
this
.
writeCommunicationLog
({
actionBody
:{
intentionBizId
:
npobj
[
i
].
intentionBizId
,
note
:
"测试反馈"
}});
console
.
log
(
"needBatchUpload-writeRes"
,
writeRes
)
console
.
log
(
"needBatchUpload-writeRes"
,
writeRes
)
// 整合前端需要的数据
// 整合前端需要的数据2
// BizIds.push(aliResult.data.BizId)
BizIds
+=
aliResult
.
data
.
BizId
+
","
;
demands
.
push
({
demands
.
push
({
uniqueCode
:
actionBody
.
demands
[
i
].
uniqueCode
,
uniqueCode
:
actionBody
.
demands
[
i
].
uniqueCode
,
demandCode
:
opResult
.
data
.
needNo
demandCode
:
npobj
[
i
].
intentionBizId
})
})
}
}
BizIds
=
BizIds
.
substr
(
0
,
BizIds
.
length
-
1
);
// 第五步 用户需求确认
// 第五步 用户需求确认
// 首先切割掉BizId最后一位 是,
BizIds
=
BizIds
.
substr
(
0
,
BizIds
.
length
-
1
);
var
aliConfirmResult
=
await
this
.
aliclient
.
reqbyget
({
action
:
"ConfirmIcpIntention"
,
reqbody
:
{
BizIds
:
BizIds
},
apiVersion
:
"2019-05-08"
});
var
aliConfirmResult
=
await
this
.
aliclient
.
reqbyget
({
action
:
"ConfirmIcpIntention"
,
reqbody
:
{
BizIds
:
BizIds
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
"needBatchUpload-aliConfirmResult"
,
aliConfirmResult
)
console
.
log
(
"needBatchUpload-aliConfirmResult"
,
aliConfirmResult
)
// 获取链接失败
// 获取链接失败
if
(
aliConfirmResult
.
status
!=
0
)
{
if
(
aliConfirmResult
.
status
!=
0
)
{
var
res
=
{
paymentLink
:
"www.baidu.com"
,
batchNumber
:
actionBody
.
batchNumber
,
demands
:
demands
}
return
system
.
getResultFail
(
-
5018
,
"confirmIcpIntention fail"
);
return
system
.
getResultFail
(
-
5018
,
"confirmIcpIntention fail"
);
// return system.getResultRedisSuccess(res);
}
}
var
res
=
{
var
res
=
{
paymentLink
:
aliConfirmResult
.
data
.
ConfirmUrl
,
paymentLink
:
aliConfirmResult
.
data
.
ConfirmUrl
,
batchNumber
:
actionBody
.
batchNumber
,
batchNumber
:
actionBody
.
batchNumber
,
demands
:
demands
demands
:
demands
}
}
// 2020 0916 lin 新增返回格式 成功status为1
// 2020 0916 lin 新增返回格式 成功status为1
因为queue判断成功请求的条件为status1
return
system
.
getResultRedisSuccess
(
res
);
return
system
.
getResultRedis
Queue
Success
(
res
);
}
}
async
testsymq
(
pobj
)
{
async
testsymq
(
pobj
)
{
var
a
=
null
;
var
a
=
null
;
...
@@ -808,6 +825,11 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -808,6 +825,11 @@ class UtilsNeedService extends AppServiceBase {
return
"edisq"
return
"edisq"
}
}
}
}
sleep
(
t
)
{
return
new
Promise
(
res
=>
setTimeout
(
res
,
t
))
}
urlSplit
(
url
)
{
urlSplit
(
url
)
{
var
arr
=
url
.
split
(
"?"
)[
1
];
//根据?跟个url
var
arr
=
url
.
split
(
"?"
)[
1
];
//根据?跟个url
var
arr2
=
arr
[
1
].
split
(
"&"
);
//根据&重新分割参数
var
arr2
=
arr
[
1
].
split
(
"&"
);
//根据&重新分割参数
...
@@ -817,6 +839,11 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -817,6 +839,11 @@ class UtilsNeedService extends AppServiceBase {
}
}
return
jsonarr
;
return
jsonarr
;
}
}
// async test() {
// var aliConfirmResult = await this.aliclient.reqbyget({ action: "ConfirmIcpIntention", reqbody: {BizIds:"20200916170117000001,20200916170117000002,20200916170117000003,20200916170118000001,20200916170118000002,20200916170118000003,20200916170119000001,20200916170119000002,20200916170120000001,20200916170120000002,20200916170120000003,20200916170121000001,20200916170121000002,20200916170121000003,20200916170122000001,20200916170122000002,20200916170122000003,20200916170123000001,20200916170123000002"}, apiVersion: "2019-05-08" });
// console.log("needBatchUpload-aliConfirmResult",aliConfirmResult)
// }
// async test1() {
// async test1() {
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
...
@@ -838,4 +865,7 @@ module.exports = UtilsNeedService;
...
@@ -838,4 +865,7 @@ module.exports = UtilsNeedService;
// var a = new UtilsNeedService();
// var a = new UtilsNeedService();
// a.queryTradeIntentionUserList({ actionBody: { intentionBizId: "20200803095203000001", userFeedBack: true } });
// a.queryTradeIntentionUserList({ actionBody: { intentionBizId: "20200803095203000001", userFeedBack: true } });
// var a = new UtilsNeedService();
// a.test();
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
aa8bfd4f
...
@@ -291,27 +291,83 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -291,27 +291,83 @@ class UtilsOrderService extends AppServiceBase {
if
(
payStatus
.
data
&&
payStatus
.
data
.
trxstatus
==
"0000"
)
{
if
(
payStatus
.
data
&&
payStatus
.
data
.
trxstatus
==
"0000"
)
{
//TODO:处理支付成功的业务逻辑
//TODO:处理支付成功的业务逻辑
// payStatus.data.client_ip = obj.client_ip || "";
// this.opPayStatusSuccess
// let attachList = [];
// if (payStatus.data.reqsn.indexOf("_") >= 0) {
// return system.getResultFail(-100130,'订单已支付,请勿重复付款,100130')
// attachList = payStatus.data.reqsn.split("_");
return
system
.
getResultSuccess
(
payStatus
.
data
,
'订单已支付,请勿重复付款,100130'
);
// }
// else {
// attachList.push(payStatus.data.reqsn);
// }
// if (attachList.length != 2) {
// return { -120, msg: "reqsn参数错误,没有_标识" };
// }
// payStatus.data.out_trade_no = attachList[0];
// payStatus.data.company_id = attachList[1];
// return await this.utilstlbankSve.opBackNotify(payStatus.data, "页面回调");
return
system
.
getResultFail
(
-
100130
,
'订单已支付,请勿重复付款,100130'
)
}
}
else
if
(
payStatus
.
data
&&
payStatus
.
data
.
trxstatus
==
"3045"
)
{
else
if
(
payStatus
.
data
&&
payStatus
.
data
.
trxstatus
==
"3045"
)
{
return
system
.
getResultFail
(
-
100170
,
"超时未支付,请刷新页面,100170"
);
return
system
.
getResultFail
(
-
100170
,
"超时未支付,请刷新页面,100170"
);
}
}
return
system
.
getResultFail
(
-
100180
,
"请及时支付,100180"
);
return
system
.
getResultFail
(
-
100180
,
"请及时支付,100180"
);
}
}
async
opPayStatusSuccess
(
parmas
,
client_ip
)
{
//操作回调业务逻辑---查询支付状态为已支付时进行调用
try
{
//日志记录
this
.
logCtl
.
info
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"回调处理订单参数:,method=opPayStatusSuccess"
,
op
:
"service/impl/utilsSve/utilsOrderSve.js/opPayStatusSuccess"
,
content
:
JSON
.
stringify
(
parmas
),
clientIp
:
client_ip
||
""
});
//获取充值业务锁
// await this.cacheManager["TlPayLocker"].init(receiptVoucher.sourceOrderNo);//---测试时放开
var
locker
=
await
this
.
cacheManager
[
"TlPayLocker"
].
enter
(
receiptVoucher
.
sourceOrderNo
);
if
(
!
locker
||
locker
!=
"1"
)
{
this
.
logCtl
.
info
({
appid
:
appInfo
.
uapp_id
,
appkey
:
appInfo
.
uapp_key
,
op
:
"service/impl/utilsSve/utilsOrderSve.js/opPayStatusSuccess"
,
content
:
"参数="
+
JSON
.
stringify
(
parmas
),
clientIp
:
parmas
.
client_ip
||
""
,
optitle
:
"通联回调操作频繁---太频繁了,太频繁了"
});
return
system
.
getResultFail
(
-
200
,
"回调操作频繁---太频繁了,太频繁了"
);
}
if
(
parmas
.
trxcode
==
"VSP501"
)
{
parmas
.
pay_type
=
"wx"
;
}
else
{
parmas
.
pay_type
=
"alipay"
;
}
parmas
.
appInfo
=
appInfo
;
parmas
.
orderNo
=
parmas
.
out_trade_no
;
//修改并返回订单支付状态,创建收款单
var
url
=
this
.
centerOrderUrl
+
"opaction/opPayOrder/receivePayCallBackNotify"
;
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
};
opResult
.
data
.
userInfo
=
{
channel_userid
:
opResult
.
data
.
order_info
.
channelUserId
,
channel_username
:
opResult
.
data
.
order_info
.
channelUserId
,
channel_nickname
:
opResult
.
data
.
order_info
.
channelUserId
};
var
pobj
=
{
appInfo
:
opResult
.
data
.
appInfo
,
actionBody
:
opResult
.
data
}
// this.utilsPushSve.pushBusInfo(opResult.data, "pushOrderBusiness",0);
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"pushOrder"
,
0
);
}
opResult
.
data
=
null
;
return
opResult
;
}
catch
(
e
)
{
await
this
.
cacheManager
[
"TlPayLocker"
].
release
(
parmas
.
out_trade_no
);
this
.
logCtl
.
error
({
optitle
:
"回调处理订单---error异常"
,
op
:
"center-app/app/base/service/impl/utilsSve/utilstlbankSve.js/opBackNotify"
,
content
:
"参数="
+
JSON
.
stringify
(
parmas
)
+
",error:"
+
e
.
stack
,
clientIp
:
client_ip
||
""
});
return
system
.
getResultFail
(
-
200
,
e
.
stack
);
}
}
/**
/**
* 获取pc端支付二维码--不跟订单关联
* 获取pc端支付二维码--不跟订单关联
* @param {*} pobj
* @param {*} pobj
...
...
center-channel/app/base/service/impl/utilsSve/utilsTmOrderCallSve.js
View file @
aa8bfd4f
...
@@ -8,9 +8,28 @@ class UtilsTmOrderCallService extends AppServiceBase {
...
@@ -8,9 +8,28 @@ class UtilsTmOrderCallService extends AppServiceBase {
constructor
()
{
constructor
()
{
super
();
super
();
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
aliUappId
=
settings
.
aliUappId
();
}
}
async
queryTradeProduceList
(
pobj
,
actionBody
)
{
//2020 0907 lin 新增 ali查询 用户确认资料支付尾款,并更新订单状态
async
queryTradeProduceList
(
pobj
,
actionBody
)
{
//2020 0907 lin 新增 ali查询 用户确认资料支付尾款,并更新订单状态
// 1查询渠道/商品为icp/edi的订单已经支付部分款的订单。
// 这里写死 itemCode 和 订单状态
pobj
.
actionBody
.
itemCode
=
"tmjy"
pobj
.
actionBody
.
orderStatus
=
64
pobj
.
actionType
=
"queryVOrderByOrderStatusAndItemCode"
;
pobj
.
appInfo
=
{
uapp_id
:
this
.
aliUappId
}
// 随便填的。因为center-order会校验if (!pobj.userInfo) {
pobj
.
userInfo
=
{
uapp_id
:
this
.
aliUappId
}
var
url
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
res
=
await
this
.
restPostUrl
(
pobj
,
url
);
console
.
log
(
res
);
// 2查询渠道/商品为icp/edi的订单已经支付尾款的订单。
// 3
var
obj
=
{
var
obj
=
{
BuyerStatus
:
11
,
BuyerStatus
:
11
,
PageNum
:
1
,
PageNum
:
1
,
...
...
center-channel/app/base/utils/aliyunClient.js
View file @
aa8bfd4f
...
@@ -53,7 +53,7 @@ class aliyunClient {
...
@@ -53,7 +53,7 @@ class aliyunClient {
reqAliclient
.
apiVersion
=
obj
.
apiVersion
;
reqAliclient
.
apiVersion
=
obj
.
apiVersion
;
}
}
var
res
=
await
reqAliclient
.
request
(
action
,
reqbody
,
{
var
res
=
await
reqAliclient
.
request
(
action
,
reqbody
,
{
timeout
:
3000
,
// default 3000 ms
timeout
:
10000
,
// default 3000 ms 2020 0916 lin修改3000为10000,原因ConfirmIcpIntention BizIds 超过5条会超时
formatAction
:
true
,
// default true, format the action to Action
formatAction
:
true
,
// default true, format the action to Action
formatParams
:
true
,
// default true, format the parameter name to first letter upper case
formatParams
:
true
,
// default true, format the parameter name to first letter upper case
method
:
'GET'
,
// set the http method, default is GET
method
:
'GET'
,
// set the http method, default is GET
...
...
center-channel/app/config/settings.js
View file @
aa8bfd4f
...
@@ -51,6 +51,14 @@ var settings = {
...
@@ -51,6 +51,14 @@ var settings = {
return
"http://aliossjava-service/uploadfile"
;
return
"http://aliossjava-service/uploadfile"
;
}
}
},
},
aliGetNamesjavaUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"192.168.210.240:80/getNames"
;
}
else
{
return
"http://aliossjava-service/getNames"
;
}
},
tmtransactionUrl
:
function
()
{
tmtransactionUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.2.109:8080/uploadfile"
;
return
"http://192.168.2.109:8080/uploadfile"
;
...
@@ -220,6 +228,13 @@ var settings = {
...
@@ -220,6 +228,13 @@ var settings = {
return
"https://m.ucommune.com/"
// 6.29lin修改为测试环境。原因优客 目前还没有正式环境
return
"https://m.ucommune.com/"
// 6.29lin修改为测试环境。原因优客 目前还没有正式环境
}
}
},
},
aliUappId
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
18
// uapp_id
}
else
{
return
18
// uapp_id
}
},
apiconfig
:
{
apiconfig
:
{
opLogUrl
:
function
()
{
opLogUrl
:
function
()
{
return
settings
.
reqEsAddr
()
+
"center_channel_log/_doc?pretty"
;
return
settings
.
reqEsAddr
()
+
"center_channel_log/_doc?pretty"
;
...
...
center-channel/app/front/entry/public/apidoc/patentDesc/patent.md
View file @
aa8bfd4f
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
1.
[
根据申请号查询聚合
](
#CommomSearchbyFilingno
)
1.
[
根据申请号查询聚合
](
#CommomSearchbyFilingno
)
1.
[
根据公开号查询聚合
](
#CommomSearchbyPubno
)
1.
[
根据公开号查询聚合
](
#CommomSearchbyPubno
)
1.
[
根据发明人查询聚合
](
#CommomSearchbyInventor
)
1.
[
根据发明人查询聚合
](
#CommomSearchbyInventor
)
1.
[
根据申请号查询并根据法律状态日期排序
](
#AffairsearchbyFilingno
)
## **<a name="CommomSearchbyApplicant"> 根据申请人查询聚合接口</a>**
## **<a name="CommomSearchbyApplicant"> 根据申请人查询聚合接口</a>**
...
@@ -1073,3 +1074,73 @@
...
@@ -1073,3 +1074,73 @@
}
}
```
```
## **<a name="AffairsearchbyFilingno"> 根据申请号查询并根据法律状态日期排序</a>**
[
返回到目录
](
#menu
)
##### URL
[
/action/patentQuery/AffairsearchbyFilingno
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:AffairsearchbyFilingno
```
javascript
{
"filingno"
:
"201410451887"
//申请号
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"操作成功"
,
"data"
:
{
"total"
:
3
,
"max_score"
:
null
,
"hits"
:
[{
"_index"
:
"bigdata_patent_affair"
,
"_type"
:
"_doc"
,
"_id"
:
"24696710"
,
"_score"
:
null
,
"_source"
:
{
"filing_no"
:
"201410451887"
,
"aff_info"
:
"公开"
,
"aff_date"
:
"2015-01-21"
,
"aff_timestamp"
:
1421816400
,
"aff_status"
:
"公开"
,
"aff_code"
:
"024000"
},
"sort"
:
[
1421798400000
]
},
{
"_index"
:
"bigdata_patent_affair"
,
"_type"
:
"_doc"
,
"_id"
:
"5523865"
,
"_score"
:
null
,
"_source"
:
{
"filing_no"
:
"201410451887"
,
"aff_info"
:
"实质审查的生效"
,
"aff_date"
:
"2015-02-18"
,
"aff_timestamp"
:
1424235600
,
"aff_status"
:
"实质审查的生效"
,
"aff_code"
:
"001000"
},
"sort"
:
[
1424217600000
]
},
{
"_index"
:
"bigdata_patent_affair"
,
"_type"
:
"_doc"
,
"_id"
:
"41352716"
,
"_score"
:
null
,
"_source"
:
{
"filing_no"
:
"201410451887"
,
"aff_info"
:
"授权"
,
"aff_date"
:
"2017-10-10"
,
"aff_timestamp"
:
1507608000
,
"aff_status"
:
"授权"
,
"aff_code"
:
"026000"
},
"sort"
:
[
1507593600000
]
}]
},
"bizmsg"
:
"empty"
}
```
\ No newline at end of file
center-channel/app/front/entry/public/apidoc/paymentDesc/payment.md
View file @
aa8bfd4f
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
获取pc端支付二维码--不跟订单关联
](
#getQrCode
)
1.
[
pc端订单支付二维码生成
](
#getOrderQrCode
)
1.
[
pc端订单支付二维码生成
](
#getOrderQrCode
)
1.
[
pc端查询订单是否支付成功
](
#getOrderQrCode
)
1.
[
获取H5支付链接
](
#getH5PayUrl
)
1.
[
获取H5支付链接
](
#getH5PayUrl
)
## **<a name="get
QrCode"> 获取pc端支付二维码--不跟订单关联
</a>**
## **<a name="get
OrderQrCode"> pc端订单支付二维码生成
</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
##### URL
##### URL
[
/web/payment/paymentApi/springBoard
]
[
/web/payment/paymentApi/springBoard
]
#### 参数格式 `JSON`
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getQrCode
#### 渠道执行的类型 actionType:get
Order
QrCode
```
javascript
```
javascript
{
{
"uapp_id"
:
"1"
,
//平台渠道ID
"orderNo"
:
"TM22202008042050Pmex"
,
//订单号
"order_num"
:
"1"
,
//支付单号
"opType"
:
"wx"
// 支付方式 alipay阿里 wx微信
"total_fee"
:
"1"
,
//支付金额 分
"body_desc"
:
"1"
,
//产品名称
"opType"
:
"1"
,
// 支付方式 alipay阿里 wx微信
}
}
```
```
#### 返回结果
#### 返回结果
```
javascript
```
javascript
{
{
"status"
:
0
,
//0 成功 小于0 失败
"status"
:
0
,
"msg"
:
"SUCCESS
"
,
"msg"
:
"success
"
,
"data"
:
{
"data"
:
{
"payinfo"
:
"https://syb.allinpay.com/apiweb/h5unionpay/native?key=l6lfPuHDErJrTW%2FN7WxSlg4n"
,
//二维码url
"payinfo"
:
"https://syb.allinpay.com/apiweb/h5unionpay/native?key=BMFvrMDcrqzLnJ04YV%2B02uX0"
,
"reqsn"
:
"dfghrtjjn_1"
,
////商户订单号_appid
"reqsn"
:
"qftTM22202008042050Pmex_22"
,
"chnltrxid"
:
"112094120001042656"
,
// 支付渠道交易单号,如支付宝,微信平台的交易单号
"chnltrxid"
:
"122005790000133940"
,
"trxid"
:
"112094120001042656"
,
// 交易单号,平台的交易流水号
"trxid"
:
"122005790000133940"
,
"trxstatus"
:
"0000"
// 交易状态,0000:交易成功、1001:交易不存在、
"trxstatus"
:
"0000"
,
"notify_url"
:
"https://igirl.gongsibao.com/api/tl/zxNotify"
},
},
"requestId"
:
"058244807fff4ab388bbda79afc04b28"
"requestId"
:
"07dedd4ffd4441dcac54c6d8a0f91653"
,
}
"wxPayOrderCode"
:
"122005790000133596"
,
"aliPayOrderCode"
:
"TM22202008042050Pmex"
}
```
```
## **<a name="queryOrderStatus"> pc端查询订单是否支付成功</a>**
## **<a name="getOrderQrCode"> pc端订单支付二维码生成</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
##### URL
##### URL
[
/web/payment/paymentApi/springBoard
]
[
/web/payment/paymentApi/springBoard
]
#### 参数格式 `JSON`
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:
getOrderQrCode
#### 渠道执行的类型 actionType:
queryOrderStatus
```
javascript
```
javascript
{
{
"orderNo"
:
"TM22202008042050Pmex"
,
//订单号
"orderNo"
:
"TM22202008042050Pmex"
,
//订单号
...
@@ -55,23 +54,13 @@
...
@@ -55,23 +54,13 @@
#### 返回结果
#### 返回结果
```
javascript
```
javascript
{
{
"status"
:
0
,
"status"
:
0
,
// 0为成功,否则失败
"msg"
:
"success"
,
"msg"
:
"success"
,
"data"
:
{
"data"
:
null
,
"payinfo"
:
"https://syb.allinpay.com/apiweb/h5unionpay/native?key=BMFvrMDcrqzLnJ04YV%2B02uX0"
,
"requestId"
:
"07dedd4ffd4441dcac54c6d8a0f91653"
"reqsn"
:
"qftTM22202008042050Pmex_22"
,
"chnltrxid"
:
"122005790000133940"
,
"trxid"
:
"122005790000133940"
,
"trxstatus"
:
"0000"
,
"notify_url"
:
"https://igirl.gongsibao.com/api/tl/zxNotify"
},
"requestId"
:
"07dedd4ffd4441dcac54c6d8a0f91653"
,
"wxPayOrderCode"
:
"122005790000133596"
,
"aliPayOrderCode"
:
"TM22202008042050Pmex"
}
}
```
```
## **<a name="getH5PayUrl"> 获取H5支付链接</a>**
## **<a name="getH5PayUrl"> 获取H5支付链接</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
##### URL
##### URL
...
...
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