Commit 3f878615 authored by 吴春's avatar 吴春

提交代码

parent ead1308c
......@@ -225,14 +225,14 @@ namespace Mall.Model.Entity.TradePavilion
/// </summary>
public string StartingInfo { get; set; }
/// <summary>
/// 首秀政策
/// </summary>
public string FirstShow { get; set; }
/// <summary>
/// 首展政策
/// </summary>
public string FirstExhibition { get; set; }
///// <summary>
///// 首秀政策
///// </summary>
//public string FirstShow { get; set; }
///// <summary>
///// 首展政策
///// </summary>
//public string FirstExhibition { get; set; }
}
}
......@@ -240,9 +240,7 @@ namespace Mall.Module.TradePavilion
{nameof(RB_CarrierApplyFor_Extend.BuiltUpArea),model.BuiltUpArea },
{nameof(RB_CarrierApplyFor_Extend.EndBuiltUpArea),model.EndBuiltUpArea },
{nameof(RB_CarrierApplyFor_Extend.FirstShopNum),model.FirstShopNum },
{nameof(RB_CarrierApplyFor_Extend.StartingInfo),model.StartingInfo },
{nameof(RB_CarrierApplyFor_Extend.FirstShow),model.FirstShow },
{nameof(RB_CarrierApplyFor_Extend.FirstExhibition),model.FirstExhibition },
{nameof(RB_CarrierApplyFor_Extend.StartingInfo),model.StartingInfo }
};
flag = carrierRepository.Update(fileds, new WhereHelper(nameof(RB_Carrier_Extend.ID), model.ID));
......
......@@ -91,7 +91,8 @@ namespace Mall.Module.TradePavilion
//查询用户列表
string userIds = string.Join(",", list.Select(x => x.CreateBy));
var ulist = member_UserRepository.GetList(new Model.Extend.User.RB_Member_User_Extend() { MallBaseId = query.MallBaseId, UserIds = userIds });
foreach (var item in list) {
foreach (var item in list)
{
var umodel = ulist.Where(x => x.Id == item.CreateBy).FirstOrDefault();
item.UserName = umodel.Name;
item.UserIcon = umodel.Photo;
......@@ -110,7 +111,7 @@ namespace Mall.Module.TradePavilion
public RB_Company_Extend GetCompanyEntity(object CompanyId)
{
var model = companyRepository.GetEntity<RB_Company_Extend>(CompanyId);
return model;
}
......@@ -126,7 +127,7 @@ namespace Mall.Module.TradePavilion
{
model.BrandModel = new RB_BrandApplyFor_Extend();
model.CarrierModel = new RB_CarrierApplyFor_Extend();
if (model.FirstShopType == 1)
{
var brandList = brandApplyForRepository.GetBrandListByWhere(new RB_BrandApplyFor_Extend { TenantId = model.TenantId, MallBaseId = model.MallBaseId, CompanyId = model.CompanyId });
......@@ -212,7 +213,8 @@ namespace Mall.Module.TradePavilion
model.CompanyName
};
}
else {
else
{
return new
{
CompanyStatus = 2,//认证待完善
......@@ -221,7 +223,8 @@ namespace Mall.Module.TradePavilion
};
}
}
else if (model.CompanyStatus == 2) {
else if (model.CompanyStatus == 2)
{
return new
{
CompanyStatus = 4,//认证未通过
......@@ -230,7 +233,8 @@ namespace Mall.Module.TradePavilion
};
}
}
else {
else
{
return new
{
CompanyStatus = 1,//未认证
......@@ -458,7 +462,8 @@ namespace Mall.Module.TradePavilion
bool flag = companyRepository.Update(keyValues, wheres);
return flag ? "" : "修改失败";
}
else {
else
{
return "认证状态不正确";
}
}
......@@ -495,7 +500,8 @@ namespace Mall.Module.TradePavilion
{
{nameof(RB_Company_Extend.CompanyStatus),Status },
};
if (Status == 2) {
if (Status == 2)
{
fileds.Add(nameof(RB_Company_Extend.RejectRemark), remark);
}
List<WhereHelper> wheres = new List<WhereHelper>() {
......@@ -506,9 +512,11 @@ namespace Mall.Module.TradePavilion
}
};
bool flag = companyRepository.Update(fileds, wheres, trans);
if (flag) {
if (flag)
{
//新增 更新品牌 载体信息
if (Status == 1) {
if (Status == 1)
{
var cmodel = companyRepository.GetEntity(CompanyId);
if (cmodel.FirstShopType == 1)
{
......@@ -522,7 +530,8 @@ namespace Mall.Module.TradePavilion
//修改
#region 验证品牌是否已关联用户
var bmodel = brand2Repository.GetEntity(BrandModel.ExistBrandId);
if (bmodel.UserId > 0) {
if (bmodel.UserId > 0)
{
companyRepository.DBSession.Rollback();
return "该品牌已被其他用户认证,请核实后再试";
}
......@@ -561,7 +570,8 @@ namespace Mall.Module.TradePavilion
};
brand2Repository.Update(filedsBrand, new WhereHelper(nameof(RB_Brand_Extend.ID), BrandModel.ExistBrandId), trans);
}
else {
else
{
//新增
#region 再次验证品牌名称
if (ValidateBrandName(BrandModel.BrandName, cmodel.MallBaseId))
......@@ -585,7 +595,8 @@ namespace Mall.Module.TradePavilion
}
}
}
else {
else
{
//载体
var carrierList = carrierApplyForRepository.GetCarrierList(new RB_CarrierApplyFor_Extend() { MallBaseId = cmodel.MallBaseId, CompanyId = cmodel.CompanyId });
if (carrierList != null && carrierList.Any())
......@@ -605,6 +616,11 @@ namespace Mall.Module.TradePavilion
}
#endregion
#region 修改载体
int FirstStoreTest = 0;
if (!string.IsNullOrWhiteSpace(CarrierModel.FirstShow) && !string.IsNullOrWhiteSpace(CarrierModel.Discount))
{
FirstStoreTest = 1;
}
Dictionary<string, object> filedsCarrier = new Dictionary<string, object>()
{
{nameof(RB_Carrier_Extend.Logo),CarrierModel.Logo },
......@@ -633,8 +649,7 @@ namespace Mall.Module.TradePavilion
{nameof(RB_Carrier_Extend.EndBuiltUpArea),CarrierModel.EndBuiltUpArea },
{nameof(RB_Carrier_Extend.FirstShopNum),CarrierModel.FirstShopNum },
{nameof(RB_Carrier_Extend.StartingInfo),CarrierModel.StartingInfo },
{nameof(RB_Carrier_Extend.FirstShow),CarrierModel.FirstShow },
{nameof(RB_Carrier_Extend.FirstExhibition),CarrierModel.FirstExhibition },
{nameof(RB_Carrier_Extend.FirstStoreTest),FirstStoreTest }
};
flag = carrierRepository.Update(filedsCarrier, new WhereHelper(nameof(RB_Carrier_Extend.ID), carrmodel.ID), trans);
if (flag)
......@@ -654,7 +669,8 @@ namespace Mall.Module.TradePavilion
}
#endregion
}
else {
else
{
//新增
#region 再次验证载体名称
if (ValidateCarrierName(CarrierModel.CarrierName, CarrierModel.MallBaseId))
......
......@@ -1405,8 +1405,6 @@ namespace Mall.WebApi.Controllers.TradePavilion
extModel.EndBuiltUpArea,
extModel.FirstShopNumList,
extModel.StartingInfo,
extModel.FirstShow,
extModel.FirstExhibition,
listEnroll,
extModel.OpeningStatus,
extModel.FirstStoreTest
......@@ -1679,7 +1677,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
[AllowAnonymous]
public ApiResult GetPrizePageList()
{
ResultPageModel pageModel = JsonConvert.DeserializeObject<ResultPageModel>(RequestParm.msg.ToString());
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var query = new RB_Prize_Extend()
{
......@@ -1687,10 +1685,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
};
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
var list = carrierModule.GetPrizePageList(pageModel.pageIndex, pageModel.pageSize, out long rowsCount, query);
pageModel.count = Convert.ToInt32(rowsCount);
pageModel.pageData = list.Select(x => new
var list = carrierModule.GetPrizeList( query);
var result = list.Select(x => new
{
x.Id,
x.Name,
......@@ -1699,7 +1695,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
x.TotalCount,
x.YearInfo
});
return ApiResult.Success(data: pageModel);
return ApiResult.Success(data: result);
}
#endregion
......
......@@ -1572,6 +1572,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
PaiYan = parms.GetInt("PaiYan", -1),
DianLiang = parms.GetStringValue("DianLiang"),
UserId = parms.GetInt("UserId", 0),
PrizeId = parms.GetInt("PrizeId", -1),
};
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
......
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