프로토콜 수정및 일부 파일 인코딩 변경
This commit is contained in:
parent
22da510844
commit
573f246e7a
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
public class UserSQL : SQL<User>
|
public class UserSQL : SQL<User>
|
||||||
{
|
{
|
||||||
public void userInsert(User user)
|
public void userInsert(User user)
|
||||||
{
|
{
|
||||||
string qurry = sqlInsert(user);
|
string qurry = sqlInsert(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,44 +1,44 @@
|
||||||
using Server.System;
|
using Server.System;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Server.Service
|
namespace Server.Service
|
||||||
{
|
{
|
||||||
public class Test : AbstractService
|
public class AddUser : AbstractService
|
||||||
{
|
{
|
||||||
private TestReq req;
|
private AddUserReq req;
|
||||||
public override string Process()
|
public override string Process()
|
||||||
{
|
{
|
||||||
return makeResp();
|
return makeResp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Protocol ProtocolValue() => Protocol.Test;
|
public override Protocol ProtocolValue() => Protocol.AddUser;
|
||||||
|
|
||||||
public override Req Requst(string json)
|
public override Req Requst(string json)
|
||||||
{
|
{
|
||||||
req = JsonConvert.DeserializeObject<TestReq>(json);
|
req = JsonConvert.DeserializeObject<AddUserReq>(json);
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string makeResp()
|
private string makeResp()
|
||||||
{
|
{
|
||||||
TestResp resp = new TestResp();
|
AddUserResp resp = new AddUserResp();
|
||||||
resp.status = 200;
|
resp.status = 200;
|
||||||
return resp.ToJson();
|
return resp.ToJson();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TestReq : Req
|
public class AddUserReq : Req
|
||||||
{
|
{
|
||||||
public override bool IsReceivedAllField()
|
public override bool IsReceivedAllField()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TestResp : Resp
|
public class AddUserResp : Resp
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
public enum Protocol
|
public enum Protocol
|
||||||
{
|
{
|
||||||
Test = 0,
|
Test = 0,
|
||||||
|
AddUser = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Error
|
public enum Error
|
||||||
|
|
Loading…
Reference in New Issue