Commit 5b140e0b authored by 吴春's avatar 吴春

提交代码

parent dbd96a20
......@@ -55,6 +55,9 @@ namespace Edu.Module.Duty
}
/// <summary>
/// 新增/修改班次信息
/// </summary>
......
......@@ -19,14 +19,18 @@ namespace Edu.Repository.Duty
{
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" SELECT A.* FROM RB_Duty_Frequency AS A WHERE 1=1 ");
builder.AppendFormat(@" SELECT A.*,(SELECT GROUP_CONCAT(SName) from rb_school where `Status`=0 and FIND_IN_SET(SId,a.School_Ids) GROUP BY `Status`=0) as SchoolName FROM RB_Duty_Frequency AS A WHERE 1=1 ");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Frequency_ViewModel.Group_Id), query.Group_Id);
}
if (query.Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Frequency_ViewModel.Id), query.Id);
}
if (query.Status >= 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Frequency_ViewModel.Status), (int)query.Status);
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Edu.Module.Duty;
using Edu.WebApi.Filter;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Edu.WebApi.Controllers.Duty
{
[Route("api/[controller]/[action]")]
[ApiExceptionFilter]
[ApiController]
[EnableCors("AllowCors")]
public class DutyController : BaseController
{
public readonly DutyModule DutyModule = new DutyModule();
}
}
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