Commit 9fb081ff authored by 吴春's avatar 吴春

提交代码

parent 0708810d
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Common.Plugin;
namespace Mall.Common.Enum.MiAi
{
public enum CarInfoEnum
{
/// <summary>
/// 有车
/// </summary>
[EnumField("有车")]
Yes = 1,
/// <summary>
/// 无车
/// </summary>
[EnumField("无车")]
No = 2
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Common.Plugin;
namespace Mall.Common.Enum.MiAi
{
public enum HouseInfoEnum
{
/// <summary>
/// 有房
/// </summary>
[EnumField("有房")]
Yes = 1,
/// <summary>
/// 多套房
/// </summary>
[EnumField("多套房")]
More =2,
/// <summary>
/// 无房
/// </summary>
[EnumField("无房")]
No = 3
}
}
using Mall.Common.Plugin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mall.Common.Enum.User
{
/// <summary>
/// 用户导出选项枚举
/// </summary>
public enum MiAiUserExportEnum
{
/// <summary>
/// 所属平台
/// </summary>
[EnumField("所属平台")]
SSPT = 1,
/// <summary>
/// 用户ID
/// </summary>
[EnumField("用户ID")]
YHID = 2,
/// <summary>
/// 平台标识ID
/// </summary>
[EnumField("平台标识ID")]
PTBSID = 3,
/// <summary>
/// 昵称
/// </summary>
[EnumField("昵称")]
NC = 4,
/// <summary>
/// 绑定手机号
/// </summary>
[EnumField("绑定手机号")]
BDSJH = 5,
/// <summary>
/// 联系方式
/// </summary>
[EnumField("联系方式")]
LXFS = 6,
/// <summary>
/// 备注
/// </summary>
[EnumField("备注")]
BZ = 7,
/// <summary>
/// 加入时间
/// </summary>
[EnumField("加入时间")]
JRSJ = 8,
/// <summary>
/// 会员等级
/// </summary>
[EnumField("会员等级")]
HYDJ = 9,
/// <summary>
/// 年龄
/// </summary>
[EnumField("年龄")]
AGE = 10,
/// <summary>
/// 身高
/// </summary>
[EnumField("身高")]
SG = 11,
/// <summary>
/// 体重
/// </summary>
[EnumField("体重")]
TZ = 12,
/// <summary>
/// 年收入
/// </summary>
[EnumField("年收入")]
YEARMONEY = 13,
/// <summary>
/// 车辆信息
/// </summary>
[EnumField("车辆信息")]
CARINFO = 14,
/// <summary>
/// 房屋信息
/// </summary>
[EnumField("房屋信息")]
HOUSERINFO = 15,
/// <summary>
/// 学历
/// </summary>
[EnumField("学历")]
XL = 16,
/// <summary>
/// 婚姻
/// </summary>
[EnumField("婚姻")]
HY = 17
}
}
......@@ -26,6 +26,23 @@ namespace Mall.Model.Entity.Miai
/// </summary>
public int UserId { get; set; }
/// <summary>
/// 身份证正面
/// </summary>
public string IDCard { get; set; }
/// <summary>
/// 身份证背面
/// </summary>
public string IDCardBack { get; set; }
public string IDCardNo { get; set; }
/// <summary>
/// 活动区域
/// </summary>
public string ActivityRegion { get; set; }
/// <summary>
/// 性别1-男,2-女
/// </summary>
......@@ -72,7 +89,7 @@ namespace Mall.Model.Entity.Miai
/// <summary>
/// 年收入
/// </summary>
public string YearMoney { get; set; }
public decimal YearMoney { get; set; }
/// <summary>
......@@ -110,10 +127,7 @@ namespace Mall.Model.Entity.Miai
/// <summary>
/// 资产
/// </summary>
public string HouseInfo { get; set; }
/// <summary>
/// 家庭背景
......@@ -190,11 +204,20 @@ namespace Mall.Model.Entity.Miai
/// </summary>
public string AppointmentAddress { get; set; }
/// <summary>
/// 车
/// </summary>
public CarInfoEnum? CarInfo { get; set; }
/// <summary>
/// 资产
/// </summary>
public string OtherInfo { get; set; }
/// <summary>
/// 房屋信息
/// </summary>
public HouseInfoEnum? HouseInfo { get; set; }
/// <summary>
/// 浏览数
/// </summary>
......
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Common.Enum.MiAi;
using VT.FW.DB;
namespace Mall.Model.Entity.Miai
{
/// <summary>
/// 查询相亲会员基础资料
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_MiAi_BaseInfoQuery
{
/// <summary>
/// 编号
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 会员id
/// </summary>
public int UserId { get; set; }
/// <summary>
/// 商户号Id
/// </summary>
public int? TenantId
{
get;
set;
}
/// <summary>
/// 小程序Id
/// </summary>
public int? MallBaseId
{
get;
set;
}
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
/// <summary>
/// 删除状态
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// 性别1-男,2-女
/// </summary>
public int Sex { get; set; }
/// <summary>
/// 年龄
/// </summary>
public int Age { get; set; }
/// <summary>
/// 年龄
/// </summary>
public int EndAge { get; set; }
/// <summary>
/// 身高
/// </summary>
public decimal Height { get; set; }
/// <summary>
/// 身高
/// </summary>
public decimal EndHeight { get; set; }
/// <summary>
/// 体重
/// </summary>
public decimal Weight { get; set; }
/// <summary>
/// 体重
/// </summary>
public decimal EndWeight { get; set; }
/// <summary>
/// 年收入
/// </summary>
public decimal YearMoney { get; set; }
/// <summary>
/// 年收入
/// </summary>
public decimal EndYearMoney { get; set; }
/// <summary>
/// 车
/// </summary>
public CarInfoEnum? CarInfo { get; set; }
/// <summary>
/// 房屋信息
/// </summary>
public HouseInfoEnum? HouseInfo { get; set; }
/// <summary>
/// 学历
/// </summary>
public EducationTypeEnum? EducationType { get; set; }
/// <summary>
/// 婚姻
/// </summary>
public MarriageEnum? Marriage { get; set; }
}
}
......@@ -3158,7 +3158,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary>
/// 匹配度
/// </summary>
public int MatchingRate { get; set; }
// public int MatchingRate { get; set; }
/// <summary>
/// 分数
......
......@@ -12,6 +12,7 @@ namespace Mall.Model.Extend.Miai
/// </summary>
public List<string> AlbumList { get; set; }
public string Name { get; set; }
......@@ -57,5 +58,55 @@ namespace Mall.Model.Extend.Miai
/// </summary>
public string DName { get; set; }
/// <summary>
/// 车
/// </summary>
public string CarInfoStr { get; set; }
/// <summary>
/// 房信息
/// </summary>
public string HouseInfoStr { get; set; }
}
public class RB_MiaiMember_Extend : RB_MiAi_BaseInfo
{
/// <summary>
/// 年龄
/// </summary>
public int Age { get; set; }
/// <summary>
/// 年龄
/// </summary>
public int EndAge { get; set; }
/// <summary>
/// 身高
/// </summary>
public decimal EndHeight { get; set; }
/// <summary>
/// 体重
/// </summary>
public decimal EndWeight { get; set; }
/// <summary>
/// 年收入
/// </summary>
public decimal EndYearMoney { get; set; }
public string UserIds { get; set; }
/// <summary>
/// 查询条件的id
/// </summary>
public int QueryId { get; set; }
}
}
......@@ -66,5 +66,11 @@ namespace Mall.Model.Extend.Miai
/// 版块图标
/// </summary>
public string ForumIcon { get; set; }
/// <summary>
/// 标签
/// </summary>
public List<string> LabelList { get; set; }
}
}
......@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.User;
using Mall.Common.Enum.MiAi;
namespace Mall.Model.Extend.User
{
......@@ -181,6 +182,92 @@ namespace Mall.Model.Extend.User
}
public class RB_Member_MiaiUser_Extend : RB_Member_User
{
/// <summary>
/// 导出枚举ids
/// </summary>
public List<int> ExcelEnumIds { get; set; }
public string Birthday { get; set; }
/// <summary>
/// 年龄
/// </summary>
public int Age { get; set; }
/// <summary>
/// 年龄
/// </summary>
public int EndAge { get; set; }
/// <summary>
/// 身高
/// </summary>
public decimal Height { get; set; }
/// <summary>
/// 身高
/// </summary>
public decimal EndHeight { get; set; }
/// <summary>
/// 体重
/// </summary>
public decimal Weight { get; set; }
/// <summary>
/// 体重
/// </summary>
public decimal EndWeight { get; set; }
/// <summary>
/// 年收入
/// </summary>
public decimal YearMoney { get; set; }
/// <summary>
/// 年收入
/// </summary>
public decimal EndYearMoney { get; set; }
/// <summary>
/// 车
/// </summary>
public CarInfoEnum? CarInfo { get; set; }
/// <summary>
/// 房屋信息
/// </summary>
public HouseInfoEnum? HouseInfo { get; set; }
/// <summary>
/// 学历
/// </summary>
public EducationTypeEnum? EducationType { get; set; }
/// <summary>
/// 婚姻
/// </summary>
public MarriageEnum? Marriage { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public string StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public string EndTime { get; set; }
/// <summary>
/// 会员等级名称
/// </summary>
public string MemberGradeName { get; set; }
}
/// <summary>
/// 抖音客户实体类
/// </summary>
......
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mall.Model.Entity.Miai;
namespace Mall.Repository.Miai
{
public class RB_MiAi_BaseInfoQueryRepository:BaseRepository<RB_MiAi_BaseInfoQuery>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_MiAi_BaseInfoQuery); } }
/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_MiAi_BaseInfoQuery> GetBaseInfoQueryList(RB_MiAi_BaseInfoQuery where)
{
StringBuilder sb = new StringBuilder();
sb.Append($@"SELECT * from RB_MiAi_BaseInfoQuery where Status=0");
if (where != null)
{
if (where.TenantId > 0)
{
sb.AppendFormat(" and TenantId={0}", where.TenantId);
}
if (where.MallBaseId > 0)
{
sb.AppendFormat(" and MallBaseId={0}", where.MallBaseId);
}
if (where.Id > 0)
{
sb.AppendFormat(" and Id={0}", where.Id);
}
if (where.UserId > 0)
{
sb.AppendFormat(" and UserId={0}", where.UserId);
}
if (where.Sex > 0)
{
sb.AppendFormat(" and Sex={0}", where.Sex);
}
}
return Get<RB_MiAi_BaseInfoQuery>(sb.ToString()).ToList();
}
}
}
......@@ -78,7 +78,7 @@ namespace Mall.Repository.Miai
{
sb.AppendFormat(" and a.UserId={0}", where.UserId);
}
if (!string.IsNullOrWhiteSpace(where.Name))
{
sb.AppendFormat(" and b.Name like'%{0}%'", where.Name);
......@@ -155,6 +155,107 @@ LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklis
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_MiAi_BaseInfo_Extend> GetFirstBaseInfoPageList_V2(int pageIndex, int pageSize, out long rowsCount, RB_MiaiMember_Extend where)
{
StringBuilder sb = new StringBuilder();
sb.Append($@"SELECT * from (SELECT c.*,b.`Name`,b.Photo ,(YEAR (curdate())- YEAR ( c.Birthday )- 1+ (DATE_FORMAT( c.Birthday, '%m%d' )<=(DATE_FORMAT( curdate(), '%m%d' )))) Age from RB_MiAi_BaseInfo as c
LEFT JOIN rb_member_user as b on c.UserId=b.Id where c.Status=0 and b.Blacklist!=1
) as a where 1=1");
if (where != null)
{
if (where.TenantId > 0)
{
sb.AppendFormat(" and a.TenantId={0}", where.TenantId);
}
if (where.MallBaseId > 0)
{
sb.AppendFormat(" and a.MallBaseId={0}", where.MallBaseId);
}
if (where.Id > 0)
{
sb.AppendFormat(" and a.Id={0}", where.Id);
}
if (where.UserId > 0)
{
sb.AppendFormat(" and a.UserId !={0}", where.UserId);
}
if (where.Sex > 0)
{
sb.AppendFormat(" and a.Sex ={0}", where.Sex);
}
if (!string.IsNullOrWhiteSpace(where.UserIds))
{
sb.AppendFormat(" and a.UserId in({0})", where.UserIds);
}
if (where.Age > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Age)} >={where.Age}");
}
if (where.EndAge > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Age)} <={where.EndAge}");
}
if (where.Height > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Height)} >={where.Height}");
}
if (where.EndHeight > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Height)} <={where.EndHeight}");
}
if (where.Weight > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Weight)} >={where.Weight}");
}
if (where.EndWeight > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Weight)} <={where.EndWeight}");
}
if (where.YearMoney > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.YearMoney)} >={where.YearMoney}");
}
if (where.EndYearMoney > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.YearMoney)} <={where.EndYearMoney}");
}
if (where.CarInfo.HasValue && where.CarInfo.Value > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.CarInfo)} ={(int)where.CarInfo}");
}
if (where.HouseInfo.HasValue && where.HouseInfo.Value > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.HouseInfo)} ={(int)where.HouseInfo}");
}
if (where.Marriage.HasValue && where.Marriage.Value > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Marriage)} ={(int)where.Marriage}");
}
if (where.EducationType.HasValue && where.EducationType.Value > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.EducationType)} ={(int)where.EducationType}");
}
sb.AppendFormat(" ORDER BY a.CreateDate desc ");
}
return GetPage<RB_MiAi_BaseInfo_Extend>(pageIndex, pageSize, out rowsCount, sb.ToString()).ToList();
}
......@@ -228,27 +329,12 @@ LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklis
/// <param name="rowsCount"></param>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_MiAi_BaseInfo_Extend> GetMatchingBaseInfoList(RB_MiAi_BaseInfo_Extend where,int Top)
public List<RB_MiAi_BaseInfo_Extend> GetMatchingBaseInfoList(RB_MiaiMember_Extend where, int Top)
{
StringBuilder sb = new StringBuilder();
sb.Append($@"SELECT
a. *,b.`Name`,b.Photo ,(YEAR (curdate())- YEAR ( a.Birthday )- 1+ (DATE_FORMAT( a.Birthday, '%m%d' )<=(DATE_FORMAT( curdate(), '%m%d' )))) Age
FROM
`RB_MiAi_BaseInfo` AS a
JOIN (
SELECT
ROUND(
RAND() * (
(SELECT MAX(id) FROM `RB_MiAi_BaseInfo`) - (SELECT MIN(id) FROM `RB_MiAi_BaseInfo`)
) + (SELECT MIN(id) FROM `RB_MiAi_BaseInfo`)
) AS id
) AS t2
LEFT JOIN rb_member_user as b on a.UserId=b.Id
WHERE
a.id >= t2.id and a.Status=0 and b.Blacklist!=1
ORDER BY
a.id
LIMIT {Top} ");
sb.Append($@"SELECT * from (SELECT
a. *,b.`Name`,b.Photo ,(YEAR (curdate())- YEAR ( a.Birthday )- 1+ (DATE_FORMAT( a.Birthday, '%m%d' )<=(DATE_FORMAT( curdate(), '%m%d' )))) Age FROM
`RB_MiAi_BaseInfo` AS a LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklist!=1 ) as a where 1=1");
if (where != null)
{
if (where.TenantId > 0)
......@@ -275,7 +361,64 @@ LIMIT {Top} ");
{
sb.AppendFormat(" and a.UserId in({0})", where.UserIds);
}
if (where.Age > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Age)} >={where.Age}");
}
if (where.EndAge > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Age)} <={where.EndAge}");
}
if (where.Height > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Height)} >={where.Height}");
}
if (where.EndHeight > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Height)} <={where.EndHeight}");
}
if (where.Weight > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Weight)} >={where.Weight}");
}
if (where.EndWeight > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Weight)} <={where.EndWeight}");
}
if (where.YearMoney > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.YearMoney)} >={where.YearMoney}");
}
if (where.EndYearMoney > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.YearMoney)} <={where.EndYearMoney}");
}
if (where.CarInfo.HasValue && where.CarInfo.Value > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.CarInfo)} ={(int)where.CarInfo}");
}
if (where.HouseInfo.HasValue && where.HouseInfo.Value > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.HouseInfo)} ={(int)where.HouseInfo}");
}
if (where.Marriage.HasValue && where.Marriage.Value > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.Marriage)} ={(int)where.Marriage}");
}
if (where.EducationType.HasValue && where.EducationType.Value > 0)
{
sb.AppendFormat($@" and a.{nameof(RB_MiaiMember_Extend.EducationType)} ={(int)where.EducationType}");
}
}
sb.AppendFormat($@" ORDER BY a.id LIMIT {Top}");
return Get<RB_MiAi_BaseInfo_Extend>(sb.ToString()).ToList();
}
}
......
This diff is collapsed.
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