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