😎1、调整新增账号时默认密码逻辑 2、代码清理及格式化

This commit is contained in:
zuohuaijun 2025-07-18 20:20:15 +08:00
parent ccdd8f4b65
commit ce82cab83d
4 changed files with 8 additions and 11 deletions

View File

@ -109,11 +109,9 @@ public class SysUserService : IDynamicApiController, ITransient
var query = _sysUserRep.AsQueryable().ClearFilter();
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);
var password = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SysPassword);
// 如果有传密码上来,就不使用默认密码
if (!string.IsNullOrWhiteSpace(input.Password))
password = input.Password;
// 若没有设置密码则取默认密码
var password = !string.IsNullOrWhiteSpace(input.Password) ? input.Password : await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SysPassword);
var user = input.Adapt<SysUser>();
user.Password = CryptogramHelper.Encrypt(password);
var newUser = await _sysUserRep.AsInsertable(user).ExecuteReturnEntityAsync();

View File

@ -51,10 +51,10 @@
"jwchat": "^2.0.3",
"lodash-es": "^4.17.21",
"magic-string": "^0.30.17",
"md-editor-v3": "^5.8.1",
"md-editor-v3": "^5.8.2",
"mitt": "^3.0.1",
"monaco-editor": "^0.52.2",
"mqtt": "^5.13.2",
"mqtt": "^5.13.3",
"nprogress": "^0.2.0",
"ol": "^10.6.1",
"pinia": "^3.0.3",

View File

@ -37,10 +37,9 @@
</el-text>
</template>
<el-tag>{{ props.data.updateTime ?? t('message.list.none') }}</el-tag>
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item>
<template #label>
<el-text>
<el-icon><ele-OfficeBuilding /></el-icon>{{ t('message.list.organizationName') }}

View File

@ -323,7 +323,7 @@ declare type TableDemoState = {
tableData: {
// data: EmptyObjectType[];
// header: TableHeaderType[];
columns: Object[]; //列设置,å<EFBFBD>ŒELTable-Column属æ€?
columns: Object[]; //列设置同ELTable-Column属性
config: {
// total: number;
// loading: boolean;
@ -350,7 +350,7 @@ declare type TableDemoState = {
};
};
// HTTP 作业消æ<EFBFBD>¯ï¼ˆå­—段定义æ<EFBFBD>¥æº?Furion çš?HttpJobMessageï¼?
// HTTP 作业消息(字段定义来源 Furion 的 HttpJobMessage
interface HttpJobMessage {
requestUri?: string | null;
httpMethod?: string | null;