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
215c7e00
Commit
215c7e00
authored
Aug 18, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
form_id
parent
99143124
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
gsb-marketplat/app/base/db/models/configmag/formsubmitrecord.js
+3
-1
gsb-marketplat/app/base/service/impl/configmag/formsubmitrecordSve.js
+12
-2
gsb-marketplat/app/base/service/impl/template/templateinfoSve.js
+5
-1
No files found.
gsb-marketplat/app/base/db/models/configmag/formsubmitrecord.js
View file @
215c7e00
...
...
@@ -6,13 +6,15 @@
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"formsubmitrecord"
,
{
template_id
:
DataTypes
.
INTEGER
(
11
),
///模板id
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无效
record_status_name
:
DataTypes
.
STRING
(
60
),
//记录状态名称
templatelink_snapshot
:
DataTypes
.
JSON
,
//模板链接快照
record_content
:
DataTypes
.
JSON
,
//记录内容
push_status
:
DataTypes
.
INTEGER
,
//推送状态 0:未推送,1:已推送 2:异常
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
...
...
gsb-marketplat/app/base/service/impl/configmag/formsubmitrecordSve.js
View file @
215c7e00
...
...
@@ -32,7 +32,17 @@ class FormsubmitrecordService extends ServiceBase {
where
:{
code
:
ab
.
link_code
},
raw
:
true
});
if
(
!
linkInfo
||
!
linkInfo
.
id
){
return
system
.
getResultFail
(
-
300
,
"未知模板链接"
)
return
system
.
getResultFail
(
-
300
,
"未知模板链接"
);
}
if
(
!
linkInfo
.
template_id
){
return
system
.
getResultFail
(
-
301
,
"链接模板信息错误"
)
}
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
,
"未知模板信息"
);
}
//获取表单信息
var
forminfo
=
await
this
.
forminfoDao
.
model
.
findOne
({
...
...
@@ -55,7 +65,7 @@ class FormsubmitrecordService extends ServiceBase {
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
record_content
:
params
,
business_code
:
templateinfo
.
business_code
}
await
this
.
dao
.
create
(
addObj
);
//创建记录
return
system
.
getResultSuccess
();
...
...
gsb-marketplat/app/base/service/impl/template/templateinfoSve.js
View file @
215c7e00
...
...
@@ -122,7 +122,11 @@ class TemplateinfoService extends ServiceBase {
// if(templateInfo.is_enabled===1){
// return system.getResultFail(-301,"该模板正在使用中,不能执行此操作");
// }
await
this
.
dao
.
update
({
id
:
templateInfo
.
id
,
template_content
:
ab
.
template_content
});
var
updateObj
=
{
id
:
templateInfo
.
id
,
template_content
:
ab
.
template_content
};
if
(
ab
.
form_id
){
updateObj
[
"form_id"
]
=
ab
.
form_id
;
}
await
this
.
dao
.
update
(
updateObj
);
return
system
.
getResultSuccess
();
}
/**
...
...
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