Commit deba9c49 authored by 吴春's avatar 吴春

提交代码

parent 9a658bc8
......@@ -51,14 +51,14 @@
<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>
</Reference>
<Reference Include="Aspose.Pdf">
<HintPath>..\..\..\Shopping\Mall.Education\lib\Aspose.Pdf.dll</HintPath>
<Reference Include="Aspose.Pdf, Version=17.7.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\packages\Aspose.Pdf.17.7\lib\net40-client\Aspose.Pdf.dll</HintPath>
</Reference>
<Reference Include="Aspose.Slides">
<HintPath>..\..\..\Shopping\Mall.Education\lib\Aspose.Slides.dll</HintPath>
<Reference Include="Aspose.Slides, Version=17.7.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\packages\Aspose.Slides.NET.17.7\lib\net4.0-client\Aspose.Slides.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words">
<HintPath>..\..\..\Shopping\Mall.Education\lib\Aspose.Words.dll</HintPath>
<Reference Include="Aspose.Words, Version=17.7.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\packages\Aspose.Words.17.7\lib\net40\Aspose.Words.dll</HintPath>
</Reference>
<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>
......
<?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
/// </summary>
public int ID { get; set; }
/// <summary>
/// 类型 1收款 2成本 3退款 4打款
/// 类型 1收款 2成本 3退款 4打款,5储值卡收款
/// </summary>
public int? Type
{
......
......@@ -25,7 +25,7 @@ namespace Mall.Model.Entity.Finance
public int RecordId { get; set; }
/// <summary>
/// 类型 1收款 2成本 3退款 4打款
/// 类型 1收款 2成本 3退款 4打款,5储值卡收入
/// </summary>
public int? Type
{
......
......@@ -29,6 +29,7 @@ namespace Mall.Model.Entity.Product
public string OrderNo
{
get;
set;
}
/// <summary>
......
......@@ -334,5 +334,10 @@ namespace Mall.Model.Entity.User
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
get;
set;
}
/// <summary>
/// 储值卡抵扣金额
/// </summary>
public decimal TotalDepositMoney { get; set; }
}
}
......@@ -1201,6 +1201,7 @@ namespace Mall.Module.MarketingCenter
//新增一条储值卡信息
int newId = member_DepositBuyRepository.Insert(newModel, trans);
mergeList.ForEach(x => x.NewDepositBuyId = newId);
//储值卡流水记录
......
......@@ -653,18 +653,19 @@ namespace Mall.Module.Property
procurement_DetailRepository.Update(keyValues1, wheres1, trans);
#region 更新物料条形码 2021-03-29 ld 暂时屏蔽
//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}
// };
// List<WhereHelper> wheres2 = new List<WhereHelper>() {
// new WhereHelper(){
// FiledName=nameof(RB_Supplies_Material_Extend.Id),
// FiledValue=dModel.MaterialId
// }
// };
// supplies_MaterialRepository.Update(keyValues2, wheres2, trans);
//}
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}
};
List<WhereHelper> wheres2 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Supplies_Material_Extend.Id),
FiledValue=dModel.MaterialId
}
};
supplies_MaterialRepository.Update(keyValues2, wheres2, trans);
}
#endregion
}
......
......@@ -1150,7 +1150,8 @@ namespace Mall.Module.User
{ nameof(RB_Distributor_Custom.UpdateDate),demodel.UpdateDate},
{ nameof(RB_Distributor_Custom.IsShowVIPBuyPic),demodel.IsShowVIPBuyPic},
{ 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>() {
new WhereHelper(){
......@@ -3516,6 +3517,7 @@ namespace Mall.Module.User
CustomModel.WithdrawDetialsImage,
CustomModel.MyTeamName,
CustomModel.MyTeamImage,
CustomModel.PromoteQRCodeName,
CustomModel.PromoteQRCodeImage,
CustomModel.ReferrerName,
......@@ -3524,6 +3526,7 @@ namespace Mall.Module.User
CustomModel.CommissionWithdrawnName,
CustomModel.OutstandingCommissionName,
CustomModel.DistributorName,
CustomModel.OpenOfflineEarnings,
},
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
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,
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
......
......@@ -88,7 +88,7 @@ namespace Mall.Repository.User
}
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)
{
......
......@@ -93,7 +93,7 @@ namespace Mall.Repository.User
}
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";
}
......
......@@ -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 },
......@@ -536,6 +537,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
}
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.TotalDepositMoney.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.NoPaid.ToString("#0.00")) { });
......@@ -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: "") { });//返佣信息
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.YFMoney).ToString("#0.00")) { });
// datarow.ExcelRows.Add(new ExcelColumn(value: item.ALLCommission.ToString("#0.00")) { });
......@@ -778,6 +781,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
Paid = list.Sum(x => x.Paid),
NoPaid = list.Sum(x => x.NoPaid),
CouponMoney = list.Sum(x => x.CouponMoney),
TotalDepositMoney = list.Sum(x => x.TotalDepositMoney),
RefundActual = list.Sum(x => x.RefundActual),
YSMoney = list.Sum(x => x.YSMoney),
RealMoney = list.Sum(x => x.RealMoney),
......@@ -856,6 +860,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
TotalRealMoney = list.Sum(x => x.RealMoney),//其他实收
TotalPayMoney = list.Sum(x => x.PayMoney),//其他实付
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)),//公司结算金额
};
......
......@@ -903,6 +903,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
var query = JsonConvert.DeserializeObject<RB_Deposit_Extend>(RequestParm.msg.ToString());
query.TenantId = UserInfo.TenantId;
query.MallBaseId = parms.MallBaseId;
query.PickupCenter = -1;
var oldLogisticsModel = IntegralModule.GetDepositList(query).FirstOrDefault();
if (oldLogisticsModel == null)
{
......
......@@ -519,7 +519,7 @@ namespace Mall.WebApi.Controllers.MallBase
item.Specification = JsonConvert.SerializeObject(item.SpecificationList);
}
if ((demodel.Income ?? 0) <= 0)
if (((demodel.Income ?? 0) + ((demodel.DepositMoney))) <= 0)
{
return ApiResult.ParamIsNull("订单金额不正确");
}
......@@ -749,8 +749,8 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.OrderClassify = 3;
demodel.DestinationAddress ??= "";
#endregion
bool flag= orderModule.SetAppletOfflineGoodsOrderModule(demodel,out string message);
return flag ? ApiResult.Success(message: message,data: new { demodel.OrderId}) : ApiResult.Failed(message: message);
bool flag = orderModule.SetAppletOfflineGoodsOrderModule(demodel, out string message);
return flag ? ApiResult.Success(message: message, data: new { demodel.OrderId }) : ApiResult.Failed(message: message);
}
/// <summary>
......@@ -1427,7 +1427,7 @@ namespace Mall.WebApi.Controllers.MallBase
bool integralResult = orderModule.AddMemberIntegral(memberIntegralModel);
if (integralResult)
{
return ApiResult.CouponSuccess(ResultCode.Success,2, "", dmodel.CommentGiveIntegral.ToString());
return ApiResult.CouponSuccess(ResultCode.Success, 2, "", dmodel.CommentGiveIntegral.ToString());
}
else
{
......@@ -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
//获取快递配置
var configModel = orderModule.GetExpressConfig(userInfo.TenantId, userInfo.MallBaseId);
if (configModel == null) {
if (configModel == null)
{
return ApiResult.Failed("未配置快递参数,无法查询");
}
if (configModel.Type == 1)
......@@ -1595,7 +1596,8 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.Failed("未能查询到该快递信息");
}
}
else {
else
{
return ApiResult.Failed("未查询到快递配置");
}
}
......@@ -1662,11 +1664,13 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetGoosdActivityInfo() {
public ApiResult GetGoosdActivityInfo()
{
var userInfo = AppletUserInfo;
JObject parms = JObject.Parse(RequestParm.msg.ToString());
int ActivityId = parms.GetInt("ActivityId", 0);
if (ActivityId <= 0) {
if (ActivityId <= 0)
{
return ApiResult.ParamIsNull();
}
......@@ -1700,7 +1704,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetGoodsMyActivityPrizeList() {
public ApiResult GetGoodsMyActivityPrizeList()
{
var parms = RequestParm;
var userInfo = AppletUserInfo;
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
......
......@@ -877,7 +877,8 @@ namespace Mall.WebApi.Controllers.User
var userInfo = AppletUserInfo;
JObject parms = JObject.Parse(req.msg.ToString());
int UserId = parms.GetInt("UserId", 0);
if (UserId <= 0) {
if (UserId <= 0)
{
return ApiResult.ParamIsNull("请传递用户id");
}
......@@ -901,10 +902,12 @@ namespace Mall.WebApi.Controllers.User
{
return ApiResult.ParamIsNull("请传递用户id");
}
if (string.IsNullOrEmpty(StartTime)) {
if (string.IsNullOrEmpty(StartTime))
{
return ApiResult.ParamIsNull("请传递开始时间");
}
if (string.IsNullOrEmpty(EndTime)) {
if (string.IsNullOrEmpty(EndTime))
{
return ApiResult.ParamIsNull("请传递结束时间");
}
try
......@@ -916,7 +919,8 @@ namespace Mall.WebApi.Controllers.User
{
return ApiResult.Failed("日期格式有误");
}
if (Convert.ToDateTime(StartTime) > Convert.ToDateTime(EndTime)) {
if (Convert.ToDateTime(StartTime) > Convert.ToDateTime(EndTime))
{
return ApiResult.ParamIsNull("开始时间不能大于结束时间");
}
......@@ -1011,11 +1015,13 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetUserMemberVipGradeInfo() {
public ApiResult GetUserMemberVipGradeInfo()
{
var userInfo = AppletUserInfo;
var parms = JObject.Parse(RequestParm.msg.ToString());
int MemberGradeId = parms.GetInt("MemberGradeId", 0);
if (MemberGradeId <= 0) {
if (MemberGradeId <= 0)
{
return ApiResult.ParamIsNull();
}
......@@ -1164,7 +1170,8 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetAppletUserPageType() {
public ApiResult GetAppletUserPageType()
{
var userInfo = AppletUserInfo;
return userModule.GetAppletUserPageType(userInfo);
......@@ -2418,12 +2425,23 @@ namespace Mall.WebApi.Controllers.User
/// <param name="requestMsg"></param>
/// <returns></returns>
[HttpPost]
[Microsoft.AspNetCore.Authorization.AllowAnonymous]
public ApiResult SetUserToVip(object requestMsg)
public ApiResult SetUserToVip()
{
var requestParm = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
JObject parms = JObject.Parse(requestParm.msg.ToString());
var userInfo = AppletUserInfo;
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 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);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
......@@ -1260,7 +1260,8 @@ namespace Mall.WebApi.Controllers.User
UpdateDate = model.UpdateDate.HasValue ? model.UpdateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
model.VipBuyICO,
model.VipBuyUrl,
model.IsShowVIPBuyPic
model.IsShowVIPBuyPic,
model.OpenOfflineEarnings
});
}
......
......@@ -9,7 +9,7 @@
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_LayoutPageFile />
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<NameOfLastUsedPublishProfile>E:\Work\Git\Mall_Api\Mall.WebApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<ShowAllFiles>false</ShowAllFiles>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -15,6 +15,7 @@ namespace Mall.WindowsService.Helper
private static int inTimer3 = 0;
private static int inTimer4 = 0;
private static int inTimer5 = 0;
private static int inTimer6 = 0;
/// <summary>
/// 收入单子服务开始执行方法
/// </summary>
......@@ -156,5 +157,30 @@ namespace Mall.WindowsService.Helper
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
/// </summary>
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>
......@@ -49,6 +55,7 @@ WHERE Status=0 AND '{0}'>=ShelvesDate AND '{0}'<=DownDate AND GoodsStatus<>1
return flag;
}
/// <summary>
/// 商品自动下架
/// </summary>
......@@ -76,5 +83,38 @@ WHERE Status=0 AND DownDate<='{0}' AND GoodsStatus=1 ", DateTime.Now.ToString("y
}
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
private System.Timers.Timer timer3; //订单自动收货计时器
private System.Timers.Timer timer4; //七天自动取消下线计时器
private System.Timers.Timer timer5; //定时上架和下架
private System.Timers.Timer timer6; //资讯定时上架和下架
private System.Timers.Timer timer7; //会员储值卡赠送状态更新
public WindowsService()
{
......@@ -76,6 +78,26 @@ namespace Mall.WindowsService
timer5.Enabled = true;
#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
}
......
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