초기 커밋.
This commit is contained in:
163
ssgrestserver/request/6월추가개발/공지CRUD.cs
Normal file
163
ssgrestserver/request/6월추가개발/공지CRUD.cs
Normal file
@@ -0,0 +1,163 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using ssgrestserver.request;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 공지CRUD : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/mfront/mobile/broadtalkNotice?";
|
||||
|
||||
DBManager mDB = DBManager.getInstance();
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
|
||||
mNeedKeyList.Add("seqGFrameNo");
|
||||
mNeedKeyList.Add("noticeAction");
|
||||
mNeedKeyList.Add("vriNoticeNo");
|
||||
mNeedKeyList.Add("content");
|
||||
mNeedKeyList.Add("nickName");
|
||||
mNeedKeyList.Add("insertDate");
|
||||
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mIsSendTypeGet = false;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
//mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.CRUD데이터);
|
||||
|
||||
string bufFrameNumber = mRequestParameterKVPairList["seqGFrameNo"];
|
||||
|
||||
string bufNoticeNumber = mRequestParameterKVPairList["vriNoticeNo"];
|
||||
|
||||
if (mRequestParameterKVPairList["noticeAction"] == "S")
|
||||
{
|
||||
|
||||
DataSet bufDataSet = mDB.sendSelectQuery(
|
||||
$"select * from ssgCRUD where seqGFrameNo='{bufFrameNumber}' and vriNoticeNo='{bufNoticeNumber}'"
|
||||
);
|
||||
|
||||
if (bufDataSet.Tables[0].Rows.Count != 0)
|
||||
{
|
||||
//return JsonConvert.SerializeObject(bufDataSet.Tables[0]["payload"]);
|
||||
return JObject.Parse(bufDataSet.Tables[0].Rows[0]["payload"].ToString()).ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "조회되지 않는 S 요청인의 정보(보낸프레임번호에 데이터가 없음)";
|
||||
}
|
||||
|
||||
/* if (mAccessableDictionary.ContainsKey(mRequestParameterKVPairList["seqGFrameNo"]))
|
||||
{
|
||||
return mAccessableDictionary[mRequestParameterKVPairList["seqGFrameNo"]].ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "조회되지 않는 S 요청인의 정보(보낸프레임번호에 데이터가 없음)";
|
||||
}*/
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
//bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
if (item.Key == "content")
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + DataCenter.getInstance().interpritURL(item.Value) + @"&";
|
||||
}
|
||||
else
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
|
||||
// receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
//if (!mAccessableDictionary.ContainsKey(mRequestParameterKVPairList["seqGFrameNo"]))
|
||||
//{
|
||||
//mAccessableDictionary.Add(mRequestParameterKVPairList["seqGFrameNo"], new JObject());
|
||||
//}
|
||||
|
||||
//요청이 제거였을경우 그동안 관리해온 인자값을 제거하고 서버의 상태를 리턴.
|
||||
if (mRequestParameterKVPairList["noticeAction"] == "D" && receiveData["message"].ToString() == "SUCCESS")
|
||||
{
|
||||
|
||||
mDB.sendInsertQuery($"Delete From ssgCRUD where seqGFrameNo='{bufFrameNumber}' and vriNoticeNo='{bufNoticeNumber}'");
|
||||
|
||||
//if (mAccessableDictionary.ContainsKey(mRequestParameterKVPairList["seqGFrameNo"]))
|
||||
//{
|
||||
// mAccessableDictionary.Remove(mRequestParameterKVPairList["seqGFrameNo"]);
|
||||
// return receiveData.ToString();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return "조회되지 않는 D 요청인의 정보(보낸프레임번호에 데이터가 없음)";
|
||||
//}
|
||||
return receiveData.ToString();
|
||||
}
|
||||
|
||||
foreach (var item in mRequestParameterKVPairList)
|
||||
{
|
||||
if (receiveData.ContainsKey(item.Key))
|
||||
{
|
||||
if (item.Key == "content")
|
||||
{
|
||||
receiveData[item.Key] = DataCenter.getInstance().interpritURL(item.Value, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
receiveData[item.Key] = item.Value;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.Key == "content")
|
||||
{
|
||||
receiveData.Add(item.Key, DataCenter.getInstance().interpritURL(item.Value, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
receiveData.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//mAccessableDictionary[mRequestParameterKVPairList["seqGFrameNo"]] = receiveData;
|
||||
|
||||
|
||||
string bufPayload = receiveData.ToString(Newtonsoft.Json.Formatting.None).Replace("'", "''");
|
||||
|
||||
mDB.sendInsertQuery(
|
||||
//$"insert into ssgCRUD (seqGFrameNo, vriNoticeNo, payload) VALUES ('{bufFrameNumber}','{bufNoticeNumber}', '{bufPayload}') "
|
||||
//+ $" ON CONFLICT(seqGFrameNo, vriNoticeNo) DO UPDATE SET payload='{bufPayload}';");
|
||||
$"replace into ssgCRUD (seqGFrameNo, vriNoticeNo, payload) VALUES ('{bufFrameNumber}','{bufNoticeNumber}', '{bufPayload}') "
|
||||
);
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
ssgrestserver/request/6월추가개발/매진조회.cs
Normal file
45
ssgrestserver/request/6월추가개발/매진조회.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 매진조회 : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/broad/cg?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("seqGFrameNo");
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mIsSendTypeGet = true;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
//receiveData.
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
43
ssgrestserver/request/6월추가개발/방송VVIP.cs
Normal file
43
ssgrestserver/request/6월추가개발/방송VVIP.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 방송VVIP : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/broadcast/masterGoodsInfo?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("seqGFrameNo");
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mIsSendTypeGet = false;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
ssgrestserver/request/6월추가개발/방송채택.cs
Normal file
45
ssgrestserver/request/6월추가개발/방송채택.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 방송채택 : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/mfront/mobile/broadtalkAdopt?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("seqGFrameNo");
|
||||
mNeedKeyList.Add("talkSeq");
|
||||
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mIsSendTypeGet = false;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
46
ssgrestserver/request/6월추가개발/방송편성.cs
Normal file
46
ssgrestserver/request/6월추가개발/방송편성.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 방송편성 : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/broadcast/callScheduleChart?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("mediaCode");
|
||||
mNeedKeyList.Add("broadStartFromDate");
|
||||
mNeedKeyList.Add("broadStartToDate");
|
||||
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mIsSendTypeGet = false;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
43
ssgrestserver/request/6월추가개발/상품QnA.cs
Normal file
43
ssgrestserver/request/6월추가개발/상품QnA.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 상품QnA : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/mfront/mobile/goodsCounselList?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("goodsCode");
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mIsSendTypeGet = true;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
43
ssgrestserver/request/6월추가개발/상품평조회.cs
Normal file
43
ssgrestserver/request/6월추가개발/상품평조회.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 상품평조회 : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/mfront/mobile/goodsCommentList?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("goodsCode");
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mIsSendTypeGet = true;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
61
ssgrestserver/request/6월추가개발/채팅답변등록.cs
Normal file
61
ssgrestserver/request/6월추가개발/채팅답변등록.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 채팅답변등록 : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/mfront/mobile/broadtalkAnswer?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("seqGFrameNo");
|
||||
mNeedKeyList.Add("content");
|
||||
mNeedKeyList.Add("nickName");
|
||||
mNeedKeyList.Add("retalkSeq");
|
||||
mNeedKeyList.Add("insertDate");
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mIsSendTypeGet = false;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
if (item.Key == "content")
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + DataCenter.getInstance().interpritURL(item.Value) + @"&";
|
||||
}
|
||||
else
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
//if (receiveData.ContainsKey("content"))
|
||||
//{
|
||||
// receiveData["content"] = DataCenter.getInstance().interpritURL(receiveData["content"].ToString(), true);
|
||||
//}
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
47
ssgrestserver/request/6월추가개발/채팅리스트.cs
Normal file
47
ssgrestserver/request/6월추가개발/채팅리스트.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 채팅리스트 : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/mfront/mobile/broadtalkList?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("seqGFrameNo");
|
||||
mNeedKeyList.Add("startDate");
|
||||
mNeedKeyList.Add("endDate");
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mIsSendTypeGet = true;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
//receiveData.
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
44
ssgrestserver/request/6월추가개발/콜데이터조회.cs
Normal file
44
ssgrestserver/request/6월추가개발/콜데이터조회.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 콜데이터조회 : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "/realorder/broadCallResponseInfo?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("seqGFrameNo");
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
mIsSendTypeGet = true;
|
||||
|
||||
string bufURLDataString = "";
|
||||
|
||||
foreach (KeyValuePair<string, string> item in mRequestParameterKVPairList)
|
||||
{
|
||||
bufURLDataString += item.Key + @"=" + item.Value + @"&";
|
||||
}
|
||||
|
||||
bufURLDataString = bufURLDataString.Substring(0, bufURLDataString.Length - 1);
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + bufURLDataString));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
//receiveData.
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
517
ssgrestserver/request/ARequestObject.cs
Normal file
517
ssgrestserver/request/ARequestObject.cs
Normal file
@@ -0,0 +1,517 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
abstract class ARequestObject
|
||||
{
|
||||
protected string TAG = "DB Connection Abstarct Class";
|
||||
|
||||
//private const string SSG_REST_SERVER_REAL = "http://inf.shinsegaetvshopping.com/";
|
||||
private const string SSG_REST_SERVER_REAL = "http://202.3.21.200/";
|
||||
private const string SSG_REST_SERVER_REAL_New = "https://m.shinsegaetvshopping.com/";
|
||||
private const string SSG_REST_SERVER_TEST = "http://sinf-dev.shinsegaetvshopping.com/";
|
||||
|
||||
protected List<string> mNeedKeyList = new List<string>();
|
||||
|
||||
protected Dictionary<string, JObject> mAccessableDictionary = null;
|
||||
|
||||
|
||||
internal ARequestObject()
|
||||
{
|
||||
|
||||
mRequestParameterKVPairList = new Dictionary<string, string>();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 접근할 테이블명
|
||||
/// </summary>
|
||||
protected string TABLE_NAME = "";
|
||||
|
||||
|
||||
protected bool mIsSendTypeGet = false;
|
||||
|
||||
protected Dictionary<string, string> mRequestParameterKVPairList = null;
|
||||
|
||||
|
||||
protected DataCenter mDataCenter = DataCenter.getInstance();
|
||||
|
||||
protected string m채널이름 = "";
|
||||
|
||||
|
||||
protected readonly string[] 송출가능목록 = { "상품", "경품", "텍스트", "채팅", "상품평", "QNA", "공지", "채팅판", "동영상", "콜데이터", "매진" };
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 테스트중
|
||||
/// </summary>
|
||||
public bool mIsRealURL = true;
|
||||
|
||||
internal static string create(string receiveValue)
|
||||
{
|
||||
|
||||
string returnValue = "";
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
|
||||
//인스턴스에서 쓸 값 초기화.
|
||||
ARequestObject bufInstance = null;
|
||||
|
||||
///요청종류/씬포멧명/적용범위 ?Key=Value&Key=Value...
|
||||
///방송용/코스피지수?Key=Value&Key=Value... 1타입
|
||||
//////방송용/9?적용범위=코스피지수&종류=당일 2타입
|
||||
|
||||
//URL에서 Request부분(?)과 address부분을 분리
|
||||
string[] bufURLSplit = receiveValue.Split('?');
|
||||
|
||||
//리퀘스트타입은 Get으로 넘어오는 Address데이터의 마지막부분 -> /RequestType
|
||||
string[] bufRequestArray = bufURLSplit[0].Split('/');
|
||||
|
||||
|
||||
string 사용처 = bufRequestArray[2];
|
||||
string 씬이름 = bufRequestArray[3];
|
||||
|
||||
|
||||
|
||||
///씬에따라 구분.
|
||||
///사용처는 나중에 User Key로 사용할예정 현재는 그냥 쓰자. 테스트용임
|
||||
switch (사용처)
|
||||
{
|
||||
#region "방송용데이터"
|
||||
case "새데이터조회":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "상품수량":
|
||||
bufInstance = new 새상품수량();
|
||||
break;
|
||||
case "경품프로모션":
|
||||
bufInstance = new 새경품프로모션();
|
||||
break;
|
||||
case "채팅리스트":
|
||||
bufInstance = new 채팅리스트();
|
||||
break;
|
||||
case "채팅답변등록":
|
||||
bufInstance = new 채팅답변등록();
|
||||
break;
|
||||
case "방송채택":
|
||||
bufInstance = new 방송채택();
|
||||
break;
|
||||
case "방송편성":
|
||||
bufInstance = new 방송편성();
|
||||
break;
|
||||
case "상품평조회":
|
||||
bufInstance = new 상품평조회();
|
||||
break;
|
||||
case "상품QnA":
|
||||
bufInstance = new 상품QnA();
|
||||
break;
|
||||
case "공지CRUD":
|
||||
bufInstance = new 공지CRUD();
|
||||
break;
|
||||
case "콜데이터조회":
|
||||
bufInstance = new 콜데이터조회();
|
||||
break;
|
||||
case "방송VVIP":
|
||||
bufInstance = new 방송VVIP();
|
||||
break;
|
||||
case "매진조회":
|
||||
bufInstance = new 매진조회();
|
||||
break;
|
||||
|
||||
default:
|
||||
returnValue = "알수없는 분류 - " + 사용처 + "----" + 씬이름;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
|
||||
case "데이터입력":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "상품수량":
|
||||
bufInstance = new 입력상품수량();
|
||||
break;
|
||||
case "경품프로모션":
|
||||
bufInstance = new 입력경품프로모션();
|
||||
break;
|
||||
|
||||
default:
|
||||
returnValue = "알수없는 분류 - " + 사용처 + "----" + 씬이름;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case "입력데이터조회":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "상품수량":
|
||||
bufInstance = new 기존상품수량();
|
||||
break;
|
||||
case "경품프로모션":
|
||||
bufInstance = new 기존경품프로모션();
|
||||
break;
|
||||
|
||||
default:
|
||||
returnValue = "알수없는 분류 - " + 사용처 + "----" + 씬이름;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case "자막상황":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 자막조회();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 자막입력();
|
||||
break;
|
||||
|
||||
default:
|
||||
returnValue = "알수없는 분류 - " + 사용처 + "----" + 씬이름;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
case "텍스트":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 기존텍스트();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력텍스트();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case "씬이름":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 조회씬이름();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력씬이름();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case "QNA":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 기존QNA();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력QNA();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case "공지":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 기존공지();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력공지();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case "상품평":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 기존상품평();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력상품평();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case "채팅":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 기존채팅();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력채팅();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case "채팅판":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 기존채팅판();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력채팅판();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case "동영상":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 기존동영상();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력동영상();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case "콜데이터":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 기존콜데이터();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력콜데이터();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case "매진":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "조회":
|
||||
bufInstance = new 기존매진();
|
||||
break;
|
||||
case "입력":
|
||||
bufInstance = new 입력매진();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case "test":
|
||||
switch (씬이름)
|
||||
{
|
||||
case "test":
|
||||
bufInstance = new 테스트();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
bufInstance.mNeedKeyList = new List<string>();
|
||||
|
||||
|
||||
if (bufRequestArray[1].Trim() == "")
|
||||
{
|
||||
throw new Exception("잘못된 채널정보");
|
||||
}
|
||||
|
||||
bufInstance.m채널이름 = bufRequestArray[1];
|
||||
|
||||
if (bufInstance != null)
|
||||
{
|
||||
//URL이 충분히 왔을때만 작업
|
||||
if (bufURLSplit.Length > 1)
|
||||
{
|
||||
bufInstance.mRequestParameterKVPairList = bufInstance.parseParameter(bufURLSplit[1]);
|
||||
}
|
||||
|
||||
//필수키가 있는 리퀘스트에 한해서 체크한다.
|
||||
string checkString = "";
|
||||
|
||||
if (bufInstance is INeedKeyRequest)
|
||||
{
|
||||
((INeedKeyRequest)bufInstance).setNeedKeys();
|
||||
checkString = bufInstance.checkNeedUpdateKey();
|
||||
}
|
||||
|
||||
if (checkString == "")
|
||||
{
|
||||
returnValue = bufInstance.startUpdateWork();
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = checkString;
|
||||
}
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
|
||||
}
|
||||
catch (DuplicateNameException dne)
|
||||
{
|
||||
|
||||
return "같은 종목을 여러번 요청하였습니다. " + dne.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Dictionary<string, string> parseParameter(string recvParametersInURL)
|
||||
{
|
||||
|
||||
Dictionary<string, string> rtnValue = new Dictionary<string, string>();
|
||||
|
||||
string[] bufGetDataArray = recvParametersInURL.Split('&');
|
||||
|
||||
foreach (string item in bufGetDataArray)
|
||||
{
|
||||
string[] bufKVDataArray = item.Split('=');
|
||||
|
||||
rtnValue.Add(bufKVDataArray[0], bufKVDataArray[1]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return rtnValue;
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected abstract string startUpdateWork();
|
||||
|
||||
protected string httpRequest(string requestURL)
|
||||
{
|
||||
string rtnValue = "";
|
||||
try
|
||||
{
|
||||
bool isMasterGoodsInfo = requestURL.Contains("masterGoodsInfo");
|
||||
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create((mIsRealURL ? SSG_REST_SERVER_REAL : SSG_REST_SERVER_TEST) + requestURL);
|
||||
if (isMasterGoodsInfo)
|
||||
{
|
||||
httpWebRequest = (HttpWebRequest)WebRequest.Create((SSG_REST_SERVER_REAL_New) + requestURL);
|
||||
}
|
||||
|
||||
|
||||
;
|
||||
// 인코딩 UTF-8
|
||||
byte[] sendData = UTF8Encoding.UTF8.GetBytes("");
|
||||
|
||||
if (mIsSendTypeGet || isMasterGoodsInfo)
|
||||
{
|
||||
httpWebRequest.Method = "GET";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
httpWebRequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
|
||||
httpWebRequest.Method = "POST";
|
||||
httpWebRequest.ContentLength = sendData.Length;
|
||||
Stream requestStream = httpWebRequest.GetRequestStream();
|
||||
requestStream.Write(sendData, 0, sendData.Length);
|
||||
requestStream.Close();
|
||||
}
|
||||
|
||||
|
||||
HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
|
||||
StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.GetEncoding("UTF-8"));
|
||||
rtnValue = streamReader.ReadToEnd();
|
||||
streamReader.Close();
|
||||
httpWebResponse.Close();
|
||||
|
||||
return rtnValue;
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
return ex.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private string checkNeedUpdateKey()
|
||||
{
|
||||
foreach (string item in mNeedKeyList)
|
||||
{
|
||||
if (!mRequestParameterKVPairList.ContainsKey(item))
|
||||
{
|
||||
return "필수키가 없음 - " + item;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
protected void 조회시간추가()
|
||||
{
|
||||
|
||||
Dictionary<string, JObject> bufTargetDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.코더상태);
|
||||
|
||||
if (mRequestParameterKVPairList.ContainsKey("보낸사람"))
|
||||
{
|
||||
if (mRequestParameterKVPairList["보낸사람"] == "코더")
|
||||
{
|
||||
bufTargetDictionary[m채널이름]["코더조회시간"] = DateTime.Now;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TimeSpan 시간차 = DateTime.Now - Convert.ToDateTime(bufTargetDictionary[m채널이름]["코더조회시간"]);
|
||||
|
||||
if (시간차.TotalSeconds > 3)
|
||||
{
|
||||
bufTargetDictionary[m채널이름]["코더"] = "N";
|
||||
}
|
||||
else
|
||||
{
|
||||
bufTargetDictionary[m채널이름]["코더"] = "Y";
|
||||
}
|
||||
|
||||
|
||||
bufTargetDictionary[m채널이름]["현재서버시간"] = DateTime.Now;
|
||||
|
||||
}
|
||||
|
||||
protected void 코더확인객채생성여부()
|
||||
{
|
||||
if (!DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.코더상태).ContainsKey(m채널이름))
|
||||
{
|
||||
|
||||
JObject buf코더상태 = new JObject();
|
||||
|
||||
|
||||
foreach (string item in 송출가능목록)
|
||||
{
|
||||
buf코더상태.Add(item, "N");
|
||||
}
|
||||
|
||||
buf코더상태.Add("코더", "N");
|
||||
buf코더상태.Add("코더조회시간", new DateTime(1990, 1, 1));
|
||||
buf코더상태.Add("현재서버시간", DateTime.Now);
|
||||
|
||||
DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.코더상태).Add(m채널이름, buf코더상태);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
133
ssgrestserver/request/DBManager.cs
Normal file
133
ssgrestserver/request/DBManager.cs
Normal file
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SQLite;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver.request
|
||||
{
|
||||
class DBManager
|
||||
{
|
||||
|
||||
|
||||
#region Singleton
|
||||
|
||||
private volatile static DBManager mInstance = null;
|
||||
|
||||
private static object mSingletonLocker = new object();
|
||||
|
||||
private DBManager()
|
||||
{
|
||||
|
||||
CONNECT_STRING = Program.mainForm.getStartupPath() + @"\ssgCRUD.db";
|
||||
DB_SOURCE = $@"Data Source={CONNECT_STRING}";
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
using (var conn = new SQLiteConnection(DB_SOURCE))
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
conn.Open();
|
||||
using (var command = new SQLiteCommand("select count(*) from sqlite_master WHERE Name = 'ssgCRUD'", conn))
|
||||
{
|
||||
result = Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
|
||||
|
||||
if (result < 1)
|
||||
{
|
||||
string bufTableBuildQuery = @"create table ssgCRUD (seqGFrameNo TEXT PRIMARY KEY, vriNoticeNo TEXT UNIQUE, payload TEXT)";
|
||||
|
||||
using (var command = new SQLiteCommand(bufTableBuildQuery, conn))
|
||||
{
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
string CONNECT_STRING = "";
|
||||
string DB_SOURCE = "";
|
||||
|
||||
public static DBManager getInstance()
|
||||
{
|
||||
lock (mSingletonLocker)
|
||||
{
|
||||
if (mInstance == null)
|
||||
{
|
||||
mInstance = new DBManager();
|
||||
}
|
||||
}
|
||||
|
||||
return mInstance;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
public DataSet sendSelectQuery(string query)
|
||||
{
|
||||
DataSet rtnValue = new DataSet();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
using (var adapter = new SQLiteDataAdapter(query, DB_SOURCE))
|
||||
{
|
||||
adapter.Fill(rtnValue, "rtnTable");
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Program.mainForm.recvLog("SQLQUERY_SELECT", ex.ToString());
|
||||
}
|
||||
|
||||
return rtnValue;
|
||||
}
|
||||
|
||||
public bool sendInsertQuery(string query)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
using (var conn = new SQLiteConnection(DB_SOURCE))
|
||||
{
|
||||
conn.Open();
|
||||
using (var command = new SQLiteCommand(query, conn))
|
||||
{
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Program.mainForm.recvLog("SQLQUERY_INSERT", ex.ToString());
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
13
ssgrestserver/request/INeedKeyRequest.cs
Normal file
13
ssgrestserver/request/INeedKeyRequest.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
interface INeedKeyRequest
|
||||
{
|
||||
void setNeedKeys();
|
||||
}
|
||||
}
|
||||
63
ssgrestserver/request/웹핸들링/입력/AInputTextHandler.cs
Normal file
63
ssgrestserver/request/웹핸들링/입력/AInputTextHandler.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
abstract class AInputTextHandler : ARequestObject
|
||||
{
|
||||
|
||||
protected string updateTextName = "";
|
||||
|
||||
protected abstract void setUpdateData();
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
this.setUpdateData();
|
||||
|
||||
if (!mRequestParameterKVPairList.ContainsKey("보낸사람"))
|
||||
{
|
||||
return "없는데이터 - 보낸사람";
|
||||
}
|
||||
if (!mRequestParameterKVPairList.ContainsKey(updateTextName))
|
||||
{
|
||||
return "없는데이터 - " + updateTextName;
|
||||
}
|
||||
|
||||
코더확인객채생성여부();
|
||||
|
||||
JObject bufObj = new JObject();
|
||||
|
||||
bufObj.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
bufObj.Add(updateTextName, mRequestParameterKVPairList[updateTextName]);
|
||||
|
||||
bufObj.Add("입력시간", DateTime.Now.ToString());
|
||||
|
||||
if (mAccessableDictionary.ContainsKey(m채널이름))
|
||||
{
|
||||
mAccessableDictionary[m채널이름] = bufObj;
|
||||
}
|
||||
else
|
||||
{
|
||||
mAccessableDictionary.Add(m채널이름, bufObj);
|
||||
}
|
||||
|
||||
|
||||
JObject retObj = new JObject();
|
||||
|
||||
|
||||
foreach (var item in mAccessableDictionary[m채널이름])
|
||||
{
|
||||
retObj.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
retObj.Add("status", "200");
|
||||
|
||||
return retObj.ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/입력/입력QNA.cs
Normal file
21
ssgrestserver/request/웹핸들링/입력/입력QNA.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력QNA : AInputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "QNA";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.QNA);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
52
ssgrestserver/request/웹핸들링/입력/입력경품프로모션.cs
Normal file
52
ssgrestserver/request/웹핸들링/입력/입력경품프로모션.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력경품프로모션 : ARequestObject
|
||||
{
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
if (!mRequestParameterKVPairList.ContainsKey("보낸사람"))
|
||||
{
|
||||
return "없는데이터 - 보낸사람";
|
||||
}
|
||||
if (!mRequestParameterKVPairList.ContainsKey("텍스트"))
|
||||
{
|
||||
return "없는데이터 - 텍스트";
|
||||
}
|
||||
|
||||
|
||||
JObject retObj = new JObject();
|
||||
|
||||
retObj.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
retObj.Add("텍스트", mRequestParameterKVPairList["텍스트"]);
|
||||
|
||||
retObj.Add("입력시간", DateTime.Now.ToString());
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.최근받은경품정보);
|
||||
|
||||
if (mAccessableDictionary.ContainsKey(m채널이름))
|
||||
{
|
||||
mAccessableDictionary[m채널이름] = retObj;
|
||||
}
|
||||
else
|
||||
{
|
||||
mAccessableDictionary.Add(m채널이름, retObj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
retObj.Add("status", "200");
|
||||
|
||||
return retObj.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/입력/입력공지.cs
Normal file
21
ssgrestserver/request/웹핸들링/입력/입력공지.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력공지 : AInputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "공지";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.공지);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/입력/입력동영상.cs
Normal file
21
ssgrestserver/request/웹핸들링/입력/입력동영상.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력동영상 : AInputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "동영상";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.동영상);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/입력/입력매진.cs
Normal file
21
ssgrestserver/request/웹핸들링/입력/입력매진.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력매진 : AInputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "매진";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.매진);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
ssgrestserver/request/웹핸들링/입력/입력상품수량.cs
Normal file
48
ssgrestserver/request/웹핸들링/입력/입력상품수량.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력상품수량 : ARequestObject
|
||||
{
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
if (!mRequestParameterKVPairList.ContainsKey("보낸사람"))
|
||||
{
|
||||
return "없는데이터 - 보낸사람";
|
||||
}
|
||||
if (!mRequestParameterKVPairList.ContainsKey("텍스트"))
|
||||
{
|
||||
return "없는데이터 - 텍스트";
|
||||
}
|
||||
|
||||
|
||||
JObject retObj = new JObject();
|
||||
|
||||
retObj.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
retObj.Add("텍스트", mRequestParameterKVPairList["텍스트"]);
|
||||
|
||||
retObj.Add("입력시간", DateTime.Now.ToString());
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.최근받은상품수량);
|
||||
|
||||
if (mAccessableDictionary.ContainsKey(m채널이름))
|
||||
{
|
||||
mAccessableDictionary[m채널이름] = retObj;
|
||||
}
|
||||
else
|
||||
{
|
||||
mAccessableDictionary.Add(m채널이름, retObj);
|
||||
}
|
||||
|
||||
retObj.Add("status", "200");
|
||||
|
||||
return retObj.ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/입력/입력상품평.cs
Normal file
21
ssgrestserver/request/웹핸들링/입력/입력상품평.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력상품평 : AInputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "상품평";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.상품평);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
49
ssgrestserver/request/웹핸들링/입력/입력씬목록.cs
Normal file
49
ssgrestserver/request/웹핸들링/입력/입력씬목록.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력씬이름 : ARequestObject
|
||||
{
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
|
||||
if (!mRequestParameterKVPairList.ContainsKey("씬이름"))
|
||||
{
|
||||
return "없는데이터 - 씬이름";
|
||||
}
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.씬이름);
|
||||
|
||||
if (!mAccessableDictionary.ContainsKey(m채널이름))
|
||||
{
|
||||
JObject bufObj = new JObject();
|
||||
|
||||
bufObj.Add("씬이름", mRequestParameterKVPairList["씬이름"]);
|
||||
|
||||
mAccessableDictionary.Add(m채널이름, bufObj);
|
||||
}
|
||||
else
|
||||
{
|
||||
mAccessableDictionary[m채널이름]["씬이름"] = mRequestParameterKVPairList["씬이름"];
|
||||
}
|
||||
|
||||
JObject retObj = new JObject();
|
||||
|
||||
|
||||
foreach (var item in mAccessableDictionary[m채널이름])
|
||||
{
|
||||
retObj.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
retObj.Add("status", "200");
|
||||
|
||||
return retObj.ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/입력/입력채팅.cs
Normal file
21
ssgrestserver/request/웹핸들링/입력/입력채팅.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력채팅 : AInputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "채팅";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.채팅);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/입력/입력채팅판.cs
Normal file
21
ssgrestserver/request/웹핸들링/입력/입력채팅판.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력채팅판 : AInputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "채팅판";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.채팅판);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/입력/입력콜데이터.cs
Normal file
21
ssgrestserver/request/웹핸들링/입력/입력콜데이터.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력콜데이터 : AInputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "콜데이터";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.콜데이터);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/입력/입력텍스트.cs
Normal file
21
ssgrestserver/request/웹핸들링/입력/입력텍스트.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 입력텍스트 : AInputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "텍스트";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.최근받은텍스트);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
50
ssgrestserver/request/웹핸들링/입력/자막입력.cs
Normal file
50
ssgrestserver/request/웹핸들링/입력/자막입력.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 자막입력 : ARequestObject
|
||||
{
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
|
||||
코더확인객채생성여부();
|
||||
|
||||
if (송출가능목록.Except(mRequestParameterKVPairList.Keys).Count() == 송출가능목록.Length)
|
||||
{
|
||||
return "없는데이터 - 입력될 자막정보가 하나도 없음";
|
||||
}
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.코더상태);
|
||||
|
||||
foreach (string item in 송출가능목록)
|
||||
{
|
||||
if (mRequestParameterKVPairList.ContainsKey(item))
|
||||
{
|
||||
if (mRequestParameterKVPairList[item] != "Y" && mRequestParameterKVPairList[item] != "N")
|
||||
{
|
||||
return "이상한데이터 - " + item + " 입력할 자막정보가 잘못됨(Y,N)";
|
||||
}
|
||||
|
||||
mAccessableDictionary[m채널이름][item] = mRequestParameterKVPairList[item];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
조회시간추가();
|
||||
|
||||
if (!mAccessableDictionary[m채널이름].ContainsKey("status"))
|
||||
{
|
||||
mAccessableDictionary[m채널이름].Add("status", "200");
|
||||
}
|
||||
|
||||
|
||||
return mAccessableDictionary[m채널이름].ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
43
ssgrestserver/request/웹핸들링/조회/AOutputTextHandler.cs
Normal file
43
ssgrestserver/request/웹핸들링/조회/AOutputTextHandler.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
abstract class AOutputTextHandler : ARequestObject
|
||||
{
|
||||
|
||||
protected string updateTextName = "";
|
||||
|
||||
protected abstract void setUpdateData();
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
setUpdateData();
|
||||
|
||||
//mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.코더상태);
|
||||
|
||||
if (!mAccessableDictionary.ContainsKey(m채널이름))
|
||||
{
|
||||
return "서버에 없는 정보 - 텍스트";
|
||||
}
|
||||
|
||||
코더확인객채생성여부();
|
||||
|
||||
조회시간추가();
|
||||
|
||||
JObject retObj = new JObject();
|
||||
|
||||
foreach (var item in mAccessableDictionary[m채널이름])
|
||||
{
|
||||
retObj.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
return retObj.ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/조회/기존QNA.cs
Normal file
21
ssgrestserver/request/웹핸들링/조회/기존QNA.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존QNA : AOutputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "QNA";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.QNA);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
24
ssgrestserver/request/웹핸들링/조회/기존경품프로모션.cs
Normal file
24
ssgrestserver/request/웹핸들링/조회/기존경품프로모션.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존경품프로모션 : ARequestObject
|
||||
{
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.최근받은경품정보);
|
||||
|
||||
if (!mAccessableDictionary.ContainsKey(this.m채널이름))
|
||||
{
|
||||
return "서버에 없는 정보 - 경품데이터";
|
||||
}
|
||||
|
||||
return mAccessableDictionary[this.m채널이름].ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/조회/기존공지.cs
Normal file
21
ssgrestserver/request/웹핸들링/조회/기존공지.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존공지 : AOutputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "공지";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.공지);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/조회/기존동영상.cs
Normal file
21
ssgrestserver/request/웹핸들링/조회/기존동영상.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존동영상 : AOutputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "동영상";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.동영상);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/조회/기존매진.cs
Normal file
21
ssgrestserver/request/웹핸들링/조회/기존매진.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존매진 : AOutputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "매진";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.매진);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
24
ssgrestserver/request/웹핸들링/조회/기존상품수량.cs
Normal file
24
ssgrestserver/request/웹핸들링/조회/기존상품수량.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존상품수량 : ARequestObject
|
||||
{
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.최근받은상품수량);
|
||||
|
||||
if (!mAccessableDictionary.ContainsKey(m채널이름))
|
||||
{
|
||||
return "서버에 없는 정보 - 상품데이터";
|
||||
}
|
||||
|
||||
return mAccessableDictionary[m채널이름].ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/조회/기존상품평.cs
Normal file
21
ssgrestserver/request/웹핸들링/조회/기존상품평.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존상품평 : AOutputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "상품평";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.상품평);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/조회/기존채팅.cs
Normal file
21
ssgrestserver/request/웹핸들링/조회/기존채팅.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존채팅 : AOutputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "채팅";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.채팅);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/조회/기존채팅판.cs
Normal file
21
ssgrestserver/request/웹핸들링/조회/기존채팅판.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존채팅판 : AOutputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "채팅판";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.채팅판);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/조회/기존콜데이터.cs
Normal file
21
ssgrestserver/request/웹핸들링/조회/기존콜데이터.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존콜데이터 : AOutputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "콜데이터";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.콜데이터);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/웹핸들링/조회/기존텍스트.cs
Normal file
21
ssgrestserver/request/웹핸들링/조회/기존텍스트.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 기존텍스트 : AOutputTextHandler
|
||||
{
|
||||
protected override void setUpdateData()
|
||||
{
|
||||
|
||||
updateTextName = "텍스트";
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.최근받은텍스트);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
29
ssgrestserver/request/웹핸들링/조회/자막조회.cs
Normal file
29
ssgrestserver/request/웹핸들링/조회/자막조회.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 자막조회 : ARequestObject
|
||||
{
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
코더확인객채생성여부();
|
||||
|
||||
조회시간추가();
|
||||
|
||||
mAccessableDictionary = DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.코더상태);
|
||||
|
||||
if (!mAccessableDictionary[m채널이름].ContainsKey("status"))
|
||||
{
|
||||
mAccessableDictionary[m채널이름].Add("status", "200");
|
||||
}
|
||||
|
||||
return mAccessableDictionary[m채널이름].ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
27
ssgrestserver/request/웹핸들링/조회/조회씬목록.cs
Normal file
27
ssgrestserver/request/웹핸들링/조회/조회씬목록.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 조회씬이름 : ARequestObject
|
||||
{
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
JObject retObj = new JObject();
|
||||
|
||||
foreach (var item in DataCenter.getInstance().getData(DataCenter.관리중인데이터들배열.씬이름)[m채널이름])
|
||||
{
|
||||
retObj.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
retObj.Add("status", "200");
|
||||
|
||||
return retObj.ToString(Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
33
ssgrestserver/request/최초개발/새경품프로모션.cs
Normal file
33
ssgrestserver/request/최초개발/새경품프로모션.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 새경품프로모션 : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
//string mRequestURL = "promo/lotteryPromo.do?promoNo=";
|
||||
string mRequestURL = "promo/lotteryPromo.do?promoNo=";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("프로모션코드");
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(mRequestURL + mRequestParameterKVPairList["프로모션코드"]));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
38
ssgrestserver/request/최초개발/새상품수량.cs
Normal file
38
ssgrestserver/request/최초개발/새상품수량.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 새상품수량 : ARequestObject, INeedKeyRequest
|
||||
{
|
||||
string mRequestURL = "goods/soldQty.do?";
|
||||
|
||||
public void setNeedKeys()
|
||||
{
|
||||
mNeedKeyList.Add("방송일");
|
||||
mNeedKeyList.Add("조회시작일");
|
||||
mNeedKeyList.Add("PGM코드");
|
||||
mNeedKeyList.Add("보낸사람");
|
||||
}
|
||||
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
|
||||
string req = mRequestURL + "bDate=" + mRequestParameterKVPairList["조회시작일"];
|
||||
req += "&broadDate=" + mRequestParameterKVPairList["방송일"];
|
||||
req += "&pgmCode=" + mRequestParameterKVPairList["PGM코드"];
|
||||
|
||||
JObject receiveData = JObject.Parse(httpRequest(req));
|
||||
|
||||
receiveData.Add("조회시간", DateTime.Now.ToString());
|
||||
receiveData.Add("보낸사람", mRequestParameterKVPairList["보낸사람"]);
|
||||
|
||||
return receiveData.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
ssgrestserver/request/테스트.cs
Normal file
21
ssgrestserver/request/테스트.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ssgrestserver
|
||||
{
|
||||
class 테스트 : ARequestObject
|
||||
{
|
||||
protected override string startUpdateWork()
|
||||
{
|
||||
JObject buf코더상태 = new JObject();
|
||||
buf코더상태.Add("test", "testtt");
|
||||
buf코더상태.Add("status", "200");
|
||||
return buf코더상태.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user