Commit 51d6ff89 authored by 吴春's avatar 吴春

提交代码

parent 542d91eb
...@@ -141,6 +141,11 @@ namespace Mall.Model.Entity.TradePavilion ...@@ -141,6 +141,11 @@ namespace Mall.Model.Entity.TradePavilion
public string Other { get; set; } public string Other { get; set; }
/// <summary>
/// 店铺开口尺寸(0-否1-有)
/// </summary>
public int IsShopSize { get; set; }
/// <summary> /// <summary>
/// 店铺开口尺寸 /// 店铺开口尺寸
/// </summary> /// </summary>
...@@ -164,17 +169,30 @@ namespace Mall.Model.Entity.TradePavilion ...@@ -164,17 +169,30 @@ namespace Mall.Model.Entity.TradePavilion
/// 燃气(0-否1-有) /// 燃气(0-否1-有)
/// </summary> /// </summary>
public int RanQi { get; set; } public int RanQi { get; set; }
/// <summary>
/// 燃气备注
/// </summary>
public string RanQiBZ { get; set; }
/// <summary> /// <summary>
/// 电量 /// 电量
/// </summary> /// </summary>
public string DianLiang { get; set; } public string DianLiang { get; set; }
/// <summary>
/// /电量(0-否1-有)
/// </summary>
public int IsDianLiang { get; set; }
/// <summary> /// <summary>
/// 排烟量(0-否1-有) /// 排烟量(0-否1-有)
/// </summary> /// </summary>
public int PaiYan { get; set; } public int PaiYan { get; set; }
/// <summary>
/// 排烟量
/// </summary>
public string PaiYanBZ { get; set; }
/// <summary> /// <summary>
/// 空调(0-否1-有) /// 空调(0-否1-有)
/// </summary> /// </summary>
......
...@@ -31,10 +31,16 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -31,10 +31,16 @@ namespace Mall.Model.Extend.TradePavilion
/// <summary> /// <summary>
/// 用户名称 /// 用户名称
/// </summary> /// </summary>
public string CreateName{ get; set; } public string CreateName { get; set; }
/// <summary> /// <summary>
/// 用户头像 /// 用户头像
/// </summary> /// </summary>
public string CreatePhoto { get; set; } public string CreatePhoto { get; set; }
/// <summary>
/// 多个ids
/// </summary>
public string Ids { get; set; }
} }
} }
...@@ -119,12 +119,26 @@ namespace Mall.Module.TradePavilion ...@@ -119,12 +119,26 @@ namespace Mall.Module.TradePavilion
return list; return list;
} }
/// <summary> /// <summary>
/// 获取认证详情 /// 列表
/// </summary> /// </summary>
/// <param name="authenticationId"></param> /// <param name="query">查询条件</param>
/// <returns></returns> /// <returns></returns>
public RB_Authentication_Extend GetAuthenticationInfo(int authenticationId) public List<RB_Authentication_Extend> GetAuthenticationList(RB_Authentication_Extend query)
{
var list= authenticationRepository.GetList(query);
list.ForEach(x => x.ImageList = (!string.IsNullOrEmpty(x.Images) && x.Images != "[]") ? JsonConvert.DeserializeObject<List<string>>(x.Images) : new List<string>());
return list;
}
/// <summary>
/// 获取认证详情
/// </summary>
/// <param name="authenticationId"></param>
/// <returns></returns>
public RB_Authentication_Extend GetAuthenticationInfo(int authenticationId)
{ {
var model = authenticationRepository.GetEntity<RB_Authentication_Extend>(authenticationId); var model = authenticationRepository.GetEntity<RB_Authentication_Extend>(authenticationId);
if (model == null) { return null; } if (model == null) { return null; }
...@@ -185,5 +199,30 @@ namespace Mall.Module.TradePavilion ...@@ -185,5 +199,30 @@ namespace Mall.Module.TradePavilion
}; };
return authenticationRepository.Update(keyValues, wheres); return authenticationRepository.Update(keyValues, wheres);
} }
/// <summary>
/// 审核
/// </summary>
/// <param name="authenticationId"></param>
/// <param name="auditState"></param>
/// <param name="auditRemark"></param>
/// <returns></returns>
public bool BatchAuthenticationAudit(string authenticationIds, int auditState, string auditRemark)
{
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Authentication_Extend.AuditState),auditState},
{ nameof(RB_Authentication_Extend.AuditRemark),auditRemark},
{ nameof(RB_Authentication_Extend.AuditDate),DateTime.Now},
};
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Authentication_Extend.Id),
FiledValue=authenticationIds,
OperatorEnum=OperatorEnum.IN
}
};
return authenticationRepository.Update(keyValues, wheres);
}
} }
} }
...@@ -365,6 +365,10 @@ namespace Mall.Module.TradePavilion ...@@ -365,6 +365,10 @@ namespace Mall.Module.TradePavilion
{nameof(RB_Brand_Extend.KongTiao),model.KongTiao }, {nameof(RB_Brand_Extend.KongTiao),model.KongTiao },
{nameof(RB_Brand_Extend.XinFeng),model.XinFeng }, {nameof(RB_Brand_Extend.XinFeng),model.XinFeng },
{nameof(RB_Brand_Extend.BrandClassId),model.BrandClassId }, {nameof(RB_Brand_Extend.BrandClassId),model.BrandClassId },
{nameof(RB_Brand_Extend.RanQiBZ),model.RanQiBZ },
{nameof(RB_Brand_Extend.IsDianLiang),model.IsDianLiang },
{nameof(RB_Brand_Extend. PaiYanBZ),model. PaiYanBZ },
{nameof(RB_Brand_Extend.IsShopSize),model.IsShopSize },
}; };
return brandRepository.Update(fileds, new WhereHelper(nameof(RB_Brand_Extend.ID), model.ID)); return brandRepository.Update(fileds, new WhereHelper(nameof(RB_Brand_Extend.ID), model.ID));
} }
......
...@@ -107,6 +107,10 @@ namespace Mall.Repository.TradePavilion ...@@ -107,6 +107,10 @@ namespace Mall.Repository.TradePavilion
{ {
builder.Append($" AND {nameof(RB_Authentication_Extend.MallBaseId)}={query.MallBaseId}"); builder.Append($" AND {nameof(RB_Authentication_Extend.MallBaseId)}={query.MallBaseId}");
} }
if (!string.IsNullOrWhiteSpace(query.Ids))
{
builder.Append($" AND {nameof(RB_Authentication_Extend.Id)} in({query.Ids})");
}
if (query.Type > 0) if (query.Type > 0)
{ {
builder.Append($" AND {nameof(RB_Authentication_Extend.Type)}={(int)query.Type}"); builder.Append($" AND {nameof(RB_Authentication_Extend.Type)}={(int)query.Type}");
......
...@@ -977,6 +977,66 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -977,6 +977,66 @@ namespace Mall.WebApi.Controllers.TradePavilion
} }
} }
/// <summary>
/// 批量认证审核
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult BatchAuthenticationAudit()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var userInfo = this.UserInfo;
string AuthenticationIds = parms.GetStringValue("AuthenticationIds");
int AuditState = parms.GetInt("AuditState", 0);//审核状态 2审核通过 3审核不通过
string AuditRemark = parms.GetStringValue("AuditRemark");
if (string.IsNullOrWhiteSpace(AuthenticationIds))
{
return ApiResult.ParamIsNull("请传递认证id");
}
if (AuditState != 2 && AuditState != 3)
{
return ApiResult.Failed("状态有误");
}
var list = authenticationModule.GetAuthenticationList(new RB_Authentication_Extend { TenantId = userInfo.TenantId, MallBaseId = userInfo.MallBaseId, Ids = AuthenticationIds });
if (list == null || !list.Any())
{
return ApiResult.Failed("请传入正确的id");
}
if (list.Any(x => x.AuditState > 1))
{
return ApiResult.Failed("已审核的不能重复审核");
}
bool flag = authenticationModule.BatchAuthenticationAudit(AuthenticationIds, AuditState, AuditRemark);
if (flag)
{
//查询用户的信息
string uids = string.Join(",", list.Select(x=>x.CreateBy));
var memberList = userModule.GetMemberUserList(new Model.Extend.User.RB_Member_User_Extend { TenantId = userInfo.TenantId, MallBaseId = userInfo.MallBaseId ,UserIds= uids });
if (memberList != null && memberList.Any())
{
List<string> openidList = new List<string>();
foreach (var item in memberList)
{
if (!string.IsNullOrWhiteSpace(item.OpenId))
{
openidList.Add(item.OpenId);
}
}
if (openidList!=null&& openidList.Any())
{
new Module.User.MiniProgramMsgModule().SendHatchExamineMsg(userInfo.TenantId, userInfo.MallBaseId, openidList, AuditState == 2 ? "认证通过" : "认证失败", "首店认证结果通知", System.DateTime.Now.ToString("yyyy年MM月dd日 HH:mm"));
}
}
return ApiResult.Success();
}
else
{
return ApiResult.Failed();
}
}
#endregion #endregion
#region 载体信息 #region 载体信息
...@@ -1063,7 +1123,7 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -1063,7 +1123,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
{ {
return ApiResult.Failed("请输入载体名称"); return ApiResult.Failed("请输入载体名称");
} }
if (string.IsNullOrWhiteSpace(query.Developers)) if (string.IsNullOrWhiteSpace(query.Developers))
{ {
return ApiResult.Failed("请输入开发商"); return ApiResult.Failed("请输入开发商");
......
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