123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using CP.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Web.Http;
- namespace CP.Api.Controllers
- {
- public class SjhandkjihController : BaseApi
- {
- /// <summary>
- /// 手机站试机号开机号列表
- /// </summary>
- /// <param name="ename">彩种英文名称</param>
- /// <param name="n">条数</param>
- /// <param name="qi">期数 type大于0的时候必须传入</param>
- /// <param name="type">0 默认 1 历史</param>
- /// <returns></returns>
- [HttpGet]
- public ApiList<ApisjhandkjihModel> Get(string ename, int n = 10, int qi = 0, int type = 0)
- {
- if (string.IsNullOrWhiteSpace(ename))
- {
- return ResponseList(new List<ApisjhandkjihModel>(), 101, "name为空");
- }
- if (n < 0)
- {
- return ResponseList(new List<ApisjhandkjihModel>(), 101, "n不能小于0");
- }
- if (type > 0 && qi<=0)
- {
- return ResponseList(new List<ApisjhandkjihModel>(), 101, "type大于0是必须传期数");
- }
- List<ApisjhandkjihModel> data = Kjh.Getsjhandkjih(ename, n, qi, type);
- return ResponseList(data);
- }
- }
- }
|