Commit 23c97c57 authored by 吴春's avatar 吴春

提交代码

parent 6bce9490
...@@ -2665,7 +2665,7 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -2665,7 +2665,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary> /// <summary>
/// 商品列表 /// 商品列表
/// </summary> /// </summary>
public List<GoodsDetailsItem2> goodsList { get; set; } public List<StoreGoodsDetailsItem2> goodsList { get; set; }
} }
/// <summary> /// <summary>
...@@ -2699,6 +2699,11 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -2699,6 +2699,11 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary> /// </summary>
public decimal OriginalPrice { get; set; } public decimal OriginalPrice { get; set; }
/// <summary>
/// 是否选择服务人员(0-不选,1-选择)前端使用
/// </summary>
public int IsChooseServicePerson { get; set; }
/// <summary> /// <summary>
/// 课程评分 2020-10-13 ld /// 课程评分 2020-10-13 ld
/// </summary> /// </summary>
......
...@@ -4945,6 +4945,49 @@ namespace Mall.Module.Product ...@@ -4945,6 +4945,49 @@ namespace Mall.Module.Product
return list; return list;
} }
/// <summary>
/// 获取下拉列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_Goods_Extend> GetProductGoodsDialogList_V3(int pageIndex, int pageSize, out long count, RB_Goods_Extend demodel)
{
var list = goodsRepository.GetProductGoodsDialogList_V3(pageIndex, pageSize, out count, demodel);
if (list.Any())
{
//查询分类
string ids = string.Join(",", list.Select(x => x.Id));
var clist = goods_CategoryRepository.GetList(new RB_Goods_Category_Extend() { GoodsIds = ids, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
foreach (var item in list)
{
item.CategoryList = clist.Where(x => x.GoodsId == item.Id).ToList();
//轮播图
item.CoverImage = "";
item.CarouselImageList = new List<RB_ImageCommonModel>();
if (!string.IsNullOrEmpty(item.CarouselImage) && item.CarouselImage != "[]")
{
List<string> CarouselIdList = JsonConvert.DeserializeObject<List<string>>(item.CarouselImage);
//封面图
item.CoverImage = CarouselIdList[0];
//轮播图
//轮播图
foreach (var qitem in CarouselIdList)
{
item.CarouselImageList.Add(new RB_ImageCommonModel()
{
Id = 0,
Name = "",
Path = qitem
});
}
}
}
}
return list;
}
/// <summary> /// <summary>
/// 获取后台商品分页列表 /// 获取后台商品分页列表
......
...@@ -25,7 +25,11 @@ namespace Mall.Repository.Product ...@@ -25,7 +25,11 @@ namespace Mall.Repository.Product
public List<RB_Goods_Extend> GetPageList(int pageIndex, int pageSize, out long rowCount, RB_Goods_Extend dmodel, bool IsAllClassify = false) public List<RB_Goods_Extend> GetPageList(int pageIndex, int pageSize, out long rowCount, RB_Goods_Extend dmodel, bool IsAllClassify = false)
{ {
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 "; string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 ";
if (dmodel.GoodsClassify == 1) if (dmodel.GoodsClassify == 3)
{//查询非司导商品
where += $@" and g.GoodsClassify =3";
}
else if (dmodel.GoodsClassify == 1)
{//查询非司导商品 {//查询非司导商品
where += $@" and g.GoodsClassify <> 1"; where += $@" and g.GoodsClassify <> 1";
} }
...@@ -45,6 +49,10 @@ namespace Mall.Repository.Product ...@@ -45,6 +49,10 @@ namespace Mall.Repository.Product
{ {
where += $@" and g.{nameof(RB_Goods_Extend.MallBaseId)}={dmodel.MallBaseId}"; where += $@" and g.{nameof(RB_Goods_Extend.MallBaseId)}={dmodel.MallBaseId}";
} }
if (!string.IsNullOrEmpty(dmodel.StoresIds))
{
where += $@" and locate('{dmodel.StoresIds}',g.{nameof(RB_Goods_Extend.StoresIds)})";
}
if (dmodel.Id > 0) if (dmodel.Id > 0)
{ {
where += $@" and g.{nameof(RB_Goods_Extend.Id)}={dmodel.Id}"; where += $@" and g.{nameof(RB_Goods_Extend.Id)}={dmodel.Id}";
...@@ -275,6 +283,135 @@ where {where} group by g.Id order by {orderBy}"; ...@@ -275,6 +283,135 @@ where {where} group by g.Id order by {orderBy}";
return GetPage<RB_Goods_Extend>(pageIndex, pageSize, out rowCount, sql).ToList(); return GetPage<RB_Goods_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
} }
/// <summary>
/// 获取列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowCount"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Goods_Extend> GetProductGoodsDialogList_V3(int pageIndex, int pageSize, out long rowCount, RB_Goods_Extend dmodel)
{
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 ";
where += $@" and g.GoodsClassify =3";//排除司导的
if (dmodel.TenantId > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.TenantId)}={dmodel.TenantId}";
}
if (dmodel.NotTenantId > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.TenantId)}<>{dmodel.NotTenantId}";
}
if (dmodel.MallBaseId > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.MallBaseId)}={dmodel.MallBaseId}";
}
if (dmodel.Id > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.Id)}={dmodel.Id}";
}
if (!string.IsNullOrEmpty(dmodel.GoodsIds))
{
where += $@" and g.{nameof(RB_Goods_Extend.Id)} in({dmodel.GoodsIds})";
}
if (!string.IsNullOrEmpty(dmodel.Name))
{
where += $@" and g.{nameof(RB_Goods_Extend.Name)} like '%{dmodel.Name}%'";
}
if (dmodel.GoodsStatus > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.GoodsStatus)}={dmodel.GoodsStatus}";
}
if (dmodel.IsSelectSellOut == 1)
{
where += $@" and g.{nameof(RB_Goods_Extend.InventoryNum)}<=0";
}
if (!string.IsNullOrEmpty(dmodel.CategoryIds))
{
where += $@" and c.{nameof(RB_Goods_Category.CategoryId)} in({dmodel.CategoryIds})";
}
if (!string.IsNullOrEmpty(dmodel.StartTime))
{
where += $@" and g.{nameof(RB_Goods_Extend.CreateDate)} >='{dmodel.StartTime}'";
}
if (!string.IsNullOrEmpty(dmodel.EndTime))
{
where += $@" and g.{nameof(RB_Goods_Extend.CreateDate)} <='{dmodel.EndTime + " 23:59:59"}'";
}
if (dmodel.IsProcurement > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.IsProcurement)}={dmodel.IsProcurement}";
}
if (dmodel.IsProxy > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.IsProxy)}={dmodel.IsProxy}";
}
if (dmodel.SupplierId > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.SupplierId)}={dmodel.SupplierId}";
}
if (dmodel.GoodsPageType.HasValue)
{
if (dmodel.GoodsPageType == Common.Enum.Goods.GoodsPageTypeEnum.Mall)
{
where += $@" and g.{nameof(RB_Goods_Extend.GoodsPageType)} in(0,1)";
}
else if (dmodel.GoodsPageType == Common.Enum.Goods.GoodsPageTypeEnum.School)
{
where += $@" and g.{nameof(RB_Goods_Extend.GoodsPageType)} in(0,2)";
}
}
string orderBy = " g.CreateDate desc";
if (dmodel.OrderBy == 1)
{
//id升序
orderBy = " g.Id asc";
}
else if (dmodel.OrderBy == 2)
{
//id降序
orderBy = " g.Id desc";
}
else if (dmodel.OrderBy == 3)
{
//排序升序
orderBy = " g.Sort asc";
}
else if (dmodel.OrderBy == 4)
{
//排序降序
orderBy = " g.Sort desc";
}
else if (dmodel.OrderBy == 5)
{
//售价升序
orderBy = " g.SellingPrice asc";
}
else if (dmodel.OrderBy == 6)
{
//售价降序
orderBy = " g.SellingPrice desc";
}
else if (dmodel.OrderBy == 7)
{
//库存升序
orderBy = " g.InventoryNum asc";
}
else if (dmodel.OrderBy == 8)
{
//库存降序
orderBy = " g.InventoryNum desc";
}
string sql = $@"select g.Id,g.Name,g.CarouselImage,g.SellingPrice from RB_Goods g
inner join rb_goods_category c on g.Id=c.GoodsId
where {where} group by g.Id order by {orderBy}";
return GetPage<RB_Goods_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
}
/// <summary> /// <summary>
/// 分页列表 /// 分页列表
/// </summary> /// </summary>
...@@ -404,11 +541,16 @@ where {where} group by g.Id order by {orderBy}"; ...@@ -404,11 +541,16 @@ where {where} group by g.Id order by {orderBy}";
public List<RB_Goods_Extend> GetList(RB_Goods_Extend dmodel) public List<RB_Goods_Extend> GetList(RB_Goods_Extend dmodel)
{ {
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 "; string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 ";
if (dmodel.GoodsClassify == 1)//查询非司导 if (dmodel.GoodsClassify == 3)//查询非司导
{
where += $" and g.GoodsClassify = 3";
}
else if (dmodel.GoodsClassify == 1)//查询非司导
{ {
where += $" and g.GoodsClassify <> 1"; where += $" and g.GoodsClassify <> 1";
} }
else { else
{
where += $" and g.GoodsClassify=0"; where += $" and g.GoodsClassify=0";
} }
if (dmodel.TenantId > 0) if (dmodel.TenantId > 0)
...@@ -427,6 +569,10 @@ where {where} group by g.Id order by {orderBy}"; ...@@ -427,6 +569,10 @@ where {where} group by g.Id order by {orderBy}";
{ {
where += $@" and g.{nameof(RB_Goods_Extend.Id)} in({dmodel.GoodsIds})"; where += $@" and g.{nameof(RB_Goods_Extend.Id)} in({dmodel.GoodsIds})";
} }
if (!string.IsNullOrEmpty(dmodel.StoresIds))
{
where += $@" and locate('{dmodel.StoresIds}',g.{nameof(RB_Goods_Extend.StoresIds)})";
}
if (!string.IsNullOrEmpty(dmodel.Name)) if (!string.IsNullOrEmpty(dmodel.Name))
{ {
where += $@" and g.{nameof(RB_Goods_Extend.Name)} like '%{dmodel.Name}%'"; where += $@" and g.{nameof(RB_Goods_Extend.Name)} like '%{dmodel.Name}%'";
...@@ -674,7 +820,8 @@ WHERE {where} group by g.Id order by g.CreateDate desc"; ...@@ -674,7 +820,8 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
{ {
where += $@" and g.{nameof(RB_Goods_Extend.Id)} in({dmodel.GoodsIds})"; where += $@" and g.{nameof(RB_Goods_Extend.Id)} in({dmodel.GoodsIds})";
} }
if (dmodel.NoGoodsId > 0) { if (dmodel.NoGoodsId > 0)
{
where += $@" and g.{nameof(RB_Goods_Extend.Id)} <> {dmodel.NoGoodsId}"; where += $@" and g.{nameof(RB_Goods_Extend.Id)} <> {dmodel.NoGoodsId}";
} }
if (!string.IsNullOrEmpty(dmodel.SupplierIds)) if (!string.IsNullOrEmpty(dmodel.SupplierIds))
...@@ -901,7 +1048,7 @@ where {where} group by g.Id order by col.Id desc"; ...@@ -901,7 +1048,7 @@ where {where} group by g.Id order by col.Id desc";
/// <param name="rowCount">总条数</param> /// <param name="rowCount">总条数</param>
/// <param name="dmodel">查询条件</param> /// <param name="dmodel">查询条件</param>
/// <returns></returns> /// <returns></returns>
public List<RB_Goods_Extend> GetPageListForCommission(int pageIndex, int pageSize, out long rowCount, RB_Goods_Extend dmodel,int GoodsClassify) public List<RB_Goods_Extend> GetPageListForCommission(int pageIndex, int pageSize, out long rowCount, RB_Goods_Extend dmodel, int GoodsClassify)
{ {
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 and g.GoodsClassify={GoodsClassify}"; string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 and g.GoodsClassify={GoodsClassify}";
if (dmodel.TenantId > 0) if (dmodel.TenantId > 0)
...@@ -1160,7 +1307,7 @@ WHERE {where} group by g.Id order by g.CreateDate desc"; ...@@ -1160,7 +1307,7 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
where += $@" and g.{nameof(RB_Goods_Extend.CarType)}={(int)dmodel.CarType}"; where += $@" and g.{nameof(RB_Goods_Extend.CarType)}={(int)dmodel.CarType}";
if (dmodel.CarType == Common.Enum.Goods.GuideCarGoodsTypeEnum.Line) if (dmodel.CarType == Common.Enum.Goods.GuideCarGoodsTypeEnum.Line)
{ {
if (dmodel.IsSpell ==1) if (dmodel.IsSpell == 1)
{ {
where += $@" and g.{nameof(RB_Goods_Extend.IsSpell)}={dmodel.IsSpell}"; where += $@" and g.{nameof(RB_Goods_Extend.IsSpell)}={dmodel.IsSpell}";
} }
...@@ -1314,7 +1461,7 @@ where {where} GROUP BY g.Id asc order by {orderBy} ,b.date asc"; ...@@ -1314,7 +1461,7 @@ where {where} GROUP BY g.Id asc order by {orderBy} ,b.date asc";
{ {
where += $@" and g.{nameof(RB_Goods_Extend.Id)}={dmodel.Id}"; where += $@" and g.{nameof(RB_Goods_Extend.Id)}={dmodel.Id}";
} }
if (!string.IsNullOrEmpty(dmodel.GoodsIds)) if (!string.IsNullOrEmpty(dmodel.GoodsIds))
{ {
where += $@" and g.{nameof(RB_Goods_Extend.Id)} in({dmodel.GoodsIds})"; where += $@" and g.{nameof(RB_Goods_Extend.Id)} in({dmodel.GoodsIds})";
...@@ -1331,7 +1478,7 @@ where {where} GROUP BY g.Id asc order by {orderBy} ,b.date asc"; ...@@ -1331,7 +1478,7 @@ where {where} GROUP BY g.Id asc order by {orderBy} ,b.date asc";
{ {
where += $@" and c.{nameof(RB_Goods_Category.CategoryId)} in({dmodel.CategoryIds})"; where += $@" and c.{nameof(RB_Goods_Category.CategoryId)} in({dmodel.CategoryIds})";
} }
if (dmodel.IsProcurement > 0) if (dmodel.IsProcurement > 0)
{ {
where += $@" and g.{nameof(RB_Goods_Extend.IsProcurement)}={dmodel.IsProcurement}"; where += $@" and g.{nameof(RB_Goods_Extend.IsProcurement)}={dmodel.IsProcurement}";
...@@ -1349,7 +1496,7 @@ where {where} GROUP BY g.Id asc order by {orderBy} ,b.date asc"; ...@@ -1349,7 +1496,7 @@ where {where} GROUP BY g.Id asc order by {orderBy} ,b.date asc";
where += $@" and b.{nameof(RB_Goods_Extend.TeacherId)}={dmodel.TeacherId}"; where += $@" and b.{nameof(RB_Goods_Extend.TeacherId)}={dmodel.TeacherId}";
} }
string orderBy = " g.Sort desc"; string orderBy = " g.Sort desc";
string sql = $@" SELECT g.*,c.CourseNum from rb_goods as g string sql = $@" SELECT g.*,c.CourseNum from rb_goods as g
LEFT JOIN rb_goods_wk_teacher as b on g.Id=b.GoodsId LEFT JOIN rb_goods_wk_teacher as b on g.Id=b.GoodsId
LEFT JOIN (SELECT GoodsId,COUNT(*) as CourseNum from rb_goods_wk_course where `Status`=0 GROUP BY GoodsId) as c on c.GoodsId=g.Id where {where} order by {orderBy}"; LEFT JOIN (SELECT GoodsId,COUNT(*) as CourseNum from rb_goods_wk_course where `Status`=0 GROUP BY GoodsId) as c on c.GoodsId=g.Id where {where} order by {orderBy}";
......
...@@ -88,7 +88,7 @@ namespace Mall.WebApi.Controllers ...@@ -88,7 +88,7 @@ namespace Mall.WebApi.Controllers
/// </summary> /// </summary>
/// <param name="item"></param> /// <param name="item"></param>
/// <returns></returns> /// <returns></returns>
public static object PlusDataToObject(ComponentItem subItem, int TenantId, int MallBaseId, int SmallShopsId, int IsOpenSchool) public static object PlusDataToObject(ComponentItem subItem, int TenantId, int MallBaseId, int SmallShopsId, int IsOpenSchool, int StoreId)
{ {
var obj = new object(); var obj = new object();
switch (subItem.Id) switch (subItem.Id)
...@@ -855,13 +855,14 @@ namespace Mall.WebApi.Controllers ...@@ -855,13 +855,14 @@ namespace Mall.WebApi.Controllers
GoodsIds = Ids, GoodsIds = Ids,
GoodsStatus = 1, GoodsStatus = 1,
GoodsClassify = 3,//查询非司导 GoodsClassify = 3,//查询非司导
GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall StoresIds = StoreId.ToString()
// GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
}, SmallShopsId: SmallShopsId); }, SmallShopsId: SmallShopsId);
List<GoodsDetailsItem2> newGoodsList = new List<GoodsDetailsItem2>(); List<StoreGoodsDetailsItem2> newGoodsList = new List<StoreGoodsDetailsItem2>();
foreach (var goodItem in childItem.goodsList) foreach (var goodItem in childItem.goodsList)
{ {
var lastItem = new GoodsDetailsItem2(); var lastItem = new StoreGoodsDetailsItem2();
var tempGood = tempGoodsList?.Where(qitem => qitem.Id == goodItem.id)?.FirstOrDefault(); var tempGood = tempGoodsList?.Where(qitem => qitem.Id == goodItem.id)?.FirstOrDefault();
if (tempGood != null && tempGood.Id > 0) if (tempGood != null && tempGood.Id > 0)
{ {
...@@ -871,6 +872,7 @@ namespace Mall.WebApi.Controllers ...@@ -871,6 +872,7 @@ namespace Mall.WebApi.Controllers
lastItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : ""; lastItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : "";
lastItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2); lastItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2);
lastItem.courseScore = (tempGood.CourseScore ?? 0); lastItem.courseScore = (tempGood.CourseScore ?? 0);
lastItem.IsChooseServicePerson = tempGood.IsChooseServicePerson;
newGoodsList.Add(lastItem); newGoodsList.Add(lastItem);
} }
} }
...@@ -880,7 +882,7 @@ namespace Mall.WebApi.Controllers ...@@ -880,7 +882,7 @@ namespace Mall.WebApi.Controllers
//自动添加商品 //自动添加商品
else else
{ {
childItem.goodsList = new List<GoodsDetailsItem2>(); childItem.goodsList = new List<StoreGoodsDetailsItem2>();
var catGoodsList = productModule.GetProductGoodsPageList_V2(1, childItem.goodsNum, out long rowsCount, new Model.Extend.Product.RB_Goods_Extend() var catGoodsList = productModule.GetProductGoodsPageList_V2(1, childItem.goodsNum, out long rowsCount, new Model.Extend.Product.RB_Goods_Extend()
{ {
TenantId = TenantId, TenantId = TenantId,
...@@ -888,20 +890,22 @@ namespace Mall.WebApi.Controllers ...@@ -888,20 +890,22 @@ namespace Mall.WebApi.Controllers
CategoryIds = childItem.id.ToString(), CategoryIds = childItem.id.ToString(),
GoodsStatus = 1, GoodsStatus = 1,
GoodsClassify = 3,//查询非司导 GoodsClassify = 3,//查询非司导
GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall StoresIds = StoreId.ToString()
// GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
}, SmallShopsId: SmallShopsId); }, SmallShopsId: SmallShopsId);
if (catGoodsList != null && catGoodsList.Count > 0) if (catGoodsList != null && catGoodsList.Count > 0)
{ {
foreach (var gItem in catGoodsList) foreach (var gItem in catGoodsList)
{ {
childItem.goodsList.Add(new GoodsDetailsItem2() childItem.goodsList.Add(new StoreGoodsDetailsItem2()
{ {
id = gItem.Id, id = gItem.Id,
price = Math.Round((gItem?.SellingPrice ?? 0), 2), price = Math.Round((gItem?.SellingPrice ?? 0), 2),
name = gItem.Name, name = gItem.Name,
picUrl = Common.Config.GetFileUrl(gItem.CoverImage), picUrl = Common.Config.GetFileUrl(gItem.CoverImage),
OriginalPrice = Math.Round((gItem?.OriginalPrice ?? 0), 2), OriginalPrice = Math.Round((gItem?.OriginalPrice ?? 0), 2),
courseScore = gItem.CourseScore ?? 0 courseScore = gItem.CourseScore ?? 0,
IsChooseServicePerson = gItem.IsChooseServicePerson
}); });
} }
} }
...@@ -921,8 +925,9 @@ namespace Mall.WebApi.Controllers ...@@ -921,8 +925,9 @@ namespace Mall.WebApi.Controllers
TenantId = TenantId, TenantId = TenantId,
MallBaseId = MallBaseId, MallBaseId = MallBaseId,
GoodsStatus = 1, GoodsStatus = 1,
GoodsClassify =3,//查询非司导 GoodsClassify = 3,//查询非司导
GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall StoresIds = StoreId.ToString()
// GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
}); });
#region 微店价格 #region 微店价格
RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend(); RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend();
...@@ -1027,8 +1032,9 @@ namespace Mall.WebApi.Controllers ...@@ -1027,8 +1032,9 @@ namespace Mall.WebApi.Controllers
name = gItem.Name, name = gItem.Name,
picUrl = Common.Config.GetFileUrl(gItem.CoverImage), picUrl = Common.Config.GetFileUrl(gItem.CoverImage),
OriginalPrice = Math.Round((gItem?.OriginalPrice ?? 0), 2), OriginalPrice = Math.Round((gItem?.OriginalPrice ?? 0), 2),
courseScore = gItem.CourseScore ?? 0 courseScore = gItem.CourseScore ?? 0,
}); IsChooseServicePerson = gItem.IsChooseServicePerson
});
} }
} }
} }
...@@ -1045,7 +1051,8 @@ namespace Mall.WebApi.Controllers ...@@ -1045,7 +1051,8 @@ namespace Mall.WebApi.Controllers
GoodsIds = Ids, GoodsIds = Ids,
GoodsStatus = 1, GoodsStatus = 1,
GoodsClassify = 3,//查询非司导 GoodsClassify = 3,//查询非司导
GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall StoresIds = StoreId.ToString()
// GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
}); });
#region 微店价格 #region 微店价格
RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend(); RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend();
...@@ -1152,6 +1159,7 @@ namespace Mall.WebApi.Controllers ...@@ -1152,6 +1159,7 @@ namespace Mall.WebApi.Controllers
childItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : ""; childItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : "";
childItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2); childItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2);
childItem.courseScore = (tempGood.CourseScore ?? 0); childItem.courseScore = (tempGood.CourseScore ?? 0);
childItem.IsChooseServicePerson = tempGood.IsChooseServicePerson;
newGoodsList.Add(childItem); newGoodsList.Add(childItem);
} }
} }
......
...@@ -1472,6 +1472,33 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1472,6 +1472,33 @@ namespace Mall.WebApi.Controllers.MallBase
} }
/// <summary>
/// 获取商品列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetProductGoodsDialogList_V3()
{
var parms = RequestParm;
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
RB_Goods_Extend demodel = JsonConvert.DeserializeObject<RB_Goods_Extend>(parms.msg.ToString());
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
var list = productModule.GetProductGoodsDialogList_V3(pagelist.pageIndex, pagelist.pageSize, out long count, demodel);
pagelist.count = Convert.ToInt32(count);
pagelist.pageData = list.Select(x => new
{
x.Id,
x.Name,
x.CoverImage,
x.CarouselImageList,
x.SellingPrice,
CategoryList = x.CategoryList.Select(y => new { y.Id, y.CategoryName })
});
return ApiResult.Success("", pagelist);
}
/// <summary> /// <summary>
/// 获取商品列表 /// 获取商品列表
/// </summary> /// </summary>
......
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