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
1cff3609
Commit
1cff3609
authored
Jul 19, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首店系统 调整
parent
163224f5
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
2854 additions
and
86 deletions
+2854
-86
RB_Brand.cs
Mall.Model/Entity/TradePavilion/RB_Brand.cs
+10
-0
RB_BrandApplyFor.cs
Mall.Model/Entity/TradePavilion/RB_BrandApplyFor.cs
+227
-0
RB_Carrier.cs
Mall.Model/Entity/TradePavilion/RB_Carrier.cs
+4
-1
RB_CarrierApplyFor.cs
Mall.Model/Entity/TradePavilion/RB_CarrierApplyFor.cs
+169
-0
RB_CarrierMetroApplyFor.cs
Mall.Model/Entity/TradePavilion/RB_CarrierMetroApplyFor.cs
+59
-0
RB_Company.cs
Mall.Model/Entity/TradePavilion/RB_Company.cs
+15
-0
RB_CompanyBrand.cs
Mall.Model/Entity/TradePavilion/RB_CompanyBrand.cs
+1
-1
RB_FirstShop_Wish.cs
Mall.Model/Entity/TradePavilion/RB_FirstShop_Wish.cs
+78
-0
RB_BrandApplyFor_Extend.cs
Mall.Model/Extend/TradePavilion/RB_BrandApplyFor_Extend.cs
+34
-0
RB_Brand_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Brand_Extend.cs
+25
-0
RB_CarrierApplyFor_Extend.cs
Mall.Model/Extend/TradePavilion/RB_CarrierApplyFor_Extend.cs
+58
-0
RB_CarrierMetroApplyFor_Extend.cs
...el/Extend/TradePavilion/RB_CarrierMetroApplyFor_Extend.cs
+18
-0
RB_Carrier_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Carrier_Extend.cs
+10
-0
RB_Company_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Company_Extend.cs
+17
-2
RB_FirstShop_Wish_Extend.cs
Mall.Model/Extend/TradePavilion/RB_FirstShop_Wish_Extend.cs
+21
-0
AuthenticationModule.cs
Mall.Module.TradePavilion/AuthenticationModule.cs
+12
-0
CarrierModule.cs
Mall.Module.TradePavilion/CarrierModule.cs
+327
-9
CompanyModule.cs
Mall.Module.TradePavilion/CompanyModule.cs
+545
-55
FirstShopWishModule.cs
Mall.Module.TradePavilion/FirstShopWishModule.cs
+130
-0
RB_AuthenticationRepository.cs
Mall.Repository/TradePavilion/RB_AuthenticationRepository.cs
+4
-0
RB_BrandApplyForRepository.cs
Mall.Repository/TradePavilion/RB_BrandApplyForRepository.cs
+123
-0
RB_BrandRepository.cs
Mall.Repository/TradePavilion/RB_BrandRepository.cs
+66
-0
RB_CarrierApplyForRepository.cs
....Repository/TradePavilion/RB_CarrierApplyForRepository.cs
+94
-0
RB_CarrierMetroApplyForRepository.cs
...sitory/TradePavilion/RB_CarrierMetroApplyForRepository.cs
+61
-0
RB_CarrierRepository.cs
Mall.Repository/TradePavilion/RB_CarrierRepository.cs
+12
-0
RB_CompanyRepository.cs
Mall.Repository/TradePavilion/RB_CompanyRepository.cs
+9
-0
RB_FirstShop_WishRepository.cs
Mall.Repository/TradePavilion/RB_FirstShop_WishRepository.cs
+109
-0
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+522
-5
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+94
-13
No files found.
Mall.Model/Entity/TradePavilion/RB_Brand.cs
View file @
1cff3609
...
...
@@ -207,5 +207,15 @@ namespace Mall.Model.Entity.TradePavilion
/// 品牌分类Id
/// </summary>
public
int
BrandClassId
{
get
;
set
;
}
/// <summary>
/// 归属于用户
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 开店意愿(打分制)
/// </summary>
public
decimal
OpenShopWish
{
get
;
set
;
}
}
}
Mall.Model/Entity/TradePavilion/RB_BrandApplyFor.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Enum
;
using
Mall.Common.Enum.TradePavilion
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 品牌申请实体表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_BrandApplyFor
{
/// <summary>
/// 编号
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 商户号id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// logo
/// </summary>
public
string
Logo
{
get
;
set
;
}
/// <summary>
/// 品牌介绍图
/// </summary>
public
string
Banner
{
get
;
set
;
}
/// <summary>
/// 品牌视频
/// </summary>
public
string
VideoUrl
{
get
;
set
;
}
/// <summary>
/// 品牌全名
/// </summary>
public
string
FullBrandName
{
get
;
set
;
}
/// <summary>
/// 品牌名称
/// </summary>
public
string
BrandName
{
get
;
set
;
}
/// <summary>
/// 店铺数量
/// </summary>
public
int
ShopNum
{
get
;
set
;
}
/// <summary>
/// 建筑面积
/// </summary>
public
decimal
BuiltUpArea
{
get
;
set
;
}
/// <summary>
/// 建筑面积
/// </summary>
public
decimal
EndBuiltUpArea
{
get
;
set
;
}
/// <summary>
/// 品牌定位
/// </summary>
public
string
BrandType
{
get
;
set
;
}
/// <summary>
/// 客户群体
/// </summary>
public
string
CustomerType
{
get
;
set
;
}
/// <summary>
/// 扩店区域
/// </summary>
public
string
StoreExpansion
{
get
;
set
;
}
/// <summary>
/// 性质
/// </summary>
public
ProjectTypeEnum
?
ProjectType
{
get
;
set
;
}
/// <summary>
/// 面积要求
/// </summary>
public
decimal
AreaRequirement
{
get
;
set
;
}
/// <summary>
/// 面积要求
/// </summary>
public
decimal
EndAreaRequirement
{
get
;
set
;
}
/// <summary>
/// 广告
/// </summary>
public
string
Advertising
{
get
;
set
;
}
/// <summary>
/// 其他
/// </summary>
public
string
Other
{
get
;
set
;
}
/// <summary>
/// 店铺开口尺寸(0-否1-有)
/// </summary>
public
int
IsShopSize
{
get
;
set
;
}
/// <summary>
/// 店铺开口尺寸
/// </summary>
public
string
ShopSize
{
get
;
set
;
}
/// <summary>
/// 上下水(0-否1-有)
/// </summary>
public
int
Plumbing
{
get
;
set
;
}
/// <summary>
/// 管径(0-否1-有)
/// </summary>
public
int
Caliber
{
get
;
set
;
}
/// <summary>
/// 排污(0-否1-有)
/// </summary>
public
int
Sewage
{
get
;
set
;
}
/// <summary>
/// 燃气(0-否1-有)
/// </summary>
public
int
RanQi
{
get
;
set
;
}
/// <summary>
/// 燃气备注
/// </summary>
public
string
RanQiBZ
{
get
;
set
;
}
/// <summary>
/// 电量
/// </summary>
public
string
DianLiang
{
get
;
set
;
}
/// <summary>
/// /电量(0-否1-有)
/// </summary>
public
int
IsDianLiang
{
get
;
set
;
}
/// <summary>
/// 排烟量(0-否1-有)
/// </summary>
public
int
PaiYan
{
get
;
set
;
}
/// <summary>
/// 排烟量
/// </summary>
public
string
PaiYanBZ
{
get
;
set
;
}
/// <summary>
/// 空调(0-否1-有)
/// </summary>
public
int
KongTiao
{
get
;
set
;
}
/// <summary>
/// 新风(0-否1-有)
/// </summary>
public
int
XinFeng
{
get
;
set
;
}
/// <summary>
/// 品牌分类Id
/// </summary>
public
int
BrandClassId
{
get
;
set
;
}
/// <summary>
/// 认证id
/// </summary>
public
int
CompanyId
{
get
;
set
;
}
/// <summary>
/// 开店意愿(打分)
/// </summary>
public
decimal
OpenShopWish
{
get
;
set
;
}
/// <summary>
/// 现有品牌id
/// </summary>
public
int
ExistBrandId
{
get
;
set
;
}
}
}
Mall.Model/Entity/TradePavilion/RB_Carrier.cs
View file @
1cff3609
...
...
@@ -155,6 +155,9 @@ namespace Mall.Model.Entity.TradePavilion
/// </summary>
public
string
Crowd
{
get
;
set
;
}
/// <summary>
/// 归属于用户
/// </summary>
public
int
UserId
{
get
;
set
;
}
}
}
Mall.Model/Entity/TradePavilion/RB_CarrierApplyFor.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Enum
;
using
Mall.Common.Enum.TradePavilion
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 载体申请实体表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_CarrierApplyFor
{
/// <summary>
/// 编号
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 商户号id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 载体名称
/// </summary>
public
string
CarrierName
{
get
;
set
;
}
/// <summary>
/// logo
/// </summary>
public
string
Logo
{
get
;
set
;
}
/// <summary>
/// 载体介绍图
/// </summary>
public
string
Banner
{
get
;
set
;
}
/// <summary>
/// 载体视频
/// </summary>
public
string
VideoUrl
{
get
;
set
;
}
/// <summary>
/// 省
/// </summary>
public
int
Province
{
get
;
set
;
}
/// <summary>
/// 市
/// </summary>
public
int
City
{
get
;
set
;
}
/// <summary>
/// 区
/// </summary>
public
int
Area
{
get
;
set
;
}
/// <summary>
/// 载体地址
/// </summary>
public
string
Address
{
get
;
set
;
}
/// <summary>
/// 载体地址经纬度
/// </summary>
public
string
LatAndLon
{
get
;
set
;
}
/// <summary>
/// 开发商
/// </summary>
public
string
Developers
{
get
;
set
;
}
/// <summary>
/// 开业时间
/// </summary>
public
DateTime
?
OpenTime
{
get
;
set
;
}
/// <summary>
/// 项目类型
/// </summary>
public
ProjectTypeEnum
?
ProjectType
{
get
;
set
;
}
/// <summary>
/// 商业体量(单位:万平方米)
/// </summary>
public
decimal
CarrierSize
{
get
;
set
;
}
/// <summary>
/// 商业层数
/// </summary>
public
string
LayersNum
{
get
;
set
;
}
/// <summary>
/// 车位数量
/// </summary>
public
int
CarNum
{
get
;
set
;
}
/// <summary>
/// 业态规划
/// </summary>
public
string
CarrierPlan
{
get
;
set
;
}
/// <summary>
/// 招引目标
/// </summary>
public
string
CarrierTarget
{
get
;
set
;
}
/// <summary>
/// 定位
/// </summary>
public
string
Location
{
get
;
set
;
}
/// <summary>
/// 目标人群
/// </summary>
public
string
Crowd
{
get
;
set
;
}
/// <summary>
/// 认证id
/// </summary>
public
int
CompanyId
{
get
;
set
;
}
/// <summary>
/// 现有的载体Id
/// </summary>
public
int
ExistCarrierId
{
get
;
set
;
}
}
}
Mall.Model/Entity/TradePavilion/RB_CarrierMetroApplyFor.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Enum
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 载体地铁申请实体表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_CarrierMetroApplyFor
{
/// <summary>
/// 编号
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 地铁线路
/// </summary>
public
int
MetroNum
{
get
;
set
;
}
/// <summary>
/// 站点名称
/// </summary>
public
string
MetroName
{
get
;
set
;
}
/// <summary>
/// 距离
/// </summary>
public
string
Distance
{
get
;
set
;
}
/// <summary>
/// 载体id
/// </summary>
public
int
CarrierId
{
get
;
set
;
}
/// <summary>
/// 商户号id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
Mall.Model/Entity/TradePavilion/RB_Company.cs
View file @
1cff3609
...
...
@@ -167,5 +167,20 @@ namespace Mall.Model.Entity.TradePavilion
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 首店类型 1品牌方 2载体方
/// </summary>
public
int
FirstShopType
{
get
;
set
;
}
/// <summary>
/// 拒绝备注
/// </summary>
public
string
RejectRemark
{
get
;
set
;
}
/// <summary>
/// 资料是否完善 1是 其他否
/// </summary>
public
int
IsComplete
{
get
;
set
;
}
}
}
Mall.Model/Entity/TradePavilion/RB_CompanyBrand.cs
View file @
1cff3609
...
...
@@ -8,7 +8,7 @@ using VT.FW.DB;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 品牌实体
/// 品牌实体
(暂时作废)
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
...
...
Mall.Model/Entity/TradePavilion/RB_FirstShop_Wish.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Enum
;
using
Mall.Common.Enum.TradePavilion
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 心愿单实体表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_FirstShop_Wish
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 用户id
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 品牌名称
/// </summary>
public
string
BranchName
{
get
;
set
;
}
/// <summary>
/// CarrierName
/// </summary>
public
string
CarrierName
{
get
;
set
;
}
/// <summary>
/// 区域
/// </summary>
public
string
Area
{
get
;
set
;
}
/// <summary>
/// 心愿详情
/// </summary>
public
string
Description
{
get
;
set
;
}
/// <summary>
/// 名片路径
/// </summary>
public
string
NameCard
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 商户号id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_BrandApplyFor_Extend.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.TradePavilion
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 品牌申请扩展类
/// </summary>
public
class
RB_BrandApplyFor_Extend
:
RB_BrandApplyFor
{
/// <summary>
/// 分类名称
/// </summary>
public
string
ClassName
{
get
;
set
;
}
public
List
<
string
>
BannerList
{
get
;
set
;
}
public
string
ProjectName
{
get
;
set
;
}
/// <summary>
/// 收藏id
/// </summary>
public
int
CollectId
{
get
;
set
;
}
/// <summary>
/// 客户群体
/// </summary>
public
List
<
string
>
CustomerTypeInfo
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_Brand_Extend.cs
View file @
1cff3609
...
...
@@ -32,5 +32,30 @@ namespace Mall.Model.Extend.TradePavilion
/// 导出枚举ids
/// </summary>
public
List
<
int
>
ExcelEnumIds
{
get
;
set
;
}
/// <summary>
/// 首店年份
/// </summary>
public
string
FirstShopYear
{
get
;
set
;
}
/// <summary>
/// 心愿详情
/// </summary>
public
string
WishDescription
{
get
;
set
;
}
/// <summary>
/// 心愿名片
/// </summary>
public
string
WishCard
{
get
;
set
;
}
/// <summary>
/// 认证用户
/// </summary>
public
string
UserName
{
get
;
set
;
}
/// <summary>
/// 认证用户头像
/// </summary>
public
string
UserIcon
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_CarrierApplyFor_Extend.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.TradePavilion
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 载体申请扩展类
/// </summary>
public
class
RB_CarrierApplyFor_Extend
:
RB_CarrierApplyFor
{
/// <summary>
/// 地铁信息
/// </summary>
public
List
<
RB_CarrierMetroApplyFor_Extend
>
CarrierMetroList
{
get
;
set
;
}
/// <summary>
/// 介绍图
/// </summary>
public
List
<
string
>
BannerList
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
OrderBy
{
get
;
set
;
}
/// <summary>
/// 开业时间
/// </summary>
public
string
StartOpenTime
{
get
;
set
;
}
/// <summary>
/// 开业时间
/// </summary>
public
string
EndOpenTime
{
get
;
set
;
}
/// <summary>
/// 地铁线路
/// </summary>
public
int
MetroNum
{
get
;
set
;
}
/// <summary>
/// 站点名称
/// </summary>
public
string
MetroName
{
get
;
set
;
}
/// <summary>
/// 收藏id
/// </summary>
public
int
CollectId
{
get
;
set
;
}
/// <summary>
/// 导出选中的字段
/// </summary>
public
List
<
int
>
ExcelEnumIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_CarrierMetroApplyFor_Extend.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.TradePavilion
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 载体申请扩展类
/// </summary>
public
class
RB_CarrierMetroApplyFor_Extend
:
RB_CarrierMetroApplyFor
{
/// <summary>
/// 载体ids
/// </summary>
public
string
CarrierIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_Carrier_Extend.cs
View file @
1cff3609
...
...
@@ -51,5 +51,15 @@ namespace Mall.Model.Extend.TradePavilion
/// 导出选中的字段
/// </summary>
public
List
<
int
>
ExcelEnumIds
{
get
;
set
;
}
/// <summary>
/// 认证用户
/// </summary>
public
string
UserName
{
get
;
set
;
}
/// <summary>
/// 认证用户头像
/// </summary>
public
string
UserIcon
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_Company_Extend.cs
View file @
1cff3609
...
...
@@ -11,8 +11,23 @@ namespace Mall.Model.Extend.TradePavilion
public
class
RB_Company_Extend
:
RB_Company
{
/// <summary>
///
公司
品牌
///
认证
品牌
/// </summary>
public
RB_CompanyBrand_Extend
BrandModel
{
get
;
set
;
}
public
RB_BrandApplyFor_Extend
BrandModel
{
get
;
set
;
}
/// <summary>
/// 认证载体
/// </summary>
public
RB_CarrierApplyFor_Extend
CarrierModel
{
get
;
set
;
}
/// <summary>
/// 用户名称
/// </summary>
public
string
UserName
{
get
;
set
;
}
/// <summary>
/// 用户头像
/// </summary>
public
string
UserIcon
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_FirstShop_Wish_Extend.cs
0 → 100644
View file @
1cff3609
using
Mall.Model.Entity.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 心愿单扩展实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_FirstShop_Wish_Extend
:
RB_FirstShop_Wish
{
/// <summary>
/// 用户名称
/// </summary>
public
string
UserName
{
get
;
set
;
}
}
}
Mall.Module.TradePavilion/AuthenticationModule.cs
View file @
1cff3609
...
...
@@ -224,5 +224,17 @@ namespace Mall.Module.TradePavilion
};
return
authenticationRepository
.
Update
(
keyValues
,
wheres
);
}
/// <summary>
/// 获取首店申请审核通过的年份
/// </summary>
/// <param name="createBy"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
string
GetFirstShopYear
(
int
createBy
,
int
mallBaseId
)
{
var
model
=
authenticationRepository
.
GetList
(
new
RB_Authentication_Extend
()
{
MallBaseId
=
mallBaseId
,
CreateBy
=
createBy
,
AuditState
=
2
}).
FirstOrDefault
();
return
model
?.
AuditDate
.
Value
.
Year
.
ToString
()
??
""
;
}
}
}
Mall.Module.TradePavilion/CarrierModule.cs
View file @
1cff3609
...
...
@@ -6,6 +6,7 @@ using Mall.Model.Extend.TradePavilion;
using
Mall.Repository.TradePavilion
;
using
Newtonsoft.Json
;
using
VT.FW.DB
;
using
Mall.Common.Plugin
;
namespace
Mall.Module.TradePavilion
{
...
...
@@ -27,7 +28,22 @@ namespace Mall.Module.TradePavilion
/// 公司信息仓储层对象
/// </summary>
private
readonly
RB_CompanyRepository
companyRepository
=
new
RB_CompanyRepository
();
/// <summary>
/// 品牌申请
/// </summary>
private
readonly
RB_BrandApplyForRepository
brandApplyForRepository
=
new
RB_BrandApplyForRepository
();
/// <summary>
/// 载体申请
/// </summary>
private
readonly
RB_CarrierApplyForRepository
carrierApplyForRepository
=
new
RB_CarrierApplyForRepository
();
/// <summary>
/// 载体地铁信息
/// </summary>
private
readonly
RB_CarrierMetroApplyForRepository
carrierMetroApplyForRepository
=
new
RB_CarrierMetroApplyForRepository
();
/// <summary>
/// 用户
/// </summary>
private
readonly
Repository
.
User
.
RB_Member_UserRepository
member_UserRepository
=
new
Repository
.
User
.
RB_Member_UserRepository
();
/// <summary>
/// 品牌信息仓储层对象
/// </summary>
...
...
@@ -53,7 +69,7 @@ namespace Mall.Module.TradePavilion
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Carrier_Extend
>
GetCarrierPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Carrier_Extend
query
)
public
List
<
RB_Carrier_Extend
>
GetCarrierPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Carrier_Extend
query
,
bool
IsSelectUser
=
false
)
{
var
list
=
carrierRepository
.
GetCarrierPageList
(
pageIndex
,
pageSize
,
out
rowCount
,
query
);
if
(
list
!=
null
&&
list
.
Any
())
...
...
@@ -71,6 +87,20 @@ namespace Mall.Module.TradePavilion
}
}
}
if
(
IsSelectUser
)
{
if
(
list
.
Where
(
x
=>
x
.
UserId
>
0
).
Any
())
{
//查询用户列表
string
userIds
=
string
.
Join
(
","
,
list
.
Where
(
x
=>
x
.
UserId
>
0
).
Select
(
x
=>
x
.
UserId
));
var
ulist
=
member_UserRepository
.
GetList
(
new
Model
.
Extend
.
User
.
RB_Member_User_Extend
()
{
MallBaseId
=
query
.
MallBaseId
,
UserIds
=
userIds
});
foreach
(
var
item
in
list
.
Where
(
x
=>
x
.
UserId
>
0
))
{
var
umodel
=
ulist
.
Where
(
x
=>
x
.
Id
==
item
.
UserId
).
FirstOrDefault
();
item
.
UserName
=
umodel
.
Name
;
item
.
UserIcon
=
umodel
.
Photo
;
}
}
}
}
return
list
;
}
...
...
@@ -196,6 +226,130 @@ namespace Mall.Module.TradePavilion
return
flag
;
}
/// <summary>
/// 验证载体名称
/// </summary>
/// <param name="carrierName"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
ValidateCarrierName
(
string
carrierName
,
int
mallBaseId
)
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Carrier_Extend
.
CarrierName
),
FiledValue
=
carrierName
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Carrier_Extend
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
carrierRepository
.
Exists
(
wheres
);
}
/// <summary>
/// 新增修改载体申请
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetCarrierApplyFor
(
RB_CarrierApplyFor_Extend
model
)
{
var
cmodel
=
companyRepository
.
GetEntity
(
model
.
CompanyId
);
if
(
cmodel
==
null
)
{
return
false
;
}
if
(
cmodel
.
FirstShopType
!=
2
)
{
return
false
;
}
bool
flag
=
false
;
if
(
model
.
ID
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_CarrierApplyFor_Extend
.
CarrierName
),
model
.
CarrierName
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
Logo
),
model
.
Logo
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
Banner
),
model
.
Banner
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
VideoUrl
),
model
.
VideoUrl
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
Address
),
model
.
Address
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
LatAndLon
),
model
.
LatAndLon
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
Developers
),
model
.
Developers
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
OpenTime
),
model
.
OpenTime
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
CarrierSize
),
model
.
CarrierSize
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
ProjectType
),(
int
)
model
.
ProjectType
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
LayersNum
),
model
.
LayersNum
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
CarNum
),
model
.
CarNum
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
CarrierPlan
),
model
.
CarrierPlan
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
CarrierTarget
),
model
.
CarrierTarget
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
Location
),
model
.
Location
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
Crowd
),
model
.
Crowd
},
{
nameof
(
RB_CarrierApplyFor_Extend
.
ExistCarrierId
),
model
.
ExistCarrierId
},
};
flag
=
carrierApplyForRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_CarrierApplyFor_Extend
.
ID
),
model
.
ID
));
if
(
flag
)
{
var
oldCarrierMetroList
=
carrierMetroApplyForRepository
.
GetCarrierMetroList
(
new
RB_CarrierMetroApplyFor_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CarrierId
=
model
.
ID
});
carrierMetroApplyForRepository
.
DeleteBatch
(
oldCarrierMetroList
);
model
.
CarrierMetroList
.
ForEach
(
x
=>
{
x
.
CarrierId
=
model
.
ID
;
x
.
Status
=
0
;
x
.
TenantId
=
model
.
TenantId
;
x
.
MallBaseId
=
model
.
MallBaseId
;
});
carrierMetroApplyForRepository
.
InsertBatch
(
model
.
CarrierMetroList
);
//更新认证表 资料状态为完成
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Company_Extend
.
IsComplete
),
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
);
}
}
else
{
#
region
验证载体申请是否已存在
var
oldList
=
carrierApplyForRepository
.
GetCarrierList
(
new
RB_CarrierApplyFor_Extend
()
{
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
oldList
.
Any
())
{
return
false
;
}
#
endregion
int
Id
=
carrierApplyForRepository
.
Insert
(
model
);
if
(
Id
>
0
)
{
model
.
CarrierMetroList
.
ForEach
(
x
=>
{
x
.
ID
=
0
;
x
.
CarrierId
=
Id
;
x
.
Status
=
0
;
x
.
TenantId
=
model
.
TenantId
;
x
.
MallBaseId
=
model
.
MallBaseId
;
});
carrierMetroApplyForRepository
.
InsertBatch
(
model
.
CarrierMetroList
);
//更新认证表 资料状态为完成
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Company_Extend
.
IsComplete
),
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
);
}
flag
=
Id
>
0
;
}
return
flag
;
}
/// <summary>
///删除载体信息状态
...
...
@@ -296,9 +450,25 @@ namespace Mall.Module.TradePavilion
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Brand_Extend
>
GetBrandPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Brand_Extend
query
)
public
List
<
RB_Brand_Extend
>
GetBrandPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Brand_Extend
query
,
bool
IsSelectUser
=
false
)
{
return
brandRepository
.
GetBrandPageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
brandRepository
.
GetBrandPageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
IsSelectUser
)
{
if
(
list
.
Where
(
x
=>
x
.
UserId
>
0
).
Any
())
{
//查询用户列表
string
userIds
=
string
.
Join
(
","
,
list
.
Where
(
x
=>
x
.
UserId
>
0
).
Select
(
x
=>
x
.
UserId
));
var
ulist
=
member_UserRepository
.
GetList
(
new
Model
.
Extend
.
User
.
RB_Member_User_Extend
()
{
MallBaseId
=
query
.
MallBaseId
,
UserIds
=
userIds
});
foreach
(
var
item
in
list
.
Where
(
x
=>
x
.
UserId
>
0
))
{
var
umodel
=
ulist
.
Where
(
x
=>
x
.
Id
==
item
.
UserId
).
FirstOrDefault
();
item
.
UserName
=
umodel
.
Name
;
item
.
UserIcon
=
umodel
.
Photo
;
}
}
}
return
list
;
}
/// <summary>
...
...
@@ -311,6 +481,51 @@ namespace Mall.Module.TradePavilion
return
brandRepository
.
GetBrand
(
query
);
}
/// <summary>
/// 验证品牌名称
/// </summary>
/// <param name="brandName"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
ValidateBrandName
(
string
brandName
,
int
mallBaseId
)
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Brand_Extend
.
BrandName
),
FiledValue
=
brandName
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Brand_Extend
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
brandRepository
.
Exists
(
wheres
);
}
/// <summary>
/// 验证品牌全称
/// </summary>
/// <param name="brandName"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
ValidateFullBrandName
(
string
brandName
,
int
mallBaseId
)
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Brand_Extend
.
FullBrandName
),
FiledValue
=
brandName
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Brand_Extend
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
brandRepository
.
Exists
(
wheres
);
}
/// <summary>
/// 根据查询条件获取品牌信息
...
...
@@ -322,6 +537,16 @@ namespace Mall.Module.TradePavilion
return
brandRepository
.
GetBrandListByWhere
(
query
);
}
/// <summary>
/// 获取品牌列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Brand_Extend
>
GetBrandList_V2
(
RB_Brand_Extend
query
)
{
return
brandRepository
.
GetBrandList
(
query
);
}
/// <summary>
/// 新增/修改品牌
/// </summary>
...
...
@@ -365,15 +590,109 @@ namespace Mall.Module.TradePavilion
{
nameof
(
RB_Brand_Extend
.
KongTiao
),
model
.
KongTiao
},
{
nameof
(
RB_Brand_Extend
.
XinFeng
),
model
.
XinFeng
},
{
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
},
{
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
},
{
nameof
(
RB_Brand_Extend
.
OpenShopWish
),
model
.
OpenShopWish
},
};
return
brandRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Brand_Extend
.
ID
),
model
.
ID
));
}
}
/// <summary>
/// 品牌申请
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetBrandApplyFor
(
RB_BrandApplyFor_Extend
model
)
{
var
cmodel
=
companyRepository
.
GetEntity
(
model
.
CompanyId
);
if
(
cmodel
==
null
)
{
return
false
;
}
if
(
cmodel
.
FirstShopType
!=
1
)
{
return
false
;
}
if
(
model
.
ID
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_BrandApplyFor_Extend
.
UpdateDate
),
model
.
UpdateDate
},
{
nameof
(
RB_BrandApplyFor_Extend
.
Logo
),
model
.
Logo
},
{
nameof
(
RB_BrandApplyFor_Extend
.
Banner
),
model
.
Banner
},
{
nameof
(
RB_BrandApplyFor_Extend
.
VideoUrl
),
model
.
VideoUrl
},
{
nameof
(
RB_BrandApplyFor_Extend
.
FullBrandName
),
model
.
FullBrandName
},
{
nameof
(
RB_BrandApplyFor_Extend
.
BrandName
),
model
.
BrandName
},
{
nameof
(
RB_BrandApplyFor_Extend
.
ShopNum
),
model
.
ShopNum
},
{
nameof
(
RB_BrandApplyFor_Extend
.
BuiltUpArea
),
model
.
BuiltUpArea
},
{
nameof
(
RB_BrandApplyFor_Extend
.
EndBuiltUpArea
),
model
.
EndBuiltUpArea
},
{
nameof
(
RB_BrandApplyFor_Extend
.
BrandType
),
model
.
BrandType
},
{
nameof
(
RB_BrandApplyFor_Extend
.
CustomerType
),
model
.
CustomerType
},
{
nameof
(
RB_BrandApplyFor_Extend
.
StoreExpansion
),
model
.
StoreExpansion
},
{
nameof
(
RB_BrandApplyFor_Extend
.
ProjectType
),
model
.
ProjectType
},
{
nameof
(
RB_BrandApplyFor_Extend
.
AreaRequirement
),
model
.
AreaRequirement
},
{
nameof
(
RB_BrandApplyFor_Extend
.
EndAreaRequirement
),
model
.
EndAreaRequirement
},
{
nameof
(
RB_BrandApplyFor_Extend
.
Advertising
),
model
.
Advertising
},
{
nameof
(
RB_BrandApplyFor_Extend
.
Other
),
model
.
Other
},
{
nameof
(
RB_BrandApplyFor_Extend
.
ShopSize
),
model
.
ShopSize
},
{
nameof
(
RB_BrandApplyFor_Extend
.
Plumbing
),
model
.
Plumbing
},
{
nameof
(
RB_BrandApplyFor_Extend
.
Caliber
),
model
.
Caliber
},
{
nameof
(
RB_BrandApplyFor_Extend
.
Sewage
),
model
.
Sewage
},
{
nameof
(
RB_BrandApplyFor_Extend
.
RanQi
),
model
.
RanQi
},
{
nameof
(
RB_BrandApplyFor_Extend
.
DianLiang
),
model
.
DianLiang
},
{
nameof
(
RB_BrandApplyFor_Extend
.
PaiYan
),
model
.
PaiYan
},
{
nameof
(
RB_BrandApplyFor_Extend
.
KongTiao
),
model
.
KongTiao
},
{
nameof
(
RB_BrandApplyFor_Extend
.
XinFeng
),
model
.
XinFeng
},
{
nameof
(
RB_BrandApplyFor_Extend
.
BrandClassId
),
model
.
BrandClassId
},
{
nameof
(
RB_BrandApplyFor_Extend
.
RanQiBZ
),
model
.
RanQiBZ
},
{
nameof
(
RB_BrandApplyFor_Extend
.
IsDianLiang
),
model
.
IsDianLiang
},
{
nameof
(
RB_BrandApplyFor_Extend
.
PaiYanBZ
),
model
.
PaiYanBZ
},
{
nameof
(
RB_BrandApplyFor_Extend
.
IsShopSize
),
model
.
IsShopSize
},
{
nameof
(
RB_BrandApplyFor_Extend
.
OpenShopWish
),
model
.
OpenShopWish
},
{
nameof
(
RB_BrandApplyFor_Extend
.
ExistBrandId
),
model
.
ExistBrandId
},
};
bool
flag
=
brandApplyForRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_BrandApplyFor_Extend
.
ID
),
model
.
ID
));
if
(
flag
)
{
//更新认证表 资料状态为完成
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Company_Extend
.
IsComplete
),
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
);
}
return
flag
;
}
else
{
#
region
验证品牌数据是否已存在
var
oldList
=
brandApplyForRepository
.
GetBrandListByWhere
(
new
RB_BrandApplyFor_Extend
()
{
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
oldList
.
Any
())
{
return
false
;
}
#
endregion
bool
flag
=
brandApplyForRepository
.
Insert
(
model
)
>
0
;
if
(
flag
)
{
//更新认证表 资料状态为完成
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Company_Extend
.
IsComplete
),
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
);
}
return
flag
;
}
}
/// <summary>
///删除品牌状态
/// </summary>
...
...
@@ -390,7 +709,6 @@ namespace Mall.Module.TradePavilion
return
flag
;
}
/// <summary>
/// 获取品牌信息分页列表
/// </summary>
...
...
Mall.Module.TradePavilion/CompanyModule.cs
View file @
1cff3609
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Repository.TradePavilion
;
using
Newtonsoft.Json
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
VT.FW.DB
;
...
...
@@ -13,6 +16,34 @@ namespace Mall.Module.TradePavilion
{
private
readonly
RB_CompanyRepository
companyRepository
=
new
RB_CompanyRepository
();
private
readonly
RB_CompanyBrandRepository
brandRepository
=
new
RB_CompanyBrandRepository
();
/// <summary>
/// 品牌申请
/// </summary>
private
readonly
RB_BrandApplyForRepository
brandApplyForRepository
=
new
RB_BrandApplyForRepository
();
/// <summary>
/// 载体申请
/// </summary>
private
readonly
RB_CarrierApplyForRepository
carrierApplyForRepository
=
new
RB_CarrierApplyForRepository
();
/// <summary>
/// 载体地铁
/// </summary>
private
readonly
RB_CarrierMetroApplyForRepository
carrierMetroApplyForRepository
=
new
RB_CarrierMetroApplyForRepository
();
/// <summary>
/// 品牌
/// </summary>
private
readonly
RB_BrandRepository
brand2Repository
=
new
RB_BrandRepository
();
/// <summary>
/// 载体
/// </summary>
private
readonly
RB_CarrierRepository
carrierRepository
=
new
RB_CarrierRepository
();
/// <summary>
/// 载体地铁
/// </summary>
private
readonly
RB_CarrierMetroRepository
carrierMetroRepository
=
new
RB_CarrierMetroRepository
();
/// <summary>
/// 用户
/// </summary>
private
readonly
Repository
.
User
.
RB_Member_UserRepository
member_UserRepository
=
new
Repository
.
User
.
RB_Member_UserRepository
();
/// <summary>
/// 获取公司信息分页列表
...
...
@@ -27,33 +58,43 @@ namespace Mall.Module.TradePavilion
var
list
=
companyRepository
.
GetCompanyPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Any
())
{
string
carrierIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
CompanyId
));
if
(!
string
.
IsNullOrWhiteSpace
(
carrierIds
))
{
var
metroList
=
brandRepository
.
GetBrandList
(
new
RB_CompanyBrand_Extend
{
TenantId
=
query
.
TenantId
,
MallBaseId
=
query
.
MallBaseId
,
CompanyIds
=
carrierIds
});
if
(
metroList
!=
null
&&
metroList
.
Any
())
{
foreach
(
var
item
in
list
)
{
item
.
BrandModel
=
new
RB_CompanyBrand_Extend
();
item
.
BrandModel
=
metroList
.
Where
(
x
=>
x
.
CompanyId
==
item
.
CompanyId
).
FirstOrDefault
();
if
(
item
.
BrandModel
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
item
.
BrandModel
.
CustomerType
))
{
item
.
BrandModel
.
CustomerTypeInfo
=
new
List
<
string
>();
foreach
(
var
itemCustomerType
in
item
.
BrandModel
.
CustomerType
.
Split
(
","
))
{
if
(!
string
.
IsNullOrWhiteSpace
(
itemCustomerType
)&&
itemCustomerType
!=
"5"
)
{
item
.
BrandModel
.
CustomerTypeInfo
.
Add
(
Common
.
Plugin
.
EnumHelper
.
GetEnumName
((
Common
.
Enum
.
TradePavilion
.
CustomerTypeEnum
)
System
.
Convert
.
ToInt32
(
itemCustomerType
)));
}
else
if
(!
string
.
IsNullOrWhiteSpace
(
itemCustomerType
))
{
item
.
BrandModel
.
CustomerTypeInfo
.
Add
(
item
.
BrandModel
.
CustomerOtherType
);
}
}
}
}
}
#
region
屏蔽
//string carrierIds = string.Join(",", list.Select(x => x.CompanyId));
//if (!string.IsNullOrWhiteSpace(carrierIds))
//{
// var metroList = brandRepository.GetBrandList(new RB_CompanyBrand_Extend { TenantId = query.TenantId, MallBaseId = query.MallBaseId, CompanyIds = carrierIds });
// if (metroList != null && metroList.Any())
// {
// foreach (var item in list)
// {
// item.BrandModel = new RB_CompanyBrand_Extend();
// item.BrandModel = metroList.Where(x => x.CompanyId == item.CompanyId).FirstOrDefault();
// if (item.BrandModel != null && !string.IsNullOrWhiteSpace(item.BrandModel.CustomerType))
// {
// item.BrandModel.CustomerTypeInfo = new List<string>();
// foreach (var itemCustomerType in item.BrandModel.CustomerType.Split(","))
// {
// if (!string.IsNullOrWhiteSpace(itemCustomerType) && itemCustomerType != "5")
// {
// item.BrandModel.CustomerTypeInfo.Add(Common.Plugin.EnumHelper.GetEnumName((Common.Enum.TradePavilion.CustomerTypeEnum)System.Convert.ToInt32(itemCustomerType)));
// }
// else if (!string.IsNullOrWhiteSpace(itemCustomerType))
// {
// item.BrandModel.CustomerTypeInfo.Add(item.BrandModel.CustomerOtherType);
// }
// }
// }
// }
// }
//}
#
endregion
//查询用户列表
string
userIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
CreateBy
));
var
ulist
=
member_UserRepository
.
GetList
(
new
Model
.
Extend
.
User
.
RB_Member_User_Extend
()
{
MallBaseId
=
query
.
MallBaseId
,
UserIds
=
userIds
});
foreach
(
var
item
in
list
)
{
var
umodel
=
ulist
.
Where
(
x
=>
x
.
Id
==
item
.
CreateBy
).
FirstOrDefault
();
item
.
UserName
=
umodel
.
Name
;
item
.
UserIcon
=
umodel
.
Photo
;
}
}
...
...
@@ -83,28 +124,106 @@ namespace Mall.Module.TradePavilion
var
model
=
companyRepository
.
GetEntity
<
RB_Company_Extend
>(
CompanyId
);
if
(
model
!=
null
&&
model
.
CompanyId
>
0
)
{
var
metroList
=
brandRepository
.
GetBrandList
(
new
RB_CompanyBrand_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
metroList
!=
null
&&
metroList
.
Any
())
model
.
BrandModel
=
new
RB_BrandApplyFor_Extend
();
model
.
CarrierModel
=
new
RB_CarrierApplyFor_Extend
();
if
(
model
.
FirstShopType
==
1
)
{
model
.
BrandModel
=
new
RB_CompanyBrand_Extend
();
model
.
BrandModel
=
metroList
.
FirstOrDefault
();
if
(
model
.
BrandModel
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
CustomerType
))
var
brandList
=
brandApplyForRepository
.
GetBrandListByWhere
(
new
RB_BrandApplyFor_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
{
model
.
BrandModel
.
CustomerTypeInfo
=
new
List
<
string
>
();
foreach
(
var
itemCustomerType
in
model
.
BrandModel
.
CustomerType
.
Split
(
","
))
model
.
BrandModel
=
brandList
.
FirstOrDefault
();
if
(
model
.
BrandModel
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
CustomerType
))
{
if
(
itemCustomerType
!=
"5"
)
model
.
BrandModel
.
CustomerTypeInfo
=
new
List
<
string
>();
foreach
(
var
itemCustomerType
in
model
.
BrandModel
.
CustomerType
.
Split
(
","
))
{
model
.
BrandModel
.
CustomerTypeInfo
.
Add
(
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
itemCustomerType
));
}
else
{
model
.
BrandModel
.
CustomerTypeInfo
.
Add
(
model
.
BrandModel
.
CustomerOtherType
);
}
}
}
}
else
{
var
carrierList
=
carrierApplyForRepository
.
GetCarrierList
(
new
RB_CarrierApplyFor_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
carrierList
.
Any
())
{
model
.
CarrierModel
=
carrierList
.
FirstOrDefault
();
var
metroList
=
carrierMetroApplyForRepository
.
GetCarrierMetroList
(
new
RB_CarrierMetroApplyFor_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CarrierId
=
model
.
CarrierModel
.
ID
});
model
.
CarrierModel
.
CarrierMetroList
=
new
List
<
RB_CarrierMetroApplyFor_Extend
>();
if
(
metroList
!=
null
&&
metroList
.
Any
())
{
model
.
CarrierModel
.
CarrierMetroList
=
metroList
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
CarrierModel
.
Banner
))
{
model
.
CarrierModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
CarrierModel
.
Banner
);
}
else
{
model
.
CarrierModel
.
BannerList
=
new
List
<
string
>();
}
}
}
}
return
model
;
}
/// <summary>
/// 获取认证状态
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public
object
GetCommpanyStatus
(
int
userId
)
{
var
model
=
companyRepository
.
GetCompanyRepository
(
new
RB_Company_Extend
()
{
CreateBy
=
userId
});
if
(
model
!=
null
)
{
if
(
model
.
CompanyStatus
==
1
)
{
return
new
{
CompanyStatus
=
5
,
//认证通过
model
.
FirstShopType
,
model
.
CompanyName
};
}
else
if
(
model
.
CompanyStatus
==
0
)
{
if
(
model
.
IsComplete
==
1
)
{
return
new
{
CompanyStatus
=
3
,
//认证审核中
model
.
FirstShopType
,
model
.
CompanyName
};
}
else
{
return
new
{
CompanyStatus
=
2
,
//认证待完善
model
.
FirstShopType
,
model
.
CompanyName
};
}
}
else
if
(
model
.
CompanyStatus
==
2
)
{
return
new
{
CompanyStatus
=
4
,
//认证未通过
model
.
FirstShopType
,
model
.
CompanyName
};
}
}
else
{
return
new
{
CompanyStatus
=
1
,
//未认证
FirstShopType
=
0
,
CompanyName
=
""
};
}
return
model
;
}
...
...
@@ -116,26 +235,107 @@ namespace Mall.Module.TradePavilion
/// <returns></returns>
public
RB_Company_Extend
GetCompanyByUserIdModule
(
int
userId
)
{
var
model
=
companyRepository
.
GetCompanyRepository
(
new
RB_Company_Extend
()
{
CreateBy
=
userId
});
var
model
=
companyRepository
.
GetCompanyRepository
(
new
RB_Company_Extend
()
{
CreateBy
=
userId
});
if
(
model
!=
null
&&
model
.
CompanyId
>
0
)
{
var
metroList
=
brandRepository
.
GetBrandList
(
new
RB_CompanyBrand_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
metroList
!=
null
&&
metroList
.
Any
())
model
.
BrandModel
=
new
RB_BrandApplyFor_Extend
();
model
.
CarrierModel
=
new
RB_CarrierApplyFor_Extend
();
if
(
model
.
CompanyStatus
==
1
)
{
model
.
BrandModel
=
new
RB_CompanyBrand_Extend
();
model
.
BrandModel
=
metroList
.
FirstOrDefault
();
if
(
model
.
BrandModel
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
CustomerType
))
if
(
model
.
FirstShopType
==
1
)
{
model
.
BrandModel
.
CustomerTypeInfo
=
new
List
<
string
>();
foreach
(
var
itemCustomerType
in
model
.
BrandModel
.
CustomerType
.
Split
(
","
))
//审核通过了的 直接查询资料表
var
blist
=
brand2Repository
.
GetBrandList
(
new
RB_Brand_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
UserId
=
userId
});
model
.
BrandModel
=
blist
.
FirstOrDefault
().
RefMapperTo
<
RB_BrandApplyFor_Extend
>();
if
(
model
.
BrandModel
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
CustomerType
))
{
if
(
itemCustomerType
!=
"5"
)
model
.
BrandModel
.
CustomerTypeInfo
=
new
List
<
string
>();
foreach
(
var
itemCustomerType
in
model
.
BrandModel
.
CustomerType
.
Split
(
","
))
{
model
.
BrandModel
.
CustomerTypeInfo
.
Add
(
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
itemCustomerType
));
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
Banner
))
{
model
.
BrandModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
BrandModel
.
Banner
);
}
else
{
model
.
BrandModel
.
BannerList
=
new
List
<
string
>();
}
}
else
{
var
clist
=
carrierRepository
.
GetCarrierList
(
new
RB_Carrier_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
UserId
=
userId
});
if
(
clist
.
Any
())
{
model
.
CarrierModel
=
clist
.
FirstOrDefault
().
RefMapperTo
<
RB_CarrierApplyFor_Extend
>();
var
metroList
=
carrierMetroRepository
.
GetCarrierMetroList
(
new
RB_CarrierMetro_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CarrierId
=
model
.
CarrierModel
.
ID
});
model
.
CarrierModel
.
CarrierMetroList
=
new
List
<
RB_CarrierMetroApplyFor_Extend
>();
if
(
metroList
!=
null
&&
metroList
.
Any
())
{
model
.
CarrierModel
.
CarrierMetroList
=
metroList
.
RefMapperToList
<
RB_CarrierMetroApplyFor_Extend
>();
}
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
CarrierModel
.
Banner
))
{
model
.
CarrierModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
CarrierModel
.
Banner
);
}
else
{
model
.
BrandModel
.
CustomerTypeInfo
.
Add
(
model
.
BrandModel
.
CustomerOtherType
);
model
.
CarrierModel
.
BannerList
=
new
List
<
string
>();
}
}
}
}
else
{
if
(
model
.
FirstShopType
==
1
)
{
var
brandList
=
brandApplyForRepository
.
GetBrandListByWhere
(
new
RB_BrandApplyFor_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
{
model
.
BrandModel
=
brandList
.
FirstOrDefault
();
if
(
model
.
BrandModel
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
CustomerType
))
{
model
.
BrandModel
.
CustomerTypeInfo
=
new
List
<
string
>();
foreach
(
var
itemCustomerType
in
model
.
BrandModel
.
CustomerType
.
Split
(
","
))
{
model
.
BrandModel
.
CustomerTypeInfo
.
Add
(
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
itemCustomerType
));
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
Banner
))
{
model
.
BrandModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
BrandModel
.
Banner
);
}
else
{
model
.
BrandModel
.
BannerList
=
new
List
<
string
>();
}
}
}
else
{
var
carrierList
=
carrierApplyForRepository
.
GetCarrierList
(
new
RB_CarrierApplyFor_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
carrierList
.
Any
())
{
model
.
CarrierModel
=
carrierList
.
FirstOrDefault
();
var
metroList
=
carrierMetroApplyForRepository
.
GetCarrierMetroList
(
new
RB_CarrierMetroApplyFor_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CarrierId
=
model
.
CarrierModel
.
ID
});
model
.
CarrierModel
.
CarrierMetroList
=
new
List
<
RB_CarrierMetroApplyFor_Extend
>();
if
(
metroList
!=
null
&&
metroList
.
Any
())
{
model
.
CarrierModel
.
CarrierMetroList
=
metroList
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
CarrierModel
.
Banner
))
{
model
.
CarrierModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
CarrierModel
.
Banner
);
}
else
{
model
.
CarrierModel
.
BannerList
=
new
List
<
string
>();
}
}
}
...
...
@@ -164,6 +364,7 @@ namespace Mall.Module.TradePavilion
{
nameof
(
RB_Company_Extend
.
LegalPerson
),
model
.
LegalPerson
},
{
nameof
(
RB_Company_Extend
.
UnifiedCode
),
model
.
UnifiedCode
},
{
nameof
(
RB_Company_Extend
.
CompanyIntro
),
model
.
CompanyIntro
},
{
nameof
(
RB_Company_Extend
.
FirstShopType
),
model
.
FirstShopType
},
{
nameof
(
RB_Company_Extend
.
CompanyStatus
),
model
.
CompanyStatus
},
{
nameof
(
RB_Company_Extend
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Company_Extend
.
UpdateDate
),
model
.
UpdateDate
},
...
...
@@ -179,6 +380,36 @@ namespace Mall.Module.TradePavilion
return
ID
;
}
/// <summary>
/// 设置认证为待完善状态
/// </summary>
/// <param name="companyId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
string
SetCommpanyCompleteCorvidae
(
int
companyId
,
int
userId
)
{
var
model
=
companyRepository
.
GetEntity
(
companyId
);
if
(
model
==
null
||
model
.
CreateBy
!=
userId
)
{
return
"认证不存在"
;
}
if
(
model
.
CompanyStatus
==
0
&&
model
.
IsComplete
==
1
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Company_Extend
.
IsComplete
),
0
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Company_Extend
.
CompanyId
),
FiledValue
=
companyId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
companyRepository
.
Update
(
keyValues
,
wheres
);
return
flag
?
""
:
"修改失败"
;
}
else
{
return
"认证状态不正确"
;
}
}
/// <summary>
/// 更新公司信息状态
/// </summary>
...
...
@@ -200,15 +431,274 @@ namespace Mall.Module.TradePavilion
/// </summary>
/// <param name="CompanyId"></param>
/// <param name="Status"></param>
/// <param name="remark"></param>
/// <returns></returns>
public
bool
UpdateCompanyStatus
(
int
CompanyId
,
int
Status
)
public
string
UpdateCompanyStatus
(
int
CompanyId
,
int
Status
,
string
remark
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
var
trans
=
companyRepository
.
DbTransaction
;
try
{
{
nameof
(
RB_Company_Extend
.
CompanyStatus
),
Status
},
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Company_Extend
.
CompanyStatus
),
Status
},
};
if
(
Status
==
2
)
{
fileds
.
Add
(
nameof
(
RB_Company_Extend
.
RejectRemark
),
remark
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Company_Extend
.
CompanyId
),
FiledValue
=
CompanyId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
companyRepository
.
Update
(
fileds
,
wheres
,
trans
);
if
(
flag
)
{
//新增 更新品牌 载体信息
if
(
Status
==
1
)
{
var
cmodel
=
companyRepository
.
GetEntity
(
CompanyId
);
if
(
cmodel
.
FirstShopType
==
1
)
{
//品牌
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
)
{
//修改
#
region
验证品牌是否已关联用户
var
bmodel
=
brand2Repository
.
GetEntity
(
BrandModel
.
ExistBrandId
);
if
(
bmodel
.
UserId
>
0
)
{
companyRepository
.
DBSession
.
Rollback
();
return
"该品牌已被其他用户认证,请核实后再试"
;
}
#
endregion
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
},
};
brand2Repository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_Brand_Extend
.
ID
),
BrandModel
.
ExistBrandId
),
trans
);
}
else
{
//新增
#
region
再次验证品牌名称
if
(
ValidateBrandName
(
BrandModel
.
BrandName
,
cmodel
.
MallBaseId
))
{
companyRepository
.
DBSession
.
Rollback
();
return
"该品牌名称已存在,请确认品牌名称后再次审核"
;
}
if
(
ValidateFullBrandName
(
BrandModel
.
FullBrandName
,
cmodel
.
MallBaseId
))
{
companyRepository
.
DBSession
.
Rollback
();
return
"该品牌全名已存在,请确认品牌全名后再次审核"
;
}
#
endregion
#
region
新增品牌
var
inserBModel
=
BrandModel
.
RefMapperTo
<
RB_Brand_Extend
>();
inserBModel
.
ID
=
0
;
inserBModel
.
UserId
=
cmodel
.
CreateBy
;
brand2Repository
.
Insert
(
inserBModel
,
trans
);
#
endregion
}
}
}
else
{
//载体
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
)
{
//修改
#
region
验证品牌是否已关联用户
var
carrmodel
=
carrierRepository
.
GetEntity
(
CarrierModel
.
ExistCarrierId
);
if
(
carrmodel
.
UserId
>
0
)
{
companyRepository
.
DBSession
.
Rollback
();
return
"该载体已被其他用户认证,请核实后再试"
;
}
#
endregion
#
region
修改载体
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
},
};
flag
=
carrierRepository
.
Update
(
filedsCarrier
,
new
WhereHelper
(
nameof
(
RB_Carrier_Extend
.
ID
),
carrmodel
.
ID
),
trans
);
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
再次验证载体名称
if
(
ValidateCarrierName
(
CarrierModel
.
CarrierName
,
CarrierModel
.
MallBaseId
))
{
return
"该载体名称已存在,请确认载体名称后再次审核"
;
}
#
endregion
#
region
新增载体
var
inserCModel
=
CarrierModel
.
RefMapperTo
<
RB_Carrier_Extend
>();
inserCModel
.
ID
=
0
;
inserCModel
.
UserId
=
cmodel
.
CreateBy
;
int
Id
=
carrierRepository
.
Insert
(
inserCModel
,
trans
);
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
,
trans
);
}
#
endregion
}
}
}
}
}
companyRepository
.
DBSession
.
Commit
();
return
flag
?
""
:
"出错了,请联系管理员"
;
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"UpdateCompanyStatus"
);
companyRepository
.
DBSession
.
Rollback
();
return
"出错了,请联系管理员"
;
}
}
/// <summary>
/// 验证品牌名称
/// </summary>
/// <param name="brandName"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
ValidateBrandName
(
string
brandName
,
int
mallBaseId
)
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Brand_Extend
.
BrandName
),
FiledValue
=
brandName
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Brand_Extend
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
companyRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Company_Extend
.
CompanyId
),
CompanyId
));
return
flag
;
return
brandRepository
.
Exists
(
wheres
);
}
/// <summary>
/// 验证品牌全称
/// </summary>
/// <param name="brandName"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
ValidateFullBrandName
(
string
brandName
,
int
mallBaseId
)
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Brand_Extend
.
FullBrandName
),
FiledValue
=
brandName
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Brand_Extend
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
brandRepository
.
Exists
(
wheres
);
}
/// <summary>
/// 验证载体名称
/// </summary>
/// <param name="carrierName"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
ValidateCarrierName
(
string
carrierName
,
int
mallBaseId
)
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Carrier_Extend
.
CarrierName
),
FiledValue
=
carrierName
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Carrier_Extend
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
carrierRepository
.
Exists
(
wheres
);
}
}
}
Mall.Module.TradePavilion/FirstShopWishModule.cs
0 → 100644
View file @
1cff3609
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Repository.TradePavilion
;
using
Mall.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Module.TradePavilion
{
/// <summary>
/// 心愿单处理类
/// </summary>
public
class
FirstShopWishModule
{
/// <summary>
/// 心愿单仓储层对象
/// </summary>
private
readonly
RB_FirstShop_WishRepository
firstShop_WishRepository
=
new
RB_FirstShop_WishRepository
();
/// <summary>
/// 用户
/// </summary>
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
/// <summary>
/// 认证
/// </summary>
private
readonly
RB_CompanyRepository
companyRepository
=
new
RB_CompanyRepository
();
/// <summary>
/// 获取心愿单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_FirstShop_Wish_Extend
>
GetWishPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_FirstShop_Wish_Extend
query
)
{
return
firstShop_WishRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 获取心愿单列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_FirstShop_Wish_Extend
>
GetWishList
(
RB_FirstShop_Wish_Extend
query
)
{
return
firstShop_WishRepository
.
GetList
(
query
);
}
/// <summary>
/// 取消心愿单
/// </summary>
/// <param name="wishId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
string
DelFirstShopWishInfo
(
int
wishId
,
int
mallBaseId
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_FirstShop_Wish_Extend
.
Status
),
1
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_FirstShop_Wish_Extend
.
Id
),
FiledValue
=
wishId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_FirstShop_Wish_Extend
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
firstShop_WishRepository
.
Update
(
keyValues
,
wheres
);
return
flag
?
""
:
"取消失败"
;
}
/// <summary>
/// 新增修改心愿单
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
string
SetMyWishInfo
(
RB_FirstShop_Wish_Extend
demodel
)
{
//验证用户是否品牌方 并且已认证
var
cmodel
=
companyRepository
.
GetCompanyRepository
(
new
RB_Company_Extend
()
{
MallBaseId
=
demodel
.
MallBaseId
,
CreateBy
=
demodel
.
UserId
});
if
(
cmodel
==
null
)
{
return
"未申请认证,无法使用心愿单"
;
}
if
(
cmodel
.
CompanyStatus
!=
1
)
{
return
"认证未审核通过,无法使用心愿单"
;
}
if
(
cmodel
.
FirstShopType
!=
1
)
{
return
"非品牌方无法使用心愿单"
;
}
if
(
demodel
.
Id
>
0
)
{
//修改
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_FirstShop_Wish_Extend
.
BranchName
),
demodel
.
BranchName
},
{
nameof
(
RB_FirstShop_Wish_Extend
.
CarrierName
),
demodel
.
CarrierName
},
{
nameof
(
RB_FirstShop_Wish_Extend
.
Area
),
demodel
.
Area
},
{
nameof
(
RB_FirstShop_Wish_Extend
.
Description
),
demodel
.
Description
},
{
nameof
(
RB_FirstShop_Wish_Extend
.
NameCard
),
demodel
.
NameCard
},
{
nameof
(
RB_FirstShop_Wish_Extend
.
UpdateDate
),
demodel
.
UpdateDate
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_FirstShop_Wish_Extend
.
Id
),
FiledValue
=
demodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
firstShop_WishRepository
.
Update
(
keyValues
,
wheres
);
return
flag
?
""
:
"修改失败"
;
}
else
{
//新增
bool
flag
=
firstShop_WishRepository
.
Insert
(
demodel
)
>
0
;
return
flag
?
""
:
"新增失败"
;
}
}
/// <summary>
/// 获取心愿单详情
/// </summary>
/// <param name="wishId"></param>
/// <returns></returns>
public
RB_FirstShop_Wish_Extend
GetMyWishInfo
(
int
wishId
)
{
return
firstShop_WishRepository
.
GetEntity
<
RB_FirstShop_Wish_Extend
>(
wishId
);
}
}
}
Mall.Repository/TradePavilion/RB_AuthenticationRepository.cs
View file @
1cff3609
...
...
@@ -127,6 +127,10 @@ namespace Mall.Repository.TradePavilion
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Authentication_Extend
.
Category
)}
=
{(
int
)
query
.
Category
}
"
);
}
if
(
query
.
CreateBy
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Authentication_Extend
.
CreateBy
)}
=
{(
int
)
query
.
CreateBy
}
"
);
}
if
(
query
.
AuditState
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Authentication_Extend
.
AuditState
)}
=
{
query
.
AuditState
}
"
);
...
...
Mall.Repository/TradePavilion/RB_BrandApplyForRepository.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Mall.Common.Enum
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 品牌申请仓储
/// </summary>
public
class
RB_BrandApplyForRepository
:
BaseRepository
<
RB_BrandApplyFor
>
{
/// <summary>
/// 根据查询条件获取品牌信息实体
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
RB_BrandApplyFor_Extend
GetBrand
(
RB_BrandApplyFor_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT a.*,b.ClassName from RB_BrandApplyFor as a LEFT JOIN rb_brandclass as b on a.BrandClassId=b.ID
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
builder
.
AppendFormat
(
" AND b.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
return
new
RB_BrandApplyFor_Extend
();
}
else
{
if
(
query
.
ID
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
ID
),
query
.
ID
);
}
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
BrandName
))
{
builder
.
AppendFormat
(
" AND a.{0} LIKE @Name "
,
nameof
(
RB_BrandApplyFor_Extend
.
BrandName
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
BrandName
.
Trim
()
+
"%"
);
}
if
(
query
.
BrandClassId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
BrandClassId
),
query
.
BrandClassId
);
}
if
(
query
.
ProjectType
.
HasValue
&&
query
.
ProjectType
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
ProjectType
),
(
int
)
query
.
ProjectType
);
}
if
(
query
.
CompanyId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
CompanyId
),
query
.
CompanyId
);
}
}
return
Get
<
RB_BrandApplyFor_Extend
>(
builder
.
ToString
(),
parameters
).
FirstOrDefault
();
}
/// <summary>
/// 根据查询条件获取品牌信息
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_BrandApplyFor_Extend
>
GetBrandListByWhere
(
RB_BrandApplyFor_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT a.*,b.ClassName from RB_BrandApplyFor as a LEFT JOIN rb_brandclass as b on a.BrandClassId=b.ID
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
builder
.
AppendFormat
(
" AND b.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
return
new
List
<
RB_BrandApplyFor_Extend
>();
}
else
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
BrandName
))
{
builder
.
AppendFormat
(
" AND a.{0} LIKE @Name "
,
nameof
(
RB_BrandApplyFor_Extend
.
BrandName
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
BrandName
.
Trim
()
+
"%"
);
}
if
(
query
.
BrandClassId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
BrandClassId
),
query
.
BrandClassId
);
}
if
(
query
.
CompanyId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
CompanyId
),
query
.
CompanyId
);
}
if
(
query
.
ProjectType
.
HasValue
&&
query
.
ProjectType
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_BrandApplyFor_Extend
.
ProjectType
),
(
int
)
query
.
ProjectType
);
}
}
return
Get
<
RB_BrandApplyFor_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
Mall.Repository/TradePavilion/RB_BrandRepository.cs
View file @
1cff3609
...
...
@@ -44,6 +44,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
UserId
),
query
.
UserId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
BrandName
))
{
builder
.
AppendFormat
(
" AND a.{0} LIKE @Name "
,
nameof
(
RB_Brand_Extend
.
BrandName
));
...
...
@@ -185,6 +189,14 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
BrandClassId
),
query
.
BrandClassId
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
UserId
),
query
.
UserId
);
}
if
(
query
.
UserId
==
-
1
)
{
builder
.
AppendFormat
(
" AND a.{0} =0 "
,
nameof
(
RB_Brand_Extend
.
UserId
));
//查询未绑定用户的
}
if
(
query
.
ProjectType
.
HasValue
&&
query
.
ProjectType
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
ProjectType
),
(
int
)
query
.
ProjectType
);
...
...
@@ -226,5 +238,59 @@ WHERE 1=1
}
return
Get
<
RB_Brand_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 获取品牌列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Brand_Extend
>
GetBrandList
(
RB_Brand_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT a.*,b.ClassName from rb_brand as a LEFT JOIN rb_brandclass as b on a.BrandClassId=b.ID
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
builder
.
AppendFormat
(
" AND b.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
return
new
List
<
RB_Brand_Extend
>();
}
else
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
BrandName
))
{
builder
.
AppendFormat
(
" AND a.{0} LIKE @Name "
,
nameof
(
RB_Brand_Extend
.
BrandName
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
BrandName
.
Trim
()
+
"%"
);
}
if
(
query
.
BrandClassId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
BrandClassId
),
query
.
BrandClassId
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
UserId
),
query
.
UserId
);
}
if
(
query
.
UserId
==
-
1
)
{
builder
.
AppendFormat
(
" AND a.{0} =0 "
,
nameof
(
RB_Brand_Extend
.
UserId
));
//查询未绑定用户的
}
if
(
query
.
ProjectType
.
HasValue
&&
query
.
ProjectType
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
ProjectType
),
(
int
)
query
.
ProjectType
);
}
}
return
Get
<
RB_Brand_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
Mall.Repository/TradePavilion/RB_CarrierApplyForRepository.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 载体申请信息仓储层
/// </summary>
public
class
RB_CarrierApplyForRepository
:
BaseRepository
<
RB_CarrierApplyFor
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_CarrierApplyFor
);
}
}
/// <summary>
/// 载体信息列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_CarrierApplyFor_Extend
>
GetCarrierList
(
RB_CarrierApplyFor_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_CarrierApplyFor_Extend
.
Status
)}
=0 "
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(
query
.
ID
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
ID
)}
=
{
query
.
ID
}
"
);
}
if
(
query
.
CompanyId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
CompanyId
)}
=
{
query
.
CompanyId
}
"
);
}
if
(
query
.
ProjectType
.
HasValue
&&
query
.
ProjectType
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
ProjectType
)}
=
{(
int
)
query
.
ProjectType
}
"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
CarrierName
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
CarrierName
)}
like '%
{
query
.
CarrierName
}
%'"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
Developers
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
Developers
)}
like '%
{
query
.
Developers
}
%'"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StartOpenTime
))
{
builder
.
Append
(
$" and DATE_FORMAT(
{
nameof
(
RB_CarrierApplyFor_Extend
.
OpenTime
)}
,'%Y-%m-%d' )>=DATE_FORMAT('
{
query
.
StartOpenTime
}
','%Y-%m-%d' ) "
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
EndOpenTime
))
{
builder
.
Append
(
$" and DATE_FORMAT(
{
nameof
(
RB_CarrierApplyFor_Extend
.
OpenTime
)}
,'%Y-%m-%d' )<= DATE_FORMAT('
{
query
.
EndOpenTime
}
','%Y-%m-%d' ) "
);
}
if
(
query
.
MetroNum
>
0
||
!
string
.
IsNullOrWhiteSpace
(
query
.
MetroName
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
ID
)}
in (SELECT CarrierId from rb_carriermetro where `Status`=0 "
);
if
(
query
.
MetroNum
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
MetroNum
)}
=
{
query
.
MetroNum
}
"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
MetroName
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierApplyFor_Extend
.
MetroName
)}
like '%
{
query
.
MetroName
}
%'"
);
}
builder
.
Append
(
" )"
);
}
if
(
query
.
OrderBy
==
1
)
{
builder
.
Append
(
$" order by
{
nameof
(
RB_CarrierApplyFor_Extend
.
CreateDate
)}
desc"
);
}
else
if
(
query
.
OrderBy
==
2
)
{
builder
.
Append
(
$" order by
{
nameof
(
RB_CarrierApplyFor_Extend
.
OpenTime
)}
desc"
);
}
}
return
Get
<
RB_CarrierApplyFor_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.Repository/TradePavilion/RB_CarrierMetroApplyForRepository.cs
0 → 100644
View file @
1cff3609
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 载体地铁申请信息仓储层
/// </summary>
public
class
RB_CarrierMetroApplyForRepository
:
BaseRepository
<
RB_CarrierMetroApplyFor
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_CarrierMetroApplyFor
);
}
}
/// <summary>
/// 载体信息列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_CarrierMetroApplyFor_Extend
>
GetCarrierMetroList
(
RB_CarrierMetroApplyFor_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_CarrierMetroApplyFor_Extend
.
Status
)}
=0 "
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierMetroApplyFor_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierMetroApplyFor_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(
query
.
CarrierId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierMetroApplyFor_Extend
.
CarrierId
)}
=
{
query
.
CarrierId
}
"
);
}
if
(
query
.
MetroNum
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierMetroApplyFor_Extend
.
MetroNum
)}
=
{
query
.
MetroNum
}
"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
MetroName
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierMetroApplyFor_Extend
.
MetroName
)}
like '%
{
query
.
MetroName
}
%'"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
CarrierIds
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_CarrierMetroApplyFor_Extend
.
CarrierId
)}
in(
{
query
.
CarrierIds
}
) "
);
}
}
return
Get
<
RB_CarrierMetroApplyFor_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.Repository/TradePavilion/RB_CarrierRepository.cs
View file @
1cff3609
...
...
@@ -50,6 +50,10 @@ namespace Mall.Repository.TradePavilion
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Carrier_Extend
.
Developers
)}
like '%
{
query
.
Developers
}
%'"
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Carrier_Extend
.
UserId
)}
=
{
query
.
UserId
}
"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StartOpenTime
))
{
...
...
@@ -109,6 +113,14 @@ namespace Mall.Repository.TradePavilion
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Carrier_Extend
.
ID
)}
=
{
query
.
ID
}
"
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Carrier_Extend
.
UserId
)}
=
{
query
.
UserId
}
"
);
}
if
(
query
.
UserId
==
-
1
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Carrier_Extend
.
UserId
)}
=0"
);
}
if
(
query
.
ProjectType
.
HasValue
&&
query
.
ProjectType
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Carrier_Extend
.
ProjectType
)}
=
{(
int
)
query
.
ProjectType
}
"
);
...
...
Mall.Repository/TradePavilion/RB_CompanyRepository.cs
View file @
1cff3609
...
...
@@ -47,12 +47,21 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Company_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
CreateBy
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Company_Extend
.
CreateBy
),
query
.
CreateBy
);
}
if
(
query
.
CompanyStatus
>
-
1
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Company_Extend
.
CompanyStatus
),
query
.
CompanyStatus
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
CompanyName
))
{
builder
.
AppendFormat
(
" AND {0} LIKE @Name "
,
nameof
(
RB_Company_Extend
.
CompanyName
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
CompanyName
.
Trim
()
+
"%"
);
}
}
builder
.
AppendFormat
(
" order by CompanyId desc "
);
return
GetPage
<
RB_Company_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Mall.Repository/TradePavilion/RB_FirstShop_WishRepository.cs
0 → 100644
View file @
1cff3609
using
Mall.Common.Enum
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 心愿单仓储层
/// </summary>
public
class
RB_FirstShop_WishRepository
:
BaseRepository
<
RB_FirstShop_Wish
>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_FirstShop_Wish_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_FirstShop_Wish_Extend
dmodel
)
{
var
parameters
=
new
DynamicParameters
();
string
where
=
$" 1=1"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Status
>=
0
)
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
Status
)}
=
{
dmodel
.
Status
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
BranchName
))
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
BranchName
)}
@BranchName"
;
parameters
.
Add
(
"BranchName"
,
"%"
+
dmodel
.
BranchName
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
CarrierName
))
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
CarrierName
)}
@CarrierName"
;
parameters
.
Add
(
"BranchName"
,
"%"
+
dmodel
.
CarrierName
+
"%"
);
}
string
sql
=
$@"select w.*,u.Name as UserName from RB_FirstShop_Wish w
left join rb_member_user u on w.UserId = u.Id
where
{
where
}
order by w.Id desc
"
;
return
GetPage
<
RB_FirstShop_Wish_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
,
parameters
).
ToList
();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_FirstShop_Wish_Extend
>
GetList
(
RB_FirstShop_Wish_Extend
dmodel
)
{
var
parameters
=
new
DynamicParameters
();
string
where
=
$" 1=1"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Status
>=
0
)
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
Status
)}
=
{
dmodel
.
Status
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
BranchName
))
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
BranchName
)}
@BranchName"
;
parameters
.
Add
(
"BranchName"
,
"%"
+
dmodel
.
BranchName
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
CarrierName
))
{
where
+=
$@" and w.
{
nameof
(
RB_FirstShop_Wish
.
CarrierName
)}
@CarrierName"
;
parameters
.
Add
(
"BranchName"
,
"%"
+
dmodel
.
CarrierName
+
"%"
);
}
string
sql
=
$@"select w.*,u.Name as UserName from RB_FirstShop_Wish w
left join rb_member_user u on w.UserId = u.Id
where
{
where
}
order by w.Id desc
"
;
return
Get
<
RB_FirstShop_Wish_Extend
>(
sql
,
parameters
).
ToList
();
}
}
}
\ No newline at end of file
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
1cff3609
...
...
@@ -79,6 +79,12 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// 小程序
/// </summary>
private
readonly
Module
.
User
.
MiniProgramModule
programModule
=
new
Module
.
User
.
MiniProgramModule
();
/// <summary>
/// 心愿单
/// </summary>
private
readonly
FirstShopWishModule
firstShopWishModule
=
new
FirstShopWishModule
();
#
region
公司信息管理
...
...
@@ -95,11 +101,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
CompanyId
=
parms
.
GetInt
(
"CompanyId"
),
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
),
BusinessLicense
=
parms
.
GetStringValue
(
"BusinessLicense"
),
// Principal = parms.GetStringValue("Principal"),
Mobile
=
parms
.
GetStringValue
(
"Mobile"
),
UnifiedCode
=
parms
.
GetStringValue
(
"UnifiedCode"
),
LegalPerson
=
parms
.
GetStringValue
(
"LegalPerson"
),
// CompanyIntro = parms.GetStringValue("CompanyIntro"),
FirstShopType
=
parms
.
GetInt
(
"FirstShopType"
,
0
)
};
if
(
string
.
IsNullOrWhiteSpace
(
extModel
.
BusinessLicense
))
{
...
...
@@ -122,6 +127,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
return
ApiResult
.
Failed
(
"请输入联系电话"
);
}
if
(
extModel
.
FirstShopType
<=
0
)
{
return
ApiResult
.
Failed
(
"请选择身份类型"
);
}
var
userInfo
=
AppletUserInfo
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
...
...
@@ -166,6 +175,381 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 获取认证状态
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCommpanyStatus
()
{
var
userInfo
=
AppletUserInfo
;
var
model
=
companyModule
.
GetCommpanyStatus
(
userInfo
.
UserId
);
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 新增/修改品牌申请信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetBrandApplyFor
()
{
var
userInfo
=
AppletUserInfo
;
RB_BrandApplyFor_Extend
query
=
JsonConvert
.
DeserializeObject
<
RB_BrandApplyFor_Extend
>(
RequestParm
.
msg
.
ToString
());
if
(
query
.
CompanyId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递认证id"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
BrandName
))
{
return
ApiResult
.
Failed
(
"请输入品牌名称"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Logo
))
{
return
ApiResult
.
Failed
(
"请上传Logo"
);
}
if
(
query
.
BrandClassId
==
0
)
{
return
ApiResult
.
Failed
(
"请选择品牌分类"
);
}
if
(
query
.
BannerList
!=
null
&&
query
.
BannerList
.
Any
())
{
query
.
Banner
=
JsonConvert
.
SerializeObject
(
query
.
BannerList
);
}
else
{
query
.
Banner
=
""
;
}
query
.
CreateDate
=
System
.
DateTime
.
Now
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
Status
=
0
;
query
.
UpdateDate
=
System
.
DateTime
.
Now
;
query
.
CreateBy
=
userInfo
.
UserId
;
query
.
UpdateBy
=
userInfo
.
UserId
;
#
region
验证品牌名称是否已经存在了
if
(
query
.
ExistBrandId
==
0
)
{
if
(
carrierModule
.
ValidateBrandName
(
query
.
BrandName
,
userInfo
.
MallBaseId
))
{
return
ApiResult
.
Failed
(
"该品牌名称已存在,请选择绑定已有品牌"
);
}
if
(
carrierModule
.
ValidateFullBrandName
(
query
.
FullBrandName
,
userInfo
.
MallBaseId
))
{
return
ApiResult
.
Failed
(
"该品牌全名已存在,请选择绑定已有品牌"
);
}
}
#
endregion
bool
flag
=
carrierModule
.
SetBrandApplyFor
(
query
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 新增/修改载体申请信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCarrierApplyFor
()
{
var
userInfo
=
AppletUserInfo
;
RB_CarrierApplyFor_Extend
query
=
JsonConvert
.
DeserializeObject
<
RB_CarrierApplyFor_Extend
>(
RequestParm
.
msg
.
ToString
());
if
(
query
.
CompanyId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递认证id"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
CarrierName
))
{
return
ApiResult
.
Failed
(
"请输入载体名称"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Developers
))
{
return
ApiResult
.
Failed
(
"请输入开发商"
);
}
if
(
query
.
BannerList
==
null
||
!
query
.
BannerList
.
Any
())
{
return
ApiResult
.
Failed
(
"请上传介绍图"
);
}
if
(
query
.
BannerList
!=
null
&&
query
.
BannerList
.
Any
())
{
query
.
Banner
=
JsonConvert
.
SerializeObject
(
query
.
BannerList
);
}
else
{
query
.
Banner
=
""
;
}
query
.
CreateDate
=
DateTime
.
Now
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
UpdateDate
=
DateTime
.
Now
;
#
region
验证品牌名称是否已经存在了
if
(
query
.
ExistCarrierId
==
0
)
{
if
(
carrierModule
.
ValidateCarrierName
(
query
.
CarrierName
,
userInfo
.
MallBaseId
))
{
return
ApiResult
.
Failed
(
"该载体名称已存在,请选择绑定已有载体"
);
}
}
#
endregion
bool
flag
=
carrierModule
.
SetCarrierApplyFor
(
query
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 修改品牌
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetBrandUpdate
()
{
var
userInfo
=
AppletUserInfo
;
RB_Brand_Extend
query
=
JsonConvert
.
DeserializeObject
<
RB_Brand_Extend
>(
RequestParm
.
msg
.
ToString
());
if
(
query
.
ID
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递品牌id"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
BrandName
))
{
return
ApiResult
.
Failed
(
"请输入品牌名称"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Logo
))
{
return
ApiResult
.
Failed
(
"请上传Logo"
);
}
if
(
query
.
BrandClassId
==
0
)
{
return
ApiResult
.
Failed
(
"请选择品牌分类"
);
}
if
(
query
.
BannerList
!=
null
&&
query
.
BannerList
.
Any
())
{
query
.
Banner
=
JsonConvert
.
SerializeObject
(
query
.
BannerList
);
}
else
{
query
.
Banner
=
""
;
}
query
.
CreateDate
=
System
.
DateTime
.
Now
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
Status
=
0
;
query
.
UpdateDate
=
System
.
DateTime
.
Now
;
query
.
CreateBy
=
userInfo
.
UserId
;
var
oldModel
=
carrierModule
.
GetBrand
(
new
RB_Brand_Extend
()
{
ID
=
query
.
ID
});
if
(
oldModel
==
null
)
{
return
ApiResult
.
Failed
(
"品牌不存在"
);
}
if
(
oldModel
.
UserId
!=
userInfo
.
UserId
)
{
return
ApiResult
.
Failed
(
"无法修改此品牌"
);
}
bool
flag
=
carrierModule
.
SetBrand
(
query
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 修改载体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCarrierUpdate
()
{
var
userInfo
=
AppletUserInfo
;
RB_Carrier_Extend
query
=
JsonConvert
.
DeserializeObject
<
RB_Carrier_Extend
>(
RequestParm
.
msg
.
ToString
());
if
(
query
.
ID
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递载体id"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
CarrierName
))
{
return
ApiResult
.
Failed
(
"请输入载体名称"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Developers
))
{
return
ApiResult
.
Failed
(
"请输入开发商"
);
}
if
(
query
.
BannerList
==
null
||
!
query
.
BannerList
.
Any
())
{
return
ApiResult
.
Failed
(
"请上传介绍图"
);
}
if
(
query
.
BannerList
!=
null
&&
query
.
BannerList
.
Any
())
{
query
.
Banner
=
JsonConvert
.
SerializeObject
(
query
.
BannerList
);
}
else
{
query
.
Banner
=
""
;
}
query
.
CreateDate
=
DateTime
.
Now
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
UpdateDate
=
DateTime
.
Now
;
var
oldModel
=
carrierModule
.
GetCarrierModel
(
new
RB_Carrier_Extend
()
{
ID
=
query
.
ID
});
if
(
oldModel
==
null
)
{
return
ApiResult
.
Failed
(
"载体不存在"
);
}
if
(
oldModel
.
UserId
!=
userInfo
.
UserId
)
{
return
ApiResult
.
Failed
(
"无法修改此载体"
);
}
bool
flag
=
carrierModule
.
SetCarrier
(
query
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 设置认证为待完善
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCommpanyCompleteCorvidae
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
int
CompanyId
=
parms
.
GetInt
(
"CompanyId"
,
0
);
if
(
CompanyId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
string
msg
=
companyModule
.
SetCommpanyCompleteCorvidae
(
CompanyId
,
userInfo
.
UserId
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取认证品牌列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCenterBrandList
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Brand_Extend
()
{
BrandName
=
parms
.
GetStringValue
(
"BrandName"
),
UserId
=
-
1
//查询未绑定用户的
};
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
var
list
=
carrierModule
.
GetBrandList_V2
(
query
);
foreach
(
var
item
in
list
)
{
item
.
ProjectName
=
item
.
ProjectType
.
GetEnumName
();
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
Banner
))
{
item
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
Banner
);
}
else
{
item
.
BannerList
=
new
List
<
string
>();
}
}
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取品牌分类实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetBrandDetailsForCompany
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Brand_Extend
()
{
ID
=
parms
.
GetInt
(
"ID"
,
0
),
};
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
RanQi
=
-
1
;
query
.
KongTiao
=
-
1
;
query
.
XinFeng
=
-
1
;
query
.
Plumbing
=
-
1
;
query
.
Caliber
=
-
1
;
query
.
PaiYan
=
-
1
;
query
.
Sewage
=
-
1
;
var
extModel
=
carrierModule
.
GetBrand
(
query
);
if
(!
string
.
IsNullOrWhiteSpace
(
extModel
.
Banner
))
{
extModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
extModel
.
Banner
);
}
else
{
extModel
.
BannerList
=
new
List
<
string
>();
}
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 获取认证载体列表
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
public
ApiResult
GetCenterCarrierList
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Carrier_Extend
()
{
CarrierName
=
parms
.
GetStringValue
(
"CarrierName"
),
UserId
=
-
1
//查询未绑定用户的
};
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
var
list
=
carrierModule
.
GetCarrierList
(
query
);
return
ApiResult
.
Success
(
data
:
list
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
CarrierName
,
x
.
Logo
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm"
),
x
.
Address
,
x
.
LatAndLon
,
x
.
Developers
,
OpenTime
=
x
.
OpenTime
.
HasValue
?
x
.
OpenTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
x
.
ProjectType
,
ProjectTypeName
=
x
.
ProjectType
.
GetEnumName
(),
x
.
CarrierSize
,
x
.
LayersNum
,
x
.
CarNum
,
x
.
CarrierPlan
,
x
.
CarrierTarget
,
x
.
Location
,
x
.
Crowd
,
x
.
VideoUrl
,
x
.
CarrierMetroList
}));
}
/// <summary>
/// 获取载体实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCarrierDetailsForCompany
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Carrier_Extend
()
{
ID
=
parms
.
GetInt
(
"ID"
,
0
),
};
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
var
extModel
=
carrierModule
.
GetCarrierModel
(
query
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
#
endregion
#
region
新闻管理
...
...
@@ -1133,8 +1517,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
ID
=
parms
.
GetInt
(
"ID"
,
0
),
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
MallBaseId
=
req
.
MallBaseId
;
query
.
TenantId
=
req
.
TenantId
;
query
.
RanQi
=
-
1
;
query
.
KongTiao
=
-
1
;
query
.
XinFeng
=
-
1
;
...
...
@@ -1153,12 +1537,30 @@ namespace Mall.WebApi.Controllers.TradePavilion
extModel
.
BannerList
=
new
List
<
string
>();
}
extModel
.
ProjectName
=
extModel
.
ClassName
;
extModel
.
ProjectName
=
extModel
.
ProjectType
.
GetEnumName
()
;
if
(
req
.
UserId
>
0
&&
extModel
.
ID
>
0
)
{
//判断是否已经关注过
var
collectModel
=
carrierModule
.
GetList
(
new
RB_Collect_Extend
{
Status
=
0
,
Type
=
2
,
UserId
=
req
.
UserId
,
SourceId
=
extModel
.
ID
,
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
}).
FirstOrDefault
();
extModel
.
CollectId
=
collectModel
?.
Id
??
0
;
}
if
(
extModel
.
UserId
>
0
)
{
//获取首店年份
extModel
.
FirstShopYear
=
authenticationModule
.
GetFirstShopYear
(
extModel
.
UserId
,
req
.
MallBaseId
);
if
(
req
.
UserId
>
0
)
{
//获取心愿单
var
companyModel
=
companyModule
.
GetCompanyByUserIdModule
(
req
.
UserId
);
if
((
companyModel
?.
FirstShopType
==
2
&&
companyModel
?.
CompanyStatus
==
1
)
||
req
.
UserId
==
extModel
.
UserId
)
{
//载体方 并且认证OK
var
wmodel
=
firstShopWishModule
.
GetWishList
(
new
RB_FirstShop_Wish_Extend
()
{
MallBaseId
=
req
.
MallBaseId
,
UserId
=
extModel
.
UserId
}).
FirstOrDefault
();
if
(
wmodel
!=
null
)
{
extModel
.
WishDescription
=
wmodel
.
Description
;
extModel
.
WishCard
=
wmodel
.
NameCard
;
}
}
}
}
return
ApiResult
.
Success
(
data
:
extModel
);
}
...
...
@@ -1271,5 +1673,120 @@ namespace Mall.WebApi.Controllers.TradePavilion
}
}
#
endregion
#
region
心愿单
/// <summary>
/// 获取我的心愿单分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMyWishPageList
()
{
var
userInfo
=
AppletUserInfo
;
var
requst
=
RequestParm
;
ResultPageModel
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
requst
.
msg
.
ToString
());
RB_FirstShop_Wish_Extend
demodel
=
JsonHelper
.
DeserializeObject
<
RB_FirstShop_Wish_Extend
>(
requst
.
msg
.
ToString
());
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
TenantId
=
userInfo
.
TenantId
;
if
(
demodel
.
UserId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递用户id"
);
}
var
list
=
firstShopWishModule
.
GetWishPageList
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
demodel
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
UserId
,
x
.
UserName
,
x
.
BranchName
,
x
.
CarrierName
,
x
.
Area
,
x
.
Description
,
x
.
NameCard
,
x
.
Status
,
UpdateDate
=
x
.
UpdateDate
.
ToString
(
"yyyy-MM-dd HH:mm"
)
});
return
ApiResult
.
Success
(
""
,
pageModel
);
}
/// <summary>
/// 获取心愿单明细
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMyWishInfo
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
int
WishId
=
parms
.
GetInt
(
"WishId"
,
0
);
if
(
WishId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
model
=
firstShopWishModule
.
GetMyWishInfo
(
WishId
);
if
(
model
==
null
||
model
.
MallBaseId
!=
userInfo
.
MallBaseId
)
{
return
ApiResult
.
Failed
(
"未查询到相关心愿单"
);
}
if
(
model
.
Status
==
1
)
{
return
ApiResult
.
Failed
(
""
);
}
return
ApiResult
.
Success
(
""
,
new
{
model
.
Id
,
model
.
UserId
,
model
.
UserName
,
model
.
BranchName
,
model
.
CarrierName
,
model
.
Area
,
model
.
Description
,
model
.
NameCard
,
UpdateDate
=
model
.
UpdateDate
.
ToString
(
"yyyy-MM-dd HH:mm"
)
});
}
/// <summary>
/// 新增修改心愿单
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetMyWishInfo
()
{
var
userInfo
=
AppletUserInfo
;
RB_FirstShop_Wish_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_FirstShop_Wish_Extend
>(
RequestParm
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
BranchName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入品牌名称"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
CarrierName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入对标载体名称"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Area
))
{
return
ApiResult
.
ParamIsNull
(
"请输入区域"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Description
))
{
return
ApiResult
.
ParamIsNull
(
"请输入心愿详情"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
NameCard
))
{
return
ApiResult
.
ParamIsNull
(
"请上传名称"
);
}
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
Status
=
0
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
UserId
=
userInfo
.
UserId
;
string
msg
=
firstShopWishModule
.
SetMyWishInfo
(
demodel
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
#
endregion
}
}
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
1cff3609
...
...
@@ -70,6 +70,12 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
private
readonly
Module
.
User
.
UserModule
userModule
=
new
Module
.
User
.
UserModule
();
/// <summary>
/// 心愿单
/// </summary>
private
readonly
FirstShopWishModule
firstShopWishModule
=
new
FirstShopWishModule
();
#
region
联系人管理
...
...
@@ -275,7 +281,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Company_Extend
()
{
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
)
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
),
CompanyStatus
=
parms
.
GetInt
(
"CompanyStatus"
,
-
1
),
CreateBy
=
parms
.
GetInt
(
"CreateBy"
,
0
),
IsComplete
=
1
//需是 已完善了资料的
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
...
...
@@ -285,7 +294,6 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取公司信息详情
/// </summary>
...
...
@@ -310,8 +318,9 @@ namespace Mall.WebApi.Controllers.TradePavilion
var
flag
=
companyModule
.
RemoveCompanyModule
(
CompanyId
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
///
更新
公司信息
///
审核
公司信息
/// </summary>
/// <returns></returns>
public
ApiResult
UpdateCompanyStatus
()
...
...
@@ -319,6 +328,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
CompanyId
=
parms
.
GetInt
(
"CompanyId"
,
0
);
var
Status
=
parms
.
GetInt
(
"CompanyStatus"
,
0
);
var
Remark
=
parms
.
GetStringValue
(
"Remark"
);
//不通过备注
var
model
=
companyModule
.
GetCompanyEntity
(
CompanyId
);
if
(
model
==
null
||
model
.
CompanyId
<=
0
)
{
...
...
@@ -328,24 +338,32 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
return
ApiResult
.
Failed
(
"状态有误"
);
}
if
(
Status
==
2
&&
string
.
IsNullOrEmpty
(
Remark
))
{
return
ApiResult
.
ParamIsNull
(
"请输入不通过的原因"
);
}
if
(
model
.
CompanyStatus
==
1
)
{
return
ApiResult
.
Failed
(
"公司信息已审核通过,请勿重复审核"
);
}
var
flag
=
companyModule
.
UpdateCompanyStatus
(
CompanyId
,
Status
);
if
(
flag
&&
Status
>
0
)
//推送审核结果
var
msg
=
companyModule
.
UpdateCompanyStatus
(
CompanyId
,
Status
,
Remark
);
if
(
msg
==
""
&&
Status
>
0
)
//推送审核结果
{
//查询用户的信息
var
umodel
=
userModule
.
GetMemberUserInfo
(
model
.
CreateBy
);
if
(
umodel
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
umodel
.
OpenId
))
{
List
<
string
>
openidList
=
new
List
<
string
>();
openidList
.
Add
(
umodel
.
OpenId
);
DateTime
dt1
=
DateTime
.
Now
;
List
<
string
>
openidList
=
new
List
<
string
>
{
umodel
.
OpenId
};
new
Module
.
User
.
MiniProgramMsgModule
().
SendHatchExamineMsg
(
model
.
TenantId
,
model
.
MallBaseId
,
openidList
,
Status
==
1
?
"认证通过"
:
"认证失败"
,
"企业认证结果通知"
,
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日 HH:mm"
));
DateTime
dt2
=
DateTime
.
Now
;
LogHelper
.
Write
(
"认证通知耗时:"
+
(
dt2
-
dt1
).
TotalSeconds
);
}
}
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
);
return
msg
==
""
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
msg
);
}
#
endregion
...
...
@@ -1058,11 +1076,12 @@ namespace Mall.WebApi.Controllers.TradePavilion
Developers
=
parms
.
GetStringValue
(
"Developers"
),
StartOpenTime
=
parms
.
GetStringValue
(
"StartOpenTime"
),
EndOpenTime
=
parms
.
GetStringValue
(
"EndOpenTime"
),
ProjectType
=
(
Common
.
Enum
.
TradePavilion
.
ProjectTypeEnum
)
parms
.
GetInt
(
"ProjectType"
,
0
)
ProjectType
=
(
Common
.
Enum
.
TradePavilion
.
ProjectTypeEnum
)
parms
.
GetInt
(
"ProjectType"
,
0
),
UserId
=
parms
.
GetInt
(
"UserId"
,
0
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
carrierModule
.
GetCarrierPageList
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
list
=
carrierModule
.
GetCarrierPageList
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
,
true
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
.
Select
(
x
=>
new
{
...
...
@@ -1084,6 +1103,9 @@ namespace Mall.WebApi.Controllers.TradePavilion
x
.
Location
,
x
.
Crowd
,
x
.
VideoUrl
,
x
.
UserId
,
x
.
UserName
,
x
.
UserIcon
,
x
.
CarrierMetroList
});
return
ApiResult
.
Success
(
data
:
pageModel
);
...
...
@@ -1458,13 +1480,14 @@ namespace Mall.WebApi.Controllers.TradePavilion
Sewage
=
parms
.
GetInt
(
"Sewage"
,
-
1
),
PaiYan
=
parms
.
GetInt
(
"PaiYan"
,
-
1
),
DianLiang
=
parms
.
GetStringValue
(
"DianLiang"
),
UserId
=
parms
.
GetInt
(
"UserId"
,
0
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
carrierModule
.
GetBrandPageList
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
list
=
carrierModule
.
GetBrandPageList
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
,
true
);
foreach
(
var
item
in
list
)
{
item
.
ProjectName
=
item
.
ClassName
;
item
.
ProjectName
=
item
.
ProjectType
.
GetEnumName
()
;
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
Banner
))
{
item
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
Banner
);
...
...
@@ -1741,5 +1764,63 @@ namespace Mall.WebApi.Controllers.TradePavilion
}
#
endregion
#
region
心愿单列表
/// <summary>
/// 获取心愿单分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetFirstShopWishPageList
()
{
var
requst
=
RequestParm
;
ResultPageModel
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
requst
.
msg
.
ToString
());
RB_FirstShop_Wish_Extend
demodel
=
JsonHelper
.
DeserializeObject
<
RB_FirstShop_Wish_Extend
>(
requst
.
msg
.
ToString
());
demodel
.
MallBaseId
=
requst
.
MallBaseId
;
demodel
.
TenantId
=
requst
.
TenantId
;
var
list
=
firstShopWishModule
.
GetWishPageList
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
demodel
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
UserId
,
x
.
UserName
,
x
.
BranchName
,
x
.
CarrierName
,
x
.
Area
,
x
.
Description
,
x
.
NameCard
,
x
.
Status
,
UpdateDate
=
x
.
UpdateDate
.
ToString
(
"yyyy-MM-dd HH:mm"
)
});
return
ApiResult
.
Success
(
""
,
pageModel
);
}
/// <summary>
/// 取消心愿单
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
DelFirstShopWishInfo
()
{
var
requst
=
RequestParm
;
JObject
prams
=
JObject
.
Parse
(
requst
.
msg
.
ToString
());
int
WishId
=
prams
.
GetInt
(
"WishId"
,
0
);
if
(
WishId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
string
msg
=
firstShopWishModule
.
DelFirstShopWishInfo
(
WishId
,
requst
.
MallBaseId
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
#
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