端口号修改 3=>5
This commit is contained in:
parent
5ff1a4ddd4
commit
295317a72b
File diff suppressed because it is too large
Load Diff
@ -1,77 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2025082201 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "CHECK_TYPE_ID",
|
||||
table: "T_WB_SAFE_CHECK",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "CODE",
|
||||
table: "T_WB_SAFE_CHECK",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NAME",
|
||||
table: "T_WB_SAFE_CHECK",
|
||||
type: "nvarchar(200)",
|
||||
maxLength: 200,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PLAN_SET_ID",
|
||||
table: "T_WB_SAFE_CHECK",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_WB_SAFE_CHECK_CHECK_TYPE_ID",
|
||||
table: "T_WB_SAFE_CHECK",
|
||||
column: "CHECK_TYPE_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_WB_SAFE_CHECK_T_WB_CHECK_TYPE_CHECK_TYPE_ID",
|
||||
table: "T_WB_SAFE_CHECK",
|
||||
column: "CHECK_TYPE_ID",
|
||||
principalTable: "T_WB_CHECK_TYPE",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_WB_SAFE_CHECK_T_WB_CHECK_TYPE_CHECK_TYPE_ID",
|
||||
table: "T_WB_SAFE_CHECK");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_WB_SAFE_CHECK_CHECK_TYPE_ID",
|
||||
table: "T_WB_SAFE_CHECK");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CHECK_TYPE_ID",
|
||||
table: "T_WB_SAFE_CHECK");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CODE",
|
||||
table: "T_WB_SAFE_CHECK");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NAME",
|
||||
table: "T_WB_SAFE_CHECK");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PLAN_SET_ID",
|
||||
table: "T_WB_SAFE_CHECK");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": true,
|
||||
"applicationUrl": "http://localhost:3101"
|
||||
"applicationUrl": "http://localhost:5101"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": true,
|
||||
"applicationUrl": "http://localhost:3178"
|
||||
"applicationUrl": "http://localhost:5178"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:3107"
|
||||
"applicationUrl": "http://localhost:5107"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"applicationUrl": "http://localhost:3119",
|
||||
"applicationUrl": "http://localhost:5119",
|
||||
"nativeDebugging": false
|
||||
},
|
||||
"Docker": {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": true,
|
||||
"applicationUrl": "http://localhost:3117"
|
||||
"applicationUrl": "http://localhost:5117"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:3109"
|
||||
"applicationUrl": "http://localhost:5109"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:3111"
|
||||
"applicationUrl": "http://localhost:5111"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:3116"
|
||||
"applicationUrl": "http://localhost:5116"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@ -30,6 +30,8 @@ using IdentityModel.Client;
|
||||
using System.Threading.Tasks;
|
||||
using APT.MS.Domain.ApiModel.PF;
|
||||
using APT.MS.Domain.Entities.BI;
|
||||
using APT.Migrations;
|
||||
using APT.BaseData.Domain.Entities.OP;
|
||||
|
||||
namespace APT.PF.WebApiControllers.Api.PF
|
||||
{
|
||||
@ -215,7 +217,7 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
? (int)PFPlatTypeEnum.后台 : Convert.ToInt32(filter.Parameter3);
|
||||
Guid orgId = Guid.Empty;
|
||||
|
||||
#region 登录优化
|
||||
#region 登录优化 orgId
|
||||
|
||||
if (string.IsNullOrEmpty(filter.Parameter4) && !filter.OrgId.HasValue && Request.Host.HasValue && Request.Host.Port.HasValue)
|
||||
{
|
||||
@ -292,6 +294,36 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
uExpress = uExpress.And(t => t.PASSWORD == userPassword || t.PASSWORD == userPasswordLower);
|
||||
}
|
||||
user = this.GetEntity<T_FM_USER>(uExpress, userFilter);
|
||||
|
||||
//#region 重写 user = this.GetEntity<T_FM_USER>(uExpress, userFilter);
|
||||
|
||||
//var SelectField = new string[] { "CODE", "Nav_ProdutionUnit.Nav_Enums.VALUE", "DEPARTMENT_ID" };
|
||||
//string conn = string.Empty;
|
||||
//using (var context = new MigrationContext(ConfigurationManager.ConnectionStrings["default"]))
|
||||
//{
|
||||
// var tenant = context.GetEntity<T_OP_TENANT>(i => i.CODE == telnetCode, new string[] { "Nav_TenantDB" });
|
||||
// if (tenant.Nav_TenantDB != null)
|
||||
// {
|
||||
// conn = tenant.Nav_TenantDB.DB_CONN;
|
||||
// if (ConfigurationManager.AppSettings["Env"] == ((int)BaseData.Domain.Enums.OP.EnvType.外网).ToString())
|
||||
// {
|
||||
// conn = tenant.Nav_TenantDB.DB_CONN_WAN;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
////没找到用户对应数据库
|
||||
//if (string.IsNullOrEmpty(conn))
|
||||
//{
|
||||
// throw new Exception("获取用户公司信息失败!");
|
||||
//}
|
||||
|
||||
//using (var contextSub = new MigrationContext(conn))
|
||||
//{
|
||||
// user = contextSub.GetEntity(uExpress, SelectField);
|
||||
//}
|
||||
|
||||
//#endregion
|
||||
|
||||
if (user == null)
|
||||
throw new Exception(ErrMsg.PM_PSD_ERROR);
|
||||
user.MineType = string.Join(",", user.Nav_ProdutionUnit?.Select(i => i?.Nav_Enums?.VALUE));
|
||||
|
||||
@ -343,6 +343,79 @@ namespace APT.PF.WebApi.Controllers.Api.FM
|
||||
loginUser.Tenant = filter.SpecifyTenant;
|
||||
return loginUser;
|
||||
}
|
||||
|
||||
//private T_FM_USER GetUser(TokenRequest request, BaseFilter filter)
|
||||
//{
|
||||
// //var commonService = APT.Infrastructure.Api.ServiceLocator.Instance.GetService<IFMUserService>();
|
||||
// if (string.IsNullOrEmpty(request.UserName.Trim()))
|
||||
// return null;
|
||||
// T_FM_USER loginUser = null;
|
||||
// //app查询需要返回租户信息
|
||||
// //if (request.ClientId == "app")
|
||||
// //{
|
||||
// var pwdLower = request.Password.ToLower();
|
||||
// var pwdUpper = request.Password.ToUpper();
|
||||
// var md5SuperPwd = DataHelper.MD5(SUPER_PASSWORD);
|
||||
// string conn = string.Empty;
|
||||
// using (var context = new MigrationContext(ConfigurationManager.ConnectionStrings["default"]))
|
||||
// {
|
||||
// var opUser = context.GetEntity<T_OP_ALLUSER>(i => !i.IS_DELETED && (i.CODE == request.UserName || i.PHONE == request.UserName), new string[] { "CODE", "TENANT", "PHONE" });
|
||||
// if (opUser == null)
|
||||
// throw new Exception("用户账号不存在");
|
||||
// filter.IsSpecifyDb = true;
|
||||
// filter.SpecifyTenant = opUser.TENANT;
|
||||
// filter.IgnoreOrgRule = true;
|
||||
|
||||
// var tenant = context.GetEntity<T_OP_TENANT>(i => i.CODE == opUser.TENANT, new string[] { "Nav_TenantDB" });
|
||||
// //if (tenantDomain == null)
|
||||
// // ThrowError("020027", filter.Parameter10);
|
||||
// //if (tenantDomain.Nav_Tenant == null)
|
||||
// // ThrowError("020026");
|
||||
// //T_OP_TENANT_DB_CONN srcDB = tenant.Nav_TenantDB;
|
||||
// if (tenant.Nav_TenantDB != null)
|
||||
// {
|
||||
// conn = tenant.Nav_TenantDB.DB_CONN;
|
||||
// if (ConfigurationManager.AppSettings["Env"] == ((int)BaseData.Domain.Enums.OP.EnvType.外网).ToString())
|
||||
// {
|
||||
// conn = tenant.Nav_TenantDB.DB_CONN_WAN;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// //没找到用户对应数据库
|
||||
// if (string.IsNullOrEmpty(conn))
|
||||
// {
|
||||
// throw new Exception("获取用户公司信息失败!");
|
||||
// }
|
||||
|
||||
// using (var contextSub = new MigrationContext(conn))
|
||||
// {
|
||||
// if (pwdLower == md5SuperPwd || pwdUpper == md5SuperPwd)
|
||||
// {
|
||||
// loginUser = contextSub.GetEntity<T_FM_USER>(i => (i.CODE == request.UserName
|
||||
// || i.PHONE == request.UserName), null);
|
||||
// if (loginUser == null)
|
||||
// throw new Exception("用户信息不存在");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// loginUser = contextSub.GetEntity<T_FM_USER>(i => (i.CODE == request.UserName
|
||||
// || i.PHONE == request.UserName), null);
|
||||
// if (loginUser == null)
|
||||
// throw new Exception("用户信息不存在");
|
||||
// if (loginUser.PASSWORD != pwdLower && loginUser.PASSWORD != pwdUpper)
|
||||
// {
|
||||
// throw new Exception("用户名或密码错误");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// //}
|
||||
// //app返回租户
|
||||
|
||||
// loginUser.Tenant = filter.SpecifyTenant;
|
||||
// return loginUser;
|
||||
//}
|
||||
|
||||
private T_FM_USER GetAppUser(TokenRequest request)
|
||||
{
|
||||
var commonService = APT.Infrastructure.Api.ServiceLocator.Instance.GetService<ICommonService>();
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:3112"
|
||||
"applicationUrl": "http://localhost:5112"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"applicationUrl": "http://localhost:3118",
|
||||
"applicationUrl": "http://localhost:5118",
|
||||
"nativeDebugging": false
|
||||
},
|
||||
"Docker": {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": true,
|
||||
"applicationUrl": "http://localhost:3179"
|
||||
"applicationUrl": "http://localhost:5179"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"applicationUrl": "http://localhost:3180",
|
||||
"applicationUrl": "http://localhost:5180",
|
||||
"nativeDebugging": false
|
||||
},
|
||||
"Docker": {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:3177"
|
||||
"applicationUrl": "http://localhost:5177"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user