using MyCode.Project.Domain.Model;
using MyCode.Project.Services;
using System.Collections.Generic;
using System.Web.Http;
namespace MyCode.Project.WebApi.Areas.Wechat.Controllers
{
public class SynchronizeDataController : BaseWechatController
{
private ISynchronizeDataService _synchronizeDataService;
public SynchronizeDataController(ISynchronizeDataService synchronizeDataService)
{
_synchronizeDataService = synchronizeDataService;
}
#region GetAllGoods(获取所有的商品包括任何状态)
///
/// 获取所有的商品包括任何状态
///
///
[HttpGet]
[AllowAnonymous]
public List GetAllGoods(string key)
{
if (key == "DCBD3197-B680-408A-BAF0-8B08611B71CA")
return _synchronizeDataService.GetAllGoods();
else
return new List();
}
#endregion
#region GetAllServiceSetService(获取所有的服务套餐明细)
///
/// 获取所有的服务套餐明细
///
///
[HttpGet]
[AllowAnonymous]
public List GetAllServiceSetService(string key)
{
if (key == "DCBD3197-B680-408A-BAF0-8B08611B71CA")
return _synchronizeDataService.GetAllServiceSetService();
else
return new List();
}
#endregion
#region GetAllBarcode(获取所有的SKU包括任何状态)
///
/// 获取所有的SKU包括任何状态
///
///
[HttpGet]
[AllowAnonymous]
public List GetAllBarcode(string key)
{
if (key == "DCBD3197-B680-408A-BAF0-8B08611B71CA")
return _synchronizeDataService.GetAllBarcode();
else
return new List();
}
#endregion
#region GetAllService(获取所有的服务包括任何状态)
///
/// 获取所有的服务包括任何状态
///
///
[HttpGet]
[AllowAnonymous]
public List GetAllService(string key)
{
if (key == "DCBD3197-B680-408A-BAF0-8B08611B71CA")
return _synchronizeDataService.GetAllService();
else
return new List();
}
#endregion
#region GetAllServiceSet(获取所有的服务套餐包括任何状态)
///
/// 获取所有的服务套餐包括任何状态
///
///
[HttpGet]
[AllowAnonymous]
public List GetAllServiceSet(string key)
{
if (key == "DCBD3197-B680-408A-BAF0-8B08611B71CA")
return _synchronizeDataService.GetAllServiceSet();
else
return new List();
}
#endregion
#region GetAllDept(获取所有的商品分类包括任何状态)
///
/// 获取所有的商品分类包括任何状态
///
///
[HttpGet]
[AllowAnonymous]
public List GetAllDept(string key)
{
if (key == "DCBD3197-B680-408A-BAF0-8B08611B71CA")
return _synchronizeDataService.GetAllDept();
else
return new List();
}
#endregion
#region GetAllDept(获取所有的主题包括任何状态)
///
/// 获取所有的主题包括任何状态
///
///
[HttpGet]
[AllowAnonymous]
public List GetAllTheme(string key)
{
if (key == "DCBD3197-B680-408A-BAF0-8B08611B71CA")
return _synchronizeDataService.GetAllTheme();
else
return new List();
}
#endregion
#region GetAllColor(获取所有的色号包括任何状态)
///
/// 获取所有的色号包括任何状态
///
///
[HttpGet]
[AllowAnonymous]
public List GetAllColor(string key)
{
if (key == "DCBD3197-B680-408A-BAF0-8B08611B71CA")
return _synchronizeDataService.GetAllColor();
else
return new List();
}
#endregion
#region SynchronizeData(同步商品等数据)
///
/// 同步商品等数据
///
///
[HttpGet]
[AllowAnonymous]
public void SynchronizeData(string key)
{
if (key == "A8DE6EDD-A860-4BD7-AC61-6A728D5FF57F")
_synchronizeDataService.SynchronizeData();
}
#endregion
}
}