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
09f491a6
Commit
09f491a6
authored
Sep 06, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首店企业认证自动审核
parent
d976bba8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
253 additions
and
9 deletions
+253
-9
Config.cs
Mall.Common/Config.cs
+11
-2
CarrierModule.cs
Mall.Module.TradePavilion/CarrierModule.cs
+210
-6
CompanyModule.cs
Mall.Module.TradePavilion/CompanyModule.cs
+8
-1
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+23
-0
appsettings.json
Mall.WebApi/appsettings.json
+1
-0
No files found.
Mall.Common/Config.cs
View file @
09f491a6
...
...
@@ -720,7 +720,16 @@ namespace Mall.Common
return
ReadConfigKey
(
"XuZongUserId"
);
}
}
/// <summary>
///首店企业认证是否自动审核,1-是
/// </summary>
public
static
string
IsFirtsShopAutoExamine
{
get
{
return
ReadConfigKey
(
"IsFirtsShopAutoExamine"
);
}
}
}
...
...
Mall.Module.TradePavilion/CarrierModule.cs
View file @
09f491a6
...
...
@@ -7,6 +7,7 @@ using Mall.Repository.TradePavilion;
using
Newtonsoft.Json
;
using
VT.FW.DB
;
using
Mall.Common.Plugin
;
using
Mall.Common
;
namespace
Mall.Module.TradePavilion
{
...
...
@@ -403,7 +404,131 @@ namespace Mall.Module.TradePavilion
}
flag
=
Id
>
0
;
}
if
(
flag
)
{
if
(
Config
.
IsFirtsShopAutoExamine
==
"1"
)
//自动审核
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Company_Extend
.
CompanyStatus
),
1
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Company_Extend
.
CompanyId
),
FiledValue
=
model
.
CompanyId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
companyRepository
.
Update
(
fileds
,
wheres
);
//载体
var
carrierList
=
carrierApplyForRepository
.
GetCarrierList
(
new
RB_CarrierApplyFor_Extend
()
{
MallBaseId
=
cmodel
.
MallBaseId
,
CompanyId
=
cmodel
.
CompanyId
});
if
(
carrierList
!=
null
&&
carrierList
.
Any
())
{
var
CarrierModel
=
carrierList
.
FirstOrDefault
();
var
MetroList
=
carrierMetroApplyForRepository
.
GetCarrierMetroList
(
new
RB_CarrierMetroApplyFor_Extend
{
MallBaseId
=
cmodel
.
MallBaseId
,
CarrierId
=
CarrierModel
.
ID
});
if
(
CarrierModel
.
ExistCarrierId
>
0
)
{
var
carrmodel
=
carrierRepository
.
GetEntity
(
CarrierModel
.
ExistCarrierId
);
#
region
修改载体
int
FirstStoreTest
=
0
;
if
(!
string
.
IsNullOrWhiteSpace
(
CarrierModel
.
StartingInfo
)
&&
!
string
.
IsNullOrWhiteSpace
(
CarrierModel
.
Discount
))
{
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_Carrier_Extend
.
Logo
),
CarrierModel
.
Logo
},
{
nameof
(
RB_Carrier_Extend
.
Banner
),
CarrierModel
.
Banner
},
{
nameof
(
RB_Carrier_Extend
.
VideoUrl
),
CarrierModel
.
VideoUrl
},
{
nameof
(
RB_Carrier_Extend
.
Address
),
CarrierModel
.
Address
},
{
nameof
(
RB_Carrier_Extend
.
LatAndLon
),
CarrierModel
.
LatAndLon
},
{
nameof
(
RB_Carrier_Extend
.
Developers
),
CarrierModel
.
Developers
},
{
nameof
(
RB_Carrier_Extend
.
OpenTime
),
CarrierModel
.
OpenTime
},
{
nameof
(
RB_Carrier_Extend
.
CarrierSize
),
CarrierModel
.
CarrierSize
},
{
nameof
(
RB_Carrier_Extend
.
ProjectType
),(
int
)
CarrierModel
.
ProjectType
},
{
nameof
(
RB_Carrier_Extend
.
LayersNum
),
CarrierModel
.
LayersNum
},
{
nameof
(
RB_Carrier_Extend
.
CarNum
),
CarrierModel
.
CarNum
},
{
nameof
(
RB_Carrier_Extend
.
CarrierPlan
),
CarrierModel
.
CarrierPlan
},
{
nameof
(
RB_Carrier_Extend
.
CarrierTarget
),
CarrierModel
.
CarrierTarget
},
{
nameof
(
RB_Carrier_Extend
.
Location
),
CarrierModel
.
Location
},
{
nameof
(
RB_Carrier_Extend
.
Crowd
),
CarrierModel
.
Crowd
},
{
nameof
(
RB_Carrier_Extend
.
UserId
),
cmodel
.
CreateBy
},
{
nameof
(
RB_Carrier_Extend
.
Discount
),
CarrierModel
.
Discount
},
{
nameof
(
RB_Carrier_Extend
.
Honor
),
CarrierModel
.
Honor
},
{
nameof
(
RB_Carrier_Extend
.
YeJi
),
CarrierModel
.
YeJi
},
{
nameof
(
RB_Carrier_Extend
.
ShopNum
),
CarrierModel
.
ShopNum
},
{
nameof
(
RB_Carrier_Extend
.
AreaRequirement
),
CarrierModel
.
AreaRequirement
},
{
nameof
(
RB_Carrier_Extend
.
EndAreaRequirement
),
CarrierModel
.
EndAreaRequirement
},
{
nameof
(
RB_Carrier_Extend
.
BuiltUpArea
),
CarrierModel
.
BuiltUpArea
},
{
nameof
(
RB_Carrier_Extend
.
EndBuiltUpArea
),
CarrierModel
.
EndBuiltUpArea
},
{
nameof
(
RB_Carrier_Extend
.
FirstShopNum
),
CarrierModel
.
FirstShopNum
},
{
nameof
(
RB_Carrier_Extend
.
StartingInfo
),
CarrierModel
.
StartingInfo
},
{
nameof
(
RB_Carrier_Extend
.
FirstStoreTest
),
FirstStoreTest
},
{
nameof
(
RB_Carrier_Extend
.
OpeningStatus
),
OpeningStatus
}
};
flag
=
carrierRepository
.
Update
(
filedsCarrier
,
new
WhereHelper
(
nameof
(
RB_Carrier_Extend
.
ID
),
carrmodel
.
ID
));
if
(
flag
)
{
var
oldCarrierMetroList
=
carrierMetroRepository
.
GetCarrierMetroList
(
new
RB_CarrierMetro_Extend
{
MallBaseId
=
CarrierModel
.
MallBaseId
,
CarrierId
=
carrmodel
.
ID
});
carrierMetroRepository
.
DeleteBatch
(
oldCarrierMetroList
);
var
mlist
=
MetroList
.
RefMapperToList
<
RB_CarrierMetro_Extend
>();
mlist
.
ForEach
(
x
=>
{
x
.
ID
=
0
;
x
.
CarrierId
=
carrmodel
.
ID
;
x
.
Status
=
0
;
x
.
TenantId
=
CarrierModel
.
TenantId
;
x
.
MallBaseId
=
CarrierModel
.
MallBaseId
;
});
carrierMetroRepository
.
InsertBatch
(
mlist
);
}
#
endregion
}
else
{
#
region
新增载体
var
inserCModel
=
CarrierModel
.
RefMapperTo
<
RB_Carrier_Extend
>();
inserCModel
.
ID
=
0
;
inserCModel
.
UserId
=
cmodel
.
CreateBy
;
if
(
CarrierModel
.
OpenTime
.
HasValue
)
{
if
(
CarrierModel
.
OpenTime
.
Value
<=
System
.
DateTime
.
Now
)
{
inserCModel
.
OpeningStatus
=
1
;
}
}
int
Id
=
carrierRepository
.
Insert
(
inserCModel
);
if
(
Id
>
0
)
{
var
mlist
=
MetroList
.
RefMapperToList
<
RB_CarrierMetro_Extend
>();
mlist
.
ForEach
(
x
=>
{
x
.
ID
=
0
;
x
.
CarrierId
=
Id
;
x
.
Status
=
0
;
x
.
TenantId
=
CarrierModel
.
TenantId
;
x
.
MallBaseId
=
CarrierModel
.
MallBaseId
;
});
carrierMetroRepository
.
InsertBatch
(
mlist
);
}
#
endregion
}
}
}
}
return
flag
;
}
...
...
@@ -537,7 +662,7 @@ namespace Mall.Module.TradePavilion
}
if
(
prizeList
!=
null
&&
prizeList
.
Any
())
{
foreach
(
var
item
in
list
.
Where
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
SourceIds
)))
foreach
(
var
item
in
list
.
Where
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
SourceIds
)))
{
item
.
PrizeList
=
new
List
<
RB_Prize_Extend
>();
foreach
(
var
itemSourceId
in
item
.
SourceIds
.
Split
(
","
))
...
...
@@ -764,6 +889,83 @@ namespace Mall.Module.TradePavilion
bool
flag
=
brandApplyForRepository
.
Insert
(
model
)
>
0
;
if
(
flag
)
{
if
(
Config
.
IsFirtsShopAutoExamine
==
"1"
)
//自动审核
{
//更新认证表 资料状态为完成
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Company_Extend
.
IsComplete
),
1
},
{
nameof
(
RB_Company_Extend
.
CompanyStatus
),
1
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Company_Extend
.
CompanyId
),
FiledValue
=
model
.
CompanyId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
companyRepository
.
Update
(
keyValues
,
wheres
);
try
{
var
brandList
=
brandApplyForRepository
.
GetBrandListByWhere
(
new
RB_BrandApplyFor_Extend
{
MallBaseId
=
cmodel
.
MallBaseId
,
CompanyId
=
cmodel
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
{
var
BrandModel
=
brandList
.
FirstOrDefault
();
if
(
BrandModel
.
ExistBrandId
>
0
)
{
Dictionary
<
string
,
object
>
filedsBrand
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Brand_Extend
.
UpdateDate
),
DateTime
.
Now
},
{
nameof
(
RB_Brand_Extend
.
Logo
),
BrandModel
.
Logo
},
{
nameof
(
RB_Brand_Extend
.
Banner
),
BrandModel
.
Banner
},
{
nameof
(
RB_Brand_Extend
.
VideoUrl
),
BrandModel
.
VideoUrl
},
{
nameof
(
RB_Brand_Extend
.
ShopNum
),
BrandModel
.
ShopNum
},
{
nameof
(
RB_Brand_Extend
.
BuiltUpArea
),
BrandModel
.
BuiltUpArea
},
{
nameof
(
RB_Brand_Extend
.
EndBuiltUpArea
),
BrandModel
.
EndBuiltUpArea
},
{
nameof
(
RB_Brand_Extend
.
BrandType
),
BrandModel
.
BrandType
},
{
nameof
(
RB_Brand_Extend
.
CustomerType
),
BrandModel
.
CustomerType
},
{
nameof
(
RB_Brand_Extend
.
StoreExpansion
),
BrandModel
.
StoreExpansion
},
{
nameof
(
RB_Brand_Extend
.
ProjectType
),
BrandModel
.
ProjectType
},
{
nameof
(
RB_Brand_Extend
.
AreaRequirement
),
BrandModel
.
AreaRequirement
},
{
nameof
(
RB_Brand_Extend
.
EndAreaRequirement
),
BrandModel
.
EndAreaRequirement
},
{
nameof
(
RB_Brand_Extend
.
ShopSize
),
BrandModel
.
ShopSize
},
{
nameof
(
RB_Brand_Extend
.
Plumbing
),
BrandModel
.
Plumbing
},
{
nameof
(
RB_Brand_Extend
.
Caliber
),
BrandModel
.
Caliber
},
{
nameof
(
RB_Brand_Extend
.
Sewage
),
BrandModel
.
Sewage
},
{
nameof
(
RB_Brand_Extend
.
RanQi
),
BrandModel
.
RanQi
},
{
nameof
(
RB_Brand_Extend
.
DianLiang
),
BrandModel
.
DianLiang
},
{
nameof
(
RB_Brand_Extend
.
PaiYan
),
BrandModel
.
PaiYan
},
{
nameof
(
RB_Brand_Extend
.
KongTiao
),
BrandModel
.
KongTiao
},
{
nameof
(
RB_Brand_Extend
.
XinFeng
),
BrandModel
.
XinFeng
},
{
nameof
(
RB_Brand_Extend
.
BrandClassId
),
BrandModel
.
BrandClassId
},
{
nameof
(
RB_Brand_Extend
.
RanQiBZ
),
BrandModel
.
RanQiBZ
},
{
nameof
(
RB_Brand_Extend
.
IsDianLiang
),
BrandModel
.
IsDianLiang
},
{
nameof
(
RB_Brand_Extend
.
PaiYanBZ
),
BrandModel
.
PaiYanBZ
},
{
nameof
(
RB_Brand_Extend
.
IsShopSize
),
BrandModel
.
IsShopSize
},
{
nameof
(
RB_Brand_Extend
.
OpenShopWish
),
BrandModel
.
OpenShopWish
},
{
nameof
(
RB_Brand_Extend
.
UserId
),
cmodel
.
CreateBy
},
};
brandRepository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_Brand_Extend
.
ID
),
BrandModel
.
ExistBrandId
));
}
else
{
#
region
新增品牌
var
inserBModel
=
BrandModel
.
RefMapperTo
<
RB_Brand_Extend
>();
inserBModel
.
ID
=
0
;
inserBModel
.
UserId
=
cmodel
.
CreateBy
;
brandRepository
.
Insert
(
inserBModel
);
#
endregion
}
}
}
catch
(
Exception
ex
)
{
}
}
else
{
//更新认证表 资料状态为完成
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Company_Extend
.
IsComplete
),
1
}
...
...
@@ -777,6 +979,8 @@ namespace Mall.Module.TradePavilion
};
companyRepository
.
Update
(
keyValues
,
wheres
);
}
}
return
flag
;
}
}
...
...
Mall.Module.TradePavilion/CompanyModule.cs
View file @
09f491a6
...
...
@@ -624,7 +624,7 @@ namespace Mall.Module.TradePavilion
int
OpeningStatus
=
0
;
if
(
CarrierModel
.
OpenTime
.
HasValue
)
{
if
(
CarrierModel
.
OpenTime
.
Value
<
System
.
DateTime
.
Now
)
if
(
CarrierModel
.
OpenTime
.
Value
<
=
System
.
DateTime
.
Now
)
{
OpeningStatus
=
1
;
}
...
...
@@ -691,6 +691,13 @@ namespace Mall.Module.TradePavilion
var
inserCModel
=
CarrierModel
.
RefMapperTo
<
RB_Carrier_Extend
>();
inserCModel
.
ID
=
0
;
inserCModel
.
UserId
=
cmodel
.
CreateBy
;
if
(
CarrierModel
.
OpenTime
.
HasValue
)
{
if
(
CarrierModel
.
OpenTime
.
Value
<=
System
.
DateTime
.
Now
)
{
inserCModel
.
OpeningStatus
=
1
;
}
}
int
Id
=
carrierRepository
.
Insert
(
inserCModel
,
trans
);
if
(
Id
>
0
)
{
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
09f491a6
...
...
@@ -243,6 +243,17 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
ApiResult
.
Failed
(
"该品牌全名已存在,请选择绑定已有品牌"
);
}
}
//修改
#
region
验证品牌是否已关联用户
if
(
query
.
ExistBrandId
>
0
)
{
var
bmodel
=
carrierModule
.
GetBrand
(
new
RB_Brand_Extend
{
ID
=
query
.
ExistBrandId
,
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
});
if
(
bmodel
.
UserId
>
0
)
{
return
ApiResult
.
Failed
(
"该品牌已被其他用户认证,请核实后再试"
);
}
}
#
endregion
#
endregion
bool
flag
=
carrierModule
.
SetBrandApplyFor
(
query
);
...
...
@@ -345,6 +356,18 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
ApiResult
.
Failed
(
"该载体名称已存在,请选择绑定已有载体"
);
}
}
//修改
#
region
验证品牌是否已关联用户
if
(
query
.
ExistCarrierId
>
0
)
{
var
carrmodel
=
carrierModule
.
GetCarrierModel
(
new
RB_Carrier_Extend
{
ID
=
query
.
ExistCarrierId
,
TenantId
=
query
.
TenantId
,
MallBaseId
=
query
.
MallBaseId
});
if
(
carrmodel
.
UserId
>
0
)
{
return
ApiResult
.
Failed
(
"该载体已被其他用户认证,请核实后再试"
);
}
}
#
endregion
#
endregion
bool
flag
=
carrierModule
.
SetCarrierApplyFor
(
query
);
...
...
Mall.WebApi/appsettings.json
View file @
09f491a6
...
...
@@ -81,6 +81,7 @@
"VirtualDirectory"
:
"WebFile"
,
"FileService"
:
"2"
,
"IsNormalServer"
:
2
,
"IsFirtsShopAutoExamine"
:
1
,
//首店企业认证是否字段审核
"FinanceSetting"
:
{
"TenantId"
:
1
,
"MallBaseId"
:
1
,
...
...
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