You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

125 lines
3.4 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Operation;
using Sog;
using LitJson;
using SimpleHttpServer;
using MySql.Data.MySqlClient;
using ProtoCSStruct;
namespace Operation
{
public enum InfoType
{
None = 0,
UpPool = 1,
Shop = 2,
Activity = 3,
Max
}
class GetInfo
{
public static void GetUpPollDrawesc(JsonData Jsondata)
{
JsonData data = new JsonData();
Jsondata["data"] = data; data.Add(""); data.Clear();
Jsondata["ret"] = 0;
Jsondata["msg"] = "请求成功";
}
public static void GetShopMall(JsonData Jsondata)
{
JsonData data = new JsonData();
Jsondata["data"] = data; data.Add(""); data.Clear();
//var itemTable = ShopMallDescMgr.Instance.ItemTable;
//if (itemTable == null)
//{
// Jsondata["ret"] = 3;
// Jsondata["msg"] = "请求失败,读表错误!";
// return;
//}
//foreach (var item in itemTable)
//{
// if(item.Value.pageId == 0)
// {
// continue;
// }
// JsonData itemData = new JsonData();
// itemData["id"] = item.Value.pageId;
// data.Add(itemData);
//}
Jsondata["ret"] = 0;
Jsondata["msg"] = "请求成功";
}
public static void GetWelfareActivity(JsonData Jsondata)
{
JsonData data = new JsonData();
Jsondata["data"] = data; data.Add(""); data.Clear();
//var itemTable = WelfareActivityDescMgr.Instance.ItemTable;
//if (itemTable == null)
//{
// Jsondata["ret"] = 3;
// Jsondata["msg"] = "请求失败,读表错误!";
// return;
//}
//foreach (var item in itemTable)
//{
// if (item.Value.activityId == 0)
// {
// continue;
// }
// JsonData itemData = new JsonData();
// itemData["id"] = item.Value.activityId;
// data.Add(itemData);
//}
Jsondata["ret"] = 0;
Jsondata["msg"] = "请求成功";
}
[RequestMapping("获取拍脸图配置",PermissionCode.NOTIFIC_SELECT_CONFIG)]
public static int GetDescInfo(string httpApiCmd, JsonData Jsondata, HttpResponse rsp, HttpRequest request, HttpQueryParams query, uint httpContextId)
{
int type = query.GetValue("type").Toint32(0);
if (type == 0 || type >= (int)InfoType.Max)
{
Jsondata["ret"] = 2;
Jsondata["msg"] = "参数错误";
return 2;
}
switch (type)
{
case (int)InfoType.UpPool:
GetUpPollDrawesc(Jsondata);
break;
case (int)InfoType.Shop:
GetShopMall(Jsondata);
break;
case (int)InfoType.Activity:
GetWelfareActivity(Jsondata);
break;
default:
break;
}
return 0;
}
}
}