😎1、调整新增账号时默认密码逻辑 2、代码清理及格式化
This commit is contained in:
parent
ccdd8f4b65
commit
ce82cab83d
@ -110,10 +110,8 @@ public class SysUserService : IDynamicApiController, ITransient
|
|||||||
if (await query.AnyAsync(u => u.Account == input.Account)) throw Oops.Oh(ErrorCodeEnum.D1003);
|
if (await query.AnyAsync(u => u.Account == input.Account)) throw Oops.Oh(ErrorCodeEnum.D1003);
|
||||||
if (!string.IsNullOrWhiteSpace(input.Phone) && await query.AnyAsync(u => u.Phone == input.Phone)) throw Oops.Oh(ErrorCodeEnum.D1032);
|
if (!string.IsNullOrWhiteSpace(input.Phone) && await query.AnyAsync(u => u.Phone == input.Phone)) throw Oops.Oh(ErrorCodeEnum.D1032);
|
||||||
|
|
||||||
var password = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SysPassword);
|
// 若没有设置密码则取默认密码
|
||||||
// 如果有传密码上来,就不使用默认密码
|
var password = !string.IsNullOrWhiteSpace(input.Password) ? input.Password : await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SysPassword);
|
||||||
if (!string.IsNullOrWhiteSpace(input.Password))
|
|
||||||
password = input.Password;
|
|
||||||
var user = input.Adapt<SysUser>();
|
var user = input.Adapt<SysUser>();
|
||||||
user.Password = CryptogramHelper.Encrypt(password);
|
user.Password = CryptogramHelper.Encrypt(password);
|
||||||
var newUser = await _sysUserRep.AsInsertable(user).ExecuteReturnEntityAsync();
|
var newUser = await _sysUserRep.AsInsertable(user).ExecuteReturnEntityAsync();
|
||||||
|
|||||||
@ -51,10 +51,10 @@
|
|||||||
"jwchat": "^2.0.3",
|
"jwchat": "^2.0.3",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"magic-string": "^0.30.17",
|
"magic-string": "^0.30.17",
|
||||||
"md-editor-v3": "^5.8.1",
|
"md-editor-v3": "^5.8.2",
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"monaco-editor": "^0.52.2",
|
"monaco-editor": "^0.52.2",
|
||||||
"mqtt": "^5.13.2",
|
"mqtt": "^5.13.3",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"ol": "^10.6.1",
|
"ol": "^10.6.1",
|
||||||
"pinia": "^3.0.3",
|
"pinia": "^3.0.3",
|
||||||
|
|||||||
@ -37,10 +37,9 @@
|
|||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
<el-tag>{{ props.data.updateTime ?? t('message.list.none') }}</el-tag>
|
<el-tag>{{ props.data.updateTime ?? t('message.list.none') }}</el-tag>
|
||||||
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template #label>
|
<template #label>
|
||||||
<el-text>
|
<el-text>
|
||||||
<el-icon><ele-OfficeBuilding /></el-icon>{{ t('message.list.organizationName') }}
|
<el-icon><ele-OfficeBuilding /></el-icon>{{ t('message.list.organizationName') }}
|
||||||
|
|||||||
4
Web/src/types/views.d.ts
vendored
4
Web/src/types/views.d.ts
vendored
@ -323,7 +323,7 @@ declare type TableDemoState = {
|
|||||||
tableData: {
|
tableData: {
|
||||||
// data: EmptyObjectType[];
|
// data: EmptyObjectType[];
|
||||||
// header: TableHeaderType[];
|
// header: TableHeaderType[];
|
||||||
columns: Object[]; //列设置,å<EFBFBD>ŒELTable-Column属æ€?
|
columns: Object[]; //列设置,同ELTable-Column属性
|
||||||
config: {
|
config: {
|
||||||
// total: number;
|
// total: number;
|
||||||
// loading: boolean;
|
// loading: boolean;
|
||||||
@ -350,7 +350,7 @@ declare type TableDemoState = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// HTTP 作业消æ<EFBFBD>¯ï¼ˆå—段定义æ<EFBFBD>¥æº?Furion çš?HttpJobMessageï¼?
|
// HTTP 作业消息(字段定义来源 Furion 的 HttpJobMessage)
|
||||||
interface HttpJobMessage {
|
interface HttpJobMessage {
|
||||||
requestUri?: string | null;
|
requestUri?: string | null;
|
||||||
httpMethod?: string | null;
|
httpMethod?: string | null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user