Commit 21efcaee authored by 吴春's avatar 吴春
parents a5b44855 b4ae6736
......@@ -198,5 +198,50 @@ namespace Mall.Model.Entity.Product
/// 是否自定义规格 1是 2否
/// </summary>
public int IsCustomSpecification { get; set; }
/// <summary>
/// 是否开启单独分销 1是 2否
/// </summary>
public int? SeparateDistribution
{
get;
set;
}
/// <summary>
/// 单独分销类型 1普通设置 2详细设置
/// </summary>
public int? SeparateDistributionType
{
get;
set;
}
/// <summary>
/// 分销佣金类型 2固定金额 1百分比
/// </summary>
public int? SeparateDistributionMoneyType
{
get;
set;
}
/// <summary>
/// 是否享受会员功能 1是 2否
/// </summary>
public int? EnjoyMember
{
get;
set;
}
/// <summary>
/// 是否单独设置会员价 1是 2否
/// </summary>
public int? SeparateSetMember
{
get;
set;
}
}
}
......@@ -138,15 +138,5 @@ namespace Mall.Model.Entity.Product
get;
set;
}
/// <summary>
/// 规格Id
/// </summary>
public int SpecificationId { get; set; }
/// <summary>
/// 规格值Id
/// </summary>
public int SpecificationValueId { get; set; }
}
}
......@@ -46,5 +46,15 @@ namespace Mall.Model.Entity.Product
/// 拼团库存
/// </summary>
public int PinTuanStock { get; set; }
/// <summary>
/// 规格:规格值 索引
/// </summary>
public string SpecificationSort { get; set; }
/// <summary>
/// 排序字段
/// </summary>
public int SortNum { get; set; }
}
}
......@@ -16,5 +16,10 @@ namespace Mall.Model.Extend.Product
/// 商品编号
/// </summary>
public string GoodsIds { get; set; }
/// <summary>
/// 规格值列表
/// </summary>
public object AttrList { get; set; }
}
}
......@@ -49,7 +49,7 @@ namespace Mall.Model.Query
public string EndDate { get; set; }
/// <summary>
/// 销售查询【1-昨日,7-七日】
/// 销售查询【0-今日,1-昨日,7-七日】
/// </summary>
public int SalesTimeType { get; set; }
......
using Mall.Model.Extend.User;
using Mall.Repository.User;
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Mall.Module.User
{
/// <summary>
/// 用户管理
/// </summary>
public class MemberUserModule
{
/// <summary>
/// 用户管理
/// </summary>
private readonly RB_Member_UserRepository member_UserRepository = new RB_Member_UserRepository();
/// <summary>
/// 根据用户Id更新用户头像和名称
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public bool SetMemberUserNameAndPhoto(RB_Member_User_Extend extModel)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_Member_User_Extend.AliasName),extModel.AliasName},
{ nameof(RB_Member_User_Extend.Photo),extModel.Photo},
};
return member_UserRepository.Update(fileds, new WhereHelper(nameof(RB_Member_User_Extend.Id), extModel.Id));
}
}
}
......@@ -2008,7 +2008,7 @@ namespace Mall.Module.User
var list = mallStatisticsRepository.MallIndexSalesStatisticsRepository(query);
List<object> resultList = new List<object>();
List<MallSalesStatistics> subList = new List<MallSalesStatistics>();
if (query.SalesTimeType == 1)
if (query.SalesTimeType == 1 || query.SalesTimeType==0)
{
for (var i = 0; i <= 23; i++)
{
......
......@@ -71,23 +71,23 @@ WHERE 1=1
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Groupbuy_Activity
SELECT A.*,B.Name AS QGoodName
FROM RB_Groupbuy_Activity AS A LEFT JOIN rb_goods AS B ON A.GoodId=B.Id
WHERE 1=1
");
if (query != null)
{
if (query.MallBaseId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Groupbuy_Activity_Extend.MallBaseId), query.MallBaseId);
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Groupbuy_Activity_Extend.MallBaseId), query.MallBaseId);
}
if (query.TenantId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Groupbuy_Activity_Extend.TenantId), query.TenantId);
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Groupbuy_Activity_Extend.TenantId), query.TenantId);
}
if (query.ActivityId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Groupbuy_Activity_Extend.ActivityId), query.ActivityId);
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Groupbuy_Activity_Extend.ActivityId), query.ActivityId);
}
}
return Get<RB_Groupbuy_Activity_Extend>(builder.ToString()).FirstOrDefault();
......
......@@ -194,10 +194,15 @@ WHERE 1=1 AND OrderStatus>=2 AND OrderStatus<=5
builder.AppendFormat(" AND A.{0}>='{1}' ", nameof(RB_Goods_Order_Extend.CreateDate), DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"));
builder.AppendFormat(" AND A.{0}<='{1} 23:59:59' ", nameof(RB_Goods_Order_Extend.CreateDate), DateTime.Now.ToString("yyyy-MM-dd"));
}
else
else if (query.SalesTimeType == 1)
{
builder.AppendFormat(" AND A.{0}>='{1}' AND A.{0}<='{1} 23:59:59' ", nameof(RB_Goods_Order_Extend.CreateDate), DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"));
}
else if (query.SalesTimeType == 0)
{
builder.AppendFormat(" AND A.{0}>='{1}' AND A.{0}<='{1} 23:59:59' ", nameof(RB_Goods_Order_Extend.CreateDate), DateTime.Now.ToString("yyyy-MM-dd"));
}
builder.Append(groupFileds);
var list = Get<MallSalesStatistics>(builder.ToString()).ToList();
return list;
......@@ -210,6 +215,7 @@ WHERE 1=1 AND OrderStatus>=2 AND OrderStatus<=5
public List<MallSalesGoodsTop> MallIndesSalesIncomeStatisticsRepository(StatisticsQuery query)
{
string where = "";
where += string.Format(" AND B.{0}<>7 ", nameof(RB_Goods_Order_Extend.OrderStatus));
where += string.Format(" AND B.{0}={1} ", nameof(RB_Goods_Order_Extend.TenantId), query.TenantId);
where += string.Format(" AND B.{0}={1} ", nameof(RB_Goods_Order_Extend.MallBaseId), query.MallBaseId);
//开始时间
......@@ -262,6 +268,7 @@ GROUP BY A.GoodsId,A.GoodsName) as a ORDER BY a.{query.OrderBy} LIMIT 100 ");
public List<MallSalesUserTop> MallIndesSalesUserStatisticsRepository(StatisticsQuery query)
{
string where = "";
where += string.Format(" AND B.{0}<>7 ", nameof(RB_Goods_Order_Extend.OrderStatus));
where += string.Format(" AND B.{0}={1} ", nameof(RB_Goods_Order_Extend.TenantId), query.TenantId);
where += string.Format(" AND B.{0}={1} ", nameof(RB_Goods_Order_Extend.MallBaseId), query.MallBaseId);
//开始时间
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Mall.Common.API;
using Mall.Model.Extend.User;
using Mall.Module.User;
using Mall.WebApi.Filter;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
namespace Mall.WebApi.Controllers.User
{
[Route("api/[controller]/[action]")]
[ApiExceptionFilter]
[ApiController]
[EnableCors("AllowCors")]
public class MemberUserController : BaseController
{
private MemberUserModule MemberUserModule = new MemberUserModule();
[AllowAnonymous]
/// <summary>
/// 用户登录
/// </summary>
/// <returns></returns>
public ApiResult SetMemberPhoto()
{
var extModel = JsonConvert.DeserializeObject<RB_Member_User_Extend>(RequestParm.msg.ToString());
var flag = MemberUserModule.SetMemberUserNameAndPhoto(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
}
}
\ 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