Commit deba9c49 authored by 吴春's avatar 吴春

提交代码

parent 9a658bc8
...@@ -51,14 +51,14 @@ ...@@ -51,14 +51,14 @@
<Reference Include="Aliyun.OSS, Version=2.11.0.0, Culture=neutral, PublicKeyToken=0ad4175f0dac0b9b, processorArchitecture=MSIL"> <Reference Include="Aliyun.OSS, Version=2.11.0.0, Culture=neutral, PublicKeyToken=0ad4175f0dac0b9b, processorArchitecture=MSIL">
<HintPath>..\packages\Aliyun.OSS.SDK.2.11.0\lib\net45\Aliyun.OSS.dll</HintPath> <HintPath>..\packages\Aliyun.OSS.SDK.2.11.0\lib\net45\Aliyun.OSS.dll</HintPath>
</Reference> </Reference>
<Reference Include="Aspose.Pdf"> <Reference Include="Aspose.Pdf, Version=17.7.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\..\..\Shopping\Mall.Education\lib\Aspose.Pdf.dll</HintPath> <HintPath>..\packages\Aspose.Pdf.17.7\lib\net40-client\Aspose.Pdf.dll</HintPath>
</Reference> </Reference>
<Reference Include="Aspose.Slides"> <Reference Include="Aspose.Slides, Version=17.7.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\..\..\Shopping\Mall.Education\lib\Aspose.Slides.dll</HintPath> <HintPath>..\packages\Aspose.Slides.NET.17.7\lib\net4.0-client\Aspose.Slides.dll</HintPath>
</Reference> </Reference>
<Reference Include="Aspose.Words"> <Reference Include="Aspose.Words, Version=17.7.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\..\..\Shopping\Mall.Education\lib\Aspose.Words.dll</HintPath> <HintPath>..\packages\Aspose.Words.17.7\lib\net40\Aspose.Words.dll</HintPath>
</Reference> </Reference>
<Reference Include="COSXML, Version=5.4.13.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="COSXML, Version=5.4.13.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Tencent.QCloud.Cos.Sdk.5.4.13\lib\netstandard2.0\COSXML.dll</HintPath> <HintPath>..\packages\Tencent.QCloud.Cos.Sdk.5.4.13\lib\netstandard2.0\COSXML.dll</HintPath>
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
\ No newline at end of file
...@@ -18,7 +18,7 @@ namespace Mall.Model.Entity.Finance ...@@ -18,7 +18,7 @@ namespace Mall.Model.Entity.Finance
/// </summary> /// </summary>
public int ID { get; set; } public int ID { get; set; }
/// <summary> /// <summary>
/// 类型 1收款 2成本 3退款 4打款 /// 类型 1收款 2成本 3退款 4打款,5储值卡收款
/// </summary> /// </summary>
public int? Type public int? Type
{ {
......
...@@ -25,7 +25,7 @@ namespace Mall.Model.Entity.Finance ...@@ -25,7 +25,7 @@ namespace Mall.Model.Entity.Finance
public int RecordId { get; set; } public int RecordId { get; set; }
/// <summary> /// <summary>
/// 类型 1收款 2成本 3退款 4打款 /// 类型 1收款 2成本 3退款 4打款,5储值卡收入
/// </summary> /// </summary>
public int? Type public int? Type
{ {
......
...@@ -29,6 +29,7 @@ namespace Mall.Model.Entity.Product ...@@ -29,6 +29,7 @@ namespace Mall.Model.Entity.Product
public string OrderNo public string OrderNo
{ {
get; get;
set; set;
} }
/// <summary> /// <summary>
......
...@@ -334,5 +334,10 @@ namespace Mall.Model.Entity.User ...@@ -334,5 +334,10 @@ namespace Mall.Model.Entity.User
set; set;
} }
/// <summary>
/// 是否开启离线收益提醒 1是 0否
/// </summary>
public int OpenOfflineEarnings { get; set; }
} }
} }
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
</Project>
\ No newline at end of file
...@@ -359,5 +359,12 @@ namespace Mall.Model.Query ...@@ -359,5 +359,12 @@ namespace Mall.Model.Query
get; get;
set; set;
} }
/// <summary>
/// 储值卡抵扣金额
/// </summary>
public decimal TotalDepositMoney { get; set; }
} }
} }
...@@ -1201,6 +1201,7 @@ namespace Mall.Module.MarketingCenter ...@@ -1201,6 +1201,7 @@ namespace Mall.Module.MarketingCenter
//新增一条储值卡信息 //新增一条储值卡信息
int newId = member_DepositBuyRepository.Insert(newModel, trans); int newId = member_DepositBuyRepository.Insert(newModel, trans);
mergeList.ForEach(x => x.NewDepositBuyId = newId); mergeList.ForEach(x => x.NewDepositBuyId = newId);
//储值卡流水记录 //储值卡流水记录
......
...@@ -653,18 +653,19 @@ namespace Mall.Module.Property ...@@ -653,18 +653,19 @@ namespace Mall.Module.Property
procurement_DetailRepository.Update(keyValues1, wheres1, trans); procurement_DetailRepository.Update(keyValues1, wheres1, trans);
#region 更新物料条形码 2021-03-29 ld 暂时屏蔽 #region 更新物料条形码 2021-03-29 ld 暂时屏蔽
//if (!string.IsNullOrEmpty(item.Barcode) && item.Barcode != dModel.Barcode) { if (!string.IsNullOrEmpty(item.Barcode) && item.Barcode != dModel.Barcode)
// Dictionary<string, object> keyValues2 = new Dictionary<string, object>() { {
// { nameof(RB_Supplies_Material_Extend.Barcode),item.Barcode} Dictionary<string, object> keyValues2 = new Dictionary<string, object>() {
// }; { nameof(RB_Supplies_Material_Extend.Barcode),item.Barcode}
// List<WhereHelper> wheres2 = new List<WhereHelper>() { };
// new WhereHelper(){ List<WhereHelper> wheres2 = new List<WhereHelper>() {
// FiledName=nameof(RB_Supplies_Material_Extend.Id), new WhereHelper(){
// FiledValue=dModel.MaterialId FiledName=nameof(RB_Supplies_Material_Extend.Id),
// } FiledValue=dModel.MaterialId
// }; }
// supplies_MaterialRepository.Update(keyValues2, wheres2, trans); };
//} supplies_MaterialRepository.Update(keyValues2, wheres2, trans);
}
#endregion #endregion
} }
......
...@@ -1150,7 +1150,8 @@ namespace Mall.Module.User ...@@ -1150,7 +1150,8 @@ namespace Mall.Module.User
{ nameof(RB_Distributor_Custom.UpdateDate),demodel.UpdateDate}, { nameof(RB_Distributor_Custom.UpdateDate),demodel.UpdateDate},
{ nameof(RB_Distributor_Custom.IsShowVIPBuyPic),demodel.IsShowVIPBuyPic}, { nameof(RB_Distributor_Custom.IsShowVIPBuyPic),demodel.IsShowVIPBuyPic},
{ nameof(RB_Distributor_Custom.VipBuyICO),demodel.VipBuyICO}, { nameof(RB_Distributor_Custom.VipBuyICO),demodel.VipBuyICO},
{ nameof(RB_Distributor_Custom.VipBuyUrl),demodel.VipBuyUrl} { nameof(RB_Distributor_Custom.VipBuyUrl),demodel.VipBuyUrl},
{ nameof(RB_Distributor_Custom.OpenOfflineEarnings),demodel.OpenOfflineEarnings}
}; };
List<WhereHelper> whereHelpers = new List<WhereHelper>() { List<WhereHelper> whereHelpers = new List<WhereHelper>() {
new WhereHelper(){ new WhereHelper(){
...@@ -3516,6 +3517,7 @@ namespace Mall.Module.User ...@@ -3516,6 +3517,7 @@ namespace Mall.Module.User
CustomModel.WithdrawDetialsImage, CustomModel.WithdrawDetialsImage,
CustomModel.MyTeamName, CustomModel.MyTeamName,
CustomModel.MyTeamImage, CustomModel.MyTeamImage,
CustomModel.PromoteQRCodeName, CustomModel.PromoteQRCodeName,
CustomModel.PromoteQRCodeImage, CustomModel.PromoteQRCodeImage,
CustomModel.ReferrerName, CustomModel.ReferrerName,
...@@ -3524,6 +3526,7 @@ namespace Mall.Module.User ...@@ -3524,6 +3526,7 @@ namespace Mall.Module.User
CustomModel.CommissionWithdrawnName, CustomModel.CommissionWithdrawnName,
CustomModel.OutstandingCommissionName, CustomModel.OutstandingCommissionName,
CustomModel.DistributorName, CustomModel.DistributorName,
CustomModel.OpenOfflineEarnings,
}, },
UserInfo = new UserInfo = new
{ {
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
</Project>
\ No newline at end of file
...@@ -1602,7 +1602,7 @@ GROUP BY od.GoodsId,o.OrderId ...@@ -1602,7 +1602,7 @@ GROUP BY od.GoodsId,o.OrderId
string sql = $@" SELECT a.OrderSource,a.OrderStatus,sum(b.InsuranceCostMoney) as InsuranceCostMoney,sum(b.InsuranceMoney) as InsuranceMoney,b.CarType,a.OrderClassify,B.Id,b.ServiceCharge,SUM(b.PaidCostMoney) as PaidCostMoney,MAX(b.OrderId) as OrderId,MAX( a.OrderNo) as OrderNo,MAX(b.GoodsName) as GoodsName,b.Specification,MAX(b.Unit_Price) as Unit_Price,SUM(b.Number) as Number,f.`Name` as SupplierName, string sql = $@" SELECT a.OrderSource,a.OrderStatus,sum(b.InsuranceCostMoney) as InsuranceCostMoney,sum(b.InsuranceMoney) as InsuranceMoney,b.CarType,a.OrderClassify,B.Id,b.ServiceCharge,SUM(b.PaidCostMoney) as PaidCostMoney,MAX(b.OrderId) as OrderId,MAX( a.OrderNo) as OrderNo,MAX(b.GoodsName) as GoodsName,b.Specification,MAX(b.Unit_Price) as Unit_Price,SUM(b.Number) as Number,f.`Name` as SupplierName,
SUM(b.Final_Price) as Final_Price,SUM(b.FreightMoney) as FreightMoney,SUM(b.Final_Price+b.FreightMoney+IFNULL(b.InsuranceMoney,0)) as AllPrice , SUM(b.Final_Price) as Final_Price,SUM(b.FreightMoney) as FreightMoney,SUM(b.Final_Price+b.FreightMoney+IFNULL(b.InsuranceMoney,0)) as AllPrice,SUM(b.DepositMoney+b.DepositRefundMoney) as TotalDepositMoney ,
(IFNULL(b.CostMoney,0)) as CostMoney,0 as PackingMoney, 0 as CostFreight,sum(b.FreightCostMoney) as GoodsFreight, (IFNULL(b.CostMoney,0)) as CostMoney,0 as PackingMoney, 0 as CostFreight,sum(b.FreightCostMoney) as GoodsFreight,
0 as OtherPrice,b.LiveCommission,b.LiveFinanceIds,b.LivePeopleNum,0 as Paid,oa.RefundActual,b.CouponMoney,b.CompanyProfitRate,b.CompanyId,muser.`Name` as CompanyName,b.YSMoney,b.RealMoney,b.YFMoney,b.PayMoney 0 as OtherPrice,b.LiveCommission,b.LiveFinanceIds,b.LivePeopleNum,0 as Paid,oa.RefundActual,b.CouponMoney,b.CompanyProfitRate,b.CompanyId,muser.`Name` as CompanyName,b.YSMoney,b.RealMoney,b.YFMoney,b.PayMoney
from rb_goods_orderdetail as b from rb_goods_orderdetail as b
......
...@@ -88,7 +88,7 @@ namespace Mall.Repository.User ...@@ -88,7 +88,7 @@ namespace Mall.Repository.User
} }
if (query.Type > 0) if (query.Type > 0)
{ {
builder.Append($" AND {nameof(RB_Member_DepositBalance_Extend.Type)}={query.Type}"); builder.Append($" AND {nameof(RB_Member_DepositBalance_Extend.Type)}={(int)query.Type}");
} }
if (query.MallBaseId > 0) if (query.MallBaseId > 0)
{ {
......
...@@ -93,7 +93,7 @@ namespace Mall.Repository.User ...@@ -93,7 +93,7 @@ namespace Mall.Repository.User
} }
if (query.IsOver > 0) if (query.IsOver > 0)
{ {
builder.Append($" AND a.{nameof(RB_Member_DepositBuy.EndTime)}> NOW()"); builder.Append($" AND {nameof(RB_Member_DepositBuy.EndTime)}> NOW()");
} }
// where += $" AND a.{nameof(RB_Member_DiscountCoupon_Extend.EndDate)}<NOW() AND a.{nameof(RB_Member_DiscountCoupon_Extend.UseState)}=0"; // where += $" AND a.{nameof(RB_Member_DiscountCoupon_Extend.EndDate)}<NOW() AND a.{nameof(RB_Member_DiscountCoupon_Extend.UseState)}=0";
} }
......
...@@ -413,6 +413,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -413,6 +413,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
new ExcelColumn(value: "已返佣金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "已返佣金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "返佣信息") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "返佣信息") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "优惠金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "优惠金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "储值卡抵扣金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "退款金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "退款金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "其他支出") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "其他支出") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "应付") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "应付") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
...@@ -536,6 +537,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -536,6 +537,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
} }
datarow.ExcelRows.Add(new ExcelColumn(value: commissionInfo) { });//返佣信息 datarow.ExcelRows.Add(new ExcelColumn(value: commissionInfo) { });//返佣信息
datarow.ExcelRows.Add(new ExcelColumn(value: item.CouponMoney.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.CouponMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.TotalDepositMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.RefundActual.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.RefundActual.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.YFMoney.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.YFMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.NoPaid.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.NoPaid.ToString("#0.00")) { });
...@@ -593,6 +595,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -593,6 +595,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
datarow.ExcelRows.Add(new ExcelColumn(value: list.Sum(x => x.RemitFXCommission).ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: list.Sum(x => x.RemitFXCommission).ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: "") { });//返佣信息 datarow.ExcelRows.Add(new ExcelColumn(value: "") { });//返佣信息
datarow.ExcelRows.Add(new ExcelColumn(value: list.Sum(x => x.CouponMoney).ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: list.Sum(x => x.CouponMoney).ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: list.Sum(x => x.TotalDepositMoney).ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: list.Sum(x => x.RefundActual).ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: list.Sum(x => x.RefundActual).ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: list.Sum(x => x.YFMoney).ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: list.Sum(x => x.YFMoney).ToString("#0.00")) { });
// datarow.ExcelRows.Add(new ExcelColumn(value: item.ALLCommission.ToString("#0.00")) { }); // datarow.ExcelRows.Add(new ExcelColumn(value: item.ALLCommission.ToString("#0.00")) { });
...@@ -778,6 +781,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -778,6 +781,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
Paid = list.Sum(x => x.Paid), Paid = list.Sum(x => x.Paid),
NoPaid = list.Sum(x => x.NoPaid), NoPaid = list.Sum(x => x.NoPaid),
CouponMoney = list.Sum(x => x.CouponMoney), CouponMoney = list.Sum(x => x.CouponMoney),
TotalDepositMoney = list.Sum(x => x.TotalDepositMoney),
RefundActual = list.Sum(x => x.RefundActual), RefundActual = list.Sum(x => x.RefundActual),
YSMoney = list.Sum(x => x.YSMoney), YSMoney = list.Sum(x => x.YSMoney),
RealMoney = list.Sum(x => x.RealMoney), RealMoney = list.Sum(x => x.RealMoney),
...@@ -856,6 +860,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -856,6 +860,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
TotalRealMoney = list.Sum(x => x.RealMoney),//其他实收 TotalRealMoney = list.Sum(x => x.RealMoney),//其他实收
TotalPayMoney = list.Sum(x => x.PayMoney),//其他实付 TotalPayMoney = list.Sum(x => x.PayMoney),//其他实付
TotalCouponMoney = list.Sum(x => x.CouponMoney),//优惠金额 TotalCouponMoney = list.Sum(x => x.CouponMoney),//优惠金额
TotalDepositMoney = list.Sum(x => x.TotalDepositMoney),//储值卡抵扣金额
TotalCompanyProfit = list.Sum(x => Math.Round((x.GrossProfit * (x.CompanyProfitRate / 100)), 2, MidpointRounding.AwayFromZero)),//公司结算金额 TotalCompanyProfit = list.Sum(x => Math.Round((x.GrossProfit * (x.CompanyProfitRate / 100)), 2, MidpointRounding.AwayFromZero)),//公司结算金额
}; };
......
...@@ -903,6 +903,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter ...@@ -903,6 +903,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
var query = JsonConvert.DeserializeObject<RB_Deposit_Extend>(RequestParm.msg.ToString()); var query = JsonConvert.DeserializeObject<RB_Deposit_Extend>(RequestParm.msg.ToString());
query.TenantId = UserInfo.TenantId; query.TenantId = UserInfo.TenantId;
query.MallBaseId = parms.MallBaseId; query.MallBaseId = parms.MallBaseId;
query.PickupCenter = -1;
var oldLogisticsModel = IntegralModule.GetDepositList(query).FirstOrDefault(); var oldLogisticsModel = IntegralModule.GetDepositList(query).FirstOrDefault();
if (oldLogisticsModel == null) if (oldLogisticsModel == null)
{ {
......
...@@ -519,7 +519,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -519,7 +519,7 @@ namespace Mall.WebApi.Controllers.MallBase
item.Specification = JsonConvert.SerializeObject(item.SpecificationList); item.Specification = JsonConvert.SerializeObject(item.SpecificationList);
} }
if ((demodel.Income ?? 0) <= 0) if (((demodel.Income ?? 0) + ((demodel.DepositMoney))) <= 0)
{ {
return ApiResult.ParamIsNull("订单金额不正确"); return ApiResult.ParamIsNull("订单金额不正确");
} }
...@@ -749,8 +749,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -749,8 +749,8 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.OrderClassify = 3; demodel.OrderClassify = 3;
demodel.DestinationAddress ??= ""; demodel.DestinationAddress ??= "";
#endregion #endregion
bool flag= orderModule.SetAppletOfflineGoodsOrderModule(demodel,out string message); bool flag = orderModule.SetAppletOfflineGoodsOrderModule(demodel, out string message);
return flag ? ApiResult.Success(message: message,data: new { demodel.OrderId}) : ApiResult.Failed(message: message); return flag ? ApiResult.Success(message: message, data: new { demodel.OrderId }) : ApiResult.Failed(message: message);
} }
/// <summary> /// <summary>
...@@ -1427,7 +1427,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1427,7 +1427,7 @@ namespace Mall.WebApi.Controllers.MallBase
bool integralResult = orderModule.AddMemberIntegral(memberIntegralModel); bool integralResult = orderModule.AddMemberIntegral(memberIntegralModel);
if (integralResult) if (integralResult)
{ {
return ApiResult.CouponSuccess(ResultCode.Success,2, "", dmodel.CommentGiveIntegral.ToString()); return ApiResult.CouponSuccess(ResultCode.Success, 2, "", dmodel.CommentGiveIntegral.ToString());
} }
else else
{ {
...@@ -1435,7 +1435,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1435,7 +1435,7 @@ namespace Mall.WebApi.Controllers.MallBase
} }
} }
return ApiResult.CouponSuccess(ResultCode.Fail,2, "", ""); return ApiResult.CouponSuccess(ResultCode.Fail, 2, "", "");
} }
...@@ -1556,7 +1556,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1556,7 +1556,8 @@ namespace Mall.WebApi.Controllers.MallBase
//获取快递配置 //获取快递配置
var configModel = orderModule.GetExpressConfig(userInfo.TenantId, userInfo.MallBaseId); var configModel = orderModule.GetExpressConfig(userInfo.TenantId, userInfo.MallBaseId);
if (configModel == null) { if (configModel == null)
{
return ApiResult.Failed("未配置快递参数,无法查询"); return ApiResult.Failed("未配置快递参数,无法查询");
} }
if (configModel.Type == 1) if (configModel.Type == 1)
...@@ -1595,7 +1596,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1595,7 +1596,8 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.Failed("未能查询到该快递信息"); return ApiResult.Failed("未能查询到该快递信息");
} }
} }
else { else
{
return ApiResult.Failed("未查询到快递配置"); return ApiResult.Failed("未查询到快递配置");
} }
} }
...@@ -1662,11 +1664,13 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1662,11 +1664,13 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetGoosdActivityInfo() { public ApiResult GetGoosdActivityInfo()
{
var userInfo = AppletUserInfo; var userInfo = AppletUserInfo;
JObject parms = JObject.Parse(RequestParm.msg.ToString()); JObject parms = JObject.Parse(RequestParm.msg.ToString());
int ActivityId = parms.GetInt("ActivityId", 0); int ActivityId = parms.GetInt("ActivityId", 0);
if (ActivityId <= 0) { if (ActivityId <= 0)
{
return ApiResult.ParamIsNull(); return ApiResult.ParamIsNull();
} }
...@@ -1700,7 +1704,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1700,7 +1704,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetGoodsMyActivityPrizeList() { public ApiResult GetGoodsMyActivityPrizeList()
{
var parms = RequestParm; var parms = RequestParm;
var userInfo = AppletUserInfo; var userInfo = AppletUserInfo;
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString()); ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
......
...@@ -877,7 +877,8 @@ namespace Mall.WebApi.Controllers.User ...@@ -877,7 +877,8 @@ namespace Mall.WebApi.Controllers.User
var userInfo = AppletUserInfo; var userInfo = AppletUserInfo;
JObject parms = JObject.Parse(req.msg.ToString()); JObject parms = JObject.Parse(req.msg.ToString());
int UserId = parms.GetInt("UserId", 0); int UserId = parms.GetInt("UserId", 0);
if (UserId <= 0) { if (UserId <= 0)
{
return ApiResult.ParamIsNull("请传递用户id"); return ApiResult.ParamIsNull("请传递用户id");
} }
...@@ -901,10 +902,12 @@ namespace Mall.WebApi.Controllers.User ...@@ -901,10 +902,12 @@ namespace Mall.WebApi.Controllers.User
{ {
return ApiResult.ParamIsNull("请传递用户id"); return ApiResult.ParamIsNull("请传递用户id");
} }
if (string.IsNullOrEmpty(StartTime)) { if (string.IsNullOrEmpty(StartTime))
{
return ApiResult.ParamIsNull("请传递开始时间"); return ApiResult.ParamIsNull("请传递开始时间");
} }
if (string.IsNullOrEmpty(EndTime)) { if (string.IsNullOrEmpty(EndTime))
{
return ApiResult.ParamIsNull("请传递结束时间"); return ApiResult.ParamIsNull("请传递结束时间");
} }
try try
...@@ -916,7 +919,8 @@ namespace Mall.WebApi.Controllers.User ...@@ -916,7 +919,8 @@ namespace Mall.WebApi.Controllers.User
{ {
return ApiResult.Failed("日期格式有误"); return ApiResult.Failed("日期格式有误");
} }
if (Convert.ToDateTime(StartTime) > Convert.ToDateTime(EndTime)) { if (Convert.ToDateTime(StartTime) > Convert.ToDateTime(EndTime))
{
return ApiResult.ParamIsNull("开始时间不能大于结束时间"); return ApiResult.ParamIsNull("开始时间不能大于结束时间");
} }
...@@ -1011,11 +1015,13 @@ namespace Mall.WebApi.Controllers.User ...@@ -1011,11 +1015,13 @@ namespace Mall.WebApi.Controllers.User
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetUserMemberVipGradeInfo() { public ApiResult GetUserMemberVipGradeInfo()
{
var userInfo = AppletUserInfo; var userInfo = AppletUserInfo;
var parms = JObject.Parse(RequestParm.msg.ToString()); var parms = JObject.Parse(RequestParm.msg.ToString());
int MemberGradeId = parms.GetInt("MemberGradeId", 0); int MemberGradeId = parms.GetInt("MemberGradeId", 0);
if (MemberGradeId <= 0) { if (MemberGradeId <= 0)
{
return ApiResult.ParamIsNull(); return ApiResult.ParamIsNull();
} }
...@@ -1164,7 +1170,8 @@ namespace Mall.WebApi.Controllers.User ...@@ -1164,7 +1170,8 @@ namespace Mall.WebApi.Controllers.User
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetAppletUserPageType() { public ApiResult GetAppletUserPageType()
{
var userInfo = AppletUserInfo; var userInfo = AppletUserInfo;
return userModule.GetAppletUserPageType(userInfo); return userModule.GetAppletUserPageType(userInfo);
...@@ -2418,12 +2425,23 @@ namespace Mall.WebApi.Controllers.User ...@@ -2418,12 +2425,23 @@ namespace Mall.WebApi.Controllers.User
/// <param name="requestMsg"></param> /// <param name="requestMsg"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Microsoft.AspNetCore.Authorization.AllowAnonymous] public ApiResult SetUserToVip()
public ApiResult SetUserToVip(object requestMsg)
{ {
var requestParm = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString()); var userInfo = AppletUserInfo;
JObject parms = JObject.Parse(requestParm.msg.ToString()); var parms = JObject.Parse(RequestParm.msg.ToString());
//var requestParm = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
//JObject parms = JObject.Parse(requestParm.msg.ToString());
var userId = parms.GetInt("NewUserId"); var userId = parms.GetInt("NewUserId");
//查询当前登录人是否是该会员的直接上级
var nowUserModel = userModule.GetMemberUserInfo(userId);
if (nowUserModel == null || nowUserModel.Id == 0)
{
return ApiResult.Failed("会员信息不存在");
}
else if (nowUserModel != null && nowUserModel.SuperiorId != userInfo.UserId)
{
return ApiResult.Failed("只能将直系下级设成VIP");
}
bool flag = userModule.SetUserToVipModule(userId); bool flag = userModule.SetUserToVipModule(userId);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
......
...@@ -1260,7 +1260,8 @@ namespace Mall.WebApi.Controllers.User ...@@ -1260,7 +1260,8 @@ namespace Mall.WebApi.Controllers.User
UpdateDate = model.UpdateDate.HasValue ? model.UpdateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", UpdateDate = model.UpdateDate.HasValue ? model.UpdateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
model.VipBuyICO, model.VipBuyICO,
model.VipBuyUrl, model.VipBuyUrl,
model.IsShowVIPBuyPic model.IsShowVIPBuyPic,
model.OpenOfflineEarnings
}); });
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected> <WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_LayoutPageFile /> <WebStackScaffolding_LayoutPageFile />
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected> <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<NameOfLastUsedPublishProfile>E:\Work\Git\Mall_Api\Mall.WebApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<ShowAllFiles>false</ShowAllFiles> <ShowAllFiles>false</ShowAllFiles>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
\ No newline at end of file
...@@ -15,6 +15,7 @@ namespace Mall.WindowsService.Helper ...@@ -15,6 +15,7 @@ namespace Mall.WindowsService.Helper
private static int inTimer3 = 0; private static int inTimer3 = 0;
private static int inTimer4 = 0; private static int inTimer4 = 0;
private static int inTimer5 = 0; private static int inTimer5 = 0;
private static int inTimer6 = 0;
/// <summary> /// <summary>
/// 收入单子服务开始执行方法 /// 收入单子服务开始执行方法
/// </summary> /// </summary>
...@@ -156,5 +157,30 @@ namespace Mall.WindowsService.Helper ...@@ -156,5 +157,30 @@ namespace Mall.WindowsService.Helper
Interlocked.Exchange(ref inTimer5, 0); Interlocked.Exchange(ref inTimer5, 0);
} }
} }
/// <summary>
///用户储值卡赠送状态更新
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void MemberDepositBuyShelves(object sender, System.Timers.ElapsedEventArgs e)
{
if (Interlocked.Exchange(ref inTimer6, 1) == 0)
{
try
{
string str = Common.Config.GetConnectionString("DefaultConnection");
LogHelper.Write("MemberDepositBuyShelves=====Start" + str);
Module.EducationArticleShelvesModule.MemberDepositBuyModule();
LogHelper.Write("MemberDepositBuyShelves=====End");
}
catch (Exception ex)
{
LogHelper.Write("MemberDepositBuyShelves=====ex" + ex.Message);
}
Interlocked.Exchange(ref inTimer6, 0);
}
}
} }
} }
...@@ -20,6 +20,12 @@ namespace Mall.WindowsService.Module ...@@ -20,6 +20,12 @@ namespace Mall.WindowsService.Module
/// </summary> /// </summary>
private static readonly RB_Education_ArticleRepository educationArticleRepository = new RB_Education_ArticleRepository(); private static readonly RB_Education_ArticleRepository educationArticleRepository = new RB_Education_ArticleRepository();
/// <summary>
/// 会员储值卡仓储层
/// </summary>
private static readonly Repository.User.RB_Member_DepositBuyRepository memberDepositBuyRepository = new Repository.User.RB_Member_DepositBuyRepository();
/// <summary> /// <summary>
/// 商品自动上架时间 /// 商品自动上架时间
/// </summary> /// </summary>
...@@ -49,6 +55,7 @@ WHERE Status=0 AND '{0}'>=ShelvesDate AND '{0}'<=DownDate AND GoodsStatus<>1 ...@@ -49,6 +55,7 @@ WHERE Status=0 AND '{0}'>=ShelvesDate AND '{0}'<=DownDate AND GoodsStatus<>1
return flag; return flag;
} }
/// <summary> /// <summary>
/// 商品自动下架 /// 商品自动下架
/// </summary> /// </summary>
...@@ -76,5 +83,38 @@ WHERE Status=0 AND DownDate<='{0}' AND GoodsStatus=1 ", DateTime.Now.ToString("y ...@@ -76,5 +83,38 @@ WHERE Status=0 AND DownDate<='{0}' AND GoodsStatus=1 ", DateTime.Now.ToString("y
} }
return flag; return flag;
} }
/// <summary>
/// 更新会员储值卡赠送状态
/// </summary>
/// <returns></returns>
public static bool MemberDepositBuyModule()
{
bool flag = false;
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Member_DepositBuy
WHERE Status=1 AND SendTime<='{0}' and SendStatus=2 ", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var list = educationArticleRepository.Get<Model.Entity.User.RB_Member_DepositBuy>(builder.ToString()).ToList();
if (list != null && list.Count > 0)
{
foreach (var item in list)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(Model.Entity.User.RB_Member_DepositBuy.SendStatus),0 },
{nameof(Model.Entity.User.RB_Member_DepositBuy.SendTime),null }
};
flag = educationArticleRepository.Update(fileds, new WhereHelper(nameof(Model.Entity.User.RB_Member_DepositBuy.Id), item.Id));
}
}
return flag;
}
} }
} }
This diff is collapsed.
...@@ -16,6 +16,8 @@ namespace Mall.WindowsService ...@@ -16,6 +16,8 @@ namespace Mall.WindowsService
private System.Timers.Timer timer3; //订单自动收货计时器 private System.Timers.Timer timer3; //订单自动收货计时器
private System.Timers.Timer timer4; //七天自动取消下线计时器 private System.Timers.Timer timer4; //七天自动取消下线计时器
private System.Timers.Timer timer5; //定时上架和下架 private System.Timers.Timer timer5; //定时上架和下架
private System.Timers.Timer timer6; //资讯定时上架和下架
private System.Timers.Timer timer7; //会员储值卡赠送状态更新
public WindowsService() public WindowsService()
{ {
...@@ -76,6 +78,26 @@ namespace Mall.WindowsService ...@@ -76,6 +78,26 @@ namespace Mall.WindowsService
timer5.Enabled = true; timer5.Enabled = true;
#region #region
#region 资讯上下架
timer6 = new System.Timers.Timer();
timer6 = new System.Timers.Timer
{
Interval = 1000 * (60 * 2) //10分钟调用一次
};
timer6.Elapsed += new System.Timers.ElapsedEventHandler(helper.EducationArticleShelves);
timer6.Enabled = true;
#endregion
#region 会员储值卡赠送状态更新
timer7 = new System.Timers.Timer();
timer7 = new System.Timers.Timer
{
Interval = 1000 * (60 * 2) //10分钟调用一次
};
timer7.Elapsed += new System.Timers.ElapsedEventHandler(helper.MemberDepositBuyShelves);
timer7.Enabled = true;
#endregion
#endregion #endregion
} }
......
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