update&add 增加了选房及片区service
This commit is contained in:
19
Api/Ewide.Core/Enum/OrgType.cs
Normal file
19
Api/Ewide.Core/Enum/OrgType.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ewide.Core
|
||||
{
|
||||
public enum OrgType
|
||||
{
|
||||
市住建部门 = 1,
|
||||
|
||||
区住建部门 = 11,
|
||||
|
||||
乡镇街道办事处 = 21,
|
||||
|
||||
片区 = 31
|
||||
}
|
||||
}
|
||||
@@ -6794,6 +6794,11 @@
|
||||
所在机构名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Ewide.Core.Service.UserOutput.RoleCode">
|
||||
<summary>
|
||||
角色编号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Ewide.Core.Service.UserOutput.RoleName">
|
||||
<summary>
|
||||
角色名称
|
||||
@@ -7282,5 +7287,20 @@
|
||||
<param name="node"></param>
|
||||
<param name="childNodeLists"></param>
|
||||
</member>
|
||||
<member name="M:StringExtensions.ToCamelCase(System.String,System.Char,System.Boolean)">
|
||||
<summary>
|
||||
下划线转为驼峰
|
||||
</summary>
|
||||
<param name="str"></param>
|
||||
<param name="initialsUppder"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StringExtensions.ToUnderScoreCase(System.String)">
|
||||
<summary>
|
||||
驼峰转为下划线
|
||||
</summary>
|
||||
<param name="str"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -67,6 +67,11 @@ namespace Ewide.Core.Service
|
||||
/// </summary>
|
||||
public virtual string OrgName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色编号
|
||||
/// </summary>
|
||||
public virtual string RoleCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色名称
|
||||
/// </summary>
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace Ewide.Core.Service
|
||||
if (string.IsNullOrEmpty(user.Name))
|
||||
user.Name = user.Account;
|
||||
if (string.IsNullOrEmpty(user.NickName))
|
||||
user.NickName = user.Account;
|
||||
user.NickName = user.Name;
|
||||
var id = Guid.NewGuid().ToString();
|
||||
user.Id = id;
|
||||
await _sysUserRep.InsertAsync(user);
|
||||
|
||||
48
Api/Ewide.Core/Util/StringExtensions.cs
Normal file
48
Api/Ewide.Core/Util/StringExtensions.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public static class StringExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// 下划线转为驼峰
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="initialsUppder"></param>
|
||||
/// <returns></returns>
|
||||
public static string ToCamelCase(this string str, char split = '_', bool initialsUppder = true)
|
||||
{
|
||||
var _ = string.Join("",
|
||||
str.Split(split).Select(p => p.Length > 1 ?
|
||||
p.First().ToString().ToUpper() + p[1..] : p.ToUpper()
|
||||
)
|
||||
);
|
||||
|
||||
if (!initialsUppder && _.Length > 1)
|
||||
{
|
||||
_ = _.First().ToString().ToUpper() + _[1..];
|
||||
}
|
||||
|
||||
return _;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 驼峰转为下划线
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string ToUnderScoreCase(this string str)
|
||||
{
|
||||
var _ = new Regex(@"[A-Z]").Replace(str, "_$0");
|
||||
|
||||
if (_.Length > str.Length)
|
||||
{
|
||||
_ = _[1..];
|
||||
}
|
||||
|
||||
return _.ToLower();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user