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
badda67a
Commit
badda67a
authored
Apr 28, 2020
by
sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 完善商机接口
parent
66a8cfb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
46 deletions
+74
-46
center-channel/app/base/api/impl/opaction/fgbusinesschance.js
+4
-7
center-channel/app/base/service/impl/utilsSve/utilsFgbusinesschanceSve.js
+70
-39
No files found.
center-channel/app/base/api/impl/opaction/fgbusinesschance.js
View file @
badda67a
...
...
@@ -39,19 +39,16 @@ class FgbusinesschanceAPI extends WEBBase {
case
"getCompanyLabel"
:
// 三十秒认知客户--ok
opResult
=
await
this
.
utilsFgbusinesschancSve
.
getCompanyLabel
(
pobj
,
pobj
.
actionBody
);
break
case
"getProductServiceLabel"
:
// 获取产品服务标签--TODO:模拟
opResult
=
await
this
.
utilsFgbusinesschancSve
.
getProductServiceLabel
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getRecommendProducts"
:
// 获取推荐产品列表--TODO:模拟
case
"getRecommendProducts"
:
// 获取推荐产品列表
opResult
=
await
this
.
utilsFgbusinesschancSve
.
getRecommendProducts
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getTalkContent"
:
// 获取营销话术
--TODO:模拟
case
"getTalkContent"
:
// 获取营销话术
opResult
=
await
this
.
utilsFgbusinesschancSve
.
getTalkContent
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getOldOrder"
:
// 获取已购产品
--TODO:模拟
case
"getOldOrder"
:
// 获取已购产品
opResult
=
await
this
.
utilsFgbusinesschancSve
.
getOldOrder
(
pobj
,
pobj
.
actionBody
);
break
;
case
"updateStatus"
:
//更新商机跟进状态
TODO:模拟
case
"updateStatus"
:
//更新商机跟进状态
opResult
=
await
this
.
utilsFgbusinesschancSve
.
updateStatus
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getMoreInfoUrl"
:
// 更多客户信息链接地址--TODO:模拟
...
...
center-channel/app/base/service/impl/utilsSve/utilsFgbusinesschanceSve.js
View file @
badda67a
...
...
@@ -57,8 +57,9 @@ class UtilsFgbusinesschancService extends AppServiceBase {
company_name
:
actionBody
.
companyName
}
var
result
=
await
this
.
restPostWithHValueUrl
(
reqParam
,
url
);
if
(
result
.
code
!=
200
)
{
return
system
.
getResult
(
null
,
result
.
message
||
"req is error"
);
let
code
=
result
.
code
||
result
.
status
if
(
code
!==
200
&&
code
!==
0
)
{
return
system
.
getResult
(
null
,
result
.
message
||
result
.
msg
||
"req is error"
);
}
return
system
.
getResultSuccess
(
result
.
data
);
}
...
...
@@ -67,41 +68,47 @@ class UtilsFgbusinesschancService extends AppServiceBase {
if
(
!
actionBody
.
businessId
)
{
return
system
.
getResult
(
null
,
"actionBody.businessId can not be empty,100290"
);
}
return
system
.
getResultSuccess
([
{
"accountId"
:
"客户ID"
,
"recommendId"
:
"00000001"
,
//推荐唯一码
"typeName"
:
"知识产权"
,
//推荐类型
"productName"
:
"软件著作权"
,
//推荐产品
"buyRate"
:
"80%"
//购买概率
},
{
"accountId"
:
"客户ID"
,
"recommendId"
:
"00000001"
,
//推荐唯一码
"typeName"
:
"知识产权"
,
//推荐类型
"productName"
:
"软件著作权"
,
//推荐产品
"buyRate"
:
"80%"
//购买概率
}
]);
var
url
=
settings
.
entProfileUrl
()
+
"api/businessProduct"
;
var
reqParam
=
{
bussines_id
:
actionBody
.
businessId
}
var
result
=
await
this
.
restPostWithHValueUrl
(
reqParam
,
url
);
let
code
=
result
.
code
||
result
.
status
if
(
code
!==
200
&&
code
!==
0
)
{
return
system
.
getResult
(
null
,
result
.
message
||
result
.
msg
||
"req is error"
);
}
return
system
.
getResultSuccess
(
result
.
data
);
}
async
getOldOrder
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
companyName
)
{
return
system
.
getResult
(
null
,
"actionBody.companyName can not be empty,100290"
);
}
return
system
.
getResultSuccess
([{
"source"
:
"阿里云"
,
//购买渠道
"productName"
:
"公司注册"
,
//购买产品名称
"orderAmount"
:
680
,
//订单金额
"createTime"
:
"2019-12-12"
,
//购买日期
"statusName"
:
"已完成"
//购买状态名称
},
{
"source"
:
"阿里云"
,
//购买渠道
"productName"
:
"公司注册"
,
//购买产品名称
"orderAmount"
:
680
,
//订单金额
"createTime"
:
"2019-12-12"
,
//购买日期
"statusName"
:
"已完成"
//购买状态名称
}]);
actionBody
.
companyName
=
await
this
.
getConvertSemiangleStr
(
actionBody
.
companyName
);
var
url
=
settings
.
entProfileUrl
()
+
"behavior"
;
var
reqParam
=
{
company_name
:
actionBody
.
companyName
}
var
result
=
await
this
.
restPostWithHValueUrl
(
reqParam
,
url
);
let
code
=
result
.
code
||
result
.
status
if
(
code
!==
200
&&
code
!==
0
)
{
return
system
.
getResult
(
null
,
result
.
message
||
result
.
msg
||
"req is error"
);
}
let
data
=
[];
if
(
Array
.
isArray
(
result
.
data
))
{
for
(
let
val
of
result
.
data
)
{
data
.
push
({
"source"
:
val
.
source
,
//购买渠道
"productName"
:
val
.
goods_name
,
//购买产品名称
"orderAmount"
:
val
.
contract_amount
,
//订单金额
"createTime"
:
val
.
purchase_date
,
//购买日期
"companyName"
:
val
.
company_name
,
"statusName"
:
"已完成"
//购买状态名称
});
}
}
return
system
.
getResultSuccess
(
data
);
}
async
updateStatus
(
pobj
,
actionBody
)
{
...
...
@@ -117,26 +124,50 @@ class UtilsFgbusinesschancService extends AppServiceBase {
if
(
!
actionBody
.
userId
)
{
return
system
.
getResult
(
null
,
"actionBody.userId can not be empty,100290"
);
}
return
system
.
getResultSuccess
();
var
url
=
settings
.
entProfileUrl
()
+
"gsb/api/tj_rec_status"
;
var
reqParam
=
{
recommendId
:
actionBody
.
recommendId
,
stateName
:
actionBody
.
statusName
}
var
result
=
await
this
.
restPostWithHValueUrl
(
reqParam
,
url
);
let
code
=
result
.
code
||
result
.
status
if
(
code
!==
200
&&
code
!==
0
)
{
return
system
.
getResult
(
null
,
result
.
message
||
result
.
msg
||
"req is error"
);
}
return
system
.
getResultSuccess
(
result
.
data
);
}
async
getTalkContent
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
recommendId
)
{
return
system
.
getResult
(
null
,
"actionBody.recommendId can not be empty,100290"
);
}
return
system
.
getResultSuccess
([
"老板,您好,我是公司宝XXX,我们是阿里云(钉钉)的战略合作伙伴。"
,
"首先非常感谢您在阿里云(钉钉)上购买了商标注册服务,您的商标正在办理过程中,在办理过程中您有任何问题和需求,都可以随时与公司宝联系,您可以关注我们的服务号,我们会随时推送您的商标申请进度反馈给您。
\
r
\
n另外,由于商标申请驳回率较高,目前接近50%,公司宝现推出商标驳回宝产品套餐,针对像您这样已经购买商标注册的客户,您只需加+500元,即送送驳回复审提交服务(不含官费750元及举证撰写费1500元起),确保您的商标在驳回的第一时间我们即会自动向商评委提交驳回复审申请,避免耽误您的驳回复审提交时间。后续您还有三个月的时间搜集整理举证证据,时间也是非常充足,目前公司宝针对阿里云(钉钉)的客户给予特价优惠,购买该项服务仅需258元,优惠幅度高达50%,您看您是否需要?"
,
"question:你们公司宝与阿里(钉钉)什么关系?---
\
nanswer:我们公司宝主体是汉唐信通(北京)咨询股份有限公司,致力于企业全生命周期的一站式服务平台。阿里(钉钉)在全国甄选优质合作伙伴时独占鳌头,成为阿里(钉钉)的直营合作伙伴。|
\
nquestion:你们的驳回宝的优势是什么?---
\
nanswer:在商标接收到驳回通知后,专家老师及时分析案件情况;与您沟通商标使用情况等细节问题;出具复审的方案,并及时整理材料进行复审操作。提交后三个月内辅助您整理收集各类证据,专业的律师团队撰写案件理由,积极复审,使复审的成功率更高。|
\
nquestion:价格能便宜点吗?---
\
nanswer:您好,因为我们目前这个驳回宝套餐,已经是优惠后的特价产品;我们负责做这件事的团队都是层层考试竞选出来的,有多年专业经验的老师负责方案分析、材料整理、律师撰写等等。我们打造的是专业,靠谱;而不是随便收您点钱,事情没好好办,走个过程。相信您做公司也能明白这个道理,专人专岗跟一个人干百样工作,他的专注度和专业性肯定不一样的;相信您复审,肯定和我们的目标是一致的,我们都是希望这个商标能注册下来的。|
\
nquestion:你们有多大把握能帮我复审成功?---
\
nanswer:您好,首先拿到案件,我们会成立专家小组给您进行专业性的案件分析。然后,我们与您沟通商标的具体使用情况及哪些可以做为复审证据等综合情况。之后,专家团队会出具本商标的具体复审实施方案。在律师撰写案件理由时,肯定也是放大我们的优势,尽力为您争取。但是由于驳回复审,是商标评审委员会的老师人为审理,也和商标注册一样,可能带有自己的主观判断;所以驳回复审也没有人敢承诺100%,我们能保证的是尽最大努力,认认真真做事,帮您争取拿下商标。|"
,
"推荐成功结束语:好的,老板,很高兴您选择这款套餐,我马上帮您系统生成订单,您后续登录IC并进行付款即可。您也可以同步关注我们的服务号,我们会随时推送您的商标申请进度反馈给您。
\
r
\
n不成功结束语:好的,老板,公司宝有公司注册、财税代理、知识产权、行业资质认证、薪 税服务、公司交易多达三百余项产品,贵公司在业务开展过程中,如果有其他上述的服务需求,随时欢迎找我们。感谢您的支持。(也可以继续推荐其他套餐)"
]);
var
url
=
settings
.
entProfileUrl
()
+
"api/talking"
;
var
reqParam
=
{
recommendId
:
actionBody
.
recommendId
}
var
result
=
await
this
.
restPostWithHValueUrl
(
reqParam
,
url
);
let
code
=
result
.
code
||
result
.
status
if
(
code
!==
200
&&
code
!==
0
)
{
return
system
.
getResult
(
null
,
result
.
message
||
result
.
msg
||
"req is error"
);
}
return
system
.
getResultSuccess
(
result
.
data
);
}
async
getMoreInfoUrl
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
companyName
)
{
return
system
.
getResult
(
null
,
"actionBody.companyName can not be empty,100290"
);
}
// var url = settings.entProfileUrl() + "?";
// var reqParam = {
// companyName: actionBody.companyName
// }
// var result = await this.restPostWithHValueUrl(reqParam, url);
// let code = result.code || result.status
// if (code !== 200 && code !== 0) {
// return system.getResult(null, result.message || result.msg || "req is error");
// }
// return system.getResultSuccess(result.data);
return
system
.
getResultSuccess
({
url
:
"https://www.gongsibao.com"
})
...
...
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