4个文件已添加
1 文件已重命名
50个文件已修改
| | |
| | | <member name="M:FlexJobApi.UserServer.Application.GetResourcesQueryHandler.Handle(FlexJobApi.Core.GetResourcesQuery,System.Threading.CancellationToken)"> |
| | | <inheritdoc/> |
| | | </member> |
| | | <member name="T:FlexJobApi.Core.SyncDatabaseCommandHandler"> |
| | | <summary> |
| | | 同步数据库 |
| | | </summary> |
| | | </member> |
| | | <member name="M:FlexJobApi.Core.SyncDatabaseCommandHandler.#ctor"> |
| | | <summary> |
| | | 同步数据库 |
| | | </summary> |
| | | </member> |
| | | <member name="M:FlexJobApi.Core.SyncDatabaseCommandHandler.Handle(FlexJobApi.Core.SyncDatabaseCommand,System.Threading.CancellationToken)"> |
| | | <summary> |
| | | 同步数据库 |
| | | </summary> |
| | | <param name="request"></param> |
| | | <param name="cancellationToken"></param> |
| | | <returns></returns> |
| | | </member> |
| | | </members> |
| | | </doc> |
New file |
| | |
| | | using Aop.Api.Domain; |
| | | using EFCore.BulkExtensions; |
| | | using Furion.DatabaseAccessor; |
| | | using Furion.DatabaseAccessor.Extensions; |
| | | using MediatR; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace FlexJobApi.Core |
| | | { |
| | | /// <summary> |
| | | /// 同步数据库 |
| | | /// </summary> |
| | | public class SyncDatabaseCommandHandler() : |
| | | IRequestHandler<SyncDatabaseCommand, int> |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 同步数据库 |
| | | /// </summary> |
| | | /// <param name="request"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public async Task<int> Handle(SyncDatabaseCommand request, CancellationToken cancellationToken) |
| | | { |
| | | var count = 0; |
| | | count += await SyncData<DictionaryCategory>(); |
| | | count += await SyncTreeData<DictionaryData>(); |
| | | //count += await SyncData<ElectronSignSetting>(); |
| | | //count += await SyncData<Enterprise>(); |
| | | //count += await SyncData<EnterpriseAuth>(); |
| | | //count += await SyncData<EnterpriseCost>(); |
| | | //count += await SyncData<EnterpriseElectronSignSetting>(); |
| | | //count += await SyncData<EnterpriseWallet>(); |
| | | //count += await SyncData<EnterpriseWalletExpandindirectOrder>(); |
| | | //count += await SyncData<EnterpriseWalletExpandindirectOrderFile>(); |
| | | //count += await SyncData<User>(); |
| | | //count += await SyncData<UserAuth>(); |
| | | count += await SyncTreeData<Menu>(); |
| | | count += await SyncData<Resource>(); |
| | | count += await SyncData<Role>(); |
| | | count += await SyncData<RoleMenu>(); |
| | | count += await SyncData<RoleResource>(); |
| | | //count += await SyncData<UserRole>(); |
| | | //count += await SyncData<ContractTemplate>(); |
| | | //count += await SyncData<ContractTemplateValue>(); |
| | | return count; |
| | | } |
| | | |
| | | private async Task<int> SyncData<TEntity>() |
| | | where TEntity : CommonEntity, new() |
| | | { |
| | | var count = 0; |
| | | var repTarget = Db.GetRepository<TEntity, SyncTargetDbContextLocator>(); |
| | | var repSource = Db.GetRepository<TEntity, MasterDbContextLocator>(); |
| | | |
| | | var sources = await repSource.AsQueryable().AsNoTracking() |
| | | .OrderBy(it => it.Sort).ThenBy(it => it.CreatedTime) |
| | | .ToListAsync(); |
| | | var targets = await repTarget.AsQueryable().AsNoTracking() |
| | | .OrderBy(it => it.Sort).ThenBy(it => it.CreatedTime) |
| | | .ToListAsync(); |
| | | |
| | | var adds = sources.Where(s => !targets.Any(t => s.Id == t.Id)).ToList(); |
| | | if (adds.IsNotNull()) |
| | | { |
| | | await repTarget.Context.BulkInsertAsync(adds); |
| | | count += adds.Count; |
| | | } |
| | | |
| | | var updates = sources.Where(s => targets.Any(t => s.Id == t.Id)).ToList(); |
| | | if (updates.IsNotNull()) |
| | | { |
| | | await repTarget.Context.BulkUpdateAsync(updates); |
| | | count += updates.Count; |
| | | } |
| | | |
| | | var deletes = targets.Where(s => sources.Any(t => s.Id == t.Id)).ToList(); |
| | | if (deletes.IsNotNull()) |
| | | { |
| | | await repTarget.Context.BulkUpdateAsync(deletes); |
| | | count += deletes.Count; |
| | | } |
| | | |
| | | return count; |
| | | } |
| | | |
| | | private async Task<int> SyncTreeData<TEntity>() |
| | | where TEntity : CommonEntity, ITreeData<TEntity>, new() |
| | | { |
| | | var count = 0; |
| | | var repTarget = Db.GetRepository<TEntity, SyncTargetDbContextLocator>(); |
| | | var repSource = Db.GetRepository<TEntity, MasterDbContextLocator>(); |
| | | |
| | | var sourceData = await repSource.AsQueryable().AsNoTracking() |
| | | .OrderBy(it => it.Sort).ThenBy(it => it.CreatedTime) |
| | | .ToListAsync(); |
| | | var targetData = await repTarget.AsQueryable().AsNoTracking() |
| | | .OrderBy(it => it.Sort).ThenBy(it => it.CreatedTime) |
| | | .ToListAsync(); |
| | | |
| | | var sources = new List<TEntity>(); |
| | | var sourceParents = sourceData.Where(it => it.ParentId == null).ToList(); |
| | | LoopTreeData(sources, sourceData, sourceParents); |
| | | |
| | | var targets = new List<TEntity>(); |
| | | var targetParents = targetData.Where(it => it.ParentId == null).ToList(); |
| | | LoopTreeData(targets, targetData, targetParents); |
| | | |
| | | var adds = sources.Where(s => !targets.Any(t => s.Id == t.Id)).ToList(); |
| | | if (adds.IsNotNull()) |
| | | { |
| | | await repTarget.Context.BulkInsertAsync(adds); |
| | | count += adds.Count; |
| | | } |
| | | |
| | | var updates = sources.Where(s => targets.Any(t => s.Id == t.Id)).ToList(); |
| | | if (updates.IsNotNull()) |
| | | { |
| | | await repTarget.Context.BulkUpdateAsync(updates); |
| | | count += updates.Count; |
| | | } |
| | | |
| | | var deletes = targets.Where(s => sources.Any(t => s.Id == t.Id)).ToList(); |
| | | if (deletes.IsNotNull()) |
| | | { |
| | | await repTarget.Context.BulkUpdateAsync(deletes); |
| | | count += deletes.Count; |
| | | } |
| | | |
| | | return count; |
| | | } |
| | | |
| | | private void LoopTreeData<TEntity>(List<TEntity> entities, List<TEntity> all, List<TEntity> parents) |
| | | where TEntity : CommonEntity, ITreeData<TEntity>, new() |
| | | { |
| | | if (parents.IsNotNull()) |
| | | { |
| | | foreach (var parent in parents) |
| | | { |
| | | entities.Add(parent); |
| | | var children = all.Where(it => it.ParentId == parent.Id).ToList(); |
| | | LoopTreeData(entities, all, children); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace FlexJobApi.Core |
| | | { |
| | | /// <summary> |
| | | /// 同步目标数据库定位器 |
| | | /// </summary> |
| | | public class SyncTargetDbContextLocator : IDbContextLocator |
| | | { |
| | | } |
| | | } |
| | |
| | | |
| | | namespace FlexJobApi.Core |
| | | { |
| | | public abstract class CommonEntity<TDbContextLocator1> : Entity<Guid, TDbContextLocator1>, IPrivateEntity |
| | | public abstract class CommonEntity<TDbContextLocator1, TDbContextLocator2> : CommonEntity, IPrivateEntity |
| | | where TDbContextLocator1 : class, IDbContextLocator |
| | | where TDbContextLocator2 : class, IDbContextLocator |
| | | { |
| | | /// <summary> |
| | | /// 排序 |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 跟踪Id |
| | | /// </summary> |
| | | public virtual string TraceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建操作人 |
| | | /// </summary> |
| | | public virtual Guid? CreatedUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建企业Id |
| | | /// </summary> |
| | | public virtual Guid? CreatedEnterpriseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最后更新操作人 |
| | | /// </summary> |
| | | public virtual Guid? UpdatedUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否删除 |
| | | /// </summary> |
| | | public virtual bool IsDeleted { get; set; } |
| | | } |
| | | |
| | | public abstract class CommonEntity : Entity<Guid>, IPrivateEntity |
| | | public abstract class CommonEntity<TDbContextLocator1> : CommonEntity, IPrivateEntity |
| | | where TDbContextLocator1 : class, IDbContextLocator |
| | | { |
| | | } |
| | | |
| | | public abstract class CommonEntity : PrivateEntity<Guid>, IPrivateEntity |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 编号地址 |
| | | /// </summary> |
| | | public class CodeUrl : CommonEntity |
| | | public class CodeUrl : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 场景 |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 字典类别 |
| | | /// </summary> |
| | | public class DictionaryCategory : CommonEntity |
| | | public class DictionaryCategory : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 编号 |
| | |
| | | /// <summary> |
| | | /// 字典数据 |
| | | /// </summary> |
| | | public class DictionaryData : CommonEntity, IEntityTypeBuilder<DictionaryData>, ITreeData<DictionaryData>, IIsDisabled, IDbAuditLogIgnore |
| | | public class DictionaryData : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator>, IEntityTypeBuilder<DictionaryData>, ITreeData<DictionaryData>, IIsDisabled, IDbAuditLogIgnore |
| | | { |
| | | public DictionaryData() |
| | | { |
| | |
| | | using Furion.FriendlyException; |
| | | using Furion.DatabaseAccessor; |
| | | using Furion.FriendlyException; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | |
| | | /// <summary> |
| | | /// 资源 |
| | | /// </summary> |
| | | public class Resource : CommonEntity, IDbAuditLogIgnore, IPhysicalDeletion |
| | | public class Resource : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator>, IDbAuditLogIgnore, IPhysicalDeletion |
| | | { |
| | | /// <summary> |
| | | /// 应用名称 |
| | |
| | | /// <summary> |
| | | /// 定时任务-作业详情 |
| | | /// </summary> |
| | | public class ScheduleJobDetail : CommonEntity, IDbAuditLogIgnore |
| | | public class ScheduleJobDetail : CommonEntity<MasterDbContextLocator>, IDbAuditLogIgnore |
| | | { |
| | | /// <summary> |
| | | /// 作业Id |
| | |
| | | /// <summary> |
| | | /// 定时任务-作业触发器 |
| | | /// </summary> |
| | | public class ScheduleJobTrigger : CommonEntity, IDbAuditLogIgnore |
| | | public class ScheduleJobTrigger : CommonEntity<MasterDbContextLocator>, IDbAuditLogIgnore |
| | | { |
| | | /// <summary> |
| | | /// 作业触发器Id |
| | |
| | | /// <summary> |
| | | /// 任务信息 |
| | | /// </summary> |
| | | public class TaskInfo : CommonEntity, IEntityTypeBuilder<TaskInfo> |
| | | public class TaskInfo : CommonEntity<MasterDbContextLocator>, IEntityTypeBuilder<TaskInfo> |
| | | { |
| | | public TaskInfo() |
| | | { |
| | |
| | | /// <summary> |
| | | /// 任务福利 |
| | | /// </summary> |
| | | public class TaskInfoBenefit : CommonEntity, IEntityTypeBuilder<TaskInfoBenefit> |
| | | public class TaskInfoBenefit : CommonEntity<MasterDbContextLocator>, IEntityTypeBuilder<TaskInfoBenefit> |
| | | { |
| | | /// <summary> |
| | | /// 任务Id |
| | |
| | | |
| | | namespace FlexJobApi.Core |
| | | { |
| | | public class TaskInfoCredentialLimit : CommonEntity, IEntityTypeBuilder<TaskInfoCredentialLimit> |
| | | public class TaskInfoCredentialLimit : CommonEntity<MasterDbContextLocator>, IEntityTypeBuilder<TaskInfoCredentialLimit> |
| | | { |
| | | /// <summary> |
| | | /// 任务Id |
| | |
| | | /// <summary> |
| | | /// 任务人员信息 |
| | | /// </summary> |
| | | public class TaskInfoUser : CommonEntity, IEntityTypeBuilder<TaskInfoUser> |
| | | public class TaskInfoUser : CommonEntity<MasterDbContextLocator>, IEntityTypeBuilder<TaskInfoUser> |
| | | { |
| | | public TaskInfoUser() |
| | | { |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 任务人员提交信息 |
| | | /// </summary> |
| | | public class TaskInfoUserSubmit : CommonEntity |
| | | public class TaskInfoUserSubmit : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | public TaskInfoUserSubmit() |
| | | { |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 任务人员提交附件 |
| | | /// </summary> |
| | | public class TaskInfoUserSubmitFile : CommonEntity |
| | | public class TaskInfoUserSubmitFile : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 提交Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 用户任务收藏 |
| | | /// </summary> |
| | | public class TaskUserCollect : CommonEntity |
| | | public class TaskUserCollect : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 用户Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 合同制版 |
| | | /// </summary> |
| | | public class ContractTemplate : CommonEntity, IIsDisabled |
| | | public class ContractTemplate : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator>, IIsDisabled |
| | | { |
| | | public ContractTemplate() |
| | | { |
| | |
| | | using FlexJobApi.Core.Enums.Users; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 合同模板变量 |
| | | /// </summary> |
| | | public class ContractTemplateValue : CommonEntity, IPhysicalDeletion |
| | | public class ContractTemplateValue : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator>, IPhysicalDeletion |
| | | { |
| | | /// <summary> |
| | | /// 合同模板Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 电子签配置 |
| | | /// </summary> |
| | | public class ElectronSignSetting : CommonEntity, IIsDisabled |
| | | public class ElectronSignSetting : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator>, IIsDisabled |
| | | { |
| | | /// <summary> |
| | | /// 通道 |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 企业电子签配置 |
| | | /// </summary> |
| | | public class EnterpriseElectronSignSetting : CommonEntity |
| | | public class EnterpriseElectronSignSetting : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 企业Id |
| | |
| | | /// <summary> |
| | | /// 部门 |
| | | /// </summary> |
| | | public class Department : CommonEntity, IEntityTypeBuilder<Department>, IIsDisabled |
| | | public class Department : CommonEntity<MasterDbContextLocator>, IEntityTypeBuilder<Department>, IIsDisabled |
| | | { |
| | | public Department() |
| | | { |
| | |
| | | /// <summary> |
| | | /// 企业 |
| | | /// </summary> |
| | | public class Enterprise : CommonEntity, IEntityTypeBuilder<Enterprise> |
| | | public class Enterprise : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator>, IEntityTypeBuilder<Enterprise> |
| | | { |
| | | public Enterprise() |
| | | { |
| | |
| | | using Mapster; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | |
| | | /// <summary> |
| | | /// 企业认证 |
| | | /// </summary> |
| | | public class EnterpriseAuth : CommonEntity |
| | | public class EnterpriseAuth : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 企业信息 |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 企业用量明细 |
| | | /// </summary> |
| | | public class EnterpriseCost : CommonEntity |
| | | public class EnterpriseCost : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 企业Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 灵工 |
| | | /// </summary> |
| | | public class EnterpriseEmployee : CommonEntity |
| | | public class EnterpriseEmployee : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | public EnterpriseEmployee() |
| | | { |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 灵工合同 |
| | | /// </summary> |
| | | public class EnterpriseEmployeeContract : CommonEntity |
| | | public class EnterpriseEmployeeContract : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 灵工Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 企业收藏用户 |
| | | /// </summary> |
| | | public class EnterpriseUserCollect : CommonEntity |
| | | public class EnterpriseUserCollect : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 企业Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 企业钱包 |
| | | /// </summary> |
| | | public class EnterpriseWallet : CommonEntity |
| | | public class EnterpriseWallet : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 企业Id |
| | |
| | | using Aop.Api.Domain; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 企业钱包-资金二级商户KYB代进件单 |
| | | /// </summary> |
| | | public class EnterpriseWalletExpandindirectOrder : CommonEntity |
| | | public class EnterpriseWalletExpandindirectOrder : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | public EnterpriseWalletExpandindirectOrder() |
| | | { |
| | |
| | | using Aop.Api.Domain; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 企业钱包-资金二级商户KYB代进件单-附件 |
| | | /// </summary> |
| | | public class EnterpriseWalletExpandindirectOrderFile : CommonEntity |
| | | public class EnterpriseWalletExpandindirectOrderFile : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 代进件单Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 企业钱包交易记录 |
| | | /// </summary> |
| | | public class EnterpriseWalletTransaction : CommonEntity |
| | | public class EnterpriseWalletTransaction : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 企业钱包Id |
| | |
| | | /// <summary> |
| | | /// 菜单 |
| | | /// </summary> |
| | | public class Menu : CommonEntity, IEntityTypeBuilder<Menu>, ITreeData<Menu>, IIsDisabled |
| | | public class Menu : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator>, IEntityTypeBuilder<Menu>, ITreeData<Menu>, IIsDisabled |
| | | { |
| | | public Menu() |
| | | { |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 角色 |
| | | /// </summary> |
| | | public class Role : CommonEntity, IIsDisabled |
| | | public class Role : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator>, IIsDisabled |
| | | { |
| | | public Role() |
| | | { |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 角色菜单 |
| | | /// </summary> |
| | | public class RoleMenu : CommonEntity |
| | | public class RoleMenu : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 角色Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 角色资源 |
| | | /// </summary> |
| | | public class RoleResource : CommonEntity |
| | | public class RoleResource : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 角色Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 用户信息角色 |
| | | /// </summary> |
| | | public class UserRole : CommonEntity |
| | | public class UserRole : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 用户信息Id |
| | |
| | | /// <summary> |
| | | /// 用户信息资格证书 |
| | | /// </summary> |
| | | public class UserCredential : CommonEntity, IEntityTypeBuilder<UserCredential> |
| | | public class UserCredential : CommonEntity<MasterDbContextLocator>, IEntityTypeBuilder<UserCredential> |
| | | { |
| | | /// <summary> |
| | | /// 用户信息Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 用户信息部门 |
| | | /// </summary> |
| | | public class UserDepartment : CommonEntity |
| | | public class UserDepartment : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 用户信息Id |
| | |
| | | /// <summary> |
| | | /// 用户信息期望岗位 |
| | | /// </summary> |
| | | public class UserExpectJob : CommonEntity, IEntityTypeBuilder<UserExpectJob> |
| | | public class UserExpectJob : CommonEntity<MasterDbContextLocator>, IEntityTypeBuilder<UserExpectJob> |
| | | { |
| | | /// <summary> |
| | | /// 用户信息Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 用户信息生活照 |
| | | /// </summary> |
| | | public class UserPhoto : CommonEntity |
| | | public class UserPhoto : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 用户信息Id |
| | |
| | | /// <summary> |
| | | /// 用户信息 |
| | | /// </summary> |
| | | public class User : CommonEntity, IEntitySeedData<User>, IEntityTypeBuilder<User> |
| | | public class User : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator>, IEntitySeedData<User>, IEntityTypeBuilder<User> |
| | | { |
| | | public User() |
| | | { |
| | |
| | | /// <summary> |
| | | /// 用户认证 |
| | | /// </summary> |
| | | public class UserAuth : CommonEntity |
| | | public class UserAuth : CommonEntity<MasterDbContextLocator, SyncTargetDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 用户信息 |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 用户银行卡信息 |
| | | /// </summary> |
| | | public class UserBankCard : CommonEntity |
| | | public class UserBankCard : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 用户信息Id |
| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// <summary> |
| | | /// 用户运营园区 |
| | | /// </summary> |
| | | public class UserManageIndustrialPark : CommonEntity |
| | | public class UserManageIndustrialPark : CommonEntity<MasterDbContextLocator> |
| | | { |
| | | /// <summary> |
| | | /// 用户信息Id |
| | |
| | | /// </summary> |
| | | [ResourceController(EnumResourceService.CommonServer, "LogRecords")] |
| | | CommonServerLogRecords, |
| | | /// <summary> |
| | | /// 同步数据库 |
| | | /// </summary> |
| | | [ResourceController(EnumResourceService.CommonServer, "SyncDatabase")] |
| | | CommonServerSyncDatabase, |
| | | |
| | | /// <summary> |
| | | /// 用户认证 |
| | |
| | | 日志数据库定位器 |
| | | </summary> |
| | | </member> |
| | | <member name="P:FlexJobApi.Core.CommonEntity`1.Sort"> |
| | | <member name="T:FlexJobApi.Core.SyncTargetDbContextLocator"> |
| | | <summary> |
| | | 排序 |
| | | </summary> |
| | | </member> |
| | | <member name="P:FlexJobApi.Core.CommonEntity`1.TraceId"> |
| | | <summary> |
| | | 跟踪Id |
| | | </summary> |
| | | </member> |
| | | <member name="P:FlexJobApi.Core.CommonEntity`1.CreatedUserId"> |
| | | <summary> |
| | | 创建操作人 |
| | | </summary> |
| | | </member> |
| | | <member name="P:FlexJobApi.Core.CommonEntity`1.CreatedEnterpriseId"> |
| | | <summary> |
| | | 创建企业Id |
| | | </summary> |
| | | </member> |
| | | <member name="P:FlexJobApi.Core.CommonEntity`1.UpdatedUserId"> |
| | | <summary> |
| | | 最后更新操作人 |
| | | </summary> |
| | | </member> |
| | | <member name="P:FlexJobApi.Core.CommonEntity`1.IsDeleted"> |
| | | <summary> |
| | | 是否删除 |
| | | 同步目标数据库定位器 |
| | | </summary> |
| | | </member> |
| | | <member name="P:FlexJobApi.Core.CommonEntity.Id"> |
| | |
| | | 日志记录 |
| | | </summary> |
| | | </member> |
| | | <member name="F:FlexJobApi.Core.EnumResourceController.CommonServerSyncDatabase"> |
| | | <summary> |
| | | 同步数据库 |
| | | </summary> |
| | | </member> |
| | | <member name="F:FlexJobApi.Core.EnumResourceController.UserServerAuth"> |
| | | <summary> |
| | | 用户认证 |
| | |
| | | 响应类型全名 |
| | | </summary> |
| | | </member> |
| | | <member name="T:FlexJobApi.Core.SyncDatabaseCommand"> |
| | | <summary> |
| | | 同步数据库 |
| | | </summary> |
| | | </member> |
| | | <member name="T:FlexJobApi.Core.Models.ElectronSignServer.Contracts.SendContractInput"> |
| | | <summary> |
| | | 发起签约 |
New file |
| | |
| | | using MediatR; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace FlexJobApi.Core |
| | | { |
| | | /// <summary> |
| | | /// 同步数据库 |
| | | /// </summary> |
| | | [Resource([EnumResourceController.CommonServerSyncDatabase])] |
| | | public class SyncDatabaseCommand : IRequest<int> |
| | | { |
| | | } |
| | | } |
| | |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.ToTable("CodeUrl"); |
| | | b.ToTable("CodeUrl", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.ContractTemplate", b => |
| | |
| | | |
| | | b.HasIndex("EnterpriseId"); |
| | | |
| | | b.ToTable("ContractTemplate"); |
| | | b.ToTable("ContractTemplate", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.ContractTemplateValue", b => |
| | |
| | | |
| | | b.HasIndex("TemplateId"); |
| | | |
| | | b.ToTable("ContractTemplateValue"); |
| | | b.ToTable("ContractTemplateValue", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.Department", b => |
| | |
| | | |
| | | b.HasIndex("ParentId"); |
| | | |
| | | b.ToTable("Department"); |
| | | b.ToTable("Department", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.DictionaryCategory", b => |
| | |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.ToTable("DictionaryCategory"); |
| | | b.ToTable("DictionaryCategory", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.DictionaryData", b => |
| | |
| | | |
| | | b.HasIndex("ParentId"); |
| | | |
| | | b.ToTable("DictionaryData"); |
| | | b.ToTable("DictionaryData", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.ElectronSignSetting", b => |
| | |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.ToTable("ElectronSignSetting"); |
| | | b.ToTable("ElectronSignSetting", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.Enterprise", b => |
| | |
| | | |
| | | b.HasIndex("ProvinceCode"); |
| | | |
| | | b.ToTable("Enterprise"); |
| | | b.ToTable("Enterprise", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseAuth", b => |
| | |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.ToTable("EnterpriseAuth"); |
| | | b.ToTable("EnterpriseAuth", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseCost", b => |
| | |
| | | |
| | | b.HasIndex("EnterpriseId"); |
| | | |
| | | b.ToTable("EnterpriseCost"); |
| | | b.ToTable("EnterpriseCost", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseElectronSignSetting", b => |
| | |
| | | |
| | | b.HasIndex("EnterpriseId"); |
| | | |
| | | b.ToTable("EnterpriseElectronSignSetting"); |
| | | b.ToTable("EnterpriseElectronSignSetting", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployee", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("EnterpriseEmployee"); |
| | | b.ToTable("EnterpriseEmployee", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployeeContract", b => |
| | |
| | | |
| | | b.HasIndex("EnterpriseEmployeeId"); |
| | | |
| | | b.ToTable("EnterpriseEmployeeContract"); |
| | | b.ToTable("EnterpriseEmployeeContract", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseUserCollect", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("EnterpriseUserCollect"); |
| | | b.ToTable("EnterpriseUserCollect", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseWallet", b => |
| | |
| | | |
| | | b.HasIndex("EnterpriseId"); |
| | | |
| | | b.ToTable("EnterpriseWallet"); |
| | | b.ToTable("EnterpriseWallet", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseWalletExpandindirectOrder", b => |
| | |
| | | |
| | | b.HasIndex("WalletId"); |
| | | |
| | | b.ToTable("EnterpriseWalletExpandindirectOrder"); |
| | | b.ToTable("EnterpriseWalletExpandindirectOrder", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseWalletExpandindirectOrderFile", b => |
| | |
| | | |
| | | b.HasIndex("OrderId"); |
| | | |
| | | b.ToTable("EnterpriseWalletExpandindirectOrderFile"); |
| | | b.ToTable("EnterpriseWalletExpandindirectOrderFile", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.EnterpriseWalletTransaction", b => |
| | |
| | | |
| | | b.HasIndex("WalletId"); |
| | | |
| | | b.ToTable("EnterpriseWalletTransaction"); |
| | | b.ToTable("EnterpriseWalletTransaction", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.Menu", b => |
| | |
| | | |
| | | b.HasIndex("ParentId"); |
| | | |
| | | b.ToTable("Menu"); |
| | | b.ToTable("Menu", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.Resource", b => |
| | |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.ToTable("Resource"); |
| | | b.ToTable("Resource", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.Role", b => |
| | |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.ToTable("Role"); |
| | | b.ToTable("Role", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.RoleMenu", b => |
| | |
| | | |
| | | b.HasIndex("RoleId"); |
| | | |
| | | b.ToTable("RoleMenu"); |
| | | b.ToTable("RoleMenu", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.RoleResource", b => |
| | |
| | | |
| | | b.HasIndex("RoleId"); |
| | | |
| | | b.ToTable("RoleResource"); |
| | | b.ToTable("RoleResource", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.ScheduleJobDetail", b => |
| | |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.ToTable("ScheduleJobDetail"); |
| | | b.ToTable("ScheduleJobDetail", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.ScheduleJobTrigger", b => |
| | |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.ToTable("ScheduleJobTrigger"); |
| | | b.ToTable("ScheduleJobTrigger", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.TaskInfo", b => |
| | |
| | | |
| | | b.HasIndex("ProvinceCode"); |
| | | |
| | | b.ToTable("TaskInfo"); |
| | | b.ToTable("TaskInfo", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.TaskInfoBenefit", b => |
| | |
| | | |
| | | b.HasIndex("TaskInfoId"); |
| | | |
| | | b.ToTable("TaskInfoBenefit"); |
| | | b.ToTable("TaskInfoBenefit", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.TaskInfoCredentialLimit", b => |
| | |
| | | |
| | | b.HasIndex("TypeCode"); |
| | | |
| | | b.ToTable("TaskInfoCredentialLimit"); |
| | | b.ToTable("TaskInfoCredentialLimit", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.TaskInfoUser", b => |
| | |
| | | |
| | | b.HasIndex("TaskInfoId"); |
| | | |
| | | b.ToTable("TaskInfoUser"); |
| | | b.ToTable("TaskInfoUser", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.TaskInfoUserSubmit", b => |
| | |
| | | |
| | | b.HasIndex("TaskInfoUserId"); |
| | | |
| | | b.ToTable("TaskInfoUserSubmit"); |
| | | b.ToTable("TaskInfoUserSubmit", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.TaskInfoUserSubmitFile", b => |
| | |
| | | |
| | | b.HasIndex("SubmitId"); |
| | | |
| | | b.ToTable("TaskInfoUserSubmitFile"); |
| | | b.ToTable("TaskInfoUserSubmitFile", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.TaskUserCollect", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("TaskUserCollect"); |
| | | b.ToTable("TaskUserCollect", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.User", b => |
| | |
| | | |
| | | b.HasIndex("ProvinceCode"); |
| | | |
| | | b.ToTable("User"); |
| | | b.ToTable("User", (string)null); |
| | | |
| | | b.HasData( |
| | | new |
| | |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.ToTable("UserAuth"); |
| | | b.ToTable("UserAuth", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.UserBankCard", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("UserBankCard"); |
| | | b.ToTable("UserBankCard", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.UserCredential", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("UserCredential"); |
| | | b.ToTable("UserCredential", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.UserDepartment", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("UserDepartment"); |
| | | b.ToTable("UserDepartment", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.UserExpectJob", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("UserExpectJob"); |
| | | b.ToTable("UserExpectJob", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.UserManageIndustrialPark", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("UserManageIndustrialPark"); |
| | | b.ToTable("UserManageIndustrialPark", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.UserPhoto", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("UserPhoto"); |
| | | b.ToTable("UserPhoto", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.UserRole", b => |
| | |
| | | |
| | | b.HasIndex("UserId"); |
| | | |
| | | b.ToTable("UserRole"); |
| | | b.ToTable("UserRole", (string)null); |
| | | }); |
| | | |
| | | modelBuilder.Entity("FlexJobApi.Core.ContractTemplate", b => |
| | |
| | | -------------------------------主数据库--------------------------------------- |
| | | |
| | | 新增迁移文件 |
| | | dotnet ef migrations add UpdateEnterpriseWallet0905005 -s "../FlexJobApi.Web.Entry" -c DefaultDbContext |
| | | dotnet ef migrations add UpdateEnterpriseWallet0905008 -s "../FlexJobApi.Web.Entry" -c DefaultDbContext |
| | | |
| | | 删除迁移文件 |
| | | dotnet ef migrations remove -s "../FlexJobApi.Web.Entry" -c DefaultDbContext |
New file |
| | |
| | | using FlexJobApi.Core; |
| | | using Furion; |
| | | using Furion.DatabaseAccessor; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore.Diagnostics; |
| | | using Microsoft.Extensions.Configuration; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace FlexJobApi.EntityFramework.Core |
| | | { |
| | | /// <summary> |
| | | /// 人力资源数据库上下文 |
| | | /// </summary> |
| | | [AppDbContext("SyncTarget", DbProvider.SqlServer)] |
| | | public class SyncTargetDbContext : AppDbContext<SyncTargetDbContext, SyncTargetDbContextLocator> |
| | | { |
| | | public SyncTargetDbContext(DbContextOptions<SyncTargetDbContext> options) : base(options) |
| | | { |
| | | } |
| | | |
| | | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) |
| | | { |
| | | base.OnConfiguring(optionsBuilder); |
| | | optionsBuilder |
| | | .UseSqlServer(App.Configuration.GetConnectionString("SyncTarget"), options => |
| | | { |
| | | // 指定目标数据库版本为SQL Server 2014 |
| | | options.UseCompatibilityLevel(120); // 120对应SQL Server 2014 |
| | | // 可选:设置批量操作大小(按需调整) |
| | | options.MaxBatchSize(1000); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | options.AddDbPool<DefaultDbContext>(); |
| | | options.AddDbPool<LogDbContext, LogDbContextLocator>(); |
| | | options.AddDbPool<HumanResourcesDbContext, HumanResourcesDbContextLocator>(); |
| | | options.AddDbPool<SyncTargetDbContext, SyncTargetDbContextLocator>(); |
| | | }, "FlexJobApi.Database.Migrations"); |
| | | |
| | | } |
| | | } |
| | |
| | | .FirstOrDefaultAsync(); |
| | | if (user == null) throw Oops.Oh(EnumErrorCodeType.s404, "用户"); |
| | | if (user.IsReal) throw Oops.Oh(EnumErrorCodeType.s510, "用户已实名,请勿重复申请"); |
| | | if (user.UserAuth == null) |
| | | { |
| | | user.UserAuth = new UserAuth(); |
| | | } |
| | | if (user.UserAuth.ElectronSignUserId == null) |
| | | { |
| | | var resultRegOrUpdateUser = await new RegOrUpdateUserInput |
| | | { |
| | | OutUserId = user.Id.ToString(), |
| | | UserType = EnumElectronSignUserType.Personal, |
| | | Name = request.Name, |
| | | Identity = request.Identity, |
| | | Mobile = request.PhoneNumber |
| | | }.SendHttpAsync<RegOrUpdateUserInput, ElectronSignServerResult<Guid?>>(EnumResourceHttpProvider.ElectronSignServerCustomer); |
| | | |
| | | if (resultRegOrUpdateUser?.Success == true) |
| | | { |
| | | user.UserAuth.ElectronSignUserId = resultRegOrUpdateUser.Result; |
| | | } |
| | | else |
| | | { |
| | | throw Oops.Oh(EnumErrorCodeType.s510, resultRegOrUpdateUser?.Message ?? "注册实名账号异常"); |
| | | } |
| | | } |
| | | var result = await new RealPersonalInput |
| | | { |
| | | OutUserId = user.Id.ToString(), |
| | |
| | | { |
| | | user.UserAuth = new UserAuth(); |
| | | } |
| | | if (user.UserAuth.Name == request.Name |
| | | && user.UserAuth.Identity == request.Identity |
| | | && user.UserAuth.RealStatus == EnumPersonalUserRealStatus.Checking |
| | | && user.UserAuth.FaceRealUrl.IsNotNull()) |
| | | return user.UserAuth.FaceRealUrl; |
| | | if (user.UserAuth.ElectronSignUserId == null) |
| | | { |
| | | var resultRegOrUpdateUser = await new RegOrUpdateUserInput |
| | | { |
| | | OutUserId = user.Id.ToString(), |
| | | UserType = EnumElectronSignUserType.Personal, |
| | | Name = request.Name, |
| | | Identity = request.Identity, |
| | | Mobile = user.PhoneNumber |
| | | }.SendHttpAsync<RegOrUpdateUserInput, ElectronSignServerResult<Guid?>>(EnumResourceHttpProvider.ElectronSignServerCustomer); |
| | | |
| | | if (resultRegOrUpdateUser?.Success == true) |
| | | { |
| | | user.UserAuth.ElectronSignUserId = resultRegOrUpdateUser.Result; |
| | | } |
| | | else |
| | | { |
| | | throw Oops.Oh(EnumErrorCodeType.s510, resultRegOrUpdateUser?.Message ?? "注册实名账号异常"); |
| | | } |
| | | } |
| | | var result = await new RealPersonalInput |
| | | { |
| | | OutUserId = user.Id.ToString(), |
| | |
| | | "ConnectionStrings": { |
| | | "FlexJobApi": "Server=120.26.58.240; Database=Dev_FlexJobApi; User=bole;Password=Bole1472589;Encrypt=false;", |
| | | "FlexJobApiLog": "Server=120.26.58.240; Database=Dev_FlexJobApiLog; User=bole;Password=Bole1472589;Encrypt=false;", |
| | | "HumanResources": "Server=120.26.58.240; Database=Dev_12333; User=bole;Password=Bole1472589;Encrypt=false;" |
| | | "HumanResources": "Server=120.26.58.240; Database=Dev_12333; User=bole;Password=Bole1472589;Encrypt=false;", |
| | | "SyncTarget": "Server=rm-bp1mt744021h1s6dg4o.sqlserver.rds.aliyuncs.com,2333; Database=Pro_FlexJobApi; User=bole;Password=Blcs20@%27;Encrypt=false;" |
| | | |
| | | //"FlexJobApi": "Server=rm-bp1mt744021h1s6dg4o.sqlserver.rds.aliyuncs.com,2333; Database=Pro_FlexJobApi; User=bole;Password=Blcs20@%27;Encrypt=false;", |
| | | //"FlexJobApiLog": "Server=rm-bp1mt744021h1s6dg4o.sqlserver.rds.aliyuncs.com,2333; Database=Pro_FlexJobApiLog; User=bole;Password=Blcs20@%27;Encrypt=false;", |
| | | //"HumanResources": "Server=rm-bp1mt744021h1s6dg4o.sqlserver.rds.aliyuncs.com,2333; Database=Pro_12333; User=bole;Password=Blcs20@%27;Encrypt=false;", |
| | | //"SyncTarget": "Server=rm-bp1mt744021h1s6dg4o.sqlserver.rds.aliyuncs.com,2333; Database=Pro_FlexJobApi; User=bole;Password=Blcs20@%27;Encrypt=false;" |
| | | }, |
| | | "Consul": { |
| | | "Address": "http://localhost:8500/", |