Commit d982b9ac authored by liudong1993's avatar liudong1993

1

parent 293582b4
......@@ -23,7 +23,7 @@ namespace Mall.Common.Enum.TradePavilion
/// <summary>
/// 服务商
/// </summary>
[EnumField("服务商")]
Servicer = 3
//[EnumField("服务商")]
//Servicer = 3
}
}
......@@ -29,6 +29,11 @@ namespace Mall.Common.Enum.TradePavilion
/// 取消
/// </summary>
[EnumField("取消")]
Cancel = 4
Cancel = 4,
/// <summary>
/// 未开始
/// </summary>
[EnumField("未开始")]
NotStarted = 5
}
}
......@@ -57,8 +57,11 @@ namespace Mall.Module.TradePavilion
{
foreach (var item in list)
{
if (item.ListState == Common.Enum.TradePavilion.ListStateEnum.Enroll && item.EndDate <= DateTime.Now)
if (item.ListState == Common.Enum.TradePavilion.ListStateEnum.Enroll && item.StartDate > DateTime.Now)
{
item.ListState = Common.Enum.TradePavilion.ListStateEnum.NotStarted;
}
else if (item.ListState == Common.Enum.TradePavilion.ListStateEnum.Enroll && item.EndDate <= DateTime.Now)
{
item.ListState = Common.Enum.TradePavilion.ListStateEnum.Rating;
}
......@@ -351,6 +354,10 @@ namespace Mall.Module.TradePavilion
/// <returns></returns>
public string SetAppletFirstShopListInfo(RB_FirstShop_ListEnroll_Extend demodel)
{
#region 验证用户是否已认证
var companyModel = companyRepository.GetCompanyRepository(new RB_Company_Extend() { MallBaseId = demodel.MallBaseId, CreateBy = demodel.UserId });
if (companyModel == null || companyModel.CompanyStatus != 1) { return "未认证,无法进行报名"; }
#endregion
var listModel = firstShop_ListRepository.GetEntity(demodel.ListId);
if (listModel == null || listModel.Status == 1 || listModel.ListState == Common.Enum.TradePavilion.ListStateEnum.Cancel)
{
......
......@@ -40,11 +40,15 @@ namespace Mall.Repository.TradePavilion
}
if (dmodel.ObjectTypeId > 0)
{
where += $@" and find_in_set('{dmodel.ObjectTypeId}',w.{nameof(RB_FirstShop_List_Extend.ListType)})";
where += $@" and find_in_set('{dmodel.ObjectTypeId}',w.{nameof(RB_FirstShop_List_Extend.ObjectTypeIds)})";
}
if (dmodel.ListState > 0)
{
if (dmodel.ListState == Common.Enum.TradePavilion.ListStateEnum.Enroll)
if (dmodel.ListState == Common.Enum.TradePavilion.ListStateEnum.NotStarted) {
where += $@" and w.{nameof(RB_FirstShop_List_Extend.ListState)}={(int)Common.Enum.TradePavilion.ListStateEnum.Enroll}";
where += $@" and w.{nameof(RB_FirstShop_List_Extend.StartDate)} >'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
else if (dmodel.ListState == Common.Enum.TradePavilion.ListStateEnum.Enroll)
{
where += $@" and w.{nameof(RB_FirstShop_List_Extend.ListState)}={(int)Common.Enum.TradePavilion.ListStateEnum.Enroll}";
where += $@" and w.{nameof(RB_FirstShop_List_Extend.StartDate)} <='{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}'";
......
......@@ -1647,7 +1647,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
extModel.ListEnroll = firstShopListModule.GetFirstShopListEnrollList(new RB_FirstShop_ListEnroll_Extend { MallBaseId = RequestParm.MallBaseId, TenantId = RequestParm.TenantId, ObjectType = Common.Enum.TradePavilion.ListObjectTypeEnum.Brand, ObjectId = extModel.ID, RankListState = 1 });
if (!string.IsNullOrWhiteSpace(extModel.SourceIds))
{
extModel.PrizeList = carrierModule.GetPrizeList(new RB_Prize_Extend { MallBaseId = RequestParm.MallBaseId, TenantId = RequestParm.TenantId,QPrizeIds= extModel.SourceIds });
extModel.PrizeList = carrierModule.GetPrizeList(new RB_Prize_Extend { MallBaseId = RequestParm.MallBaseId, TenantId = RequestParm.TenantId, QPrizeIds = extModel.SourceIds });
}
return ApiResult.Success(data: extModel);
}
......@@ -1677,7 +1677,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
[AllowAnonymous]
public ApiResult GetPrizePageList()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var query = new RB_Prize_Extend()
{
......@@ -1685,8 +1685,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
};
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
var list = carrierModule.GetPrizeList( query);
var result = list.Select(x => new
var list = carrierModule.GetPrizeList(query);
var result = list.Select(x => new
{
x.Id,
x.Name,
......@@ -1985,14 +1985,14 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
public ApiResult GetAppletFirstShopListPageList()
{
var userInfo = base.AppletUserInfo;
var req = base.RequestParm;
ResultPageModel pageModel = JsonHelper.DeserializeObject<ResultPageModel>(req.msg.ToString());
RB_FirstShop_List_Extend demodel = JsonHelper.DeserializeObject<RB_FirstShop_List_Extend>(req.msg.ToString());
demodel.TenantId = userInfo.TenantId;
demodel.MallBaseId = userInfo.MallBaseId;
demodel.TenantId = req.TenantId;
demodel.MallBaseId = req.MallBaseId;
demodel.IsAppletSelectNor = 1;
demodel.OrderBy = 1;
......@@ -2187,6 +2187,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
public ApiResult GetListTypeEnumList()
{
var list = EnumHelper.GetEnumList(typeof(Common.Enum.TradePavilion.ListTypeEnum));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment