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
ab8462be
Commit
ab8462be
authored
Dec 24, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
素材管理, 上传重复验证问题
parent
70b76a10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+49
-0
No files found.
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
ab8462be
...
@@ -113,6 +113,55 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -113,6 +113,55 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
}
}
/// <summary>
/// 新增素材信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetGetMaterialInfo
()
{
var
parms
=
RequestParm
;
RB_Material_Info_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Material_Info_Extend
>(
parms
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
{
return
ApiResult
.
ParamIsNull
(
"请输入素材名称"
);
}
if
(
demodel
.
Type
!=
1
&&
demodel
.
Type
!=
2
&&
demodel
.
Type
!=
3
)
{
return
ApiResult
.
ParamIsNull
(
"请传递类型"
);
}
if
((
demodel
.
GroupId
??
0
)
<
0
)
{
return
ApiResult
.
ParamIsNull
(
"请输入分组"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Path
))
{
return
ApiResult
.
ParamIsNull
(
"请传递文件路径"
);
}
//HK2020-09-01修改
//if (demodel.Type == 1)
//{
// demodel.Path = Config.GetFilePath(demodel.Path);
// demodel.Image = Config.GetFilePath(demodel.Image);
//}
demodel
.
TenantId
=
Convert
.
ToInt32
(
parms
.
uid
);
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
Status
=
0
;
demodel
.
Recycled
=
1
;
bool
flag
=
productModule
.
SetMaterialInfo
(
demodel
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// <summary>
/// 获取素材分组列表
/// 获取素材分组列表
/// </summary>
/// </summary>
...
...
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