public async Task InsertProductDataAsync(MiniComponentNestedDTO data) { var proj_id = _operator?.Property?.Last_Interview_Project; var miniComponent = new mini_component() { Id = IdHelper.GetId(), Project_Id = proj_id, Parent_Component_Id = data.Parent_Component_Id, Sys_Component_Id = data.Sys_Component_Id, Description = data.Tittle, Sort = data.Sort, CreateTime = DateTime.Now, CreatorId = _operator?.UserId }; await Db.InsertAsync <mini_component>(miniComponent); data.Component_Id = miniComponent.Id; await InsertAsync(_mapper.Map <mini_component_item>(data)); }
public async Task UpdateProductDataAsync(MiniComponentNestedDTO data) { data.Image = data.Image.Replace(ConfigHelper.GetValue("FastDFS:FileRootUrl"), ""); await UpdateAsync(_mapper.Map <mini_component_item>(data)); }