Commit a626b2ce authored by liudong1993's avatar liudong1993

1

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