Commit 6750f2ce authored by 吴春's avatar 吴春

提交代码

parent 29429cc1
......@@ -47,6 +47,11 @@ namespace Mall.Model.Entity.Reserve
public int SmallShopId { get; set; }
/// <summary>
/// 关联门店
/// </summary>
public int StoreId { get; set; }
/// <summary>
/// 是否赞羊使用0-否,1-是
/// </summary>
......
using VT.FW.DB;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.Reserve
{
/// <summary>
/// 销售分销海报实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Reserve_FenXiaoPoster
{
/// <summary>
/// 主键编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 商户Id
/// </summary>
public int TenantId { get; set; }
/// <summary>
/// 小程序Id
/// </summary>
public int MallBaseId { get; set; }
/// <summary>
/// 海报背景图
/// </summary>
public string PosterBgImg { get; set; }
/// <summary>
/// 是否显示头像(0-显示,1-不显示)
/// </summary>
public int IsShowHead { get; set; }
/// <summary>
/// 头像大小
/// </summary>
public int HeadSize { get; set; }
/// <summary>
/// 头像上间距
/// </summary>
public int HeadPaddingTop { get; set; }
/// <summary>
/// 头像左间距
/// </summary>
public int HeadPaddingLeft { get; set; }
/// <summary>
/// 头像形状(0-圆形,1-方形)
/// </summary>
public int HeadType { get; set; }
/// <summary>
/// 是否显示昵称(0-显示,1-不显示)
/// </summary>
public int IsShowNick { get; set; }
/// <summary>
/// 昵称大小
/// </summary>
public int NickSize { get; set; }
/// <summary>
/// 昵称上间距
/// </summary>
public int NickPaddingTop { get; set; }
/// <summary>
/// 昵称左间距
/// </summary>
public int NickPaddingLeft { get; set; }
/// <summary>
/// 昵称颜色
/// </summary>
public string NickColor { get; set; }
/// <summary>
/// 是否显示二维码(0-显示,1-不显示)
/// </summary>
public int IsShowQrCode { get; set; }
/// <summary>
/// 二维码大小
/// </summary>
public int QrCodeSize { get; set; }
/// <summary>
/// 二维码上间距
/// </summary>
public int QrCodePaddingTop { get; set; }
/// <summary>
/// 二维码上间距
/// </summary>
public int QrCodePaddingLeft { get; set; }
/// <summary>
/// 二维码形状(0-圆形,1-方形)
/// </summary>
public int QrCodeType { get; set; }
/// <summary>
/// 是否开启线下服务版本(1-开启)
/// </summary>
public int IsOpenReserve { get; set; }
}
}
......@@ -427,6 +427,13 @@ namespace Mall.Model.Entity.User
/// 是否开启校园版(1-开启)
/// </summary>
public int IsOpenSchool { get; set; }
/// <summary>
/// 是否开启服务版本(1-开启)
/// </summary>
public int IsOpenReserve { get; set; }
/// <summary>
/// 菜单栏json格式 多组模式
/// </summary>
......
......@@ -2734,7 +2734,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary>
/// 搜索圆角像素
/// 圆角像素
/// </summary>
public int SearchFilletPX
{
......
using Mall.Model.Entity.Reserve;
using System;
using VT.FW.DB;
namespace Mall.Model.Extend.Reserve
{
/// <summary>
/// 销售分销海报扩展类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Reserve_FenXiaoPoster_Extend : RB_Reserve_FenXiaoPoster
{
}
}
......@@ -42,6 +42,67 @@ namespace Mall.Module.Reserve
private readonly RB_Reserve_BaseRepository reserveBaseRepository = new RB_Reserve_BaseRepository();
#endregion
#region 分享服务人员海报
private readonly RB_Reserve_FenXiaoPosterRepository reserveFenXiaoPosterRepository = new RB_Reserve_FenXiaoPosterRepository();
#endregion
#region 分享服务人员海报
/// <summary>
/// 根据查询条件获取分销海报实体
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public RB_Reserve_FenXiaoPoster_Extend GetReserveFenXiaoPosterModule(RB_Reserve_FenXiaoPoster_Extend query)
{
return reserveFenXiaoPosterRepository.GetEntityExtRepository(query);
}
/// <summary>
/// 添加修改分销海报
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public bool SetReserveFenXiaoPosterModule(RB_Reserve_FenXiaoPoster_Extend extModel)
{
bool flag;
if (extModel.Id > 0)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_Reserve_FenXiaoPoster_Extend.PosterBgImg),extModel.PosterBgImg},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.IsShowHead),extModel.IsShowHead},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.HeadSize),extModel.HeadSize},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.HeadPaddingTop),extModel.HeadPaddingTop},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.HeadPaddingLeft),extModel.HeadPaddingLeft},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.IsShowNick),extModel.IsShowNick},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.NickSize),extModel.NickSize},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.NickPaddingTop),extModel.NickPaddingTop},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.NickPaddingLeft),extModel.NickPaddingLeft},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.NickColor),extModel.NickColor},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.IsShowQrCode),extModel.IsShowQrCode},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.QrCodeSize),extModel.QrCodeSize},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.QrCodePaddingTop),extModel.QrCodePaddingTop},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.QrCodePaddingLeft),extModel.QrCodePaddingLeft},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.QrCodeType),extModel.QrCodeType},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.IsOpenReserve),extModel.IsOpenReserve},
{ nameof(RB_Reserve_FenXiaoPoster_Extend.HeadType),extModel.HeadType},
};
flag = reserveFenXiaoPosterRepository.Update(fileds, new WhereHelper(nameof(RB_Reserve_FenXiaoPoster_Extend.Id), extModel.Id));
}
else
{
int NewId = reserveFenXiaoPosterRepository.Insert(extModel);
extModel.Id = NewId;
flag = NewId > 0;
}
return flag;
}
#endregion
#region 基础配置
/// <summary>
/// 获取基础配置
......
......@@ -232,6 +232,15 @@ SELECT a.ID as MemberCouponId,a.UserId,a.HeXiao,a.UseHeXiao,b.`Name`,b.UseType,b
{
where += $" AND a.{nameof(RB_Reserve_Coupon_Extend.SmallShopId)}=0";
}
if (query.StoreId > 0)
{
where += $" AND ( a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}={query.StoreId} or a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}=0 ))";
}
else
{
where += $" AND a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}=0";
}
}
string sql = @$" SELECT t.*,c.MemberNum from (SELECT a.ID,a.`Name`,a.`Describe`,a.UseType,a.StartDate,a.EndDate,a.CouponIco,a.IndateDay,a.IndateType,a.TotalNum from {TableName} as a
{where} and a.IndateType=1
......@@ -334,6 +343,15 @@ on a.CouponId=b.ID {where} ";
{
builder.Append($" AND a.{nameof(RB_Reserve_Coupon_Extend.SmallShopId)}=0");
}
if (query.StoreId > 0)
{
builder.Append($" AND ( a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}={query.StoreId} or (a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}=0 ))");
}
else
{
builder.Append($" AND a.{nameof(RB_Reserve_Coupon_Extend.SmallShopId)}=0");
}
}
string sql = @$"SELECT a.*,b.TriggerType,b.GrantNum from rb_Reserve_couponselfmotion as b LEFT JOIN {TableName} as a on a.ID=b.DiscountCouponId
......
using Mall.Model.Entity.Reserve;
using Mall.Model.Extend.Reserve;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mall.Repository.Reserve
{
public class RB_Reserve_FenXiaoPosterRepository:BaseRepository<RB_Reserve_FenXiaoPoster>
{
/// <summary>
/// 根据查询条件获取小程序用户中心配置实体
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public RB_Reserve_FenXiaoPoster_Extend GetEntityExtRepository(RB_Reserve_FenXiaoPoster_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append(" SELECT * FROM RB_Reserve_FenXiaoPoster WHERE 1=1 ");
if (query != null)
{
if (query.TenantId > 0)
{
builder.AppendFormat(" AND TenantId={0} ", query.TenantId);
}
if (query.MallBaseId > 0)
{
builder.AppendFormat(" AND MallBaseId={0} ", query.MallBaseId);
}
if (query.Id > 0)
{
builder.AppendFormat(" AND Id={0} ", query.Id);
}
if (query.IsOpenReserve >= 0)
{
builder.AppendFormat(" AND IsOpenReserve={0} ", query.IsOpenReserve);
}
}
return Get<RB_Reserve_FenXiaoPoster_Extend>(builder.ToString()).FirstOrDefault();
}
}
}
......@@ -28,6 +28,35 @@ namespace Mall.WebApi.Controllers.Reserve
private Module.User.UserModule UserModule = new Module.User.UserModule();
#region 海报
/// <summary>
/// 添加修改服务人员海报
/// </summary>
/// <returns></returns>
public ApiResult SetReserveFenXiaoPoster()
{
var extModel = JsonConvert.DeserializeObject<RB_Reserve_FenXiaoPoster_Extend>(RequestParm.msg.ToString());
extModel.TenantId = RequestParm.TenantId;
extModel.MallBaseId = RequestParm.MallBaseId;
var flag = reserveModule.SetReserveFenXiaoPosterModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 获取服务人员海报
/// </summary>
/// <returns></returns>
public ApiResult GetReserveFenXiaoPoster()
{
var extModel = JsonConvert.DeserializeObject<RB_Reserve_FenXiaoPoster_Extend>(RequestParm.msg.ToString());
extModel.TenantId = RequestParm.TenantId;
extModel.MallBaseId = RequestParm.MallBaseId;
var result = reserveModule.GetReserveFenXiaoPosterModule(extModel);
return ApiResult.Success(data: result);
}
#endregion
#region 基础配置
/// <summary>
/// 获取线下服务行业基础配置
......
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