1234567891011121314151617181920212223242526272829303132333435363738 |
- 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
- {
- /// <summary>
- /// 获取指定期数开奖号
- /// </summary>
- public class OneController : BaseApi
- {
- /// <summary>
- /// 获取指定期数开奖号
- /// </summary>
- /// <param name="ename">英文名称</param>
- /// <param name="qi">期数 不传或者为0获取最近期</param>
- /// <returns></returns>
- [HttpGet]
- public ApiOne<ApiModel> Get(string ename, int qi = 0)
- {
- if (string.IsNullOrWhiteSpace(ename))
- {
- return ResponseOne<ApiModel>(null, 101, "name为空");
- }
- if (qi < 0)
- {
- return ResponseOne<ApiModel>(null, 101, "qi不能小于0");
- }
- ApiModel data = Kjh.GetOne(ename, qi);
- return ResponseOne(data);
- }
- }
- }
|