|
|
@ -96,7 +96,8 @@ namespace Shentun.WebPeis.Questions |
|
|
QuestionSubjectTypeId = p.QuestionSubjectTypeId, |
|
|
QuestionSubjectTypeId = p.QuestionSubjectTypeId, |
|
|
QuestionTypeId = p.QuestionTypeId, |
|
|
QuestionTypeId = p.QuestionTypeId, |
|
|
SimpleCode = p.SimpleCode, |
|
|
SimpleCode = p.SimpleCode, |
|
|
DisplayOrder = p.DisplayOrder |
|
|
|
|
|
|
|
|
DisplayOrder = p.DisplayOrder, |
|
|
|
|
|
ForSexId = p.ForSexId |
|
|
}; |
|
|
}; |
|
|
return GetTree(items.ToList(), 0, ""); |
|
|
return GetTree(items.ToList(), 0, ""); |
|
|
} |
|
|
} |
|
|
@ -111,7 +112,7 @@ namespace Shentun.WebPeis.Questions |
|
|
public async Task<QuestionDto> CreateAsync(CreateQuestionDto input) |
|
|
public async Task<QuestionDto> CreateAsync(CreateQuestionDto input) |
|
|
{ |
|
|
{ |
|
|
var createEntity = ObjectMapper.Map<CreateQuestionDto, Question>(input); |
|
|
var createEntity = ObjectMapper.Map<CreateQuestionDto, Question>(input); |
|
|
createEntity.QuestionId= GuidGenerator.Create(); |
|
|
|
|
|
|
|
|
createEntity.QuestionId = GuidGenerator.Create(); |
|
|
var entity = await _questionManager.CreateAsync(createEntity); |
|
|
var entity = await _questionManager.CreateAsync(createEntity); |
|
|
entity = await _questionRepository.InsertAsync(entity); |
|
|
entity = await _questionRepository.InsertAsync(entity); |
|
|
var dto = ObjectMapper.Map<Question, QuestionDto>(entity); |
|
|
var dto = ObjectMapper.Map<Question, QuestionDto>(entity); |
|
|
@ -203,6 +204,7 @@ namespace Shentun.WebPeis.Questions |
|
|
QuestionTypeId = p.QuestionTypeId, |
|
|
QuestionTypeId = p.QuestionTypeId, |
|
|
SimpleCode = p.SimpleCode, |
|
|
SimpleCode = p.SimpleCode, |
|
|
DisplayOrder = p.DisplayOrder, |
|
|
DisplayOrder = p.DisplayOrder, |
|
|
|
|
|
ForSexId = p.ForSexId, |
|
|
TreeChildren = subs.ToList() |
|
|
TreeChildren = subs.ToList() |
|
|
} |
|
|
} |
|
|
).ToList(); |
|
|
).ToList(); |
|
|
|