버그 수정 version 0.0.2완료

This commit is contained in:
김판돌 2023-11-28 23:01:25 +09:00
parent aaeadfb03c
commit 6c9d1ff0f4
17 changed files with 91 additions and 15 deletions

View File

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.6.33801.468 VisualStudioVersion = 17.6.33801.468
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{31E93A00-A8CA-4F84-A21A-0737ADA49581}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{31E93A00-A8CA-4F84-A21A-0737ADA49581}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -80,7 +80,7 @@ namespace Server.Git
private void Push(string excel) private void Push(string excel)
{ {
if(excel == "") if (excel == "")
{ {
return; return;
} }
@ -99,18 +99,19 @@ namespace Server.Git
using (DynamicDataSQL sql = new DynamicDataSQL()) using (DynamicDataSQL sql = new DynamicDataSQL())
{ {
logger.Info("version : " + ProtocolProcessor.version);
if (ProtocolProcessor.version == "") if (ProtocolProcessor.version == "")
{ {
ProtocolProcessor.version = sql.SelectName("version").value; ProtocolProcessor.version = sql.SelectName("version").value;
logger.Info("Select version : " + ProtocolProcessor.version);
} }
else else
{ {
sql.Update(1, ProtocolProcessor.version); sql.Update(1, ProtocolProcessor.version);
logger.Info("Update version : " + ProtocolProcessor.version);
} }
} }
Console.Write(ProtocolProcessor.version);
// 스테이징 // 스테이징
RepositorySet("add .", repositoryPath); RepositorySet("add .", repositoryPath);

View File

@ -31,7 +31,7 @@ namespace Server.Git
// 쿼리 작성 및 실행 // 쿼리 작성 및 실행
//모든 쿼리 삭제 //모든 쿼리 삭제
string query; string query;
string header1 = "CREATE TABLE IF NOT EXISTS excel."; string header1 = "CREATE TABLE excel.";
string header2 = "INSERT INTO excel."; string header2 = "INSERT INTO excel.";
string newTableQuery; string newTableQuery;
string tableDatas; string tableDatas;
@ -61,12 +61,15 @@ namespace Server.Git
} }
if (m != 0) if (m != 0)
{ {
newTableQuery += ",\n"; newTableQuery += ",";
tableDatas += ", "; tableDatas += ", ";
} }
switch (sheets[n].type[m]) switch (sheets[n].type[m])
{ {
case "bool":
newTableQuery += $"{sheets[n].variable[m]} BOOL ";
break;
case "int": case "int":
newTableQuery += $"{sheets[n].variable[m]} INT "; newTableQuery += $"{sheets[n].variable[m]} INT ";
break; break;
@ -74,18 +77,21 @@ namespace Server.Git
newTableQuery += $"{sheets[n].variable[m]} FLOAT4 "; newTableQuery += $"{sheets[n].variable[m]} FLOAT4 ";
break; break;
case "string": case "string":
case "json":
newTableQuery += $"{sheets[n].variable[m]} VARCHAR(255) "; newTableQuery += $"{sheets[n].variable[m]} VARCHAR(255) ";
break; break;
case "enum": case "enum":
newTableQuery += $"{sheets[n].variable[m]} INT2 "; newTableQuery += $"{sheets[n].variable[m]} INT2 ";
break; break;
case "text": case "text":
case "json":
newTableQuery += $"{sheets[n].variable[m]} TEXT "; newTableQuery += $"{sheets[n].variable[m]} TEXT ";
break; break;
case "time": case "time":
newTableQuery += $"{sheets[n].variable[m]} timestamp "; newTableQuery += $"{sheets[n].variable[m]} timestamp ";
break; break;
default:
logger.Error($"unknown data {sheets[n].type[m]}");
break;
} }
tableDatas += sheets[n].variable[m]; tableDatas += sheets[n].variable[m];
} }
@ -117,24 +123,31 @@ namespace Server.Git
{ {
query += ", "; query += ", ";
} }
switch (sheets[n].type[m]) switch (sheets[n].type[m])
{ {
case "int": case "bool":
case "enum": case "enum":
case "int":
case "float":
query += $"{pair.Value[sheets[n].variable[m]]}"; query += $"{pair.Value[sheets[n].variable[m]]}";
break; break;
case "string": case "string":
case "text":
case "json": case "json":
case "text":
query += $"'{pair.Value[sheets[n].variable[m]]}'"; query += $"'{pair.Value[sheets[n].variable[m]]}'";
break; break;
case "time": case "time":
query += $"'{((DateTime)pair.Value[sheets[n].variable[m]]).ToString("yyyy-MM-dd HH:mm:ss")}'"; query += $"'{((DateTime)pair.Value[sheets[n].variable[m]]).ToString("yyyy-MM-dd HH:mm:ss")}'";
break; break;
default:
logger.Error($"unknown data value {sheets[n].type[m]}");
break;
} }
} }
query += ")"; query += ")";
} }
query += ";";
#endregion #endregion
} }
ExecuteNonQuery(connection, query); ExecuteNonQuery(connection, query);

