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
c9a8a2e4
Commit
c9a8a2e4
authored
Sep 07, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
needinfo
parent
2384d5a9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
0 deletions
+110
-0
gsb-marketplat-mag/app/base/api/impl/action/template.js
+4
-0
gsb-marketplat-mag/app/base/controller/impl/aggregation/needinfoCtl.js
+10
-0
gsb-marketplat-mag/app/base/db/models/aggregation/needinfo.js
+43
-0
gsb-marketplat-mag/app/base/service/impl/aggregation/needinfoSve.js
+50
-0
gsb-marketplat-mag/app/config/settings.js
+3
-0
No files found.
gsb-marketplat-mag/app/base/api/impl/action/template.js
View file @
c9a8a2e4
...
@@ -11,6 +11,7 @@ class Template extends APIBase {
...
@@ -11,6 +11,7 @@ class Template extends APIBase {
this
.
templatelinkSve
=
system
.
getObject
(
"service.template.templatelinkSve"
);
this
.
templatelinkSve
=
system
.
getObject
(
"service.template.templatelinkSve"
);
this
.
formsubmitrecordSve
=
system
.
getObject
(
"service.configmag.formsubmitrecordSve"
);
this
.
formsubmitrecordSve
=
system
.
getObject
(
"service.configmag.formsubmitrecordSve"
);
this
.
forminfoSve
=
system
.
getObject
(
"service.configmag.forminfoSve"
);
this
.
forminfoSve
=
system
.
getObject
(
"service.configmag.forminfoSve"
);
this
.
needinfoSve
=
system
.
getObject
(
"service.aggregation.needinfoSve"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
formCache
=
{};
this
.
formCache
=
{};
}
}
...
@@ -53,6 +54,9 @@ class Template extends APIBase {
...
@@ -53,6 +54,9 @@ class Template extends APIBase {
case
"pushMarketplatFormInfo2Fq"
:
//推送需求表单信息至蜂擎
case
"pushMarketplatFormInfo2Fq"
:
//推送需求表单信息至蜂擎
opResult
=
await
this
.
formsubmitrecordSve
.
pushMarketplatFormInfo2Fq
(
pobj
.
actionBody
);
opResult
=
await
this
.
formsubmitrecordSve
.
pushMarketplatFormInfo2Fq
(
pobj
.
actionBody
);
break
;
break
;
case
"pushAggregationNeedInfo2fq"
:
opResult
=
await
this
.
needinfoSve
.
pushAggregationNeedInfo2fq
(
pobj
.
actionBody
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
gsb-marketplat-mag/app/base/controller/impl/aggregation/needinfoCtl.js
0 → 100644
View file @
c9a8a2e4
var
system
=
require
(
"../../../system"
)
var
settings
=
require
(
"../../../../config/settings"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
var
cacheBaseComp
=
null
;
class
NeedinfoCtl
extends
CtlBase
{
constructor
()
{
super
(
"aggregation"
,
CtlBase
.
getServiceName
(
NeedinfoCtl
));
}
}
module
.
exports
=
NeedinfoCtl
;
gsb-marketplat-mag/app/base/db/models/aggregation/needinfo.js
0 → 100644
View file @
c9a8a2e4
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
const
submit_type
=
{
"1"
:
"页面"
,
"2"
:
"弹窗"
};
/**
* 表单信息表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"needinfo"
,
{
product_type_code
:
DataTypes
.
STRING
,
//产品类型编码
product_type_name
:
DataTypes
.
STRING
,
//产品类型名称
submit_type_name
:
DataTypes
.
STRING
,
//提交方式名称
submit_type
:{
type
:
DataTypes
.
STRING
(
60
),
set
:
function
(
val
)
{
this
.
setDataValue
(
"submit_type"
,
val
);
this
.
setDataValue
(
"submit_type_name"
,
submit_type
[
val
]);
}
},
channel_code
:
DataTypes
.
STRING
,
//渠道编码
channel_name
:
DataTypes
.
STRING
,
//渠道名称
page_code
:
DataTypes
.
STRING
,
//页面编码
page_name
:
DataTypes
.
STRING
,
//页面名称
contact_mobile
:
DataTypes
.
STRING
,
//联系电话
contact_name
:
DataTypes
.
STRING
,
//联系人
original_need
:
DataTypes
.
STRING
,
//原始需求
region
:
DataTypes
.
STRING
,
//地区
business_id
:
DataTypes
.
STRING
,
//云服产品id
push_status
:
DataTypes
.
INTEGER
,
notes
:
DataTypes
.
STRING
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
tableName
:
'mc_need_info'
,
validate
:
{},
indexes
:
[
]
});
}
gsb-marketplat-mag/app/base/service/impl/aggregation/needinfoSve.js
0 → 100644
View file @
c9a8a2e4
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
NeedinfoService
extends
ServiceBase
{
constructor
()
{
super
(
"aggregation"
,
ServiceBase
.
getDaoName
(
NeedinfoService
));
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
}
//推送聚合页需求至蜂擎
async
pushAggregationNeedInfo2fq
(
ab
){
if
(
!
ab
||
!
ab
.
id
){
return
;
}
var
needinfo
=
await
this
.
dao
.
model
.
findOne
({
where
:{
id
:
ab
.
id
,
push_status
:
0
},
raw
:
true
});
if
(
!
needinfo
||
!
needinfo
.
id
||
!
needinfo
.
business_id
||
!
needinfo
.
contact_mobile
){
return
;
}
var
pobj
=
{
"customer_name"
:
needinfo
.
contact_name
||
"未知"
,
"customer_phone"
:
needinfo
.
contact_mobile
,
"customer_region"
:
"全国"
,
"demand_list"
:
[{
"product_id"
:
needinfo
.
business_id
,
"region"
:
"全国"
}],
"remark"
:
needinfo
.
original_need
,
"source_keyword"
:
needinfo
.
channel_name
,
"source"
:
"媒体聚合页"
};
console
.
log
(
pobj
,
"pobj###########################2"
);
var
pushRes
=
await
this
.
fqUtilsSve
.
pushMediaNeedInfo2Fq
(
pobj
);
console
.
log
(
pushRes
,
"pushRes############################3"
);
if
(
pushRes
&&
pushRes
.
data
&&
pushRes
.
code
&&
pushRes
.
code
==
"200"
&&
pushRes
.
success
){
//推送成功
await
this
.
dao
.
update
({
id
:
needinfo
.
id
,
push_status
:
1
});
}
else
{
await
this
.
dao
.
update
({
id
:
needinfo
.
id
,
push_status
:
2
});
}
}
}
module
.
exports
=
NeedinfoService
;
\ No newline at end of file
gsb-marketplat-mag/app/config/settings.js
View file @
c9a8a2e4
...
@@ -34,6 +34,9 @@ var settings = {
...
@@ -34,6 +34,9 @@ var settings = {
browsingRecordsLogUrl
:
function
()
{
browsingRecordsLogUrl
:
function
()
{
return
"http://43.247.184.94:7200/marketplat_browsingrecords_log/_doc?pretty"
;
return
"http://43.247.184.94:7200/marketplat_browsingrecords_log/_doc?pretty"
;
},
},
mediabrowsingRecordsLogUrl
:
function
()
{
//媒体聚合页访问记录
return
"http://43.247.184.94:7200/marketmedia_browsingrecords_log/_doc?pretty"
;
},
templateLinkUrl
:
function
()
{
templateLinkUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.200.208:8081/tfhref"
;
return
"http://192.168.200.208:8081/tfhref"
;
...
...
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