Commit 2ff426a5 authored by 吴春's avatar 吴春

1

parent 52a00788
...@@ -591,11 +591,11 @@ namespace Mall.Module.TradePavilion ...@@ -591,11 +591,11 @@ namespace Mall.Module.TradePavilion
if (flag) if (flag)
{ {
//更新认证表 资料状态为完成 //更新认证表 资料状态为完成
Dictionary<string, object> keyValues = new Dictionary<string, object>() Dictionary<string, object> keyValues = new Dictionary<string, object>()
{ {
{ nameof(RB_CompanyEnterprise_Extend.IsComplete),1} { nameof(RB_CompanyEnterprise_Extend.IsComplete),1}
}; };
List<WhereHelper> wheres = new List<WhereHelper>() List<WhereHelper> wheres = new List<WhereHelper>()
{ {
new WhereHelper() new WhereHelper()
{ {
...@@ -796,8 +796,8 @@ namespace Mall.Module.TradePavilion ...@@ -796,8 +796,8 @@ namespace Mall.Module.TradePavilion
//审核通过了的 直接查询资料表 //审核通过了的 直接查询资料表
var blist = brand_EnterpriseRepository.GetBrandEnterpriseListRepository(new RB_Brand_Enterprise_Extend() { TenantId = model.TenantId, MallBaseId = model.MallBaseId, UserId = userId }); var blist = brand_EnterpriseRepository.GetBrandEnterpriseListRepository(new RB_Brand_Enterprise_Extend() { TenantId = model.TenantId, MallBaseId = model.MallBaseId, UserId = userId });
model.BrandModel = blist.FirstOrDefault().RefMapperTo<RB_BrandEnterpriseApplyFor_Extend>(); model.BrandModel = blist.FirstOrDefault().RefMapperTo<RB_BrandEnterpriseApplyFor_Extend>();
model.BrandModel.BrandClassId = blist?.FirstOrDefault()?.CategoryId??0; model.BrandModel.BrandClassId = blist?.FirstOrDefault()?.CategoryId ?? 0;
model.BrandModel.ClassName = blist?.FirstOrDefault()?.CategoryName??""; model.BrandModel.ClassName = blist?.FirstOrDefault()?.CategoryName ?? "";
if (model.BrandModel != null) if (model.BrandModel != null)
{ {
if (!string.IsNullOrWhiteSpace(model.BrandModel.CustomerType)) if (!string.IsNullOrWhiteSpace(model.BrandModel.CustomerType))
...@@ -823,11 +823,11 @@ namespace Mall.Module.TradePavilion ...@@ -823,11 +823,11 @@ namespace Mall.Module.TradePavilion
{ {
model.BrandModel.PropertyDemandList = Common.ConvertHelper.ConvertToListString(model.BrandModel.PropertyDemand); model.BrandModel.PropertyDemandList = Common.ConvertHelper.ConvertToListString(model.BrandModel.PropertyDemand);
} }
catch(Exception ex) catch (Exception ex)
{ {
Common.Plugin.LogHelper.Write(ex, "GetCompanyByUserIdModule_Brand_PropertyDemandList"); Common.Plugin.LogHelper.Write(ex, "GetCompanyByUserIdModule_Brand_PropertyDemandList");
} }
//Common.ConvertHelper.ConvertToListString(model.BrandModel.PropertyDemand); //Common.ConvertHelper.ConvertToListString(model.BrandModel.PropertyDemand);
} }
else else
{ {
...@@ -1219,7 +1219,7 @@ namespace Mall.Module.TradePavilion ...@@ -1219,7 +1219,7 @@ namespace Mall.Module.TradePavilion
if (!string.IsNullOrWhiteSpace(model.BrandModel.PropertyDemand)) if (!string.IsNullOrWhiteSpace(model.BrandModel.PropertyDemand))
{ {
model.BrandModel.PropertyDemandList = Common.ConvertHelper.ConvertToListString(model.BrandModel.PropertyDemand); model.BrandModel.PropertyDemandList = Common.ConvertHelper.ConvertToListString(model.BrandModel.PropertyDemand);
//JsonConvert.DeserializeObject<List<string>>(model.BrandModel.PropertyDemand); //JsonConvert.DeserializeObject<List<string>>(model.BrandModel.PropertyDemand);
} }
else else
{ {
...@@ -1298,13 +1298,49 @@ namespace Mall.Module.TradePavilion ...@@ -1298,13 +1298,49 @@ namespace Mall.Module.TradePavilion
/// <param name="CompanyId"></param> /// <param name="CompanyId"></param>
/// <param name="Status"></param> /// <param name="Status"></param>
/// <returns></returns> /// <returns></returns>
public bool RemoveCompanyModule(int CompanyId, int Status) public bool RemoveCompanyModule(int CompanyId, int Status, RB_CompanyEnterprise_Extend model = null)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_CompanyEnterprise_Extend.Status),Status }, {nameof(RB_CompanyEnterprise_Extend.Status),Status },
}; };
bool flag = companyEnterpriseRepository.Update(fileds, new WhereHelper(nameof(RB_CompanyEnterprise_Extend.CompanyId), CompanyId)); bool flag = companyEnterpriseRepository.Update(fileds, new WhereHelper(nameof(RB_CompanyEnterprise_Extend.CompanyId), CompanyId));
if (model != null && model.CompanyId > 0 && Status == 1 && flag)
{
if (model.FirstShopType == 1 && (model?.BrandModel?.ID ?? 0) > 0)
{
Dictionary<string, object> filedsC = new Dictionary<string, object>()
{
{nameof(RB_BrandEnterpriseApplyFor.Status),Status },
};
brandEnterpriseApplyForRepository.Update(fileds, new WhereHelper(nameof(RB_BrandEnterpriseApplyFor.ID), model.BrandModel.ID));
}
else if (model.FirstShopType == 2 && (model?.CarrierModel?.ID ?? 0) > 0)
{
Dictionary<string, object> filedsC = new Dictionary<string, object>()
{
{nameof(RB_CarrierEnterpriseApplyFor.Status),Status },
};
carrierEnterpriseApplyForRepository.Update(fileds, new WhereHelper(nameof(RB_CarrierEnterpriseApplyFor.ID), model.CarrierModel.ID));
}
else if (model.FirstShopType == 3 && (model?.EnterpriseServicesModel?.ID ?? 0) > 0)
{
Dictionary<string, object> filedsC = new Dictionary<string, object>()
{
{nameof(RB_EnterpriseServicesApply.Status),Status },
};
enterpriseServicesApplyRepository.Update(fileds, new WhereHelper(nameof(RB_EnterpriseServicesApply.ID), model.EnterpriseServicesModel.ID));
}
else if (model.FirstShopType == 4 && (model?.buildingApplyForModel?.ID ?? 0) > 0)
{
Dictionary<string, object> filedsC = new Dictionary<string, object>()
{
{nameof(RB_BuildingApplyFor.Status),Status },
};
buildingApplyForRepository.Update(fileds, new WhereHelper(nameof(RB_BuildingApplyFor.ID), model.buildingApplyForModel.ID));
}
}
return flag; return flag;
} }
......
...@@ -4128,6 +4128,34 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -4128,6 +4128,34 @@ namespace Mall.WebApi.Controllers.TradePavilion
} }
return msg == "" ? ApiResult.Success() : ApiResult.Failed(msg); return msg == "" ? ApiResult.Success() : ApiResult.Failed(msg);
} }
/// <summary>
/// 删除公司信息
/// </summary>
/// <returns></returns>
public ApiResult RemoveCompanyEnterprise()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var CompanyId = parms.GetInt("CompanyId", 0);
var userInfo = AppletUserInfo;
var model = buildingCarrierModule.GetCompanyModule(CompanyId);
if ((model?.CompanyId ?? 0) == 0)
{
return ApiResult.Failed("公司信息不存在");
}
if (model.CreateBy != userInfo.UserId)
{
return ApiResult.Failed("公司信息不存在");
}
if (model.CompanyStatus != 2)
{
return ApiResult.Failed("公司信息" + (model.CompanyStatus == 1 ? "已审核通过" : "审核中") + ",请勿删除");
}
var flag = buildingCarrierModule.RemoveCompanyModule(model.CompanyId, 1,model);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion #endregion
......
...@@ -4577,7 +4577,8 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -4577,7 +4577,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
JObject parms = JObject.Parse(RequestParm.msg.ToString()); JObject parms = JObject.Parse(RequestParm.msg.ToString());
var CompanyId = parms.GetInt("CompanyId", 0); var CompanyId = parms.GetInt("CompanyId", 0);
var Status = parms.GetInt("Status", 0); var Status = parms.GetInt("Status", 0);
var flag = buildingCarrierModule.RemoveCompanyModule(CompanyId, Status); var model = buildingCarrierModule.GetCompanyModule(CompanyId);
var flag = buildingCarrierModule.RemoveCompanyModule(CompanyId, Status, model);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : 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