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
46f725c3
Commit
46f725c3
authored
Aug 19, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交表单记录接口
parent
11d23aab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
4 deletions
+47
-4
gsb-marketplat/app/base/api/impl/action/template.js
+1
-0
gsb-marketplat/app/base/db/models/configmag/formsubmitrecord.js
+9
-2
gsb-marketplat/app/base/service/impl/configmag/formsubmitrecordSve.js
+2
-2
gsb-marketplat/app/front/entry/public/apidoc/customer/template.md
+35
-0
No files found.
gsb-marketplat/app/base/api/impl/action/template.js
View file @
46f725c3
...
...
@@ -59,6 +59,7 @@ class Template extends APIBase {
opResult
=
await
this
.
templatelinkSve
.
getTemplateAndLinkInfo
(
pobj
);
break
;
case
"submitFormRecord"
:
//提交表单记录
var
a
=
0
;
opResult
=
await
this
.
formsubmitrecordSve
.
submitFormRecord
(
pobj
);
break
;
default
:
...
...
gsb-marketplat/app/base/db/models/configmag/formsubmitrecord.js
View file @
46f725c3
...
...
@@ -4,13 +4,20 @@
* @param DataTypes
* @returns {Model|void|*}
*/
const
record_status
=
{
"1"
:
"未读"
,
"2"
:
"已读"
,
"3"
:
"无效"
};
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"formsubmitrecord"
,
{
business_code
:
DataTypes
.
STRING
(
100
),
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无效
form_id
:
DataTypes
.
INTEGER
(
11
),
//表单id
record_status
:{
//记录状态 1未读 2已读 3无效
type
:
DataTypes
.
STRING
(
60
),
set
:
function
(
val
)
{
this
.
setDataValue
(
"record_status"
,
val
);
this
.
setDataValue
(
"record_status_name"
,
record_status
[
val
]);
}
},
record_status_name
:
DataTypes
.
STRING
(
60
),
//记录状态名称
templatelink_snapshot
:
DataTypes
.
JSON
,
//模板链接快照
record_content
:
DataTypes
.
JSON
,
//记录内容
...
...
gsb-marketplat/app/base/service/impl/configmag/formsubmitrecordSve.js
View file @
46f725c3
...
...
@@ -37,10 +37,10 @@ class FormsubmitrecordService extends ServiceBase {
if
(
!
linkInfo
.
template_id
){
return
system
.
getResultFail
(
-
301
,
"链接模板信息错误"
)
}
var
templateinfo
=
await
this
.
templateinfoDao
.
model
.
findOne
{
var
templateinfo
=
await
this
.
templateinfoDao
.
model
.
findOne
(
{
where
:{
id
:
linkInfo
.
template_id
},
raw
:
true
,
attributes
:[
"id"
,
"business_code"
]
};
}
)
;
if
(
!
templateinfo
||
!
templateinfo
.
id
){
return
system
.
getResultFail
(
-
500
,
"未知模板信息"
);
}
...
...
gsb-marketplat/app/front/entry/public/apidoc/customer/template.md
View file @
46f725c3
...
...
@@ -10,6 +10,7 @@
1.
[
获取表单列表
](
#getFormList
)
1.
[
获取文件上传配置信息
](
#getOssConfig
)
1.
[
根据链接参数获取模板链接信息
](
#getTemplateAndLinkInfo
)
1.
[
提交表单记录
](
#submitFormRecord
)
## **<a name="createTemplate"> 创建模板</a>**
[
返回到目录
](
#menu
)
...
...
@@ -513,6 +514,7 @@
}
```
## **<a name="getTemplateAndLinkInfo"> 根据链接参数获取模板链接信息</a>**
[
返回到目录
](
#menu
)
##### URL
...
...
@@ -595,3 +597,36 @@
}
```
## **<a name="submitFormRecord"> 提交表单记录</a>**
[
返回到目录
](
#menu
)
##### URL
[
/api/action/template/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:submitFormRecord
```
javascript
{
"actionType"
:
"submitFormRecord"
,
"actionBody"
:
{
"link_code"
:
"TL202008141607VdD4le"
,
"form_id"
:
79
,
"contact_mobile"
:
"13075556693"
,
"contact_name"
:
"1234"
,
"IT202008171022jen9Ar"
:
"test"
,
"IT202008171023jxT06N"
:
"10"
}
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"requestId"
:
"77d3b071053c44a9b5322bb01b0a27aa"
}
```
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