Yuebon.WebApi/Areas/Authorizer/Controllers/RegistryCodeController.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Yuebon.AspNetCore.Controllers;
using Yuebon.AspNetCore.Models;
using Yuebon.Commons.Helpers;
using Yuebon.Commons.Log;
using Yuebon.Commons.Mapping;
using Yuebon.Commons.Models;
using Yuebon.Commons.Pages;
using Yuebon.Authorizer.Dtos;
using Yuebon.Authorizer.Models;
using Yuebon.Authorizer.IServices;
using Yuebon.Commons.Encrypt;
using Yuebon.AspNetCore.Mvc;
namespace Yuebon.WebApi.Areas.Authorizer.Controllers
{
/// <summary>
/// 软件授权注册和验证接口
/// </summary>
[ApiController]
[Route("api/Authorizer/[controller]")]
public class RegistryCodeController : AreaApiController<RegistryCode, RegistryCodeOutputDto, RegistryCodeInputDto, IRegistryCodeService,string>
{
/// <summary>
/// 构造函数
/// </summary>
/// <param name="_iService"></param>
public RegistryCodeController(IRegistryCodeService _iService) : base(_iService)
{
iService = _iService;
AuthorizeKey.ListKey = "RegistryCode/List";
AuthorizeKey.InsertKey = "RegistryCode/Add";
AuthorizeKey.UpdateKey = "RegistryCode/Edit";
AuthorizeKey.UpdateEnableKey = "RegistryCode/Enable";
AuthorizeKey.DeleteKey = "RegistryCode/Delete";
AuthorizeKey.DeleteSoftKey = "RegistryCode/DeleteSoft";
AuthorizeKey.ViewKey = "RegistryCode/View";
}
/// <summary>
/// 新增前处理数据
/// </summary>
/// <param name="info"></param>
protected override void OnBeforeInsert(RegistryCode info)
{
info.Id = GuidUtils.CreateNo();
info.CreatorTime = DateTime.Now;
info.CreatorUserId = CurrentUser.UserId;
info.DeleteMark = false;
}
/// <summary>
/// 在更新数据前对数据的修改操作
/// </summary>
/// <param name="info"></param>
/// <returns></returns>
protected override void OnBeforeUpdate(RegistryCode info)
{
后面还有 37 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。