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
cb7a1291
Commit
cb7a1291
authored
Sep 03, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
adbf38ca
dd0902a1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
169 additions
and
69 deletions
+169
-69
center-channel/app/base/api/impl/opaction/tmOrder.js
+2
-0
center-channel/app/base/api/impl/trade/brand.js
+32
-0
center-channel/app/base/service/impl/common/gatewaypushlogSve.js
+1
-1
center-channel/app/base/service/impl/common/pushlogSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+83
-39
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+43
-16
center-channel/app/config/routes/api.js
+1
-1
center-channel/app/front/entry/public/apidoc/platform/trademarkReview.md
+6
-11
No files found.
center-channel/app/base/api/impl/opaction/tmOrder.js
View file @
cb7a1291
...
...
@@ -25,6 +25,7 @@ class ProductAPI extends WEBBase {
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
pobj
.
requestId
=
req
.
requestId
;
var
opResult
=
null
;
console
.
log
(
"11111"
,
opResult
)
switch
(
action_type
)
{
case
"tmAccept"
:
//2020 0828 lin 新增 ali商标交易 创建订单接口
opResult
=
await
this
.
utilsOrderSve
.
tmAccept
(
pobj
,
pobj
.
actionBody
);
...
...
@@ -39,6 +40,7 @@ class ProductAPI extends WEBBase {
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
console
.
log
(
opResult
)
return
opResult
;
}
...
...
center-channel/app/base/api/impl/trade/brand.js
0 → 100644
View file @
cb7a1291
let
WEBBase
=
require
(
"../../web.base"
);
let
system
=
require
(
"../../../system"
);
class
brand
extends
WEBBase
{
constructor
()
{
super
();
this
.
utilsNeedSve
=
system
.
getObject
(
"service.utilsSve.utilsNeedSve"
);
}
async
springBoard
(
pobj
,
qobj
,
req
)
{
return
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
let
opResult
=
null
;
switch
(
action_type
)
{
case
"QueryTradeIntentionUserList"
:
// 查询咨询客户列表
let
endtime
=
Date
.
now
();
let
starttime
=
Date
.
now
()
-
30
*
60
*
1000
;
//30分钟(毫秒)
pobj
.
actionBody
=
{
Begin
:
starttime
,
End
:
endtime
};
opResult
=
await
this
.
utilsNeedSve
.
queryTradeIntentionUserList
(
pobj
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
brand
;
\ No newline at end of file
center-channel/app/base/service/impl/common/gatewaypushlogSve.js
View file @
cb7a1291
...
...
@@ -14,7 +14,7 @@ class GatewaypushlogService extends ServiceBase {
var
sql
=
"select * from gateway_pushlog where pushStatus='wts' and pushtimes<4"
var
icloginfos
=
await
this
.
customQuery
(
sql
);
if
(
icloginfos
.
length
>
0
)
{
var
count
=
10
;
var
count
=
10
0
;
if
(
icloginfos
.
length
<
count
)
{
count
=
icloginfos
.
length
;
}
...
...
center-channel/app/base/service/impl/common/pushlogSve.js
View file @
cb7a1291
...
...
@@ -75,7 +75,7 @@ class PushlogService extends ServiceBase {
return
system
.
getResultSuccess
();
}
async
getPublicServiceLogList
()
{
var
sql
=
"SELECT id,appkey,`pushUrl`,pushContent,pushNumber,clientIp FROM `center_channel_public_servicelog` WHERE pushNumber<10 LIMIT
20
0"
;
var
sql
=
"SELECT id,appkey,`pushUrl`,pushContent,pushNumber,clientIp FROM `center_channel_public_servicelog` WHERE pushNumber<10 LIMIT
1
0"
;
var
list
=
await
this
.
pushfaillogDao
.
customQuery
(
sql
);
var
result
=
system
.
getResultSuccess
(
list
);
return
result
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
cb7a1291
...
...
@@ -19,8 +19,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* 提交需求
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
submitNeed
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
intentionBizId
)
{
...
...
@@ -41,6 +41,25 @@ class UtilsNeedService extends AppServiceBase {
pobj
.
actionBody
.
type_name
=
data
.
data
.
type_name
;
pobj
.
actionBody
.
channel_type_code
=
data
.
data
.
channel_type_code
;
pobj
.
actionBody
.
channel_type_name
=
data
.
data
.
channel_type_name
;
if
(
pobj
.
actionBody
.
channel_type_code
==
5
)
{
pobj
.
actionBody
.
type
=
"ali.icp"
;
}
else
{
pobj
.
actionBody
.
type
=
"ali.edi"
;
}
if
(
pobj
.
actionBody
.
description
.
indexOf
(
"#备#"
)
<
0
)
{
pobj
.
actionBody
.
level
=
"A"
;
}
else
{
var
levelurl
=
"http://106.13.228.212:8000/recProbability"
;
var
levelresult
=
await
this
.
restPostUrl
({
intentionBizId
:
pobj
.
actionBody
.
intentionBizId
,
type
:
pobj
.
actionBody
.
type
,
note
:
pobj
.
actionBody
.
description
},
levelurl
);
if
(
levelresult
.
status
==
0
)
{
pobj
.
actionBody
.
level
=
levelresult
.
data
.
level
;
pobj
.
actionBody
.
probability
=
levelresult
.
data
.
per
;
}
else
{
pobj
.
actionBody
.
level
=
"C"
}
}
pobj
.
actionType
=
"submitNeed"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
...
@@ -48,17 +67,17 @@ class UtilsNeedService extends AppServiceBase {
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
}
else
{
if
(
pobj
.
actionBody
.
channel_type_code
==
5
)
{
pobj
.
actionBody
.
type
=
"ali.icp"
;
}
else
{
pobj
.
actionBody
.
type
=
"ali.edi"
;
}
var
reqParams
=
{
actionBody
:
pobj
.
actionBody
,
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"addChance"
);
pobj
.
actionBody
.
description
=
pobj
.
actionBody
.
description
+
" 成交概率:"
+
pobj
.
actionBody
.
level
if
(
pobj
.
actionBody
.
probability
)
{
pobj
.
actionBody
.
description
=
pobj
.
actionBody
.
description
+
"("
+
pobj
.
actionBody
.
probability
+
") "
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedICPBusiness"
);
}
}
...
...
@@ -75,7 +94,7 @@ class UtilsNeedService extends AppServiceBase {
}
var
self
=
this
;
pobj
.
actionType
=
"receiveIcpFeedback"
;
// 2020 0803 lin 修改;
// 2020 0803 lin 修改;
if
(
pobj
.
intentionStatus
)
{
// 如果需求当前字段为5(已关闭)则通知fq
if
(
pobj
.
intentionStatus
==
5
)
{
...
...
@@ -129,7 +148,7 @@ class UtilsNeedService extends AppServiceBase {
/**
* 获取需求详情
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody needNo 需求号
*/
async
getItemByNeedNo
(
pobj
,
actionBody
)
{
...
...
@@ -142,7 +161,7 @@ class UtilsNeedService extends AppServiceBase {
}
/**
* 获取需求详情
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody needNo 需求号
*/
async
getItemByChannelNeedNo
(
pobj
,
actionBody
)
{
...
...
@@ -155,7 +174,7 @@ class UtilsNeedService extends AppServiceBase {
}
/**
* 获取需求详情
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody bizId 渠道方案号
*/
async
getItemByChannelSolutionNo
(
pobj
,
actionBody
)
{
...
...
@@ -168,8 +187,8 @@ class UtilsNeedService extends AppServiceBase {
}
/**
* 关闭需求
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
needClose
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
intentionBizId
)
{
...
...
@@ -187,8 +206,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* icp关闭需求
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
needCloseIcp
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
channelNeedNo
)
{
...
...
@@ -473,8 +492,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* 2020 0827 lin 新增 4.1 用户在公司宝前端提交需求
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
submitIcpIntention
(
pobj
,
actionBody
)
{
// 校验文档上必填字段
...
...
@@ -494,7 +513,7 @@ class UtilsNeedService extends AppServiceBase {
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
// 生成成功 通知ali
if
(
result
.
status
==
0
)
{
if
(
result
.
status
==
0
)
{
var
aliResult
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIcpIntention"
,
reqbody
:
actionBody
,
apiVersion
:
"2019-05-08"
});
console
.
log
(
aliResult
);
}
...
...
@@ -503,8 +522,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* 2020 0827 lin 新增 4.2 需求列表查询
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
queryIntentionList
(
pobj
,
actionBody
)
{
var
aliResult
=
await
self
.
aliclient
.
reqbyget
({
action
:
"QueryIntentionList"
,
reqbody
:
actionBody
,
apiVersion
:
"2019-05-08"
});
...
...
@@ -517,8 +536,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* 2020 0827 lin 新增 4.3 用户需求确认 未测试
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
confirmIcpIntention
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
intentionBizId
)
{
...
...
@@ -534,26 +553,51 @@ class UtilsNeedService extends AppServiceBase {
}
}
async
queryTradeIntentionUserList
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100493"
);
}
if
(
!
pobj
.
actionBody
.
userFeedBack
)
{
return
system
.
getResult
(
null
,
"actionBody.userFeedBack can not be empty,100494"
);
}
// if (!pobj.actionBody.intentionBizId) {
// return system.getResult(null, "actionBody.intentionBizId can not be empty,100493");
// }
// if (!pobj.actionBody.userFeedBack) {
// return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
// }
pobj
.
actionBody
.
data
=
[];
await
this
.
queryByAli
(
pobj
,
1
);
pobj
.
actionType
=
"getUnCreated"
;
let
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
pobj
.
actionBody
=
{
type
:
"tmjy"
};
for
(
let
item
of
result
.
data
){
pobj
.
actionBody
.
intentionBizId
=
item
.
BizId
;
pobj
.
actionBody
.
mobile
=
item
.
Mobile
?
item
.
Mobile
:
""
;
pobj
.
actionBody
.
userName
=
item
.
UserName
?
item
.
UserName
:
""
;
pobj
.
notes
=
`
${
item
.
RegisterNumber
?
"RegisterNumber:"
+
item
.
RegisterNumber
:
""
}${
item
.
Classification
?
"Classification:"
+
item
.
Classification
:
""
}
`
;
let
res
=
await
this
.
submitNeed
(
JSON
.
parse
(
JSON
.
stringify
(
pobj
)),{
intentionBizId
:
item
.
BizId
});
console
.
log
(
res
)
}
return
system
.
getResultSuccess
();
}
else
{
return
system
.
getResultFail
(
result
.
status
,
result
.
msg
);
}
return
system
.
getResultFail
(
res
.
status
,
res
.
msg
);
}
async
queryByAli
(
pobj
,
page
){
let
res
=
await
this
.
aliclient
.
reqbyget
({
action
:
"QueryTradeIntentionUserList"
,
reqbody
:
{
BeginTime
:
pobj
.
actionBody
.
BeginTime
?
pobj
.
actionBody
.
BeginTime
:
""
,
EndTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
BizId
:
pobj
.
actionBody
.
intentionBizId
,
UserFeedBack
:
pobj
.
actionBody
.
userFeedBack
,
PageNum
:
pobj
.
actionBody
.
pageNum
||
1
,
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2019-05-08"
action
:
"QueryTradeIntentionUserList"
,
reqbody
:
{
Begin
:
pobj
.
actionBody
.
Begin
?
pobj
.
actionBody
.
Begin
:
""
,
End
:
pobj
.
actionBody
.
End
?
pobj
.
actionBody
.
End
:
""
,
PageNum
:
page
,
PageSize
:
10
,
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
res
)
return
system
.
getResultSuccess
(
res
);
if
(
res
.
status
==
0
)
{
pobj
.
actionBody
.
data
.
push
(...
res
.
data
.
Data
);
if
(
page
<
res
.
data
.
TotalPageNum
){
await
this
.
queryByAli
(
pobj
,
page
+
1
)
}
}
}
async
testsymq
(
pobj
)
{
var
a
=
null
;
try
{
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
cb7a1291
...
...
@@ -800,15 +800,13 @@ class UtilsOrderService extends AppServiceBase {
async
tmAccept
(
pobj
)
{
// 2020 0828 lin 新增 ali商标交易 创建订单接口
try
{
var
actionBody
=
pobj
.
actionBody
;
actionBody
.
channelItemCode
=
"sbjy"
actionBody
.
quantity
=
1
;
pobj
.
actionType
=
"getProductDetail"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
productItemResult
.
status
!=
0
)
{
return
productItemResult
;
}
productItemResult
.
data
.
price_list
[
0
][
"price"
]
=
actionBody
.
price
;
pobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
var
verifyResult
=
await
this
.
isOrderVerify
(
pobj
,
pobj
.
actionBody
);
if
(
verifyResult
.
status
!=
0
)
{
...
...
@@ -821,32 +819,61 @@ class UtilsOrderService extends AppServiceBase {
pobj
.
actionType
=
"addOrder"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
// console.log(pobj);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
result
.
totalSum
=
actionBody
.
totalSum
;
return
result
;
if
(
result
)
{
var
r
esult
=
{
"errorCode"
:
"
error
"
,
"errorMsg"
:
orderinfo
.
msg
,
"module"
:
{
"order
Id"
:
""
},
"requestId"
:
req
.
requestId
,
"success"
:
fals
e
var
tmR
esult
=
{
"errorCode"
:
"
OK
"
,
"errorMsg"
:
"操作成功"
,
"module"
:
{
"order
Number"
:
result
.
data
.
orderNo
},
"requestId"
:
pobj
.
requestId
,
"success"
:
tru
e
}
return
result
;
console
.
log
(
"utils"
,
tmResult
)
return
tmResult
;
}
}
catch
(
e
)
{
var
result
=
{
"errorCode"
:
"error"
,
"errorMsg"
:
e
,
"module"
:
{
"orderNumber"
:
""
},
"requestId"
:
req
.
requestId
,
"requestId"
:
pobj
.
requestId
,
"success"
:
false
}
return
result
;
}
}
async
tmRefuse
(
pobj
)
{
// 2020 0828 lin 新增 ali商标交易 关闭订单接口
try
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
// 如果返回值正常
if
(
result
.
status
==
0
)
{
var
tmResult
=
{
"errorCode"
:
"OK"
,
"errorMsg"
:
"操作成功"
,
"requestId"
:
pobj
.
requestId
,
"success"
:
true
}
return
tmResult
;
}
var
tmResult
=
{
"errorCode"
:
"error"
,
"errorMsg"
:
result
.
msg
,
"requestId"
:
pobj
.
requestId
,
"success"
:
false
}
return
tmResult
;
}
catch
(
e
)
{
var
result
=
{
"ErrorCode"
:
"error"
,
"ErrorMsg"
:
e
,
"Module"
:
{
"orderNumber"
:
""
},
"RequestId"
:
pobj
.
requestId
,
"Success"
:
false
}
return
result
;
}
}
}
module
.
exports
=
UtilsOrderService
;
center-channel/app/config/routes/api.js
View file @
cb7a1291
...
...
@@ -248,7 +248,7 @@ module.exports = function (app) {
"getNeedListUser"
,
"manualEvaluation"
,
"diagnosisInfo"
,
"check"
,
"enterpriseInfo"
,
"diagnosisDetail"
,
"submitIcpIntention"
,
"queryIntentionList"
,
"confirmIcpIntention"
,
"tmAccept"
,
"tm
Refuse"
,
"tm
Status"
"tmAccept"
,
"tmStatus"
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
...
...
center-channel/app/front/entry/public/apidoc/platform/trademarkReview.md
View file @
cb7a1291
...
...
@@ -161,13 +161,13 @@
"evidenceCon"
:
""
,
// 证据内容 文件
"evidenceSend"
:
""
,
// 送达证据 文件
},
"supData"
:
{
//补充材料
"dir"
:
""
,
// 补充证据目录
"con"
:
""
,
// 补充证据内容
"supData"
:
{
//
N
补充材料
"dir"
:
""
,
//
N
补充证据目录
"con"
:
""
,
//
N
补充证据内容
},
"deliveryStatusName"
:
"待完善材料"
"recDate"
:
""
,
//接单时间
"askforDate"
:
""
//递交时间
"recDate"
:
""
,
//
N
接单时间
"askforDate"
:
""
//
N
递交时间
}
}
```
...
...
@@ -177,12 +177,7 @@
{
"status"
:
0
,
// 0为成功,否则失败
"msg"
:
"success"
,
"data"
:
{
"orderNo"
:
"OT26202002151649kPgs"
,
//订单号
"channelServiceNo"
:
"OT26202002151649kPgs"
,
//渠道服务单号
"channelOrderNo"
:
"OT26202002151649kPgs"
,
//渠道订单号
"channelParams"
:
""
//渠道参数
},
"data"
:
null
,
"requestId"
:
"2f90fad8108b4933bb97c3d978b0fe10"
}
```
...
...
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