신규 프로토콜 생성
This commit is contained in:
parent
66ca07176a
commit
1a315bdc97
|
|
@ -0,0 +1,45 @@
|
||||||
|
using Server.System;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Server.Service
|
||||||
|
{
|
||||||
|
public class ChangeDeck : AbstractService
|
||||||
|
{
|
||||||
|
private ChangeDeckReq req;
|
||||||
|
public override string Process()
|
||||||
|
{
|
||||||
|
return makeResp();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Protocol ProtocolValue() => Protocol.Test;
|
||||||
|
|
||||||
|
public override Req Requst(string json)
|
||||||
|
{
|
||||||
|
req = JsonConvert.DeserializeObject<ChangeDeckReq>(json);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string makeResp()
|
||||||
|
{
|
||||||
|
ChangeDeckResp resp = new ChangeDeckResp();
|
||||||
|
resp.status = 200;
|
||||||
|
return resp.ToJson();
|
||||||
|
}
|
||||||
|
|
||||||
|
//1. 해당 데이터가 db에 있는지 확인
|
||||||
|
//2. 존재하는 데이터라면 신규 데이터로 업데이트
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ChangeDeckReq : Req
|
||||||
|
{
|
||||||
|
public override bool IsReceivedAllField()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ChangeDeckResp : Resp
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue