Commit a627d3a9 authored by 吴春's avatar 吴春

提交代码

parent b4297c07
using Mall.Common.Enum.GuideCar;
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Mall.Model.Entity.Education
{
/// <summary>
/// 评论/拼拼plus的点赞
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_MiAi_DianZan
{
public int ID { get; set; }
/// <summary>
/// 商户id
/// </summary>
public int TenantId { get; set; }
/// <summary>
/// 小程序id
/// </summary>
public int MallBaseId { get; set; }
/// <summary>
/// 拼拼plusId
/// </summary>
public int ActivityId { get; set; }
public int Status { get; set; }
public DateTime CreateDate { get; set; }
public DateTime UpdateDate { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 拼拼plus评论的id
/// </summary>
public int ActivityDiscussId { get; set; }
}
}
...@@ -107,12 +107,12 @@ namespace Mall.Model.Entity.Miai ...@@ -107,12 +107,12 @@ namespace Mall.Model.Entity.Miai
/// <summary> /// <summary>
/// 活动开始时间 /// 活动开始时间
/// </summary> /// </summary>
public DateTime StartTime { get; set; } public DateTime? StartTime { get; set; }
/// <summary> /// <summary>
/// 活动结束时间 /// 活动结束时间
/// </summary> /// </summary>
public DateTime EndTime { get; set; } public DateTime? EndTime { get; set; }
/// <summary> /// <summary>
/// 男数量 /// 男数量
......
...@@ -92,6 +92,13 @@ namespace Mall.Model.Entity.User ...@@ -92,6 +92,13 @@ namespace Mall.Model.Entity.User
/// </summary> /// </summary>
public MallShopStyleEnum MallShopStyle { get; set; } public MallShopStyleEnum MallShopStyle { get; set; }
/// <summary>
/// 相亲拼拼plus风格 1-卡片,2-列表
/// </summary>
public int MiaiPPPlusStyle { get; set; }
/// <summary> /// <summary>
/// 顶部标题文件颜色类型(0-白色,1-黑色) /// 顶部标题文件颜色类型(0-白色,1-黑色)
/// </summary> /// </summary>
...@@ -112,6 +119,12 @@ namespace Mall.Model.Entity.User ...@@ -112,6 +119,12 @@ namespace Mall.Model.Entity.User
/// </summary> /// </summary>
public string BottomNavBgColor { get; set; } public string BottomNavBgColor { get; set; }
/// <summary>
/// 底部导航栏是否显示图标0-否,1-是
/// </summary>
public int IsShowIcon { get; set; }
/// <summary> /// <summary>
/// 导航底部是否开启阴影效果(0-未开启,1-开启) /// 导航底部是否开启阴影效果(0-未开启,1-开启)
/// </summary> /// </summary>
......
...@@ -3335,7 +3335,7 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -3335,7 +3335,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary> /// </summary>
public class MiAiActivityTypeCusModel public class MiAiActivityTypeCusModel
{ {
/// <summary> /// <summary>
/// 标题 /// 标题
...@@ -3372,6 +3372,154 @@ namespace Mall.Model.Extend.MarketingCenter ...@@ -3372,6 +3372,154 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary>
/// 相亲ppplus (招募贴)插件
/// </summary>
public class blindDatePPPlusItem
{
/// <summary>
/// 显示分类
/// </summary>
public bool showCat { get; set; }
/// <summary>
/// 分类栏位置
/// </summary>
public string catPosition { get; set; }
/// <summary>
/// 分类样式
/// </summary>
public int catStyle { get; set; }
/// <summary>
/// ppplus添加方式【0-自动添加,1-手动添加】
/// </summary>
public int addActivityType { get; set; }
/// <summary>
/// ppplus数量
/// </summary>
public int activityLength { get; set; }
/// <summary>
/// 列表样式[-1-瀑布流模式,0-卡片,]
/// </summary>
public int listStyle { get; set; }
/// <summary>
/// 展示样式
/// </summary>
public int activityStyle { get; set; }
/// <summary>
/// 分类列表
/// </summary>
public List<catActivityItem> catList { get; set; }
/// <summary>
/// 商品列表
/// </summary>
public List<ActivityDetailsItem> list { get; set; }
}
/// <summary>
///相亲ppplus (招募贴)详情项
/// </summary>
public class ActivityDetailsItem
{
/// <summary>
/// 商品编号
/// </summary>
public int id { get; set; }
/// <summary>
/// 商品名称
/// </summary>
public string name { get; set; }
/// <summary>
/// 商品图片
/// </summary>
public string picUrl { get; set; }
/// <summary>
/// 发帖人
/// </summary>
public string CreateBy { get; set; }
/// <summary>
/// 发帖人
/// </summary>
public int CreateById { get; set; }
/// <summary>
/// 发帖人
/// </summary>
public string CreateByIco { get; set; }
/// <summary>
/// 点赞数
/// </summary>
public int DianZanNum { get; set; }
/// <summary>
/// 是否点赞0-否,1-是
/// </summary>
public int IsDianZan { get; set; }
}
/// <summary>
/// 相亲ppplus (招募贴)分类
/// </summary>
public class catActivityItem
{
/// <summary>
/// 分类编号
/// </summary>
public int id { get; set; }
/// <summary>
/// 是否自定义分类0-否,1-是
/// </summary>
public int isCustom { get; set; }
/// <summary>
/// 帖子范围,1-全部帖子,2-用户关注,3-手动关联,1-2只需要填写帖子数量,3-要手动指定活动
/// </summary>
public int range { get; set; }
/// <summary>
/// 商品分类
/// </summary>
public string name { get; set; }
/// <summary>
/// 菜单名称
/// </summary>
public string menuName { get; set; }
/// <summary>
/// 商品数量
/// </summary>
public int goodsNum { get; set; }
/// <summary>
/// 是否显示自定义商品
/// </summary>
public bool staticGoods { get; set; }
/// <summary>
/// 商品列表
/// </summary>
public List<ActivityDetailsItem> goodsList { get; set; }
}
#endregion #endregion
} }
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Education;
namespace Mall.Model.Extend.Miai
{
/// <summary>
/// 拼拼plus的点赞
/// </summary>
public class RB_MiAi_DianZan_Extend : RB_MiAi_DianZan
{
/// <summary>
/// 0-全部,1-拼拼plus的点赞,2-拼拼plus评论的点赞
/// </summary>
public int IsSelectActivity { get; set; }
public string UserName { get; set; }
public string Photo { get; set; }
/// <summary>
/// 活动ids
/// </summary>
public string ActivityIds { get; set; }
/// <summary>
/// 评价ids
/// </summary>
public string ActivityDiscussIds { get; set; }
}
}
...@@ -48,9 +48,19 @@ namespace Mall.Model.Extend.Miai ...@@ -48,9 +48,19 @@ namespace Mall.Model.Extend.Miai
/// </summary> /// </summary>
public int ReplyNum { get; set; } public int ReplyNum { get; set; }
/// <summary>
/// 点赞数
/// </summary>
public int DianZanNum { get; set; }
/// <summary> /// <summary>
/// 图片列表 /// 图片列表
/// </summary> /// </summary>
public List<string> ImageList { get; set; } public List<string> ImageList { get; set; }
/// <summary>
/// 排序
/// </summary>
public int OrderBy { get; set; }
} }
} }
...@@ -43,11 +43,22 @@ namespace Mall.Model.Extend.Miai ...@@ -43,11 +43,22 @@ namespace Mall.Model.Extend.Miai
/// </summary> /// </summary>
public int EnrollNum { get; set; } public int EnrollNum { get; set; }
/// <summary>
/// 点赞数
/// </summary>
public int DianZanNum { get; set; }
/// <summary> /// <summary>
/// 只看可报名 1是 /// 只看可报名 1是
/// </summary> /// </summary>
public int IsSelectEnroll { get; set; } public int IsSelectEnroll { get; set; }
/// <summary>
/// 是否关注 0-否,1-是
/// </summary>
public int IsFollow { get; set; }
/// <summary> /// <summary>
/// 排序 0默认最新 1报名人数倒序 2回复数量倒序 /// 排序 0默认最新 1报名人数倒序 2回复数量倒序
/// </summary> /// </summary>
...@@ -72,5 +83,32 @@ namespace Mall.Model.Extend.Miai ...@@ -72,5 +83,32 @@ namespace Mall.Model.Extend.Miai
/// 标签 /// 标签
/// </summary> /// </summary>
public List<string> LabelList { get; set; } public List<string> LabelList { get; set; }
/// <summary>
/// 热评
/// </summary>
public List<HotComment> HotCommentList { get; set; }
}
/// <summary>
/// 热评
/// </summary>
public class HotComment
{
/// <summary>
/// 点赞数
/// </summary>
public int DianZanNum { get; set; }
/// <summary>
/// 评论内容
/// </summary>
public string Comment { get; set; }
/// <summary>
/// 评论id
/// </summary>
public int CommentId { get; set; }
} }
} }
...@@ -32,6 +32,8 @@ namespace Mall.Model.Extend.User ...@@ -32,6 +32,8 @@ namespace Mall.Model.Extend.User
/// </summary> /// </summary>
public string TenantName { get; set; } public string TenantName { get; set; }
public List<RB_SupplierCommission> SupplierCommissionList { get; set; } public List<RB_SupplierCommission> SupplierCommissionList { get; set; }
} }
} }
...@@ -932,6 +932,8 @@ namespace Mall.Module.MarketingCenter ...@@ -932,6 +932,8 @@ namespace Mall.Module.MarketingCenter
} }
item.data = miAiActivityTypeCustomItem; item.data = miAiActivityTypeCustomItem;
break; break;
//相亲ppplus (招募贴)插件
case "blindDatePPPlus": item.data = JsonHelper.DeserializeObject<blindDatePPPlusItem>(item.data.ToString()); break;
//导航-页面 //导航-页面
case "nav-page": item.data = JsonHelper.DeserializeObject<navPageItem>(item.data.ToString()); break; case "nav-page": item.data = JsonHelper.DeserializeObject<navPageItem>(item.data.ToString()); break;
......
This diff is collapsed.
...@@ -379,6 +379,8 @@ namespace Mall.Module.User ...@@ -379,6 +379,8 @@ namespace Mall.Module.User
{ nameof(RB_MiniProgram_Extend.TopNavBgColor),extModel.TopNavBgColor}, { nameof(RB_MiniProgram_Extend.TopNavBgColor),extModel.TopNavBgColor},
{ nameof(RB_MiniProgram_Extend.BottomNavBgColor),extModel.BottomNavBgColor}, { nameof(RB_MiniProgram_Extend.BottomNavBgColor),extModel.BottomNavBgColor},
{ nameof(RB_MiniProgram_Extend.BottomNavIsShadow),extModel.BottomNavIsShadow}, { nameof(RB_MiniProgram_Extend.BottomNavIsShadow),extModel.BottomNavIsShadow},
{ nameof(RB_MiniProgram_Extend.IsShowIcon),extModel.IsShowIcon},
}; };
flag = programRepository.Update(fileds, new WhereHelper(nameof(RB_MiniProgram_Extend.MallBaseId), extModel.MallBaseId)); flag = programRepository.Update(fileds, new WhereHelper(nameof(RB_MiniProgram_Extend.MallBaseId), extModel.MallBaseId));
} }
...@@ -600,6 +602,24 @@ namespace Mall.Module.User ...@@ -600,6 +602,24 @@ namespace Mall.Module.User
} }
return flag; return flag;
} }
/// <summary>
/// 更新相亲拼拼plus风格
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public bool SetMiaiPPPlusStyle(RB_MiniProgram_Extend extModel)
{
bool flag = false;
if (extModel.MallBaseId > 0)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_MiniProgram_Extend.MiaiPPPlusStyle),extModel.MiaiPPPlusStyle},
};
flag = programRepository.Update(fileds, new WhereHelper(nameof(RB_MiniProgram_Extend.MallBaseId), extModel.MallBaseId));
}
return flag;
}
/// <summary> /// <summary>
/// 修改小程序首页布局 /// 修改小程序首页布局
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mall.Model.Entity.Education;
using Mall.Model.Extend.Miai;
namespace Mall.Repository.Miai
{
public class RB_MiAi_DianZanRepository : BaseRepository<RB_MiAi_DianZan>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_MiAi_DianZan); } }
/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_MiAi_DianZan_Extend> GetDianZanList(RB_MiAi_DianZan_Extend where)
{
StringBuilder sb = new StringBuilder();
sb.Append($@"SELECT a.*,u.Name as UserName,u.Photo from RB_MiAi_DianZan as a
LEFT JOIN rb_member_user as u on a.CreateBy=u.Id 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.CreateBy > 0)
{
sb.AppendFormat(" and a.CreateBy={0}", where.CreateBy);
}
if (where.IsSelectActivity > 0)
{
if (where.IsSelectActivity == 1)
{
sb.AppendFormat(" and a.ActivityId={0} and a.ActivityDiscussId=0", where.ActivityId);
}
else if (where.IsSelectActivity == 2)
{
sb.AppendFormat(" and a.ActivityId={0} and a.ActivityDiscussId={1}", where.ActivityId,where.ActivityDiscussId);
}
}
if (!string.IsNullOrEmpty(where.ActivityIds))
{
sb.AppendFormat($@" and a.{nameof(RB_MiAi_DianZan.ActivityId)} in({where.ActivityIds})");
}
if (where.Status >= 0)
{
sb.AppendFormat($" AND a.{nameof(RB_MiAi_DianZan.Status)}={where.Status}");
}
}
return Get<RB_MiAi_DianZan_Extend>(sb.ToString()).ToList();
}
}
}
...@@ -52,11 +52,12 @@ namespace Mall.Repository.Miai ...@@ -52,11 +52,12 @@ namespace Mall.Repository.Miai
{ {
where += $@" and d.{nameof(RB_Miai_ActivityDiscuss_Extend.ParentId)} =0"; where += $@" and d.{nameof(RB_Miai_ActivityDiscuss_Extend.ParentId)} =0";
} }
string sql = $@"select d.*,u.Name as UserName,u.Photo,u1.Name as ReplyUserName,b.Sex from RB_Miai_ActivityDiscuss d string sql = $@"select d.*,u.Name as UserName,u.Photo,u1.Name as ReplyUserName,b.Sex,IFNULL(dz.DianZanNum,0) as DianZanNum from RB_Miai_ActivityDiscuss d
left join rb_member_user u on d.UserId = u.Id left join rb_member_user u on d.UserId = u.Id
left join rb_member_user u1 on d.ReplyUserId = u1.Id left join rb_member_user u1 on d.ReplyUserId = u1.Id
left join rb_miai_baseinfo b on d.UserId =b.UserId left join rb_miai_baseinfo b on d.UserId =b.UserId
LEFT JOIN (SELECT ActivityDiscussId,COUNT(*) DianZanNum from rb_miai_dianzan where `Status`=0 and ActivityId>0 and ActivityDiscussId>0 GROUP BY ActivityDiscussId) as dz on dz.ActivityDiscussId=d.Id
where {where} order by d.Id desc"; where {where} order by d.Id desc";
return GetPage<RB_Miai_ActivityDiscuss_Extend>(pageIndex, pageSize, out rowCount, sql).ToList(); return GetPage<RB_Miai_ActivityDiscuss_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
} }
...@@ -68,36 +69,41 @@ where {where} order by d.Id desc"; ...@@ -68,36 +69,41 @@ where {where} order by d.Id desc";
/// <returns></returns> /// <returns></returns>
public List<RB_Miai_ActivityDiscuss_Extend> GetList(RB_Miai_ActivityDiscuss_Extend dmodel) public List<RB_Miai_ActivityDiscuss_Extend> GetList(RB_Miai_ActivityDiscuss_Extend dmodel)
{ {
string where = $" 1=1 and {nameof(RB_Miai_ActivityDiscuss_Extend.Status)}=0 "; string where = $" 1=1 and d.{nameof(RB_Miai_ActivityDiscuss_Extend.Status)}=0 ";
if (dmodel.TenantId > 0) if (dmodel.TenantId > 0)
{ {
where += $@" and {nameof(RB_Miai_ActivityDiscuss_Extend.TenantId)}={dmodel.TenantId}"; where += $@" and d.{nameof(RB_Miai_ActivityDiscuss_Extend.TenantId)}={dmodel.TenantId}";
} }
if (dmodel.MallBaseId > 0) if (dmodel.MallBaseId > 0)
{ {
where += $@" and {nameof(RB_Miai_ActivityDiscuss_Extend.MallBaseId)}={dmodel.MallBaseId}"; where += $@" and d.{nameof(RB_Miai_ActivityDiscuss_Extend.MallBaseId)}={dmodel.MallBaseId}";
} }
if (dmodel.ActivityId > 0) if (dmodel.ActivityId > 0)
{ {
where += $@" and {nameof(RB_Miai_ActivityDiscuss_Extend.ActivityId)} ={dmodel.ActivityId}"; where += $@" and d.{nameof(RB_Miai_ActivityDiscuss_Extend.ActivityId)} ={dmodel.ActivityId}";
} }
if (!string.IsNullOrEmpty(dmodel.ActivityIds)) if (!string.IsNullOrEmpty(dmodel.ActivityIds))
{ {
where += $@" and {nameof(RB_Miai_ActivityDiscuss_Extend.ActivityId)} in({dmodel.ActivityIds})"; where += $@" and d.{nameof(RB_Miai_ActivityDiscuss_Extend.ActivityId)} in({dmodel.ActivityIds})";
} }
if (dmodel.UserId > 0) if (dmodel.UserId > 0)
{ {
where += $@" and {nameof(RB_Miai_ActivityDiscuss_Extend.UserId)} ={dmodel.UserId}"; where += $@" and d.{nameof(RB_Miai_ActivityDiscuss_Extend.UserId)} ={dmodel.UserId}";
} }
if (dmodel.Id > 0) if (dmodel.Id > 0)
{ {
where += $@" and {nameof(RB_Miai_ActivityDiscuss_Extend.Id)} ={dmodel.Id}"; where += $@" and d.{nameof(RB_Miai_ActivityDiscuss_Extend.Id)} ={dmodel.Id}";
} }
if (dmodel.ParentId > 0) if (dmodel.ParentId > 0)
{ {
where += $@" and {nameof(RB_Miai_ActivityDiscuss_Extend.ParentId)} ={dmodel.ParentId}"; where += $@" and d.{nameof(RB_Miai_ActivityDiscuss_Extend.ParentId)} ={dmodel.ParentId}";
}
string orderBy = " order by d.Id asc ";
if (dmodel.OrderBy == 1)
{
orderBy = " ORDER BY IFNULL(dz.DianZanNum, 0) desc,d.CreateDate desc";
} }
string sql = $@"select * from RB_Miai_ActivityDiscuss where {where} order by Id asc"; string sql = $@"select d.*,IFNULL(dz.DianZanNum,0) as DianZanNum from RB_Miai_ActivityDiscuss as d LEFT JOIN (SELECT ActivityDiscussId,COUNT(*) DianZanNum from rb_miai_dianzan where `Status`=0 and ActivityId>0 and ActivityDiscussId>0 GROUP BY ActivityDiscussId) as dz on dz.ActivityDiscussId=d.Id where {where} {orderBy}";
return Get<RB_Miai_ActivityDiscuss_Extend>(sql).ToList(); return Get<RB_Miai_ActivityDiscuss_Extend>(sql).ToList();
} }
...@@ -114,9 +120,10 @@ where {where} order by d.Id desc"; ...@@ -114,9 +120,10 @@ where {where} order by d.Id desc";
if (count == 1) if (count == 1)
{ {
//只有一条数据 //只有一条数据
sql = $@"select d.*,u.Name as UserName,u.Photo,u1.Name as ReplyUserName from RB_Miai_ActivityDiscuss d sql = $@"select d.*,u.Name as UserName,u.Photo,u1.Name as ReplyUserName,IFNULL(dz.DianZanNum,0) as DianZanNum from RB_Miai_ActivityDiscuss d
left join rb_member_user u on d.UserId = u.Id left join rb_member_user u on d.UserId = u.Id
left join rb_member_user u1 on d.ReplyUserId = u1.Id left join rb_member_user u1 on d.ReplyUserId = u1.Id
LEFT JOIN (SELECT ActivityDiscussId,COUNT(*) DianZanNum from rb_miai_dianzan where `Status`=0 and ActivityId>0 and ActivityDiscussId>0 GROUP BY ActivityDiscussId) as dz on dz.ActivityDiscussId=d.Id
where d.Status =0 and d.ParentId ={pidsList.FirstOrDefault()} order by d.Id desc limit {number}"; where d.Status =0 and d.ParentId ={pidsList.FirstOrDefault()} order by d.Id desc limit {number}";
} }
else else
...@@ -126,16 +133,18 @@ where d.Status =0 and d.ParentId ={pidsList.FirstOrDefault()} order by d.Id desc ...@@ -126,16 +133,18 @@ where d.Status =0 and d.ParentId ={pidsList.FirstOrDefault()} order by d.Id desc
if (i == count - 1) if (i == count - 1)
{ {
//最后一条 //最后一条
sql += $@"(select d.*,u.Name as UserName,u.Photo,u1.Name as ReplyUserName from RB_Miai_ActivityDiscuss d sql += $@"(select d.*,u.Name as UserName,u.Photo,u1.Name as ReplyUserName,IFNULL(dz.DianZanNum,0) as DianZanNum from RB_Miai_ActivityDiscuss d
left join rb_member_user u on d.UserId = u.Id left join rb_member_user u on d.UserId = u.Id
left join rb_member_user u1 on d.ReplyUserId = u1.Id left join rb_member_user u1 on d.ReplyUserId = u1.Id
LEFT JOIN (SELECT ActivityDiscussId,COUNT(*) DianZanNum from rb_miai_dianzan where `Status`=0 and ActivityId>0 and ActivityDiscussId>0 GROUP BY ActivityDiscussId) as dz on dz.ActivityDiscussId=d.Id
where d.Status =0 and d.ParentId ={pidsList[i]} order by d.Id desc limit {number})"; where d.Status =0 and d.ParentId ={pidsList[i]} order by d.Id desc limit {number})";
} }
else else
{ {
sql += $@"(select d.*,u.Name as UserName,u.Photo,u1.Name as ReplyUserName from RB_Miai_ActivityDiscuss d sql += $@"(select d.*,u.Name as UserName,u.Photo,u1.Name as ReplyUserName,IFNULL(dz.DianZanNum,0) as DianZanNum from RB_Miai_ActivityDiscuss d
left join rb_member_user u on d.UserId = u.Id left join rb_member_user u on d.UserId = u.Id
left join rb_member_user u1 on d.ReplyUserId = u1.Id left join rb_member_user u1 on d.ReplyUserId = u1.Id
LEFT JOIN (SELECT ActivityDiscussId,COUNT(*) DianZanNum from rb_miai_dianzan where `Status`=0 and ActivityId>0 and ActivityDiscussId>0 GROUP BY ActivityDiscussId) as dz on dz.ActivityDiscussId=d.Id
where d.Status =0 and d.ParentId ={pidsList[i]} order by d.Id desc limit {number}) where d.Status =0 and d.ParentId ={pidsList[i]} order by d.Id desc limit {number})
union union
"; ";
......
...@@ -24,17 +24,20 @@ namespace Mall.Repository.Miai ...@@ -24,17 +24,20 @@ namespace Mall.Repository.Miai
public List<RB_Miai_Activity_Extend> GetPageList(int pageIndex, int pageSize, out long rowCount, RB_Miai_Activity_Extend dmodel) public List<RB_Miai_Activity_Extend> GetPageList(int pageIndex, int pageSize, out long rowCount, RB_Miai_Activity_Extend dmodel)
{ {
string where = $" 1=1 and a.{nameof(RB_Miai_Activity_Extend.Status)}=0 "; string where = $" 1=1 and a.{nameof(RB_Miai_Activity_Extend.Status)}=0 ";
if (dmodel.TenantId > 0) { if (dmodel.TenantId > 0)
{
where += $@" and a.{nameof(RB_Miai_Activity_Extend.TenantId)}={dmodel.TenantId}"; where += $@" and a.{nameof(RB_Miai_Activity_Extend.TenantId)}={dmodel.TenantId}";
} }
if (dmodel.MallBaseId > 0) if (dmodel.MallBaseId > 0)
{ {
where += $@" and a.{nameof(RB_Miai_Activity_Extend.MallBaseId)}={dmodel.MallBaseId}"; where += $@" and a.{nameof(RB_Miai_Activity_Extend.MallBaseId)}={dmodel.MallBaseId}";
} }
if (!string.IsNullOrEmpty(dmodel.ActivityTitle)) { if (!string.IsNullOrEmpty(dmodel.ActivityTitle))
{
where += $@" and a.{nameof(RB_Miai_Activity_Extend.ActivityTitle)} like '%{dmodel.ActivityTitle}%'"; where += $@" and a.{nameof(RB_Miai_Activity_Extend.ActivityTitle)} like '%{dmodel.ActivityTitle}%'";
} }
if (dmodel.ForumId > 0) { if (dmodel.ForumId > 0)
{
where += $@" and a.{nameof(RB_Miai_Activity_Extend.ForumId)} ={dmodel.ForumId}"; where += $@" and a.{nameof(RB_Miai_Activity_Extend.ForumId)} ={dmodel.ForumId}";
} }
if (dmodel.UserId > 0) if (dmodel.UserId > 0)
...@@ -49,11 +52,15 @@ namespace Mall.Repository.Miai ...@@ -49,11 +52,15 @@ namespace Mall.Repository.Miai
{ {
where += $@" and a.{nameof(RB_Miai_Activity_Extend.Deadline)} >='{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}'"; where += $@" and a.{nameof(RB_Miai_Activity_Extend.Deadline)} >='{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}'";
} }
string orderBy = " a.Id DESC";
if (dmodel.OrderBy == 1)
{
orderBy = " a.CreateDate DESC";
}
string sql = $@"select a.*,u.Name as UserName,u.Photo,b.Sex from RB_Miai_Activity a string sql = $@"select a.*,u.Name as UserName,u.Photo,b.Sex from RB_Miai_Activity a
left join rb_member_user u on a.UserId =u.Id left join rb_member_user u on a.UserId =u.Id
left join rb_miai_baseinfo b on a.UserId =b.UserId left join rb_miai_baseinfo b on a.UserId =b.UserId
where {where} order by a.Id desc"; where {where} order by {orderBy}";
return GetPage<RB_Miai_Activity_Extend>(pageIndex, pageSize, out rowCount, sql).ToList(); return GetPage<RB_Miai_Activity_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
} }
...@@ -97,7 +104,8 @@ where {where} order by a.Id desc"; ...@@ -97,7 +104,8 @@ where {where} order by a.Id desc";
{ {
orderBy = " e.Number DESC,a.Id DESC"; orderBy = " e.Number DESC,a.Id DESC";
} }
else if (dmodel.OrderBy == 2) { else if (dmodel.OrderBy == 2)
{
orderBy = " r.ReplyNum DESC,a.Id DESC"; orderBy = " r.ReplyNum DESC,a.Id DESC";
} }
...@@ -116,7 +124,7 @@ where {where} order by {orderBy}"; ...@@ -116,7 +124,7 @@ where {where} order by {orderBy}";
/// </summary> /// </summary>
/// <param name="dmodel"></param> /// <param name="dmodel"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Miai_Activity_Extend> GetList(RB_Miai_Activity_Extend dmodel,bool IsAll = false) public List<RB_Miai_Activity_Extend> GetList(RB_Miai_Activity_Extend dmodel, bool IsAll = false)
{ {
string where = $" 1=1 and a.{nameof(RB_Miai_Activity_Extend.Status)}=0 "; string where = $" 1=1 and a.{nameof(RB_Miai_Activity_Extend.Status)}=0 ";
if (IsAll) { where = " 1=1"; } if (IsAll) { where = " 1=1"; }
...@@ -144,11 +152,76 @@ where {where} order by {orderBy}"; ...@@ -144,11 +152,76 @@ where {where} order by {orderBy}";
{ {
where += $@" and a.{nameof(RB_Miai_Activity_Extend.UserId)} ={dmodel.UserId}"; where += $@" and a.{nameof(RB_Miai_Activity_Extend.UserId)} ={dmodel.UserId}";
} }
string sql = $@"select a.*,u.Name as UserName,u.Photo,b.Sex from RB_Miai_Activity a
string orderBy = " a.Id DESC";
if (dmodel.OrderBy == 1)
{
orderBy = " a.CreateDate DESC";
}
string sql = $@"select a.*,u.Name as UserName,u.Photo,b.Sex,IFNULL(d.DianZanNum,0) as DianZanNum from RB_Miai_Activity a
left join rb_member_user u on a.UserId =u.Id left join rb_member_user u on a.UserId =u.Id
left join rb_miai_baseinfo b on a.UserId =b.UserId left join rb_miai_baseinfo b on a.UserId =b.UserId
where {where} order by a.Id desc"; LEFT JOIN (SELECT ActivityId,COUNT(*) DianZanNum from rb_miai_dianzan where `Status`=0 and ActivityId>0 and ActivityDiscussId=0 GROUP BY ActivityId) as d on d.ActivityId=a.Id
where {where} order by {orderBy}";
return Get<RB_Miai_Activity_Extend>(sql).ToList(); return Get<RB_Miai_Activity_Extend>(sql).ToList();
} }
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public List<RB_Miai_Activity_Extend> GetPageList_V3(int pageIndex, int pageSize, out long rowCount, RB_Miai_Activity_Extend dmodel)
{
string where = $" 1=1 and a.{nameof(RB_Miai_Activity_Extend.Status)}=0 ";
if (dmodel.TenantId > 0)
{
where += $@" and a.{nameof(RB_Miai_Activity_Extend.TenantId)}={dmodel.TenantId}";
}
if (dmodel.MallBaseId > 0)
{
where += $@" and a.{nameof(RB_Miai_Activity_Extend.MallBaseId)}={dmodel.MallBaseId}";
}
if (!string.IsNullOrEmpty(dmodel.ActivityTitle))
{
where += $@" and a.{nameof(RB_Miai_Activity_Extend.ActivityTitle)} like '%{dmodel.ActivityTitle}%'";
}
if (dmodel.ForumId > 0)
{
where += $@" and a.{nameof(RB_Miai_Activity_Extend.ForumId)} ={dmodel.ForumId}";
}
if (dmodel.IsFollow == 1)
{
if (dmodel.UserId > 0)
{
where += $@" and f.CreateBy ={dmodel.UserId}";
}
}
if (dmodel.Id > 0)
{
where += $@" and a.{nameof(RB_Miai_Activity_Extend.Id)} ={dmodel.Id}";
}
if (dmodel.IsSelectEnroll == 1)
{
where += $@" and a.{nameof(RB_Miai_Activity_Extend.Deadline)} >='{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}'";
}
string orderBy = " a.Id DESC";
if (dmodel.OrderBy == 1)
{
orderBy = " a.CreateDate DESC";
}
string sql = $@"select a.*,u.Name as UserName,u.Photo,b.Sex,IFNULL(d.DianZanNum,0) as DianZanNum from RB_Miai_Activity a
left join rb_member_user u on a.UserId =u.Id
left join rb_miai_baseinfo b on a.UserId =b.UserId
LEFT JOIN rb_miai_followmember f on f.UserId=a.UserId
LEFT JOIN (SELECT ActivityId,COUNT(*) DianZanNum from rb_miai_dianzan where `Status`=0 and ActivityId>0 and ActivityDiscussId=0 GROUP BY ActivityId) as d on d.ActivityId=a.Id
where {where} order by {orderBy}";
return GetPage<RB_Miai_Activity_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
}
} }
} }
...@@ -1763,7 +1763,7 @@ where {where} group by g.Id order by col.Id desc"; ...@@ -1763,7 +1763,7 @@ where {where} group by g.Id order by col.Id desc";
string sql = $@"select IFNULL(synchro.Isynchro,0) as Isynchro,g.*,s.`Name` as SupplierName from RB_Goods g string sql = $@"select IFNULL(synchro.Isynchro,0) as Isynchro,g.*,s.`Name` as SupplierName from RB_Goods g
inner join rb_goods_category c on g.Id=c.GoodsId inner join rb_goods_category c on g.Id=c.GoodsId
LEFT JOIN rb_supplier as s on g.SupplierId=s.ID LEFT JOIN rb_tenant as s on g.TenantId=s.TenantId
LEFT JOIN (SELECT SourceGoodsId,COUNT(*) as Isynchro from RB_Goods where SourceGoodsId>0 {sourceWhere} GROUP BY SourceGoodsId ) as LEFT JOIN (SELECT SourceGoodsId,COUNT(*) as Isynchro from RB_Goods where SourceGoodsId>0 {sourceWhere} GROUP BY SourceGoodsId ) as
synchro on synchro.SourceGoodsId=g.Id synchro on synchro.SourceGoodsId=g.Id
where {where} group by g.Id order by {orderBy}"; where {where} group by g.Id order by {orderBy}";
......
...@@ -356,6 +356,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -356,6 +356,8 @@ namespace Mall.WebApi.Controllers.MallBase
top_text_color = miniProgram.TopNavWordColor, top_text_color = miniProgram.TopNavWordColor,
//导航底部是否开启阴影效果(0-未开启,1-开启) //导航底部是否开启阴影效果(0-未开启,1-开启)
shadow = miniProgram.BottomNavIsShadow, shadow = miniProgram.BottomNavIsShadow,
//底部导航栏是否显示图标0-否,1-是
isShowIcon = miniProgram.IsShowIcon,
//导航栏 //导航栏
navs = navList, navs = navList,
}; };
......
This diff is collapsed.
...@@ -144,8 +144,9 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -144,8 +144,9 @@ namespace Mall.WebApi.Controllers.MallBase
x.EnrollNum, x.EnrollNum,
x.IsOpenEnroll, x.IsOpenEnroll,
x.Label, x.Label,
StartTime = x.StartTime.ToString("yyyy-MM-dd HH:mm"), StartTime = x.StartTime.HasValue ? x.StartTime.Value.ToString("yyyy-MM-dd HH:mm") : "",
EndTime = x.EndTime.ToString("yyyy-MM-dd HH:mm"), EndTime = x.EndTime.HasValue ? x.EndTime.Value.ToString("yyyy-MM-dd HH:mm") : "",
IsTieZi = (x.IsOpenEnroll == 2 && x.ManNum == 0 && x.WoManNum == 0 && x.Distinguish == 1 && !x.StartTime.HasValue && !x.EndTime.HasValue) ? 1 : 0,
x.ManNum, x.ManNum,
x.WoManNum, x.WoManNum,
x.LonLat, x.LonLat,
...@@ -156,6 +157,47 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -156,6 +157,47 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.Success("", pagelist); return ApiResult.Success("", pagelist);
} }
/// <summary>
/// 获取活动分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetActivityDianZanPageList()
{
var parms = RequestParm;
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
RB_Miai_Activity_Extend demodel = JsonConvert.DeserializeObject<RB_Miai_Activity_Extend>(parms.msg.ToString());
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
var list = miaiModule.GetActivityPageList_V3(pagelist.pageIndex, pagelist.pageSize, out long count, demodel);
pagelist.count = Convert.ToInt32(count);
pagelist.pageData = list.Select(x => new
{
x.Id,
x.ActivityTitle,
x.UserId,
x.UserName,
x.Photo,
x.Content,
x.ImageList,
x.ReplyNum,
x.EnrollNum,
x.IsOpenEnroll,
x.Label,
StartTime = x.StartTime.HasValue ? x.StartTime.Value.ToString("yyyy-MM-dd HH:mm") : "",
EndTime = x.EndTime.HasValue ? x.EndTime.Value.ToString("yyyy-MM-dd HH:mm") : "",
x.ManNum,
x.WoManNum,
x.LonLat,
x.LocationName,
x.DianZanNum,
Deadline = x.IsOpenEnroll == 1 ? x.Deadline.Value.ToString("yyyy-MM-dd HH:mm") : "",
CreateDate = x.CreateDate.ToString("yyyy-MM-dd HH:mm:ss")
});
return ApiResult.Success("", pagelist);
}
/// <summary> /// <summary>
/// 获取活动信息(包含报名人数) /// 获取活动信息(包含报名人数)
/// </summary> /// </summary>
...@@ -1003,7 +1045,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1003,7 +1045,7 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.Success("", new return ApiResult.Success("", new
{ {
model.Id, model.Id,
WechatNo = oldBaseInfo.WechatNo??"", WechatNo = oldBaseInfo.WechatNo ?? "",
Photo = model.Photo ?? "", Photo = model.Photo ?? "",
model.Name, model.Name,
model.AliasName, model.AliasName,
......
...@@ -3170,6 +3170,9 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -3170,6 +3170,9 @@ namespace Mall.WebApi.Controllers.MallBase
var newGoodsList = new List<RB_Goods_Extend>(); var newGoodsList = new List<RB_Goods_Extend>();
foreach (var item in goodsList) foreach (var item in goodsList)
{ {
int TenantId = item.TenantId;
int MallBaseId = item.MallBaseId;
RB_Goods_Extend model = new RB_Goods_Extend(); RB_Goods_Extend model = new RB_Goods_Extend();
item.IsDefaultService = 1; item.IsDefaultService = 1;
item.IsAreaBuy = 2; item.IsAreaBuy = 2;
...@@ -3211,10 +3214,11 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -3211,10 +3214,11 @@ namespace Mall.WebApi.Controllers.MallBase
item.SpecificationPriceList.ForEach(x => x.CreateDate = System.DateTime.Now); item.SpecificationPriceList.ForEach(x => x.CreateDate = System.DateTime.Now);
item.SpecificationPriceList.ForEach(x => x.MallBaseId = RequestParm.MallBaseId); item.SpecificationPriceList.ForEach(x => x.MallBaseId = RequestParm.MallBaseId);
model = item; model = item;
model.SourceTenantId = TenantId;
model.SourceMallBaseId = MallBaseId;
model.TenantId = RequestParm.TenantId; model.TenantId = RequestParm.TenantId;
model.MallBaseId = RequestParm.MallBaseId; model.MallBaseId = RequestParm.MallBaseId;
model.SourceTenantId = item.TenantId;
model.SourceMallBaseId = item.MallBaseId;
model.SourceGoodsId = item.Id; model.SourceGoodsId = item.Id;
model.RetailStore = 0; model.RetailStore = 0;
model.Id = 0; model.Id = 0;
......
...@@ -421,6 +421,25 @@ namespace Mall.WebApi.Controllers.User ...@@ -421,6 +421,25 @@ namespace Mall.WebApi.Controllers.User
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
/// <summary>
/// 更新相亲拼拼plus风格
/// </summary>
/// <returns></returns>
public ApiResult SetMiaiPPPlusStyle()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var MallBaseId = parms.GetInt("MallBaseId", 0);
int MiaiPPPlusStyle = parms.GetInt("MiaiPPPlusStyle");
var extModel = new RB_MiniProgram_Extend()
{
MallBaseId = MallBaseId,
MiaiPPPlusStyle = MiaiPPPlusStyle
};
var flag = programModule.SetMiaiPPPlusStyle(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary> /// <summary>
/// 新增修改底部导航 /// 新增修改底部导航
/// </summary> /// </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