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
bd58752d
Commit
bd58752d
authored
Aug 11, 2020
by
钟占达
Browse files
Options
Browse Files
Download
Plain Diff
zyd
parents
7d20b520
c4e4f0b5
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
332 additions
and
57 deletions
+332
-57
gsb-marketplat/app/base/api/impl/action/template.js
+4
-0
gsb-marketplat/app/base/controller/ctl.base.js
+5
-0
gsb-marketplat/app/base/controller/impl/configmag/formitemCtl.js
+14
-3
gsb-marketplat/app/base/controller/impl/templatemag/templatelinkCtl.js
+33
-0
gsb-marketplat/app/base/db/impl/configmag/forminfoDao.js
+0
-0
gsb-marketplat/app/base/db/impl/configmag/formitemDao.js
+0
-0
gsb-marketplat/app/base/db/metadata/app/platform.js
+14
-1
gsb-marketplat/app/base/db/models/configmag/businesstype.js
+0
-0
gsb-marketplat/app/base/db/models/configmag/forminfo.js
+0
-0
gsb-marketplat/app/base/db/models/configmag/formitem.js
+0
-0
gsb-marketplat/app/base/db/models/configmag/formsubmitrecord.js
+18
-18
gsb-marketplat/app/base/db/models/configmag/imginfo.js
+0
-0
gsb-marketplat/app/base/db/models/configmag/launchchannel.js
+0
-0
gsb-marketplat/app/base/db/models/configmag/launchtype.js
+0
-0
gsb-marketplat/app/base/db/models/configmag/maininfo.js
+0
-0
gsb-marketplat/app/base/db/models/configmag/marketingsubject.js
+0
-0
gsb-marketplat/app/base/db/models/configmag/puttype.js
+0
-0
gsb-marketplat/app/base/service/impl/configmag/forminfoSve.js
+1
-15
gsb-marketplat/app/base/service/impl/configmag/formitemSve.js
+87
-0
gsb-marketplat/app/base/service/impl/configmag/formsubmitrecordSve.js
+91
-0
gsb-marketplat/app/base/service/impl/configmag/imginfoSve.js
+5
-12
gsb-marketplat/app/base/service/impl/configmag/launchchannelSve.js
+1
-1
gsb-marketplat/app/base/service/impl/configmag/maininfoSve.js
+3
-3
gsb-marketplat/app/base/service/impl/configmag/puttypeSve.js
+3
-3
gsb-marketplat/app/base/service/impl/template/templatelinkSve.js
+21
-1
tx-fi-tax/app/config/localsettings.js
+32
-0
No files found.
gsb-marketplat/app/base/api/impl/action/template.js
View file @
bd58752d
...
...
@@ -9,6 +9,7 @@ class Template extends APIBase {
super
();
this
.
templateinfoSve
=
system
.
getObject
(
"service.template.templateinfoSve"
);
this
.
templatelinkSve
=
system
.
getObject
(
"service.template.templatelinkSve"
);
this
.
formsubmitrecordSve
=
system
.
getObject
(
"service.configmag.formsubmitrecordSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -54,6 +55,9 @@ class Template extends APIBase {
case
"getTemplateAndLinkInfo"
:
//根据链接参数获取模板链接信息
opResult
=
await
this
.
templatelinkSve
.
getTemplateAndLinkInfo
(
pobj
);
break
;
case
"submitFormRecord"
:
//提交表单记录
opResult
=
await
this
.
formsubmitrecordSve
.
submitFormRecord
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
gsb-marketplat/app/base/controller/ctl.base.js
View file @
bd58752d
...
...
@@ -24,6 +24,11 @@ class CtlBase {
const
up
=
await
this
.
service
.
delete
(
pobj
);
return
system
.
getResult
(
up
);
}
async
bulkDelete
(
ids
)
{
var
en
=
await
this
.
service
.
bulkDelete
(
ids
);
return
system
.
getResult
(
en
);
}
async
findAndCountAll
(
pobj
,
qobj
,
req
)
{
//设置查询条件
const
rs
=
await
this
.
service
.
findAndCountAll
(
pobj
);
...
...
gsb-marketplat/app/base/controller/impl/configmag/formitemCtl.js
View file @
bd58752d
...
...
@@ -14,9 +14,20 @@ class FormItemCtl extends CtlBase {
* @param pobj
* @returns {Promise<void>}
*/
// async create(pobj){
//
// }
async
create
(
pobj
){
let
result
=
this
.
formitemSve
.
createItem
(
pobj
);
return
result
;
}
/**
* 重写删除
* @param pobj
* @returns {Promise<void>}
*/
async
delete
(
pobj
){
let
result
=
this
.
formitemSve
.
deleteItem
(
pobj
);
return
result
;
}
}
module
.
exports
=
FormItemCtl
;
gsb-marketplat/app/base/controller/impl/templatemag/templatelinkCtl.js
0 → 100644
View file @
bd58752d
var
system
=
require
(
"../../../system"
)
var
settings
=
require
(
"../../../../config/settings"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
var
cacheBaseComp
=
null
;
class
FormInfoCtl
extends
CtlBase
{
constructor
()
{
super
(
"templateinfomag"
,
CtlBase
.
getServiceName
(
FormInfoCtl
));
this
.
templatelinkSve
=
system
.
getObject
(
'service.template.templatelinkSve'
);
}
/**
* 重写查询方法
* @param pobj
* @returns {Promise<{msg: string, data: *, bizmsg: string, status: number}>}
*/
async
findAndCountAll
(
pobj
)
{
let
result
=
await
this
.
templatelinkSve
.
findAndCountAll
(
pobj
);
return
result
;
}
/**
* 重写保存方法
* @param pobj
* @returns {Promise<void>}
*/
async
create
(
pobj
){
let
result
=
await
this
.
templatelinkSve
.
createTemplateLink
(
pobj
);
return
result
;
}
}
module
.
exports
=
FormInfoCtl
;
gsb-marketplat/app/base/db/impl/
form
/forminfoDao.js
→
gsb-marketplat/app/base/db/impl/
configmag
/forminfoDao.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/impl/
form
/formitemDao.js
→
gsb-marketplat/app/base/db/impl/
configmag
/formitemDao.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/metadata/app/platform.js
View file @
bd58752d
...
...
@@ -11,7 +11,20 @@ module.exports = {
"sex"
:
{
"male"
:
"男"
,
"female"
:
"女"
},
"logLevel"
:
{
"debug"
:
0
,
"info"
:
1
,
"warn"
:
2
,
"error"
:
3
,
"fatal"
:
4
},
"msgType"
:
{
"sys"
:
"系统"
,
"single"
:
"单点"
,
"multi"
:
"群发"
},
"node_type"
:{
"org"
:
"组织"
,
"arc"
:
"文档"
}
"node_type"
:{
"org"
:
"组织"
,
"arc"
:
"文档"
},
"item_type"
:{
"phone"
:
"手机号"
,
"singleBtn"
:
"单选按钮"
,
"multipleBtn"
:
"多选按钮"
,
"downOptions"
:
"下拉选项"
,
"singleText"
:
"单行文本"
,
"multipleText"
:
"多行文本"
,
"dateTime"
:
"日期"
,
"area"
:
"省市"
},
"record_status"
:{
"1"
:
"未读"
,
"2"
:
"已读"
,
"3"
:
"无效"
}
}
}
}
gsb-marketplat/app/base/db/models/
marketconfi
g/businesstype.js
→
gsb-marketplat/app/base/db/models/
configma
g/businesstype.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/models/
marketconfi
g/forminfo.js
→
gsb-marketplat/app/base/db/models/
configma
g/forminfo.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/models/
marketconfi
g/formitem.js
→
gsb-marketplat/app/base/db/models/
configma
g/formitem.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/models/
marketconfi
g/formsubmitrecord.js
→
gsb-marketplat/app/base/db/models/
configma
g/formsubmitrecord.js
View file @
bd58752d
...
...
@@ -5,24 +5,24 @@
* @returns {Model|void|*}
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"formsubmitrecord"
,
{
form_id
:
DataTypes
.
INTEGER
(
11
),
//表单
id
record_status
:
DataTypes
.
STRING
(
60
),
//记录状态 1未读 2已读 3无效
record_status_name
:
DataTypes
.
STRING
(
60
),
//记录状态名称
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
timestamps
:
true
,
updated_at
:
true
,
tableName
:
'c_form_submit_record'
,
validate
:
{
}
,
indexes
:
[
]
return
db
.
define
(
"formsubmitrecord"
,
{
template_id
:
DataTypes
.
INTEGER
(
11
),
///模板
id
templatelink_id
:
DataTypes
.
INTEGER
(
11
),
//模板链接id
form_id
:
DataTypes
.
INTEGER
(
11
),
//表单id
record_status
:
DataTypes
.
STRING
(
60
),
//记录状态 1未读 2已读 3无效
record_status_name
:
DataTypes
.
STRING
(
60
),
//记录状态名称
templatelink_snapshot
:
DataTypes
.
JSON
,
//模板链接快照
record_content
:
DataTypes
.
JSON
,
//记录内容
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
timestamps
:
true
,
updated_at
:
true
,
tableName
:
'c_form_submit_record'
,
validate
:
{},
indexes
:
[
]
});
}
gsb-marketplat/app/base/db/models/
marketconfi
g/imginfo.js
→
gsb-marketplat/app/base/db/models/
configma
g/imginfo.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/models/
marketconfi
g/launchchannel.js
→
gsb-marketplat/app/base/db/models/
configma
g/launchchannel.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/models/
marketconfi
g/launchtype.js
→
gsb-marketplat/app/base/db/models/
configma
g/launchtype.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/models/
marketconfi
g/maininfo.js
→
gsb-marketplat/app/base/db/models/
configma
g/maininfo.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/models/
marketconfi
g/marketingsubject.js
→
gsb-marketplat/app/base/db/models/
configma
g/marketingsubject.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/db/models/
marketconfi
g/puttype.js
→
gsb-marketplat/app/base/db/models/
configma
g/puttype.js
View file @
bd58752d
File moved
gsb-marketplat/app/base/service/impl/configmag/forminfoSve.js
View file @
bd58752d
...
...
@@ -32,14 +32,6 @@ class ForminfoService extends ServiceBase {
if
(
!
pobj
.
form_describe
){
return
system
.
getResult
(
null
,
'form_describe can not be empty'
);
}
let
items
=
''
;
// if(!pobj.form_item){
// return 'form_item can not be empty';
// }
const
formItem
=
this
.
composeItem
(
items
);
if
(
formItem
.
status
!=
0
){
return
formItem
;
}
let
code
=
await
this
.
getBusUid
(
"fm"
)
let
formData
=
{
name
:
pobj
.
name
,
...
...
@@ -50,7 +42,7 @@ class ForminfoService extends ServiceBase {
user_name
:
pobj
.
username
}
let
result
=
await
this
.
create
(
formData
);
return
system
.
getResul
(
result
);
return
system
.
getResul
t
(
result
);
}
/**
*
...
...
@@ -58,14 +50,9 @@ class ForminfoService extends ServiceBase {
* @returns {Promise<void>}
*/
async
updateForm
(
pobj
)
{
return
null
;
}
//表单项 数据重组
async
composeItem
(
obj
){
return
system
.
getResultSuccess
();
}
}
module
.
exports
=
ForminfoService
;
\ No newline at end of file
gsb-marketplat/app/base/service/impl/configmag/formitemSve.js
0 → 100644
View file @
bd58752d
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
FormitemService
extends
ServiceBase
{
constructor
()
{
super
(
"configmag"
,
ServiceBase
.
getDaoName
(
FormitemService
));
this
.
forminfoSve
=
system
.
getObject
(
"service.configmag.forminfoSve"
);
}
/**
* 创建表单项
* @param pobj
* @returns {Promise<void>}
*/
async
createItem
(
pobj
)
{
let
type_name
=
await
this
.
getTypeName
(
pobj
.
item_type
);
let
code
=
await
this
.
getBusUid
(
'it'
);
pobj
.
item_type_name
=
type_name
;
pobj
.
is_enabled
=
pobj
.
is_enabled
?
1
:
0
;
pobj
.
is_required
=
pobj
.
is_required
?
1
:
0
;
pobj
.
code
=
code
;
console
.
log
(
pobj
)
//获取表单的表单项
let
form
=
await
this
.
forminfoSve
.
findOne
({
id
:
pobj
.
form_id
},[
'form_items'
]);
console
.
log
(
form
)
if
(
!
form
){
return
system
.
getResult
(
null
,
'获取订单信息失败'
);
}
let
form_items
=
form
.
form_items
?
form
.
form_items
+
"、"
+
type_name
:
type_name
;
//修改表单项字段
this
.
forminfoSve
.
updateByWhere
({
form_items
:
form_items
},{
id
:
pobj
.
form_id
});
//保存表单项
let
result
=
await
this
.
create
(
pobj
);
return
system
.
getResult
(
result
)
}
/**
* 表单项删除
* @param pobj
* @returns {Promise<void>}
*/
async
deleteItem
(
pobj
){
let
item
=
await
this
.
findOne
({
id
:
pobj
.
id
},[
'form_id'
,
'item_type_name'
]);
if
(
!
item
){
return
system
.
getResult
(
null
,
'获取表单项失败'
);
}
let
form
=
await
this
.
forminfoSve
.
findOne
({
id
:
item
.
form_id
},[
'form_items'
]);
if
(
!
form
){
return
system
.
getResult
(
null
,
'获取表单失败'
);
}
let
form_items
=
form
.
form_items
.
replace
(
'、'
+
item
.
item_type_name
,
''
);
this
.
forminfoSve
.
updateByWhere
({
form_items
:
form_items
},{
id
:
item
.
form_id
});
let
result
=
await
this
.
delete
(
pobj
);
return
system
.
getResult
(
result
);
}
/**
*
* @param pobj
* @returns {Promise<void>}
*/
async
updateForm
(
pobj
)
{
return
null
;
}
//根据类型获取类型名称
async
getTypeName
(
type
)
{
let
data
=
{
"phone"
:
"手机号"
,
"singleBtn"
:
"单选按钮"
,
"multipleBtn"
:
"多选按钮"
,
"downOptions"
:
"下拉选项"
,
"singleText"
:
"单行文本"
,
"multipleText"
:
"多行文本"
,
"dateTime"
:
"日期"
,
"area"
:
"省市"
}
return
data
[
type
];
}
}
module
.
exports
=
FormitemService
;
\ No newline at end of file
gsb-marketplat/app/base/service/impl/configmag/formsubmitrecordSve.js
View file @
bd58752d
...
...
@@ -5,6 +5,10 @@ const settings = require("../../../../config/settings");
class
ForminfoService
extends
ServiceBase
{
constructor
()
{
super
(
"configmag"
,
ServiceBase
.
getDaoName
(
ForminfoService
));
this
.
templateinfoDao
=
system
.
getObject
(
"db.template.templateinfoDao"
);
this
.
templatelinkDao
=
system
.
getObject
(
"db.template.templatelinkDao"
);
this
.
forminfoDao
=
system
.
getObject
(
"db.configmag.forminfoDao"
);
this
.
formitemDao
=
system
.
getObject
(
"db.configmag.formitemDao"
);
}
/**
...
...
@@ -37,6 +41,92 @@ class ForminfoService extends ServiceBase {
}
return
system
.
getResult
(
resData
);
}
/**
* 提交表单记录
* @param {*} pobj
*/
async
submitFormRecord
(
pobj
){
var
ab
=
pobj
.
actionBody
;
var
xctx
=
pobj
.
xctx
;
if
(
!
ab
){
return
system
.
getResultFail
(
-
100
,
"参数错误"
);
}
if
(
!
ab
.
link_code
){
return
system
.
getResultFail
(
-
101
,
"模板链接编码不能为空"
);
}
if
(
!
ab
.
form_id
){
return
system
.
getResultFail
(
-
102
,
"表单id不能为空"
);
}
//获取模板链接信息
var
linkInfo
=
await
this
.
templatelinkDao
.
model
.
findOne
({
where
:{
code
:
ab
.
link_code
},
raw
:
true
});
if
(
!
linkInfo
||
!
linkInfo
.
id
){
return
system
.
getResultFail
(
-
300
,
"未知模板链接"
)
}
//获取表单信息
var
forminfo
=
await
this
.
forminfoDao
.
model
.
findOne
({
where
:{
id
:
ab
.
form_id
},
raw
:
true
});
if
(
!
forminfo
||
!
forminfo
.
id
){
return
system
.
getResultFail
(
-
400
,
"未知表单"
)
}
//获取表单项
var
formitems
=
await
this
.
formitemDao
.
model
.
findAll
({
where
:{
form_id
:
ab
.
form_id
},
raw
:
true
});
//校验封装参数
var
res
=
await
this
.
checkAndPackageFormItems
(
formitems
,
ab
);
if
(
res
&&
res
.
status
&&
res
.
status
<
0
){
return
res
;
}
var
params
=
res
;
var
addObj
=
{
template_id
:
linkInfo
.
template_id
,
templatelink_id
:
linkInfo
.
id
,
form_id
:
forminfo
.
id
,
record_status
:
1
,
templatelink_snapshot
:
linkInfo
,
form_snapshot
:{
forminfo
:
forminfo
,
formitems
:
formitems
},
record_content
:
params
}
await
this
.
dao
.
create
(
addObj
);
//创建记录
return
system
.
getResultSuccess
();
}
/**
* 参数校验
* @param {*} formitems 表单项
* @param {*} ab 表单提交数据
*/
async
checkAndPackageFormItems
(
formitems
,
ab
){
var
params
=
{};
for
(
var
i
=
0
;
i
<
formitems
.
length
;
i
++
){
var
item
=
formitems
[
i
];
var
itemConfig
=
item
.
config_params
;
if
(
item
&&
item
.
code
&&
item
.
is_enabled
){
//显示状态的表单项
var
value
=
ab
[
item
.
code
];
if
(
item
.
is_required
===
1
){
//必填
if
(
!
ab
[
item
.
code
]){
return
system
.
getResultFail
(
-
100
,
item
.
name
+
"参数不能为空"
);
}
}
if
(
itemConfig
.
mobile_input_length
===
1
){
//手机号 1:限定11位 2:限定7-11位
if
(
value
&&
value
.
length
!=
11
){
return
system
.
getResultFail
(
-
101
,
item
.
name
+
"参数限定11位"
);
}
}
if
(
itemConfig
.
mobile_input_length
===
2
){
//手机号 1:限定11位 2:限定7-11位
if
(
value
&&
(
value
.
length
<
7
||
value
.
length
>
11
)){
return
system
.
getResultFail
(
-
102
,
item
.
name
+
"参数限定7-11位"
);
}
}
if
(
itemConfig
.
input_length
&&
itemConfig
.
input_length
.
length
==
2
){
//输入长度区间
if
(
value
&&
(
value
.
length
<
itemConfig
.
input_length
[
0
]
||
value
.
length
>
itemConfig
.
input_length
[
1
])){
return
system
.
getResultFail
(
-
103
,
item
.
name
+
"参数输入长度为"
+
itemConfig
.
input_length
[
0
]
+
"-"
+
itemConfig
.
input_length
[
1
]
+
"位"
);
}
}
params
[
item
.
code
]
=
value
;
}
}
return
params
;
}
}
module
.
exports
=
ForminfoService
;
\ No newline at end of file
gsb-marketplat/app/base/service/impl/configmag/imginfoSve.js
View file @
bd58752d
...
...
@@ -3,21 +3,13 @@ const ServiceBase = require("../../sve.base");
const
settings
=
require
(
"../../../../config/settings"
);
class
ImginfoService
extends
ServiceBase
{
constructor
()
{
super
(
"co
mmon
"
,
ServiceBase
.
getDaoName
(
ImginfoService
));
super
(
"co
nfigmag
"
,
ServiceBase
.
getDaoName
(
ImginfoService
));
}
async
create
(
pobj
){
let
code
=
await
this
.
getBusUid
(
"img"
);
let
imginfo
=
pobj
.
imginfo
;
let
data
=
{
name
:
imginfo
.
name
,
pic_url
:
imginfo
.
url
,
pic_size
:
imginfo
.
size
,
company_id
:
imginfo
.
company_id
||
10
,
code
:
code
};
let
res
=
this
.
dao
.
create
(
data
);
return
system
.
getResult
(
res
);
var
code
=
await
this
.
getBusUid
(
"img"
);
pobj
.
code
=
code
;
return
this
.
dao
.
create
(
pobj
);
}
}
module
.
exports
=
ImginfoService
;
\ No newline at end of file
gsb-marketplat/app/base/service/impl/configmag/launchchannelSve.js
View file @
bd58752d
...
...
@@ -4,7 +4,7 @@ const settings = require("../../../../config/settings");
class
LaunchchannelService
extends
ServiceBase
{
constructor
()
{
super
(
"co
mmon
"
,
ServiceBase
.
getDaoName
(
LaunchchannelService
));
super
(
"co
nfigmag
"
,
ServiceBase
.
getDaoName
(
LaunchchannelService
));
}
/**
...
...
gsb-marketplat/app/base/service/impl/configmag/maininfoSve.js
View file @
bd58752d
...
...
@@ -3,12 +3,12 @@ const ServiceBase = require("../../sve.base");
const
settings
=
require
(
"../../../../config/settings"
);
class
MaininfoService
extends
ServiceBase
{
constructor
()
{
super
(
"co
mmon
"
,
ServiceBase
.
getDaoName
(
MaininfoService
));
super
(
"co
nfigmag
"
,
ServiceBase
.
getDaoName
(
MaininfoService
));
}
async
create
(
pobj
){
// var code = await this.getBusUid("img
");
//
pobj.code = code;
var
code
=
await
this
.
getBusUid
(
"main
"
);
pobj
.
code
=
code
;
return
this
.
dao
.
create
(
pobj
);
}
}
...
...
gsb-marketplat/app/base/service/impl/configmag/puttypeSve.js
View file @
bd58752d
...
...
@@ -3,12 +3,12 @@ const ServiceBase = require("../../sve.base");
const
settings
=
require
(
"../../../../config/settings"
);
class
PuttypeService
extends
ServiceBase
{
constructor
()
{
super
(
"co
mmon
"
,
ServiceBase
.
getDaoName
(
PuttypeService
));
super
(
"co
nfigmag
"
,
ServiceBase
.
getDaoName
(
PuttypeService
));
}
async
create
(
pobj
){
// var code = await this.getBusUid("img
");
//
pobj.code = code;
var
code
=
await
this
.
getBusUid
(
"put
"
);
pobj
.
code
=
code
;
return
this
.
dao
.
create
(
pobj
);
}
}
...
...
gsb-marketplat/app/base/service/impl/template/templatelinkSve.js
View file @
bd58752d
...
...
@@ -8,7 +8,27 @@ class TemplatelinkService extends ServiceBase {
this
.
templateinfoDao
=
system
.
getObject
(
"db.template.templateinfoDao"
);
this
.
browsingrecordsDao
=
system
.
getObject
(
"db.template.browsingrecordsDao"
);
}
/**
* 获取模板链接配置参数
* @param {*} pobj
*/
async
getLinkConfigParams
(
pobj
){
var
ab
=
pobj
.
actionBody
;
var
xctx
=
pobj
.
xctx
;
var
res
=
{};
if
(
!
ab
){
return
system
.
getResultFail
(
-
100
,
"参数错误"
);
}
//渠道主体
//业务参数
//投放方式
//营销主体
return
system
.
getResultSuccess
(
res
);
}
/**
* 链接列表
* @param {*} obj
*/
async
findAndCountAll
(
obj
){
var
res
=
await
this
.
dao
.
findAndCountAll
(
obj
);
return
system
.
getResultSuccess
(
res
);
...
...
tx-fi-tax/app/config/localsettings.js
0 → 100644
View file @
bd58752d
var
settings
=
{
redis
:
{
host
:
"192.168.4.119"
,
port
:
6379
,
password
:
"Gongsibao2018"
,
db
:
9
,
},
database
:
{
dbname
:
"gsb_marketplat"
,
user
:
"write"
,
password
:
"write"
,
config
:
{
host
:
'43.247.184.35'
,
port
:
8899
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
max
:
5
,
min
:
0
,
acquire
:
90000000
,
idle
:
1000000
},
debug
:
false
,
dialectOptions
:
{
requestTimeout
:
999999
,
// instanceName:'DEV'
}
//设置MSSQL超时时间
}
},
kongurl
:
'http://192.168.4.119:8001/'
,
};
module
.
exports
=
settings
;
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