Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
8c4220a9
Commit
8c4220a9
authored
Aug 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c75e05a8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
CustomFormModule.cs
Mall.Module.TradePavilion/CustomFormModule.cs
+21
-0
CustomFormController.cs
Mall.WebApi/Controllers/MallBase/CustomFormController.cs
+4
-0
No files found.
Mall.Module.TradePavilion/CustomFormModule.cs
View file @
8c4220a9
...
@@ -44,6 +44,27 @@ namespace Mall.Module.TradePavilion
...
@@ -44,6 +44,27 @@ namespace Mall.Module.TradePavilion
return
custom_FormRepository
.
GetCustomFormListRepository
(
query
);
return
custom_FormRepository
.
GetCustomFormListRepository
(
query
);
}
}
/// <summary>
/// 检查表单是否存在
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
CheckExistsCustomFormModule
(
RB_Custom_Form_Extend
model
)
{
IList
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>
{
new
WhereHelper
(
nameof
(
RB_Custom_Form_Extend
.
FormType
),
model
.
FormType
),
new
WhereHelper
(
nameof
(
RB_Custom_Form_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
),
new
WhereHelper
(
nameof
(
RB_Custom_Form_Extend
.
TenantId
),
model
.
TenantId
)
};
if
(
model
.
Id
>
0
)
{
list
.
Add
(
new
WhereHelper
(
nameof
(
RB_Custom_Form_Extend
.
Id
),
model
.
Id
,
OperatorEnum
.
NotEqual
));
}
return
custom_FormRepository
.
Exists
(
list
);
}
/// <summary>
/// <summary>
/// 新增修改自定义表单
/// 新增修改自定义表单
/// </summary>
/// </summary>
...
...
Mall.WebApi/Controllers/MallBase/CustomFormController.cs
View file @
8c4220a9
...
@@ -105,6 +105,10 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -105,6 +105,10 @@ namespace Mall.WebApi.Controllers.MallBase
model
.
CreateDate
=
DateTime
.
Now
;
model
.
CreateDate
=
DateTime
.
Now
;
model
.
UpdateDate
=
DateTime
.
Now
;
model
.
UpdateDate
=
DateTime
.
Now
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
if
(
customFormModule
.
CheckExistsCustomFormModule
(
model
))
{
return
ApiResult
.
Failed
(
message
:
"已存在此类型的表单!"
);
};
var
flag
=
customFormModule
.
SetCustomFormModule
(
model
);
var
flag
=
customFormModule
.
SetCustomFormModule
(
model
);
return
flag
?
ApiResult
.
Success
(
data
:
model
)
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
(
data
:
model
)
:
ApiResult
.
Failed
();
}
}
...
...
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