增加填写问卷模块

develop
old易 2024-04-24 09:50:16 +08:00
parent ecb063a114
commit b4989426ac
2 changed files with 11 additions and 1 deletions

View File

@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Autofac.Core; using Autofac.Core;
using Castle.Core.Resource;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
@ -516,13 +517,20 @@ namespace New_College.Api.Controllers.Front
{ {
var count = await _naireRepository.Add(new QuestionNaire() var count = await _naireRepository.Add(new QuestionNaire()
{ {
Id = dto.id, CustomerId = dto.id,
CreateTime = DateTime.Now, CreateTime = DateTime.Now,
infoList = dto.infoList, infoList = dto.infoList,
IsDelete = false, IsDelete = false,
ModifyTime = DateTime.Now, ModifyTime = DateTime.Now,
OrderSort = 0 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>() return new MessageModel<bool>()
{ {
response = count > 0, response = count > 0,

View File

@ -20,6 +20,8 @@ namespace New_College.Model.Models
[SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true)] [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; } public int Id { get; set; }
public int CustomerId { get; set; }
/// <summary> /// <summary>
/// 学校名称 /// 学校名称
/// </summary> /// </summary>