Commit c72a3433 authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/mall.oytour.com into sdzq-ld

parents 8a3c0565 098b817c
......@@ -2066,5 +2066,19 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
public string fontColor { get; set; }
/// <summary>
/// 字体名称
/// </summary>
public string fontName { get; set; }
/// <summary>
/// 字体大小
/// </summary>
public string fontSize { get; set; }
/// <summary>
/// 是否加粗
/// </summary>
public string isBold { get; set; }
}
}
......@@ -295,5 +295,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public int IsVideo { get; set; }
/// <summary>
/// ERP商品对象
/// </summary>
public object ERPGoodObj { get; set; }
}
}
......@@ -146,6 +146,16 @@ namespace Mall.Model.Extend.User
/// 是否直接下级[1-是]
/// </summary>
public int IsDirect { get; set; }
/// <summary>
/// 店铺Id
/// </summary>
public int ShopId { get; set; }
/// <summary>
/// 店铺名称
/// </summary>
public string ShopName { get; set; }
}
......
......@@ -377,7 +377,31 @@ namespace Mall.Module.MarketingCenter
//快捷导航
case "quick-nav": item.data = JsonHelper.DeserializeObject<quicknavItem>(item.data.ToString()); break;
//店铺用户信息
case "shop-info": item.data = JsonHelper.DeserializeObject<shopinfoItem>(item.data.ToString());break;
case "shop-info":
shopinfoItem shopModel = new shopinfoItem();
try
{
var shopInfoData = JsonHelper.DeserializeObject<shopinfoItem>(item.data.ToString());
if (shopInfoData != null)
{
shopModel.headImg = shopInfoData?.headImg ?? "";
shopModel.headName = shopInfoData?.headName ?? "";
shopModel.headInfo = shopInfoData?.headInfo ?? "";
shopModel.backgroundPicUrl = shopInfoData?.backgroundPicUrl ?? "";
shopModel.backgroundColor = shopInfoData?.backgroundColor ?? "";
shopModel.bottonImg = shopInfoData?.bottonImg ?? "";
shopModel.fontColor = shopInfoData?.fontColor ?? "";
shopModel.fontName = shopInfoData?.fontName ?? "";
shopModel.fontSize = shopInfoData?.fontSize ?? "13";
shopModel.isBold = shopInfoData?.isBold ?? "false";
}
}
catch
{
}
item.data = shopModel;
break;
}
}
......
......@@ -18,6 +18,7 @@ using Mall.Repository.BaseSetUp;
using Mall.Repository.Product;
using Mall.Repository.User;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.Functions;
using VT.FW.DB;
......@@ -231,8 +232,9 @@ namespace Mall.Module.Product
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <param name="IsGetShare">1-获取分销佣金</param>
/// <returns></returns>
public List<RB_Goods_Extend> GetAppletGoodsPageListForZY(int pageIndex, int pageSize, out long count, RB_Goods_Extend demodel)
public List<RB_Goods_Extend> GetAppletGoodsPageListForZY(int pageIndex, int pageSize, out long count, RB_Goods_Extend demodel,int IsGetShare=0)
{
var list = goodsRepository.GetAppletGoodsPageList(pageIndex, pageSize, out count, demodel);
if (list.Any())
......@@ -447,10 +449,16 @@ namespace Mall.Module.Product
item.FreeShippingModel = new RB_FreeShipping_Extend();
}
//2020-08-06 Add by:W End
//HK 2020-09-08新增
if (IsGetShare == 1)
{
var obj = GetAppletGoodsInfo_V2(item.Id, (demodel?.UserId ?? 0), (demodel?.SmallShopsId ?? 0), demodel.TenantId, demodel.MallBaseId);
if (obj != null)
{
item.ERPGoodObj = obj;
}
}
}
}
return list;
}
......
......@@ -33,6 +33,12 @@ namespace Mall.Module.User
/// 用户管理
/// </summary>
private readonly RB_Member_UserRepository member_UserRepository = new RB_Member_UserRepository();
/// <summary>
/// 用户管理
/// </summary>
private readonly RB_Member_UserRepository2 member_UserRepository2 = new RB_Member_UserRepository2();
/// <summary>
/// 会员等级
/// </summary>
......@@ -6570,5 +6576,15 @@ namespace Mall.Module.User
};
return distributor_InfoRepository.Update(fileds, new WhereHelper(nameof(RB_Distributor_Info_Extend.UserId), UserId));
}
/// <summary>
/// 获取商户用户列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Member_User_Extend> GetMemberUserListExtModule(RB_Member_User_Extend dmodel)
{
return member_UserRepository2.GetMemberUserListExtRepository(dmodel);
}
}
}
......@@ -12,7 +12,7 @@ namespace Mall.Repository.User
/// <summary>
/// 商户用户仓储层
/// </summary>
public class RB_Member_UserRepository : BaseRepository<RB_Member_User>
public partial class RB_Member_UserRepository : BaseRepository<RB_Member_User>
{
/// <summary>
......
using Mall.Model.Extend.User;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Mall.Model.Entity.User;
using VT.FW.DB.Dapper;
namespace Mall.Repository.User
{
/// <summary>
/// 商户用户仓储层
/// </summary>
public partial class RB_Member_UserRepository2 : BaseRepository<RB_Member_User>
{
/// <summary>
/// 获取商户用户列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Member_User_Extend> GetMemberUserListExtRepository(RB_Member_User_Extend dmodel)
{
DynamicParameters dynamicParameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT IFNULL(B.Id,0) AS ShopId,IFNULL(B.Name,'') AS ShopName,A.*
FROM rb_member_user AS A LEFT JOIN rb_smallshops_info AS B ON A.Id=B.UserId
WHERE 1=1
");
if (dmodel.TenantId > 0)
{
builder.AppendFormat($@" and A.{nameof(RB_Member_User.TenantId)}={dmodel.TenantId}");
}
if (dmodel.MallBaseId > 0)
{
builder.AppendFormat($@" and A.{nameof(RB_Member_User.MallBaseId)}={dmodel.MallBaseId}");
}
if (!string.IsNullOrEmpty(dmodel.Name.Trim()))
{
builder.AppendFormat($@" and A.Name like @Name ");
dynamicParameters.Add("Name", "%" + dmodel.Name.Trim() + "%");
}
return Get<RB_Member_User_Extend>(builder.ToString(), dynamicParameters).ToList();
}
}
}
......@@ -159,7 +159,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.RemitFXCommission = 0;
item.RefundActual = item.RefundActual > 0 ? item.RefundActual : item.AllPrice;
}
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.RefundActual + item.YFMoney;
// item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item.NoPaid = item.ALLCommission;
item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.Paid = item.RefundActual + item.RemitFXCommission + item.CostMoney + item.GoodsFreight + item.PayMoney;
......@@ -173,11 +174,6 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{
item.GrossProfitRate = ((item.AllPrice + item.YSMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.YSMoney)), 4, MidpointRounding.AwayFromZero) * 100);
}
// item.Paid = item.PaidCostMoney + item.RemitFXCommission;
//item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
//item.GrossProfitRate = (item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 0 : Math.Round((item.GrossProfit / ((item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 1 : (item.AllPrice + item.RealMoney - item.RefundActual))), 2, MidpointRounding.AwayFromZero);
}
pagelist.count = Convert.ToInt32(count);
pagelist.pageData = list;
......@@ -378,7 +374,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.RemitFXCommission = 0;
item.RefundActual = item.RefundActual > 0 ? item.RefundActual : item.AllPrice;
}
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
// item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.RefundActual + item.YFMoney;
item.NoPaid = item.ALLCommission;
item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.Paid = item.RefundActual + item.RemitFXCommission + item.CostMoney + item.GoodsFreight + item.PayMoney;
......@@ -392,13 +389,6 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{
item.GrossProfitRate = ((item.AllPrice + item.YSMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.YSMoney)), 4, MidpointRounding.AwayFromZero) * 100);
}
//item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.OtherPrice;
//item.NoPaid = item.ALLCommission;
//item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
//item.Paid = item.PaidCostMoney + item.RemitFXCommission;
//item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
//item.GrossProfitRate = (item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 0 : Math.Round((item.GrossProfit / ((item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 1 : (item.AllPrice + item.RealMoney - item.RefundActual))), 2, MidpointRounding.AwayFromZero);
}
#region 组装数据
int Num = 0;
......@@ -587,7 +577,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.RemitFXCommission = 0;
item.RefundActual = item.RefundActual > 0 ? item.RefundActual : item.AllPrice;
}
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.RefundActual + item.YFMoney;
// item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item.NoPaid = item.ALLCommission;
item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.Paid = item.RefundActual + item.RemitFXCommission + item.CostMoney + item.GoodsFreight + item.PayMoney;
......
......@@ -169,12 +169,23 @@ namespace Mall.WebApi.Controllers.MallBase
}
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
RB_Goods_Extend demodel = JsonConvert.DeserializeObject<RB_Goods_Extend>(parms.msg.ToString());
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
demodel.GoodsStatus = 1;//只查询销售中的
demodel.SmallShopsId = parms.SmallShopsId;
JObject newParms = JObject.Parse(parms.msg.ToString());
int UserId = parms.UserId;
if (newParms.GetInt("ERPUserId") > 0)
{
UserId = newParms.GetInt("ERPUserId");
}
if (newParms.GetInt("ERPSmallShopId") > 0)
{
demodel.SmallShopsId = newParms.GetInt("ERPSmallShopId");
}
demodel.UserId = UserId;
//HK2020-09-07新增
int IsGetShare = newParms.GetInt("IsGetShare");
RB_Member_User_Extend userModel = new RB_Member_User_Extend();
RB_Member_Grade_Extend memberGrade = new RB_Member_Grade_Extend();
if (UserId > 0)
......@@ -188,7 +199,7 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.SmallShopsId = userModel.SmallShopId;
}
}
var list = productModule.GetAppletGoodsPageListForZY(pagelist.pageIndex, pagelist.pageSize, out long count, demodel);
var list = productModule.GetAppletGoodsPageListForZY(pagelist.pageIndex, pagelist.pageSize, out long count, demodel,IsGetShare:IsGetShare);
List<object> RList = new List<object>();
if (list.Any())
{
......@@ -349,7 +360,8 @@ namespace Mall.WebApi.Controllers.MallBase
goods_stock = model.InventoryNum,
goods_num = model.InventoryNum,
marketingLogo= model.MarketingLogo,
video_type=model.VideoType
video_type=model.VideoType,
erpgoodobj=model.ERPGoodObj
});
}
}
......
......@@ -690,7 +690,7 @@ namespace Mall.WebApi.Controllers.User
demodel.TenantId = userInfo.TenantId;
demodel.MallBaseId = userInfo.MallBaseId;
demodel.UserId = userInfo.UserId;
demodel.IsDirect = prams.GetInt("IsDirect", 1);
int NewUserId = 0;
//HK 2020-08-27新增
JObject parms = JObject.Parse(req.msg.ToString());
......
......@@ -3346,5 +3346,29 @@ namespace Mall.WebApi.Controllers.User
}
}
#endregion
#region 获取用户列表
[HttpPost]
[AllowAnonymous]
public ApiResult GetMemberUserListExt()
{
var re = RequestParm;
var parms = JObject.Parse(re.msg.ToString());
RB_Member_User_Extend query = new RB_Member_User_Extend()
{
Name = parms.GetStringValue("Name"),
};
query.TenantId = Convert.ToInt32(re.uid);
query.MallBaseId = re.MallBaseId;
var list = userModule.GetMemberUserListExtModule(query);
return ApiResult.Success(data: list.Select(qitem => new
{
qitem.Id,
qitem.Name,
qitem.ShopId,
qitem.ShopName
}));
}
#endregion
}
}
\ No newline at end of file
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