Commit 37f9ba7a authored by liudong1993's avatar liudong1993

1

parent 9b1afdf7
......@@ -8,6 +8,7 @@
<ProjectReference Include="..\Mall.CacheManager\Mall.CacheManager.csproj" />
<ProjectReference Include="..\Mall.Common\Mall.Common.csproj" />
<ProjectReference Include="..\Mall.Model\Mall.Model.csproj" />
<ProjectReference Include="..\Mall.Module.User\Mall.Module.User.csproj" />
<ProjectReference Include="..\Mall.Repository\Mall.Repository.csproj" />
</ItemGroup>
......
......@@ -11,6 +11,7 @@ using Mall.Common.Plugin;
using Mall.Model.Entity.Product;
using Mall.Model.Extend.Product;
using Mall.Model.Extend.User;
using Mall.Module.User;
using Mall.Repository;
using Mall.Repository.BaseSetUp;
using Mall.Repository.Finance;
......@@ -4599,6 +4600,25 @@ namespace Mall.Module.Product
return goods_OrderRepository.GetEntity(OrderId).RefMapperTo<RB_Goods_Order_Extend>();
}
/// <summary>
/// 获取订单明细实体
/// </summary>
/// <param name="OrderId"></param>
/// <returns></returns>
public RB_Goods_OrderDetail_Extend GetOrderDetailInfo(int OrderId)
{
return goods_OrderDetailRepository.GetEntity(OrderId).RefMapperTo<RB_Goods_OrderDetail_Extend>();
}
/// <summary>
/// 获取用户信息
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public RB_Member_User_Extend GetMemberUserInfo(int userId) {
return member_UserRepository.GetEntity(userId).RefMapperTo<RB_Member_User_Extend>();
}
/// <summary>
/// 获取售后订单详情
/// </summary>
......@@ -5261,6 +5281,33 @@ namespace Mall.Module.Product
Type = 1
}, trans);
}
var omodel = goods_OrderRepository.GetEntity(demodel.OrderId);
var umodel = member_UserRepository.GetEntity(omodel.UserId);
string goodsName = dlist.FirstOrDefault().GoodsName;
if (dlist.Count > 1)
{
if (goodsName.Length > 12)
{
goodsName = goodsName.Substring(0, 12) + "..";
}
goodsName += "等" + dlist.Count + "件商品";
}
else {
if (goodsName.Length > 18)
{
goodsName = goodsName.Substring(0, 18) + "..";
}
}
if (demodel.Type == 1)
{
var exModel = logistics_ExpressRepository.GetEntity(demodel.ExpressId);
new MiniProgramMsgModule().SendOrderDeliverMsg(demodel.TenantId, demodel.MallBaseId, umodel.OpenId, "商品已发货,注意查收!", demodel.ExpressNumber, exModel.Name ?? "其他", goodsName);
}
else {
//new MiniProgramMsgModule().SendOrderDeliverMsg(demodel.TenantId, demodel.MallBaseId, umodel.OpenId, demodel.Remark ?? "", "", "其他方式", goodsName);
}
}
}
goods_OrderExpressRepository.DBSession.Commit();
......@@ -5470,6 +5517,23 @@ namespace Mall.Module.Product
}
//余额支付回滚
string goodsName = detailList.FirstOrDefault().GoodsName;
if (detailList.Count > 1)
{
if (goodsName.Length > 12)
{
goodsName = goodsName.Substring(0, 12) + "..";
}
goodsName += "等" + detailList.Count + "件商品";
}
else
{
if (goodsName.Length > 18)
{
goodsName = goodsName.Substring(0, 18) + "..";
}
}
new MiniProgramMsgModule().SendOrderCancelMsg(tenantId, mallBaseId, umodel.OpenId, omodel.OrderNo, omodel.CancelRemark ?? "", (omodel.Income ?? 0).ToString(), goodsName);
}
//记录日志
string Content = $"客人申请取消订单,审核:{(type == 1 ? "同意" : "拒绝")}";
......
......@@ -1678,7 +1678,7 @@ namespace Mall.Module.Product
})
}),
goods_stock = model.InventoryNum,
virtual_sales = model.SalesNum,
virtual_sales = (model.SalesNum ?? 0),
confine_count = model.LimitBuyGoodsNum,
pieces = model.FullNumPinkage,//满件包邮
forehead = model.FullMoneyPinkage,//满额包邮
......@@ -1714,7 +1714,7 @@ namespace Mall.Module.Product
area_type=x.AreaType
}) } },
form_id = model.FormsId,
sales = model.SalesNum + payment_num,//已售出数量 + 订单商品数量//
sales = (model.SalesNum ?? 0) + payment_num,//已售出数量 + 订单商品数量//
name = model.Name,
original_price = model.OriginalPrice,
cover_pic = model.CoverImage,
......
......@@ -325,8 +325,19 @@ namespace Mall.Module.User
string goodsName = orderGoodsList.FirstOrDefault().GoodsName;
if (orderGoodsList.Count > 1)
{
if (goodsName.Length > 12)
{
goodsName = goodsName.Substring(0, 12) + "..";
}
goodsName += "等" + orderGoodsList.Count + "件商品";
}
else
{
if (goodsName.Length > 18)
{
goodsName = goodsName.Substring(0, 18) + "..";
}
}
appletWeChatModule.SendOrderSucceedMsg(oldOrder.TenantId, oldOrder.MallBaseId, umodel.OpenId, oldOrder.OrderNo, oldOrder.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss"), (oldOrder.Income ?? 0).ToString(), goodsName);
}
return flag;
......
......@@ -24,7 +24,7 @@ namespace Mall.Repository.Product
/// <returns></returns>
public List<RB_Goods_Comment_Extend> GetPageList(int pageIndex, int pageSize, out long count, RB_Goods_Comment_Extend dmodel)
{
string where = $" 1=1 ";
string where = $" 1=1 and c.{nameof(RB_Goods_Comment.Status)}=0 ";
if (dmodel.TenantId > 0)
{
where += $@" and c.{nameof(RB_Goods_Comment.TenantId)}={dmodel.TenantId}";
......@@ -74,7 +74,7 @@ where {where} order by c.Id desc";
/// <returns></returns>
public List<RB_Goods_Comment_Extend> GetAppletPageList(int pageIndex, int pageSize, out long count, RB_Goods_Comment_Extend dmodel)
{
string where = $" 1=1 ";
string where = $" 1=1 and c.{nameof(RB_Goods_Comment.Status)}=0 ";
if (dmodel.TenantId > 0)
{
where += $@" and c.{nameof(RB_Goods_Comment.TenantId)}={dmodel.TenantId}";
......@@ -123,7 +123,7 @@ where {where} order by c.Id desc";
/// <returns></returns>
public List<RB_Goods_Comment_Extend> GetAppletGoodsCommentStatistics(int goodsId, int tenantId, int mallBaseId)
{
string where = $" 1=1 and c.{nameof(RB_Goods_Comment.Is_Show)}=1";
string where = $" 1=1 and c.{nameof(RB_Goods_Comment.Status)}=0 and c.{nameof(RB_Goods_Comment.Is_Show)}=1";
if (tenantId > 0)
{
where += $@" and c.{nameof(RB_Goods_Comment.TenantId)}={tenantId}";
......
......@@ -359,7 +359,7 @@ SELECT o.OrderId,o.Income FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
WHERE od.GoodsId={goodsId} and o.`Status`=0 and o.OrderStatus <> 7 GROUP BY o.OrderId)t";
string sql2 = $@"
SELECT SUM(od.Number) as GoodsNum FROM rb_goods_order o
SELECT SUM(od.Number) as OrderNum FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
WHERE od.GoodsId={goodsId} and o.`Status`=0 and o.OrderStatus <> 7";
string sql3 = $@"SELECT COUNT(UserId) AS OrderNum FROM(
......
......@@ -1486,6 +1486,18 @@ namespace Mall.WebApi.Controllers.MallBase
//日志记录
LogHelper.Write("售后订单:" + ReOrderId + ",金额:" + Refund + " 退款记录失败");
}
var detailModel = orderModule.GetOrderDetailInfo(ReModel.OrderDetialId ?? 0);
string goodsName = detailModel?.GoodsName ?? "";
if (goodsName.Length > 18)
{
goodsName = goodsName.Substring(0, 18) + "..";
}
var umodel = orderModule.GetMemberUserInfo(orderModel.UserId ?? 0);
if (goodsName != "" && umodel != null)
{
new MiniProgramMsgModule().SendOrderRefundMsg(orderModel.TenantId, orderModel.MallBaseId, umodel.OpenId, "", orderModel.OrderNo, (Refund).ToString(), goodsName);
}
return ApiResult.Success("");
}
else
......
......@@ -1832,6 +1832,8 @@ namespace Mall.WebApi.Controllers.User
{
LogHelper.Write("提现:" + RemitId + ",失败");
}
new MiniProgramMsgModule().SendWithdrawSucceedMsg(model.TenantId, model.MallBaseId, umodel.OpenId, (model.RemitMoney ?? 0).ToString(), (model.Fee ?? 0).ToString(), (model.WithdrawalWay.GetEnumName()), "");
return ApiResult.Success();
}
else
......
......@@ -86,7 +86,7 @@ namespace Test.Helper
}
}
pageIndex++;
var ranDomNum = new Random().Next(3, 7);
var ranDomNum = new Random().Next(2, 5);
Thread.Sleep(1000 * ranDomNum);
}
}
......
......@@ -201,7 +201,7 @@ DiscountRate,IsMemberPrice,TenantId,MallBaseId,CreateDate,UpdateDate,IsComment,F
}
}
pageIndex++;
var ranDomNum = new Random().Next(3, 7);
var ranDomNum = new Random().Next(2, 5);
Thread.Sleep(1000 * ranDomNum);
}
}
......
......@@ -35,11 +35,11 @@ namespace Test.Helper
{
foreach (var subItem in tempImgList)
{
if (subItem.user_id >= 19992 && subItem.user_id <= 101706)
if (subItem.user_id > 101707 && subItem.user_id <= 106252)
{
StringBuilder stringBuilder = new StringBuilder();
//stringBuilder.AppendFormat("update rb_member_user set Photo = '{0}',Name='{1}',SuperiorId={2} where Id = {3}", subItem.avatar, subItem.nickname, subItem.parent_id, subItem.user_id);
stringBuilder.AppendFormat("update rb_member_user set SuperiorId={0} where Id = {1} and SuperiorId not in (5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)", subItem.parent_id, subItem.user_id);
stringBuilder.AppendFormat("update rb_member_user set Photo = '{0}',SuperiorId={1} where Id = {2} and SuperiorId not in (5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)", subItem.avatar, subItem.parent_id, subItem.user_id);
try
{
var newResult = MySqlHelper.ExecuteNonQuery(MySqlHelper.defaultConnection, System.Data.CommandType.Text, stringBuilder.ToString(), null);
......@@ -70,7 +70,7 @@ namespace Test.Helper
pageCount = 2;
List<UserImage> list = new List<UserImage>();
string newImaApi = "http://wx.weibaoge.cn/web/index.php?r=mall%2Fuser%2Findex&page=" + pageIndex + "&member_level=0&platform=0&keyword=";
cookie = "__login_route=%2Fadmin%2Fpassport%2Flogin; __login_role=admin; HJ_SESSION_ID=lgfv5vck57rj84nh4npn59b4pj; _csrf=1febe37678187521a164220da9a9293f67d6d638a1cc01acebf0d3123757216ea%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22e5vd7mYVeGAfqcBMV_m0lkeiJLXFghtc%22%3B%7D";
cookie = "search={'keyword':'','status':' - 1','sort_prop':'','sort_type':'','cats':[],'date_start':null,'date_end':null,'type':''}; _identity=c964edefdd891bb281844324071fea4e2c1e7d2b21aef031ed81730f4e753d06a%3A2%3A%7Bi%3A0%3Bs%3A9%3A%22_identity%22%3Bi%3A1%3Bs%3A48%3A%22%5B19740%2C%22Cktp5k6Wf3lVS_yjQI_uTgEEE6_ANe-5%22%2C86400%5D%22%3B%7D; HJ_SESSION_ID=tv09q5jnte4v44ca14bnvdi28s; _csrf=9a1b84c62ffd209719019cca9730bf48f33854d3acc2f31982a5ef51ceda400ca%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22QwYL8fmmakdUX981YM7R26-Y5YoMnXxU%22%3B%7D";
string jsonData = HttpGet(newImaApi, cookie);
if (jsonData != null && !string.IsNullOrEmpty(jsonData))
......
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