初始化项目
This commit is contained in:
25
Services/Manager/AuthoStatusServer.cs
Normal file
25
Services/Manager/AuthoStatusServer.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Models;
|
||||
using Models.ModelItems;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Services.Manager
|
||||
{
|
||||
public class AuthoStatusServer
|
||||
{
|
||||
public static AuthoStatusType AddAuthoStatus(string Name,string desc)
|
||||
{
|
||||
|
||||
AuthoStatusType authoStatus = Cache.CacheHelp.cacheSysAuthoStatusType.FirstOrDefault(x => x.Name == Name);
|
||||
if (authoStatus != null)
|
||||
return null;
|
||||
authoStatus = new AuthoStatusType() {Name = Name ,Desc = desc };
|
||||
SqlSugarBase.Db.Insertable(authoStatus).ExecuteCommand();
|
||||
Cache.CacheHelp.Removesys(Cache.CacheHelp.syskey.sysAuthoStatusTypeListKey);
|
||||
return authoStatus;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user