Commit a626b2ce authored by liudong1993's avatar liudong1993

1

parent efb148eb
...@@ -242,6 +242,7 @@ namespace Mall.Education.RabbitMQ ...@@ -242,6 +242,7 @@ namespace Mall.Education.RabbitMQ
if (fi.CreationTime < DateTime.Now.AddHours(-1)) if (fi.CreationTime < DateTime.Now.AddHours(-1))
fi.Delete(); fi.Delete();
} }
LogHelper.Write("DelTemporaryFile清理一次");
} }
catch(Exception ex) catch(Exception ex)
{ {
......
...@@ -2418,9 +2418,9 @@ namespace Mall.Module.Product ...@@ -2418,9 +2418,9 @@ namespace Mall.Module.Product
coupon = new coupon = new
{ {
enabled = true, enabled = true,
use = demodel.User_Coupon_Id > 0 ? true : false, use = CouponsMoney > 0 && demodel.User_Coupon_Id > 0 ? true : false,
coupon_discount = CouponsMoney, coupon_discount = CouponsMoney,
user_coupon_id = demodel.User_Coupon_Id ?? 0 user_coupon_id = CouponsMoney > 0 ? demodel.User_Coupon_Id ?? 0 : 0
}, },
integral = IntegralObj, integral = IntegralObj,
delivery = Delivery, delivery = Delivery,
......
...@@ -690,9 +690,9 @@ namespace Mall.Module.Product ...@@ -690,9 +690,9 @@ namespace Mall.Module.Product
coupon = new coupon = new
{ {
enabled = true, enabled = true,
use = demodel.User_Coupon_Id > 0 ? true : false, use = CouponsMoney > 0 && demodel.User_Coupon_Id > 0 ? true : false,
coupon_discount = CouponsMoney, coupon_discount = CouponsMoney,
user_coupon_id = demodel.User_Coupon_Id ?? 0 user_coupon_id = CouponsMoney > 0 ? demodel.User_Coupon_Id ?? 0 : 0
}, },
integral = IntegralObj, integral = IntegralObj,
education = new { education = new {
......
...@@ -4914,8 +4914,12 @@ namespace Mall.Module.Product ...@@ -4914,8 +4914,12 @@ namespace Mall.Module.Product
var list = goodsRepository.GetProductGoodsDialogList_V2(pageIndex, pageSize, out count, demodel); var list = goodsRepository.GetProductGoodsDialogList_V2(pageIndex, pageSize, out count, demodel);
if (list.Any()) 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) foreach (var item in list)
{ {
item.CategoryList = clist.Where(x => x.GoodsId == item.Id).ToList();
//轮播图 //轮播图
item.CoverImage = ""; item.CoverImage = "";
item.CarouselImageList = new List<RB_ImageCommonModel>(); item.CarouselImageList = new List<RB_ImageCommonModel>();
......
...@@ -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 (IsAllClassify == false) if (dmodel.GoodsClassify == 1)
{//查询非司导商品
where += $@" and g.GoodsClassify <> 1";
}
else if (IsAllClassify == false)
{ {
where += $@" and g.GoodsClassify=0"; where += $@" and g.GoodsClassify=0";
} }
...@@ -399,7 +403,14 @@ where {where} group by g.Id order by {orderBy}"; ...@@ -399,7 +403,14 @@ where {where} group by g.Id order by {orderBy}";
/// <returns></returns> /// <returns></returns>
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 and g.GoodsClassify=0"; string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 ";
if (dmodel.GoodsClassify == 1)//查询非司导
{
where += $" and g.GoodsClassify <> 1";
}
else {
where += $" and g.GoodsClassify=0";
}
if (dmodel.TenantId > 0) if (dmodel.TenantId > 0)
{ {
where += $@" and g.{nameof(RB_Goods_Extend.TenantId)}={dmodel.TenantId}"; where += $@" and g.{nameof(RB_Goods_Extend.TenantId)}={dmodel.TenantId}";
......
...@@ -202,6 +202,7 @@ namespace Mall.WebApi.Controllers ...@@ -202,6 +202,7 @@ namespace Mall.WebApi.Controllers
MallBaseId = MallBaseId, MallBaseId = MallBaseId,
GoodsIds = Ids, GoodsIds = Ids,
GoodsStatus = 1, GoodsStatus = 1,
GoodsClassify = 1,//查询非司导
GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
}, SmallShopsId: SmallShopsId); }, SmallShopsId: SmallShopsId);
...@@ -234,6 +235,7 @@ namespace Mall.WebApi.Controllers ...@@ -234,6 +235,7 @@ namespace Mall.WebApi.Controllers
MallBaseId = MallBaseId, MallBaseId = MallBaseId,
CategoryIds = childItem.id.ToString(), CategoryIds = childItem.id.ToString(),
GoodsStatus = 1, GoodsStatus = 1,
GoodsClassify = 1,//查询非司导
GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall 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)
...@@ -267,6 +269,7 @@ namespace Mall.WebApi.Controllers ...@@ -267,6 +269,7 @@ namespace Mall.WebApi.Controllers
TenantId = TenantId, TenantId = TenantId,
MallBaseId = MallBaseId, MallBaseId = MallBaseId,
GoodsStatus = 1, GoodsStatus = 1,
GoodsClassify = 1,//查询非司导
GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
}); });
#region 微店价格 #region 微店价格
...@@ -389,6 +392,7 @@ namespace Mall.WebApi.Controllers ...@@ -389,6 +392,7 @@ namespace Mall.WebApi.Controllers
MallBaseId = MallBaseId, MallBaseId = MallBaseId,
GoodsIds = Ids, GoodsIds = Ids,
GoodsStatus = 1, GoodsStatus = 1,
GoodsClassify = 1,//查询非司导
GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
}); });
#region 微店价格 #region 微店价格
......
...@@ -1465,7 +1465,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1465,7 +1465,8 @@ namespace Mall.WebApi.Controllers.MallBase
x.Name, x.Name,
x.CoverImage, x.CoverImage,
x.CarouselImageList, x.CarouselImageList,
x.SellingPrice x.SellingPrice,
CategoryList = x.CategoryList.Select(y => new { y.Id, y.CategoryName })
}); });
return ApiResult.Success("", pagelist); return ApiResult.Success("", pagelist);
} }
......
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