View File

@ -30,8 +30,6 @@ namespace Server.System {
// 각 클래스의 인스턴스를 생성합니다. 생성자에서 자동으로 등록됩니다. // 각 클래스의 인스턴스를 생성합니다. 생성자에서 자동으로 등록됩니다.
foreach (var type in serviceTypes) foreach (var type in serviceTypes)
addProtocol((AbstractService)Activator.CreateInstance(type)); addProtocol((AbstractService)Activator.CreateInstance(type));
logger.Info("Server Start");
} }
public static string Process(HttpContext context) { public static string Process(HttpContext context) {
@ -83,7 +81,7 @@ namespace Server.System {
{ {
private static readonly NLog.ILogger logger = LogManager.GetCurrentClassLogger(); private static readonly NLog.ILogger logger = LogManager.GetCurrentClassLogger();
public static bool isUpdate = false; public static bool isUpdate = true;
public static Thread thread; public static Thread thread;
@ -109,7 +107,7 @@ namespace Server.System {
Response = successResp.ToJson(); Response = successResp.ToJson();
//무작위 공격을 대비한 1차적인 방어조치 //무작위 공격을 대비한 1차적인 방어조치
if (eaDelivery == "" || eaDelivery.Length < 30) if (eaDelivery == "" || eaDelivery.Length < 15)
return Response; return Response;
ProtocolProcessor.version = eaDelivery; ProtocolProcessor.version = eaDelivery;

View File

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Server")] [assembly: System.Reflection.AssemblyCompanyAttribute("Server")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+50e537861e1681fd831cc2bbcb011fc43bc4a98c")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+aaeadfb03c72bb9d38b74272237c124305179fce")]
[assembly: System.Reflection.AssemblyProductAttribute("Server")] [assembly: System.Reflection.AssemblyProductAttribute("Server")]
[assembly: System.Reflection.AssemblyTitleAttribute("Server")] [assembly: System.Reflection.AssemblyTitleAttribute("Server")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@ -1 +1 @@
fbb3c522ea63c00bc2b4c984221d6833c2cbdb68d81de87b4366d731cde26984 f995762679a6433f4d737060571f5989d28dc660643c12425947e6c2bf314112

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]

View File

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 이 코드는 도구를 사용하여 생성되었습니다.
// 런타임 버전:4.0.30319.42000
//
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
// 이러한 변경 내용이 손실됩니다.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Server")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Server")]
[assembly: System.Reflection.AssemblyTitleAttribute("Server")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// MSBuild WriteCodeFragment 클래스에서 생성되었습니다.

View File

@ -0,0 +1 @@
de626008ab478696095f5a4f76d8453fba4715bb09e02c38b06b445dbfb1ddc9

View File

@ -0,0 +1,19 @@
is_global = true
build_property.TargetFramework = net8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb = true
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Server
build_property.RootNamespace = Server
build_property.ProjectDir = E:\git\thewar_server\Server\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.RazorLangVersion = 8.0
build_property.SupportLocalizedComponentNames =
build_property.GenerateRazorMetadataSourceChecksumAttributes =
build_property.MSBuildProjectDirectory = E:\git\thewar_server\Server
build_property._RazorSourceGeneratorDebug =

View File

@ -0,0 +1,17 @@
// <auto-generated/>
global using global::Microsoft.AspNetCore.Builder;
global using global::Microsoft.AspNetCore.Hosting;
global using global::Microsoft.AspNetCore.Http;
global using global::Microsoft.AspNetCore.Routing;
global using global::Microsoft.Extensions.Configuration;
global using global::Microsoft.Extensions.DependencyInjection;
global using global::Microsoft.Extensions.Hosting;
global using global::Microsoft.Extensions.Logging;
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Net.Http.Json;
global using global::System.Threading;
global using global::System.Threading.Tasks;

Binary file not shown.