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
6220b6f0
Commit
6220b6f0
authored
May 21, 2020
by
sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add 商机类型
parent
540b1334
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
4 deletions
+35
-4
center-channel/app/base/service/impl/utilsSve/utilsFgbusinesschanceSve.js
+16
-3
center-channel/app/base/system.js
+14
-0
center-channel/app/front/entry/public/apidoc/platform/fgbusinesschance.md
+5
-1
No files found.
center-channel/app/base/service/impl/utilsSve/utilsFgbusinesschanceSve.js
View file @
6220b6f0
...
...
@@ -19,6 +19,9 @@ class UtilsFgbusinesschancService extends AppServiceBase {
if
(
!
actionBody
.
businessData
)
{
return
system
.
getResult
(
null
,
"actionBody.businessData can not be empty,100290"
);
}
if
(
!
actionBody
.
businessType
)
{
return
system
.
getResult
(
null
,
"actionBody.businessType can not be empty,100290"
);
}
if
(
!
Array
.
isArray
(
actionBody
.
businessData
))
{
return
system
.
getResult
(
null
,
"actionBody.businessData should be Array,100290"
);
}
...
...
@@ -31,7 +34,10 @@ class UtilsFgbusinesschancService extends AppServiceBase {
var
tmpPobj
=
{
appInfo
:
pobj
.
appInfo
,
actionType
:
"create"
,
actionBody
:
item
actionBody
:
{
...
item
,
businessType
:
actionBody
.
businessType
}
}
var
tmpResult
=
await
self
.
restPostUrl
(
tmpPobj
,
reqUrl
);
if
(
tmpResult
.
status
==
0
)
{
...
...
@@ -93,16 +99,23 @@ class UtilsFgbusinesschancService extends AppServiceBase {
if
(
!
actionBody
.
businessId
)
{
return
system
.
getResult
(
null
,
"actionBody.businessId can not be empty,100290"
);
}
if
(
!
actionBody
.
businessType
)
{
return
system
.
getResult
(
null
,
"actionBody.businessType can not be empty,100290"
);
}
if
(
!
[
"复购算法"
,
"关联推荐"
,
"智能监测"
].
includes
(
actionBody
.
businessType
))
{
return
system
.
getResult
(
null
,
"actionBody.businessType don't compliance,100290"
);
}
var
url
=
settings
.
entProfileUrl
()
+
"api/businessProduct"
;
var
reqParam
=
{
bussines_id
:
actionBody
.
businessId
bussines_id
:
actionBody
.
businessId
,
businessType
:
actionBody
.
businessType
}
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
.
getResult
Success
(
result
.
data
);
return
system
.
getResult
CustomSuccess
(
actionBody
.
businessType
===
"智能监测"
?
{
data
:
result
.
data
,
survey_reason
:
result
.
survey_reason
}
:
{
data
:
result
.
data
}
);
}
async
getOldOrder
(
pobj
,
actionBody
)
{
...
...
center-channel/app/base/system.js
View file @
6220b6f0
...
...
@@ -172,6 +172,20 @@ class System {
data
:
data
||
null
,
};
}
/**
* 请求返回成功 自定义
* @param {*} data 操作成功返回的数据
* @param {*} okmsg 操作成功的描述
*/
static
getResultCustomSuccess
(
data
,
okmsg
=
"success"
)
{
return
{
status
:
0
,
msg
:
okmsg
,
...
data
};
}
/**
* 请求返回失败
* @param {*} status 操作失败状态,默认为-1
...
...
center-channel/app/front/entry/public/apidoc/platform/fgbusinesschance.md
View file @
6220b6f0
...
...
@@ -296,7 +296,8 @@
{
"actionType":"getRecommendProducts",
actionBody:{
businessId:"商机Id"
businessId:"商机Id",
businessType:"复购算法" // 复购算法、关联推荐、智能监测
}
}
```
...
...
@@ -307,6 +308,9 @@
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"survey_reason":[
{'change_item': '住所', 'change_time': '2020-03-24', 'change_text': '【北京市海淀区巨山路78号院209室】变更为【北京市海淀区信息路28号1幢10层1003-12室】'}
] // 备注 : 只有类型 智能监测 该字段才出现
"data":[{
"accountId":"客户ID",
"recommendId": "00000001",//推荐唯一码
...
...
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