Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
0915a9d1
Commit
0915a9d1
authored
Dec 13, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
4935a06b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
166 additions
and
222 deletions
+166
-222
BuildingCarrierModule_V2.cs
Mall.Module.TradePavilion/BuildingCarrierModule_V2.cs
+166
-222
No files found.
Mall.Module.TradePavilion/BuildingCarrierModule_V2.cs
View file @
0915a9d1
...
...
@@ -5,6 +5,7 @@ using Mall.Common.Enum;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Module.TradePavilion
;
using
Mall.Module.User
;
using
Mall.Repository.TradePavilion
;
using
Newtonsoft.Json
;
...
...
@@ -1320,11 +1321,13 @@ namespace Mall.Module.TradePavilion
{
fileds
.
Add
(
nameof
(
RB_CompanyEnterprise_Extend
.
RejectRemark
),
remark
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_CompanyEnterprise_Extend
.
CompanyId
),
FiledValue
=
CompanyId
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
CompanyId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
companyEnterpriseRepository
.
Update
(
fileds
,
wheres
,
trans
);
...
...
@@ -1334,71 +1337,48 @@ namespace Mall.Module.TradePavilion
if
(
Status
==
1
)
{
var
cmodel
=
companyEnterpriseRepository
.
GetEntity
(
CompanyId
);
//消费品牌
if
(
cmodel
.
FirstShopType
==
1
)
{
//品牌
var
brandList
=
brandEnterpriseApplyForRepository
.
GetCarrierEnterpriseApplyForRepository
(
new
RB_BrandEnterpriseApplyFor_Extend
{
MallBaseId
=
cmodel
.
MallBaseId
,
CompanyId
=
cmodel
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
{
var
BrandModel
=
brandList
.
FirstOrDefault
();
var
brandEnterpriseModel
=
new
RB_Brand_Enterprise_Extend
()
{
};
if
(
BrandModel
.
ExistBrandId
>
0
)
{
//修改
#
region
验证品牌是否已关联用户
//var bmodel = brand2Repository.GetEntity(BrandModel.ExistBrandId);
//if (bmodel.UserId > 0)
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌已被其他用户认证,请核实后再试";
//}
#
endregion
Dictionary
<
string
,
object
>
filedsBrand
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Brand_Enterprise_Extend
.
BrandName
),
BrandModel
.
BrandName
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
FullBrandName
),
BrandModel
.
FullBrandName
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
VideoUrl
),
BrandModel
.
VideoUrl
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Logo
),
BrandModel
.
Logo
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Banner
),
BrandModel
.
Banner
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
ShopNum
),
BrandModel
.
ShopNum
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
BuiltUpArea
),
BrandModel
.
BuiltUpArea
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
EndBuiltUpArea
),
BrandModel
.
EndBuiltUpArea
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
BrandType
),
BrandModel
.
BrandType
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
CustomerType
),
BrandModel
.
CustomerType
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
AreaRequirement
),
BrandModel
.
AreaRequirement
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
EndAreaRequirement
),
BrandModel
.
EndAreaRequirement
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
CategoryId
),
BrandModel
.
BrandClassId
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
BrandEnterpriseType
),
BrandModel
.
BrandEnterpriseType
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Introduce
),
BrandModel
.
Introduce
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
DevIntention
),
BrandModel
.
DevIntention
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
PropertyDemand
),
BrandModel
.
PropertyDemand
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Cooperation
),
BrandModel
.
Cooperation
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Complementary
),
BrandModel
.
Complementary
},
{
{
nameof
(
RB_Brand_Enterprise_Extend
.
FullBrandName
),
BrandModel
.
FullBrandName
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
BrandName
),
BrandModel
.
BrandName
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
VideoUrl
),
BrandModel
.
VideoUrl
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Logo
),
BrandModel
.
Logo
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Banner
),
BrandModel
.
Banner
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
CategoryId
),
BrandModel
.
BrandClassId
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Introduce
),
BrandModel
.
Introduce
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
ShopNum
),
BrandModel
.
ShopNum
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
AreaRequirement
),
BrandModel
.
ShopNum
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
CustomerType
),
BrandModel
.
CustomerType
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
BrandType
),
BrandModel
.
BrandType
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Cooperation
),
BrandModel
.
Cooperation
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
PropertyDemand
),
BrandModel
.
PropertyDemand
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
Complementary
),
BrandModel
.
Complementary
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
ContactName
),
BrandModel
.
ContactName
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
ContactPhone
),
BrandModel
.
ContactPhone
},
{
nameof
(
RB_Brand_Enterprise_Extend
.
BrandEnterpriseType
),
BrandModel
.
BrandEnterpriseType
},
};
brand_EnterpriseRepository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_Brand_Enterprise_Extend
.
ID
),
BrandModel
.
ExistBrandId
),
trans
);
}
else
{
//新增
#
region
再次验证品牌名称
//if (ValidateBrandName(BrandModel.BrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌名称已存在,请确认品牌名称后再次审核";
//}
//if (ValidateFullBrandName(BrandModel.FullBrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌全名已存在,请确认品牌全名后再次审核";
//}
#
endregion
#
region
新增品牌
var
inserBModel
=
BrandModel
.
RefMapperTo
<
RB_Brand_Enterprise_Extend
>();
inserBModel
.
ID
=
0
;
inserBModel
.
CategoryId
=
BrandModel
.
BrandClassId
;
inserBModel
.
UserId
=
cmodel
.
CreateBy
;
brand_EnterpriseRepository
.
Insert
(
inserBModel
,
trans
);
#
endregion
}
}
}
...
...
@@ -1409,59 +1389,87 @@ namespace Mall.Module.TradePavilion
if
(
carrierList
!=
null
&&
carrierList
.
Any
())
{
var
CarrierModel
=
carrierList
.
FirstOrDefault
();
int
OpeningStatus
=
0
;
if
(
CarrierModel
.
OpenTime
.
HasValue
)
{
if
(
CarrierModel
.
OpenTime
.
Value
<=
System
.
DateTime
.
Now
)
{
OpeningStatus
=
1
;
}
}
var
buildingCarrierModel
=
new
RB_Building_Carrier_Extend
()
{
CarrierName
=
CarrierModel
.
CarrierName
,
Logo
=
CarrierModel
.
Logo
,
Banner
=
CarrierModel
.
Banner
,
Address
=
CarrierModel
.
Address
,
LatAndLon
=
CarrierModel
.
LatAndLon
,
VideoUrl
=
CarrierModel
.
VideoUrl
,
OpeningStatus
=
OpeningStatus
,
CarrierSize
=
CarrierModel
.
CarrierSize
,
LayersNum
=
CarrierModel
.
LayersNum
,
CarNum
=
CarrierModel
.
CarNum
,
BuiltUpArea
=
CarrierModel
?.
BuiltUpArea
??
0
,
AreaRequirement
=
CarrierModel
?.
AreaRequirement
??
0
,
VisitorsFlowrate
=
CarrierModel
.
VisitorsFlowrate
,
SupportingFacilities
=
CarrierModel
.
SupportingFacilities
,
ManagementCompany
=
CarrierModel
.
ManagementCompany
,
Developers
=
CarrierModel
.
Developers
,
CategoryId
=
CarrierModel
.
CategoryId
,
Ascription
=
CarrierModel
.
Ascription
,
CarrierPlan
=
CarrierModel
.
CarrierPlan
,
BrandDemand
=
CarrierModel
.
BrandDemand
,
Location
=
CarrierModel
.
Location
,
ContactName
=
CarrierModel
.
ContactName
,
ContactPhone
=
CarrierModel
.
ContactPhone
,
BuildingCarrierType
=
CarrierModel
.
BuildingCarrierType
,
UpdateBy
=
CarrierModel
.
UpdateBy
,
UpdateDate
=
CarrierModel
.
UpdateDate
,
TenantId
=
CarrierModel
.
TenantId
,
MallBaseId
=
CarrierModel
.
MallBaseId
,
};
if
(!
string
.
IsNullOrEmpty
(
Common
.
ConvertHelper
.
FormatDate
(
CarrierModel
?.
OpenTime
)))
{
buildingCarrierModel
.
OpenTime
=
Convert
.
ToDateTime
(
CarrierModel
.
OpenTime
);
}
var
MetroList
=
carrierEnterpriseMetroApplyForRepository
.
GetCarrierMetroList
(
new
RB_CarrierEnterpriseMetroApplyFor_Extend
{
MallBaseId
=
cmodel
.
MallBaseId
,
CarrierId
=
CarrierModel
.
ID
});
if
(
CarrierModel
.
ExistCarrierId
>
0
)
{
//修改
#
region
验证品牌是否已关联用户
var
carrmodel
=
building_CarrierRepository
.
GetEntity
(
CarrierModel
.
ExistCarrierId
);
//if (carrmodel.UserId > 0)
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该载体已被其他用户认证,请核实后再试";
//}
#
endregion
#
region
修改载体
int
FirstStoreTest
=
0
;
if
(!
string
.
IsNullOrWhiteSpace
(
CarrierModel
.
StartingInfo
))
{
FirstStoreTest
=
1
;
}
int
OpeningStatus
=
0
;
if
(
CarrierModel
.
OpenTime
.
HasValue
)
{
if
(
CarrierModel
.
OpenTime
.
Value
<=
System
.
DateTime
.
Now
)
{
OpeningStatus
=
1
;
}
}
Dictionary
<
string
,
object
>
filedsCarrier
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Building_Carrier_Extend
.
CarrierName
),
CarrierModel
.
CarrierName
},
{
nameof
(
RB_Building_Carrier_Extend
.
Logo
),
CarrierModel
.
Logo
},
{
nameof
(
RB_Building_Carrier_Extend
.
Banner
),
CarrierModel
.
Banner
},
{
nameof
(
RB_Building_Carrier_Extend
.
Honor
),
CarrierModel
.
Honor
},
{
nameof
(
RB_Building_Carrier_Extend
.
Developers
),
CarrierModel
.
Developers
},
{
nameof
(
RB_Building_Carrier_Extend
.
OpeningStatus
),
OpeningStatus
},
{
nameof
(
RB_Building_Carrier_Extend
.
VideoUrl
),
CarrierModel
.
VideoUrl
},
{
nameof
(
RB_Building_Carrier_Extend
.
Address
),
CarrierModel
.
Address
},
{
nameof
(
RB_Building_Carrier_Extend
.
LatAndLon
),
CarrierModel
.
LatAndLon
},
{
nameof
(
RB_Building_Carrier_Extend
.
OpenTime
),
CarrierModel
.
OpenTime
},
{
nameof
(
RB_Building_Carrier_Extend
.
BuildingCarrierType
),
CarrierModel
.
BuildingCarrierType
},
{
nameof
(
RB_Building_Carrier_Extend
.
CategoryId
),
CarrierModel
.
CategoryId
},
{
nameof
(
RB_Building_Carrier_Extend
.
Ascription
),
CarrierModel
.
Ascription
},
{
nameof
(
RB_Building_Carrier_Extend
.
CarrierSize
),
CarrierModel
.
CarrierSize
},
{
nameof
(
RB_Building_Carrier_Extend
.
PropertyComposition
),
CarrierModel
.
PropertyComposition
},
{
nameof
(
RB_Building_Carrier_Extend
.
Location
),
CarrierModel
.
Location
},
{
nameof
(
RB_Building_Carrier_Extend
.
Crowd
),
CarrierModel
.
Crowd
},
{
nameof
(
RB_Building_Carrier_Extend
.
VisitorsFlowrate
),
CarrierModel
.
VisitorsFlowrate
},
{
nameof
(
RB_Building_Carrier_Extend
.
LayersNum
),
CarrierModel
.
LayersNum
},
{
nameof
(
RB_Building_Carrier_Extend
.
SupportingFacilities
),
CarrierModel
.
SupportingFacilities
},
{
nameof
(
RB_Building_Carrier_Extend
.
ManagementCompany
),
CarrierModel
.
ManagementCompany
},
{
nameof
(
RB_Building_Carrier_Extend
.
BrandDemand
),
CarrierModel
.
BrandDemand
},
{
nameof
(
RB_Building_Carrier_Extend
.
UpdateBy
),
CarrierModel
.
UpdateBy
},
{
nameof
(
RB_Building_Carrier_Extend
.
UpdateDate
),
CarrierModel
.
UpdateDate
},
{
nameof
(
RB_Building_Carrier_Extend
.
CarrierName
),
buildingCarrierModel
.
CarrierName
},
{
nameof
(
RB_Building_Carrier_Extend
.
Logo
),
buildingCarrierModel
.
Logo
},
{
nameof
(
RB_Building_Carrier_Extend
.
Banner
),
buildingCarrierModel
.
Banner
},
{
nameof
(
RB_Building_Carrier_Extend
.
Address
),
buildingCarrierModel
.
Address
},
{
nameof
(
RB_Building_Carrier_Extend
.
LatAndLon
),
buildingCarrierModel
.
LatAndLon
},
{
nameof
(
RB_Building_Carrier_Extend
.
VideoUrl
),
buildingCarrierModel
.
VideoUrl
},
{
nameof
(
RB_Building_Carrier_Extend
.
OpeningStatus
),
buildingCarrierModel
},
{
nameof
(
RB_Building_Carrier_Extend
.
CarrierSize
),
buildingCarrierModel
.
CarrierSize
},
{
nameof
(
RB_Building_Carrier_Extend
.
LayersNum
),
buildingCarrierModel
.
LayersNum
},
{
nameof
(
RB_Building_Carrier_Extend
.
CarNum
),
buildingCarrierModel
.
CarNum
},
{
nameof
(
RB_Building_Carrier_Extend
.
BuiltUpArea
),
buildingCarrierModel
.
BuiltUpArea
},
{
nameof
(
RB_Building_Carrier_Extend
.
AreaRequirement
),
buildingCarrierModel
.
AreaRequirement
},
{
nameof
(
RB_Building_Carrier_Extend
.
OpenTime
),
buildingCarrierModel
.
OpenTime
},
{
nameof
(
RB_Building_Carrier_Extend
.
VisitorsFlowrate
),
buildingCarrierModel
.
VisitorsFlowrate
},
{
nameof
(
RB_Building_Carrier_Extend
.
SupportingFacilities
),
buildingCarrierModel
.
SupportingFacilities
},
{
nameof
(
RB_Building_Carrier_Extend
.
ManagementCompany
),
buildingCarrierModel
.
ManagementCompany
},
{
nameof
(
RB_Building_Carrier_Extend
.
Developers
),
buildingCarrierModel
.
Developers
},
{
nameof
(
RB_Building_Carrier_Extend
.
CategoryId
),
buildingCarrierModel
.
CategoryId
},
{
nameof
(
RB_Building_Carrier_Extend
.
Ascription
),
buildingCarrierModel
.
Ascription
},
{
nameof
(
RB_Building_Carrier_Extend
.
CarrierPlan
),
buildingCarrierModel
.
CarrierPlan
},
{
nameof
(
RB_Building_Carrier_Extend
.
BrandDemand
),
buildingCarrierModel
.
BrandDemand
},
{
nameof
(
RB_Building_Carrier_Extend
.
Location
),
buildingCarrierModel
.
Location
},
{
nameof
(
RB_Building_Carrier_Extend
.
ContactName
),
buildingCarrierModel
.
ContactName
},
{
nameof
(
RB_Building_Carrier_Extend
.
ContactPhone
),
buildingCarrierModel
.
ContactPhone
},
{
nameof
(
RB_Building_Carrier_Extend
.
BuildingCarrierType
),
buildingCarrierModel
.
BuildingCarrierType
},
{
nameof
(
RB_Building_Carrier_Extend
.
UpdateBy
),
buildingCarrierModel
.
UpdateBy
},
{
nameof
(
RB_Building_Carrier_Extend
.
UpdateDate
),
buildingCarrierModel
.
UpdateDate
},
};
flag
=
building_CarrierRepository
.
Update
(
filedsCarrier
,
new
WhereHelper
(
nameof
(
RB_Building_Carrier_Extend
.
ID
),
carrmodel
.
ID
),
trans
);
if
(
flag
)
...
...
@@ -1483,29 +1491,15 @@ namespace Mall.Module.TradePavilion
}
else
{
//新增
#
region
再次验证载体名称
//if (ValidateCarrierName(CarrierModel.CarrierName, CarrierModel.MallBaseId))
//{
// return "该载体名称已存在,请确认载体名称后再次审核";
//}
#
endregion
#
region
新增载体
var
inserCModel
=
CarrierModel
.
RefMapperTo
<
RB_Building_Carrier_Extend
>();
inserCModel
.
ID
=
0
;
inserCModel
.
UserId
=
cmodel
.
CreateBy
;
if
(
CarrierModel
.
OpenTime
.
HasValue
)
{
if
(
CarrierModel
.
OpenTime
.
Value
<=
System
.
DateTime
.
Now
)
{
inserCModel
.
OpeningStatus
=
1
;
}
}
buildingCarrierModel
.
ID
=
0
;
buildingCarrierModel
.
UserId
=
cmodel
.
CreateBy
;
if
(!
string
.
IsNullOrWhiteSpace
(
CarrierModel
.
StartingInfo
))
{
inserC
Model
.
FirstStoreTest
=
1
;
buildingCarrier
Model
.
FirstStoreTest
=
1
;
}
int
Id
=
building_CarrierRepository
.
Insert
(
inserC
Model
,
trans
);
int
Id
=
building_CarrierRepository
.
Insert
(
buildingCarrier
Model
,
trans
);
if
(
Id
>
0
)
{
var
mlist
=
MetroList
.
RefMapperToList
<
RB_CarrierEnterpriseMetroApplyFor_Extend
>();
...
...
@@ -1523,143 +1517,93 @@ namespace Mall.Module.TradePavilion
}
}
}
//企业服务
else
if
(
cmodel
.
FirstShopType
==
3
)
{
//企业服务
var
brandList
=
enterpriseServicesApplyRepository
.
GetEnterpriseServicesApplyRepository
(
new
RB_EnterpriseServicesApply_Extend
{
MallBaseId
=
cmodel
.
MallBaseId
,
CompanyId
=
cmodel
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
var
enterpriseServicesList
=
enterpriseServicesApplyRepository
.
GetEnterpriseServicesApplyRepository
(
new
RB_EnterpriseServicesApply_Extend
{
MallBaseId
=
cmodel
.
MallBaseId
,
CompanyId
=
cmodel
.
CompanyId
});
if
(
enterpriseServicesList
!=
null
&&
enterpriseServicesList
.
Any
())
{
var
BrandModel
=
brand
List
.
FirstOrDefault
();
if
(
Brand
Model
.
ExistServiceId
>
0
)
var
enterpriseModel
=
enterpriseServices
List
.
FirstOrDefault
();
if
(
enterprise
Model
.
ExistServiceId
>
0
)
{
//修改
#
region
验证品牌是否已关联用户
//var bmodel = brand2Repository.GetEntity(BrandModel.ExistBrandId);
//if (bmodel.UserId > 0)
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌已被其他用户认证,请核实后再试";
//}
#
endregion
Dictionary
<
string
,
object
>
filedsBrand
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_EnterpriseServices_Extend
.
Name
),
Brand
Model
.
Name
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Banner
),
Brand
Model
.
Banner
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Introduction
),
Brand
Model
.
Introduction
},
{
nameof
(
RB_EnterpriseServices_Extend
.
DevIntention
),
Brand
Model
.
DevIntention
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Address
),
Brand
Model
.
Address
},
{
nameof
(
RB_EnterpriseServices_Extend
.
LatAndLon
),
Brand
Model
.
LatAndLon
},
{
nameof
(
RB_EnterpriseServices_Extend
.
OperationTime
),
Brand
Model
.
OperationTime
},
{
nameof
(
RB_EnterpriseServices_Extend
.
CategoryId
),
Brand
Model
.
CategoryId
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Renovation
),
Brand
Model
.
Renovation
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Payment
),
Brand
Model
.
Payment
},
{
nameof
(
RB_EnterpriseServices_Extend
.
HandoverDate
),
Brand
Model
.
HandoverDate
},
{
nameof
(
RB_EnterpriseServices_Extend
.
IntentionalFloor
),
Brand
Model
.
IntentionalFloor
},
{
nameof
(
RB_EnterpriseServices_Extend
.
ElevatorNum
),
Brand
Model
.
ElevatorNum
},
{
nameof
(
RB_EnterpriseServices_Extend
.
PropertyFee
),
Brand
Model
.
PropertyFee
},
{
nameof
(
RB_EnterpriseServices_Extend
.
RentFee
),
Brand
Model
.
RentFee
},
{
nameof
(
RB_EnterpriseServices_Extend
.
ContactName
),
Brand
Model
.
ContactName
},
{
nameof
(
RB_EnterpriseServices_Extend
.
ContactPhone
),
Brand
Model
.
ContactPhone
},
{
nameof
(
RB_EnterpriseServices_Extend
.
UpdateBy
),
Brand
Model
.
UpdateBy
},
{
nameof
(
RB_EnterpriseServices_Extend
.
UpdateDate
),
Brand
Model
.
UpdateDate
},
{
{
nameof
(
RB_EnterpriseServices_Extend
.
Name
),
enterprise
Model
.
Name
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Banner
),
enterprise
Model
.
Banner
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Introduction
),
enterprise
Model
.
Introduction
},
{
nameof
(
RB_EnterpriseServices_Extend
.
DevIntention
),
enterprise
Model
.
DevIntention
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Address
),
enterprise
Model
.
Address
},
{
nameof
(
RB_EnterpriseServices_Extend
.
LatAndLon
),
enterprise
Model
.
LatAndLon
},
{
nameof
(
RB_EnterpriseServices_Extend
.
OperationTime
),
enterprise
Model
.
OperationTime
},
{
nameof
(
RB_EnterpriseServices_Extend
.
CategoryId
),
enterprise
Model
.
CategoryId
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Renovation
),
enterprise
Model
.
Renovation
},
{
nameof
(
RB_EnterpriseServices_Extend
.
Payment
),
enterprise
Model
.
Payment
},
{
nameof
(
RB_EnterpriseServices_Extend
.
HandoverDate
),
enterprise
Model
.
HandoverDate
},
{
nameof
(
RB_EnterpriseServices_Extend
.
IntentionalFloor
),
enterprise
Model
.
IntentionalFloor
},
{
nameof
(
RB_EnterpriseServices_Extend
.
ElevatorNum
),
enterprise
Model
.
ElevatorNum
},
{
nameof
(
RB_EnterpriseServices_Extend
.
PropertyFee
),
enterprise
Model
.
PropertyFee
},
{
nameof
(
RB_EnterpriseServices_Extend
.
RentFee
),
enterprise
Model
.
RentFee
},
{
nameof
(
RB_EnterpriseServices_Extend
.
ContactName
),
enterprise
Model
.
ContactName
},
{
nameof
(
RB_EnterpriseServices_Extend
.
ContactPhone
),
enterprise
Model
.
ContactPhone
},
{
nameof
(
RB_EnterpriseServices_Extend
.
UpdateBy
),
enterprise
Model
.
UpdateBy
},
{
nameof
(
RB_EnterpriseServices_Extend
.
UpdateDate
),
enterprise
Model
.
UpdateDate
},
};
enterpriseServicesRepository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_EnterpriseServices_Extend
.
ServiceId
),
Brand
Model
.
ExistServiceId
),
trans
);
enterpriseServicesRepository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_EnterpriseServices_Extend
.
ServiceId
),
enterprise
Model
.
ExistServiceId
),
trans
);
}
else
{
//新增
#
region
再次验证品牌名称
//if (ValidateBrandName(BrandModel.BrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌名称已存在,请确认品牌名称后再次审核";
//}
//if (ValidateFullBrandName(BrandModel.FullBrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌全名已存在,请确认品牌全名后再次审核";
//}
#
endregion
#
region
新增品牌
var
inserBModel
=
BrandModel
.
RefMapperTo
<
RB_EnterpriseServices_Extend
>();
var
inserBModel
=
enterpriseModel
.
RefMapperTo
<
RB_EnterpriseServices_Extend
>();
inserBModel
.
ServiceId
=
0
;
inserBModel
.
UserId
=
cmodel
.
CreateBy
;
enterpriseServicesRepository
.
Insert
(
inserBModel
,
trans
);
#
endregion
}
}
}
//楼宇
else
if
(
cmodel
.
FirstShopType
==
4
)
{
//企业服务
var
brandList
=
buildingApplyForRepository
.
GetBuildingRepository
(
new
RB_BuildingApplyFor_Extend
{
MallBaseId
=
cmodel
.
MallBaseId
,
CompanyId
=
cmodel
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
var
buildingList
=
buildingApplyForRepository
.
GetBuildingRepository
(
new
RB_BuildingApplyFor_Extend
{
MallBaseId
=
cmodel
.
MallBaseId
,
CompanyId
=
cmodel
.
CompanyId
});
if
(
buildingList
!=
null
&&
buildingList
.
Any
())
{
var
BrandModel
=
brand
List
.
FirstOrDefault
();
if
(
Brand
Model
.
ExistBuildId
>
0
)
var
buildingModel
=
building
List
.
FirstOrDefault
();
if
(
building
Model
.
ExistBuildId
>
0
)
{
//修改
#
region
验证品牌是否已关联用户
//var bmodel = brand2Repository.GetEntity(BrandModel.ExistBrandId);
//if (bmodel.UserId > 0)
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌已被其他用户认证,请核实后再试";
//}
#
endregion
Dictionary
<
string
,
object
>
filedsBrand
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Building_Extend
.
Name
),
Brand
Model
.
Name
},
{
nameof
(
RB_Building_Extend
.
Banner
),
Brand
Model
.
Banner
},
{
nameof
(
RB_Building_Extend
.
Address
),
Brand
Model
.
Address
},
{
nameof
(
RB_Building_Extend
.
LatAndLon
),
Brand
Model
.
LatAndLon
},
{
nameof
(
RB_Building_Extend
.
OperationTime
),
Brand
Model
.
OperationTime
},
{
nameof
(
RB_Building_Extend
.
CategoryId
),
Brand
Model
.
CategoryId
},
{
nameof
(
RB_Building_Extend
.
Areas
),
Brand
Model
.
Areas
},
{
nameof
(
RB_Building_Extend
.
BuildingNum
),
Brand
Model
.
BuildingNum
},
{
nameof
(
RB_Building_Extend
.
FloorNum
),
Brand
Model
.
FloorNum
},
{
nameof
(
RB_Building_Extend
.
ElevatorNum
),
Brand
Model
.
ElevatorNum
},
{
nameof
(
RB_Building_Extend
.
FloorHeight
),
Brand
Model
.
FloorHeight
},
{
nameof
(
RB_Building_Extend
.
Developers
),
Brand
Model
.
Developers
},
{
nameof
(
RB_Building_Extend
.
PropertyComp
),
Brand
Model
.
PropertyComp
},
{
nameof
(
RB_Building_Extend
.
SaleOrSelf
),
Brand
Model
.
SaleOrSelf
},
{
nameof
(
RB_Building_Extend
.
IsAllOperate
),
Brand
Model
.
IsAllOperate
},
{
nameof
(
RB_Building_Extend
.
ConstructionTime
),
Brand
Model
.
ConstructionTime
},
{
nameof
(
RB_Building_Extend
.
PropertyFee
),
Brand
Model
.
PropertyFee
},
{
nameof
(
RB_Building_Extend
.
RentFee
),
Brand
Model
.
RentFee
},
{
nameof
(
RB_Building_Extend
.
IndustryDirection
),
Brand
Model
.
IndustryDirection
},
{
nameof
(
RB_Building_Extend
.
BrandDemand
),
Brand
Model
.
BrandDemand
},
{
nameof
(
RB_Building_Extend
.
Other
),
Brand
Model
.
Other
},
{
nameof
(
RB_Building_Extend
.
ContactName
),
Brand
Model
.
ContactName
},
{
nameof
(
RB_Building_Extend
.
ContactPhone
),
Brand
Model
.
ContactPhone
},
{
nameof
(
RB_Building_Extend
.
UpdateBy
),
Brand
Model
.
UpdateBy
},
{
nameof
(
RB_Building_Extend
.
UpdateDate
),
Brand
Model
.
UpdateDate
},
{
{
nameof
(
RB_Building_Extend
.
Name
),
building
Model
.
Name
},
{
nameof
(
RB_Building_Extend
.
Banner
),
building
Model
.
Banner
},
{
nameof
(
RB_Building_Extend
.
Address
),
building
Model
.
Address
},
{
nameof
(
RB_Building_Extend
.
LatAndLon
),
building
Model
.
LatAndLon
},
{
nameof
(
RB_Building_Extend
.
OperationTime
),
building
Model
.
OperationTime
},
{
nameof
(
RB_Building_Extend
.
CategoryId
),
building
Model
.
CategoryId
},
{
nameof
(
RB_Building_Extend
.
Areas
),
building
Model
.
Areas
},
{
nameof
(
RB_Building_Extend
.
BuildingNum
),
building
Model
.
BuildingNum
},
{
nameof
(
RB_Building_Extend
.
FloorNum
),
building
Model
.
FloorNum
},
{
nameof
(
RB_Building_Extend
.
ElevatorNum
),
building
Model
.
ElevatorNum
},
{
nameof
(
RB_Building_Extend
.
FloorHeight
),
building
Model
.
FloorHeight
},
{
nameof
(
RB_Building_Extend
.
Developers
),
building
Model
.
Developers
},
{
nameof
(
RB_Building_Extend
.
PropertyComp
),
building
Model
.
PropertyComp
},
{
nameof
(
RB_Building_Extend
.
SaleOrSelf
),
building
Model
.
SaleOrSelf
},
{
nameof
(
RB_Building_Extend
.
IsAllOperate
),
building
Model
.
IsAllOperate
},
{
nameof
(
RB_Building_Extend
.
ConstructionTime
),
building
Model
.
ConstructionTime
},
{
nameof
(
RB_Building_Extend
.
PropertyFee
),
building
Model
.
PropertyFee
},
{
nameof
(
RB_Building_Extend
.
RentFee
),
building
Model
.
RentFee
},
{
nameof
(
RB_Building_Extend
.
IndustryDirection
),
building
Model
.
IndustryDirection
},
{
nameof
(
RB_Building_Extend
.
BrandDemand
),
building
Model
.
BrandDemand
},
{
nameof
(
RB_Building_Extend
.
Other
),
building
Model
.
Other
},
{
nameof
(
RB_Building_Extend
.
ContactName
),
building
Model
.
ContactName
},
{
nameof
(
RB_Building_Extend
.
ContactPhone
),
building
Model
.
ContactPhone
},
{
nameof
(
RB_Building_Extend
.
UpdateBy
),
building
Model
.
UpdateBy
},
{
nameof
(
RB_Building_Extend
.
UpdateDate
),
building
Model
.
UpdateDate
},
};
buildingRepository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_Building_Extend
.
BuildId
),
Brand
Model
.
ExistBuildId
),
trans
);
buildingRepository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_Building_Extend
.
BuildId
),
building
Model
.
ExistBuildId
),
trans
);
}
else
{
//新增
#
region
再次验证品牌名称
//if (ValidateBrandName(BrandModel.BrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌名称已存在,请确认品牌名称后再次审核";
//}
//if (ValidateFullBrandName(BrandModel.FullBrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌全名已存在,请确认品牌全名后再次审核";
//}
#
endregion
#
region
新增品牌
var
inserBModel
=
BrandModel
.
RefMapperTo
<
RB_Building_Extend
>();
var
inserBModel
=
buildingModel
.
RefMapperTo
<
RB_Building_Extend
>();
inserBModel
.
BuildId
=
0
;
inserBModel
.
UserId
=
cmodel
.
CreateBy
;
buildingRepository
.
Insert
(
inserBModel
,
trans
);
#
endregion
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment