Commit ab8462be authored by liudong1993's avatar liudong1993

素材管理, 上传重复验证问题

parent 70b76a10
...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment