45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Net;
|
|||
|
using System.Net.Http;
|
|||
|
using System.Web.Http;
|
|||
|
using BLL;
|
|||
|
|
|||
|
namespace WebAPI.Controllers.DataPenetrate
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 常量查询控制器
|
|||
|
/// </summary>
|
|||
|
public class Sys_ConstPenetrateController : ApiController
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 根据groupId获取常量
|
|||
|
/// </summary>
|
|||
|
/// <param name="groupId"></param>
|
|||
|
/// <returns></returns>
|
|||
|
public Model.ResponeData getInfo(string groupId="")
|
|||
|
{
|
|||
|
var responeData = new Model.ResponeData();
|
|||
|
try
|
|||
|
{
|
|||
|
if (string.IsNullOrEmpty(groupId))
|
|||
|
{
|
|||
|
responeData.code = 0;
|
|||
|
responeData.message = "groupId不能为空";
|
|||
|
return responeData;
|
|||
|
}
|
|||
|
var getDataList = Funs.DB.Sys_Const.Where(x => x.GroupId == groupId).ToList();
|
|||
|
|
|||
|
responeData.data = new { getDataList };
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
responeData.code = 0;
|
|||
|
responeData.message = ex.Message;
|
|||
|
}
|
|||
|
|
|||
|
return responeData;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|