Commit ec24af0a authored by 黄奎's avatar 黄奎

信息用户中心实体类

parent 9eb4f457
using Mall.Common.AOP;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.User
{
/// <summary>
/// 小程序用户中心配置实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_MiniProgram_UserCenterConfig
{
/// <summary>
/// 主键Id
/// </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 DefaultBgImg { get; set; }
/// <summary>
/// 普通用户背景
/// </summary>
public string MemberBgImg { get; set; }
/// <summary>
/// 会员中心背景
/// </summary>
public string VipBgImg { get; set; }
/// <summary>
/// 头像样式类型(1-头像靠左,2-头像居中,3-头像内嵌)
/// </summary>
public int HeadStyle { get; set; }
/// <summary>
/// 头像样式字符串
/// </summary>
public string HeadStyleStr { get; set; }
/// <summary>
/// 是否显示收藏夹(0-显示,1-不显示)
/// </summary>
public int IsShowFavorite { get; set; }
/// <summary>
/// 我的收藏图片
/// </summary>
public string MyFavoriteImg { get; set; }
/// <summary>
/// 我的足迹图片
/// </summary>
public string MyFootPrintImg { get; set; }
/// <summary>
/// 是否显示订单栏(0-显示,1-不显示)
/// </summary>
public int IsShowOrderNav { get; set; }
/// <summary>
/// 待付款图片
/// </summary>
public string NoPayImg { get; set; }
/// <summary>
/// 待发货图片
/// </summary>
public string NoDeliveryImg { get; set; }
/// <summary>
/// 待收货图片
/// </summary>
public string NoReciveImg { get; set; }
/// <summary>
/// 待评价图片
/// </summary>
public string NoEvaluation { get; set; }
/// <summary>
/// 售后图片
/// </summary>
public string AfterSales { get; set; }
/// <summary>
/// 是否显示账户栏(0-显示,1-不显示)
/// </summary>
public int IsShowAccountNav { get; set; }
/// <summary>
/// 积分自定义名称
/// </summary>
public string IntegralName { get; set; }
/// <summary>
/// 积分图片
/// </summary>
public string IntegralImg { get; set; }
/// <summary>
/// 余额自定义名称
/// </summary>
public string BalanceName { get; set; }
/// <summary>
/// 余额自定义图片
/// </summary>
public string BalanceImg { get; set; }
/// <summary>
/// 优惠券自定义名称
/// </summary>
public string CouponsName { get; set; }
/// <summary>
/// 优惠券自定义图片
/// </summary>
public string CouponsImg { get; set; }
/// <summary>
/// 卡券名称
/// </summary>
public string CardName { get; set; }
/// <summary>
/// 卡券图片
/// </summary>
public string CardImg { get; set; }
/// <summary>
/// 是否显示菜单栏(0-显示,1-不显示)
/// </summary>
public int IsShowMenuNav { get; set; }
/// <summary>
/// 菜单栏标题
/// </summary>
public string MenuNavTitle { get; set; }
/// <summary>
/// 菜单栏样式(0-列表,1-九宫格)
/// </summary>
public int MenuNavStyle { get; set; }
/// <summary>
/// 菜单栏JSON数据
/// </summary>
public string MenuNavJson { get; set; }
}
}
using Mall.Common.AOP;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Extend.User
{
/// <summary>
/// 小程序用户中心配置扩展实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_MiniProgram_UserCenterConfig_Extend : Model.Entity.User.RB_MiniProgram_UserCenterConfig
{
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Extend.User;
using Mall.Repository;
using Mall.Repository.User;
namespace Mall.Module.User
{
/// <summary>
/// 小程序用户中心配置处理类
/// </summary>
public class MiniProgramUserCenterConfigModule
{
/// <summary>
/// 小程序用户中心配置仓储层对象
/// </summary>
private RB_MiniProgram_UserCenterConfigRepository configRepository = new RB_MiniProgram_UserCenterConfigRepository();
/// <summary>
/// 根据查询条件获取小程序用户中心配置实体
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public RB_MiniProgram_UserCenterConfig_Extend GetEntityExtModule(RB_MiniProgram_UserCenterConfig_Extend query)
{
var extModel = configRepository.GetEntityExtRepository(query);
if (extModel == null)
{
extModel = new RB_MiniProgram_UserCenterConfig_Extend();
}
return extModel;
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.User;
using Mall.Model.Extend.User;
using System.Linq;
namespace Mall.Repository.User
{
/// <summary>
/// 小程序用户中心配置仓储层
/// </summary>
public class RB_MiniProgram_UserCenterConfigRepository : RepositoryBase<RB_MiniProgram_UserCenterConfig>
{
/// <summary>
/// 根据查询条件获取小程序用户中心配置实体
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public RB_MiniProgram_UserCenterConfig_Extend GetEntityExtRepository(RB_MiniProgram_UserCenterConfig_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append(" SELECT * FROM RB_MiniProgram_UserCenterConfig 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);
}
}
return Get<RB_MiniProgram_UserCenterConfig_Extend>(builder.ToString()).FirstOrDefault();
}
}
}
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