123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- using System;
- using System.Collections.Generic;
- using System.Threading.Tasks;
- using System.Linq;
- using System.Web;
- using Microsoft.AspNetCore.Mvc;
- using YiSha.Util;
- using YiSha.Util.Model;
- using YiSha.Entity;
- using YiSha.Model;
- using YiSha.Admin.Web.Controllers;
- using YiSha.Entity.KJH;
- using YiSha.IService.KJH;
- using YiSha.Model.Param.KJH;
- using YiSha.IBusiness.KJH;
- namespace YiSha.Admin.Web.Areas.KJH.Controllers
- {
- /// <summary>
- /// 创 建:cmzx
- /// 日 期:2021-04-27 16:23
- /// 描 述:体彩排列3、5控制器类
- /// </summary>
- [Area("KJH")]
- public class Tcp3Controller : BaseController
- {
- private ITcp3BLL _tcp3BLL;
- public Tcp3Controller(ITcp3BLL tcp3BLL)
- {
- _tcp3BLL = tcp3BLL;
- }
- #region 视图功能
- [AuthorizeFilter("kjh:tcp3:view")]
- public ActionResult Tcp3Index()
- {
- return View();
- }
- public ActionResult Tcp3Form()
- {
- return View();
- }
- #endregion
- #region 获取数据
- [HttpGet]
- [AuthorizeFilter("kjh:tcp3:search")]
- public async Task<ActionResult> GetListJson(Tcp3ListParam param)
- {
- TData<List<Tcp3Entity>> obj = await _tcp3BLL.GetList(param);
- return Json(obj);
- }
- [HttpGet]
- [AuthorizeFilter("kjh:tcp3:search")]
- public async Task<ActionResult> GetPageListJson(Tcp3ListParam param, Pagination pagination)
- {
- TData<List<Tcp3Entity>> obj = await _tcp3BLL.GetPageList(param, pagination);
- return Json(obj);
- }
- [HttpGet]
- public async Task<ActionResult> GetFormJson(int id)
- {
- TData<Tcp3Entity> obj = await _tcp3BLL.GetEntity(id);
- return Json(obj);
- }
- #endregion
- #region 提交数据
- [HttpPost]
- [AuthorizeFilter("kjh:tcp3:add,kjh:tcp3:edit")]
- public async Task<ActionResult> SaveFormJson(Tcp3Entity entity)
- {
- TData<int> obj = await _tcp3BLL.SaveForm(entity);
- return Json(obj);
- }
- [HttpPost]
- [AuthorizeFilter("kjh:tcp3:delete")]
- public async Task<ActionResult> DeleteFormJson(string ids)
- {
- TData obj = await _tcp3BLL.DeleteFormById(ids);
- return Json(obj);
- }
- #endregion
- #region 清理缓存
- [HttpGet]
- public async Task<ActionResult> UpCache()
- {
- TData obj = ClearCache.UpCache("tcp3");
- return Json(obj);
- }
- #endregion
- }
- }
|