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
f62d4a53
Commit
f62d4a53
authored
Sep 02, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
53286bfe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
32 deletions
+142
-32
RB_Commerce_Consult_Extend.cs
....Model/Extend/TradePavilion/RB_Commerce_Consult_Extend.cs
+35
-0
CommerceConsultModule.cs
Mall.Module.TradePavilion/CommerceConsultModule.cs
+105
-28
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+2
-4
No files found.
Mall.Model/Extend/TradePavilion/RB_Commerce_Consult_Extend.cs
View file @
f62d4a53
...
...
@@ -143,6 +143,31 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
public
string
UserName
{
get
;
set
;
}
/// <summary>
/// 认证状态
/// </summary>
public
string
CompanyStatusStr
{
get
;
set
;
}
/// <summary>
/// 认证公司名称
/// </summary>
public
string
CompanyName
{
get
;
set
;
}
/// <summary>
/// 认证品牌/认证载体
/// </summary>
public
string
FirstShopTypeName
{
get
;
set
;
}
/// <summary>
/// 认证名称
/// </summary>
public
string
AuthName
{
get
;
set
;
}
/// <summary>
/// 跨行
/// </summary>
public
int
RowSpan
{
get
;
set
;
}
/// <summary>
/// 报名用户列表
/// </summary>
...
...
@@ -183,5 +208,15 @@ namespace Mall.Model.Extend.TradePavilion
/// 地址信息
/// </summary>
public
string
CountryInfo
{
get
;
set
;
}
/// <summary>
/// 公司名称
/// </summary>
public
string
CompanyName
{
get
;
set
;
}
/// <summary>
/// 性质
/// </summary>
public
string
Nature
{
get
;
set
;
}
}
}
Mall.Module.TradePavilion/CommerceConsultModule.cs
View file @
f62d4a53
...
...
@@ -10,6 +10,7 @@ using System.Linq;
using
VT.FW.DB
;
using
Mall.Repository.Miai
;
using
Mall.Common.Enum
;
using
Mall.Common.Plugin
;
namespace
Mall.Module.TradePavilion
{
...
...
@@ -40,9 +41,18 @@ namespace Mall.Module.TradePavilion
private
readonly
RB_Miai_MessageRepository
miai_MessageRepository
=
new
RB_Miai_MessageRepository
();
/// <summary>
///
认证仓储层对象
///
公司认证
/// </summary>
private
readonly
RB_AuthenticationRepository
authenticationRepository
=
new
RB_AuthenticationRepository
();
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>
/// 获取商会活动报名分页列表
...
...
@@ -56,22 +66,86 @@ namespace Mall.Module.TradePavilion
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
userids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
UserId
));
var
authList
=
authenticationRepository
.
GetList
(
new
RB_Authentication_Extend
()
{
QCreateBy
=
userids
});
string
activityIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
ActivityId
));
var
authList
=
companyRepository
.
GetCompanyListRepository
(
new
RB_Company_Extend
()
{
UserIds
=
userids
});
var
memberList
=
member_UserRepository
.
GetList
(
new
RB_Member_User_Extend
()
{
UserIds
=
userids
});
var
userList
=
list
.
GroupBy
(
qitem
=>
new
{
qitem
.
UserId
,
qitem
.
ActivityId
}).
Select
(
qitem
=>
new
{
qitem
.
Key
.
UserId
,
qitem
.
Key
.
ActivityId
});
var
subList
=
consultRepository
.
GetCommerceConsultListRepository
(
new
RB_Commerce_Consult_Extend
()
{
QActivityIds
=
activityIds
,
QUserIds
=
userids
,
});
foreach
(
var
item
in
userList
)
{
var
userModel
=
memberList
?.
Where
(
qitem
=>
qitem
.
Id
==
item
.
UserId
)?.
FirstOrDefault
();
var
authModel
=
authList
?.
Where
(
qitem
=>
qitem
.
CreateBy
==
item
.
UserId
)?.
FirstOrDefault
();
string
CompanyStatus
=
"未认证"
;
string
FirstShopTypeName
=
""
;
string
AuthName
=
""
;
if
(
authModel
!=
null
)
{
if
(
authModel
.
CompanyStatus
==
0
)
{
CompanyStatus
=
"待审核"
;
}
else
if
(
authModel
.
CompanyStatus
==
1
)
{
CompanyStatus
=
"审核通过"
;
}
else
if
(
authModel
.
CompanyStatus
==
2
)
{
CompanyStatus
=
"审核拒绝"
;
}
//品牌
if
(
authModel
.
FirstShopType
==
1
)
{
var
brandList
=
brandApplyForRepository
.
GetBrandListByWhere
(
new
RB_BrandApplyFor_Extend
{
CompanyId
=
authModel
.
CompanyId
});
FirstShopTypeName
=
"认证品牌"
;
AuthName
=
brandList
?.
FirstOrDefault
()?.
BrandName
??
""
;
}
//载体
else
if
(
authModel
.
FirstShopType
==
2
)
{
var
carrierList
=
carrierApplyForRepository
.
GetCarrierList
(
new
RB_CarrierApplyFor_Extend
()
{
CompanyId
=
authModel
.
CompanyId
});
FirstShopTypeName
=
"认证载体"
;
AuthName
=
carrierList
?.
FirstOrDefault
()?.
CarrierName
??
""
;
}
}
ActivityUserItem
activity
=
new
ActivityUserItem
()
{
UserId
=
item
.
UserId
,
UserName
=
userModel
?.
Name
??
""
,
CompanyStatusStr
=
CompanyStatus
,
CompanyName
=
authModel
?.
CompanyName
??
""
,
FirstShopTypeName
=
FirstShopTypeName
,
AuthName
=
AuthName
,
RowSpan
=
1
,
SignUserList
=
new
List
<
SignUserItem
>(),
};
var
tempList
=
subList
?.
Where
(
qitem
=>
qitem
.
UserId
==
item
.
UserId
&&
qitem
.
ActivityId
==
item
.
ActivityId
)?.
ToList
();
if
(
tempList
!=
null
&&
tempList
.
Count
>
0
)
{
foreach
(
var
sItem
in
tempList
)
{
SignUserItem
signUser
=
new
SignUserItem
()
{
Id
=
sItem
.
Id
,
ActivityId
=
sItem
.
ActivityId
,
LinkMan
=
sItem
.
LinkMan
,
LinkTel
=
sItem
.
LinkTel
,
Post
=
sItem
.
Post
,
CountryInfo
=
sItem
.
CountryInfo
,
CompanyName
=
sItem
.
CompanyName
,
Nature
=
sItem
.
Nature
.
GetEnumName
()
};
activity
.
SignUserList
.
Add
(
signUser
);
}
activity
.
RowSpan
=
tempList
.
Count
;
}
result
.
Add
(
activity
);
}
};
...
...
@@ -125,11 +199,14 @@ namespace Mall.Module.TradePavilion
{
if
(
oldModel
.
Money
!=
model
.
Money
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Member_User_Extend
.
PointNum
),
umodel
.
PointNum
+
oldModel
.
Money
-
model
.
Money
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Member_User_Extend
.
Id
),
FiledValue
=
umodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
@@ -183,11 +260,14 @@ namespace Mall.Module.TradePavilion
{
if
(
model
.
Money
>
0
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Member_User_Extend
.
PointNum
),
umodel
.
PointNum
-
model
.
Money
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Member_User_Extend
.
Id
),
FiledValue
=
umodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
@@ -214,9 +294,6 @@ namespace Mall.Module.TradePavilion
return
flag
?
""
:
"出错了,请联系管理员"
;
}
/// <summary>
/// 活动报名
/// </summary>
...
...
@@ -230,12 +307,9 @@ namespace Mall.Module.TradePavilion
var
trans
=
consultRepository
.
DbTransaction
;
foreach
(
var
demodel
in
list
)
{
flag
=
consultRepository
.
Insert
(
demodel
,
trans
)
>
0
;
}
consultRepository
.
DBSession
.
Commit
();
}
catch
(
Exception
ex
)
{
...
...
@@ -375,11 +449,14 @@ namespace Mall.Module.TradePavilion
{
//取消退回使用点数
var
umodel
=
member_UserRepository
.
GetEntity
(
cmodel
.
UserId
);
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Member_User_Extend
.
PointNum
),
umodel
.
PointNum
+
cmodel
.
Money
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Member_User_Extend
.
Id
),
FiledValue
=
umodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
f62d4a53
...
...
@@ -189,8 +189,7 @@ namespace Mall.WebApi.Controllers.MallBase
name
=
item
.
NavName
,
page_id
=
0
,
template_id
=
item
.
Id
,
template
=
templateData
,
templateBg
=
new
{
titleColor
=
"#111"
}
template
=
templateData
};
list
.
Add
(
tempObj
);
}
...
...
@@ -263,8 +262,7 @@ namespace Mall.WebApi.Controllers.MallBase
name
=
(
index
==
0
?
"首页"
:
item
.
NavName
),
page_id
=
0
,
template_id
=
item
.
Id
,
template
=
templateData
,
templateBg
=
new
{
titleColor
=
"#111"
}
template
=
templateData
};
list
.
Add
(
tempObj
);
index
++;
...
...
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