Commit 1ebeb1c1 authored by 吴春's avatar 吴春

提交代码

parent d56bc07e
......@@ -193,17 +193,18 @@ namespace Mall.Module.Education
/// <returns></returns>
public bool UpdatePointOrder(RB_Point_Order_Extend newModel)
{
var umodel = member_UserRepository.GetEntity(newModel.UserId);
if (umodel == null)
{
return false;
}
//判断订单状态是否是待支付 2020-06-16 Add By:W
var model = pointOrderRepository.GetEntity(newModel.ID);
if (model == null)
{
return false;
}
var umodel = member_UserRepository.GetEntity(model.UserId);
if (umodel == null)
{
return false;
}
if (model.State != 0)
{
return false;
......@@ -220,9 +221,8 @@ namespace Mall.Module.Education
IDictionary<string, object> fileds = new Dictionary<string, object>
{
{ nameof(RB_Point_Order_Extend.PaymentTime), newModel.PaymentTime },
{ nameof(RB_Point_Order_Extend.OrderStatus), newModel.OrderStatus },
{ nameof(RB_Point_Order_Extend.MerchantsNo), newModel.MerchantsNo },
{ nameof(RB_Point_Order_Extend.OldPonitNum), newModel.OldPonitNum }
{ nameof(RB_Point_Order_Extend.OrderStatus),2},
{ nameof(RB_Point_Order_Extend.MerchantsNo), newModel.MerchantsNo }
};
IList<WhereHelper> auditrecordWhereHelpers = new List<WhereHelper>
{
......@@ -250,12 +250,12 @@ namespace Mall.Module.Education
{
UserId = model.UserId,
Type = Common.Enum.MarketingCenter.RecordTypeEnum.Income,
PonitNum = newModel.PonitNum + newModel.GivePoint,
Description = "在线购买" + model.PonitNum + "点" + (model.GivePoint > 0 ? ("赠送" + model.GivePoint) : ""),
PonitNum = model.PonitNum + model.GivePoint,
Description = "在线购买" + model.PonitNum + "点" + (model.GivePoint > 0 ? ("赠送" + model.GivePoint+"点") : ""),
CreateDate = newModel.PaymentTime,
TenantId = model.TenantId,
MallBaseId = model.MallBaseId,
Remarks = "订单号:" + model.OrderNo + "在线购买支付" + model.Income + "元" + model.PonitNum + "点" + (model.GivePoint > 0 ? ("赠送" + model.GivePoint) : ""),
Remarks = "订单号:" + model.OrderNo + "在线购买支付" + model.Income + "元" + model.PonitNum + "点" + (model.GivePoint > 0 ? ("赠送" + model.GivePoint + "点") : ""),
PlatformType = model.OrderSource
};
memberPointBalanceRepository.Insert(memberBalanceModel, trans);
......@@ -879,7 +879,7 @@ namespace Mall.Module.Education
};
flag = pointTeacherCourseOrderRepository.Update(fileds, auditrecordWhereHelpers, trans);
pointTeacherCourseOrderRepository.DBSession.Commit();
if (flag)//推送房间信息
{
List<string> openidList = new List<string>();
......@@ -887,7 +887,7 @@ namespace Mall.Module.Education
new MiniProgramMsgModule().SendCourseOrderTplMsg(model.TenantId, model.MallBaseId, openidList, model.CourseName,model.RoomInfo, model.StudyDate.ToString("MM月dd日"));
}
}
pointTeacherCourseOrderRepository.DBSession.Commit();
return flag;
}
......
......@@ -949,11 +949,11 @@ namespace Mall.Module.User
{
thing1 = new
{
value = Title.Substring(0, 15)
value = Title.Length > 20 ? Title.Substring(0, 15) : Title
},
thing2 = new
{
value = UserName.Substring(0, 18)
value = UserName.Length>20? UserName.Substring(0, 18): UserName
},
time4 = new
{
......
......@@ -268,6 +268,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
demodel.UserId = userInfo.UserId;
demodel.MallBaseId = userInfo.MallBaseId;
demodel.TenantId = userInfo.TenantId;
demodel.OrderSource = userModel.Source;
//新增充值记录
int rechargeId = pointModule.SetPointOrder(demodel);
if (rechargeId == 0)
......@@ -587,6 +588,19 @@ namespace Mall.WebApi.Controllers.AppletWeChat
userCommonModule.InsertOrderPayInfo(demodel.UserId ?? 0, demodel.OrderId, demodel.OrderNo, "s1111111111111", Common.Enum.Goods.OrderPayTypeEnum.WeChatPay, "test", (demodel.Income ?? 0), System.DateTime.Now, 0);
return ApiResult.Success("");
}
public ApiResult TestUpdatePointOrder()
{
var request = RequestParm;
var userInfo = AppletUserInfo;
RB_Point_Order_Extend demodel = JsonConvert.DeserializeObject<RB_Point_Order_Extend>(request.msg.ToString());
//ID = OrderId, OrderNo = sOrderNo, Income = dPaid, MerchantsNo = TransactionId, PaymentTime = PayDate
pointModule.UpdatePointOrder(demodel);
return ApiResult.Success("");
}
#endregion
......
......@@ -874,7 +874,8 @@ namespace Mall.WebApi.Controllers.Education
model.StudyStartDate,
model.StudyEndDate,
orderList,
StudentNumTypeName = EnumHelper.GetEnumName(model.StudentNumType)
StudentNumTypeName = EnumHelper.GetEnumName(model.StudentNumType),
WeekStr = StringHelper.GetWeek(model.StudyDate),
};
return ApiResult.Success("", result);
}
......
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