增加填写问卷模块
parent
ecb063a114
commit
b4989426ac
|
|
@ -4,6 +4,7 @@ using System.ComponentModel;
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Autofac.Core;
|
||||
using Castle.Core.Resource;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
|
@ -516,13 +517,20 @@ namespace New_College.Api.Controllers.Front
|
|||
{
|
||||
var count = await _naireRepository.Add(new QuestionNaire()
|
||||
{
|
||||
Id = dto.id,
|
||||
CustomerId = dto.id,
|
||||
CreateTime = DateTime.Now,
|
||||
infoList = dto.infoList,
|
||||
IsDelete = false,
|
||||
ModifyTime = DateTime.Now,
|
||||
OrderSort = 0
|
||||
});
|
||||
if (count > 0)
|
||||
{
|
||||
var firstinfo = await _services.QueryById((object)dto.id);
|
||||
firstinfo.IsVIP = true;
|
||||
firstinfo.ModifyTime = DateTime.Now;
|
||||
await _services.Update(firstinfo);
|
||||
}
|
||||
return new MessageModel<bool>()
|
||||
{
|
||||
response = count > 0,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ namespace New_College.Model.Models
|
|||
[SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public int CustomerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 学校名称
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue