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
7ca1f0bf
Commit
7ca1f0bf
authored
Sep 17, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
3cfdf44e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
842 additions
and
26 deletions
+842
-26
AppletUserInfo.cs
Mall.Common/API/AppletUserInfo.cs
+4
-0
RequestParm.cs
Mall.Common/API/RequestParm.cs
+6
-0
RB_Education_Consult.cs
Mall.Model/Entity/Education/RB_Education_Consult.cs
+6
-0
RB_Account_ViewModel.cs
Mall.Model/Extend/Education/RB_Account_ViewModel.cs
+94
-0
RB_Education_Activity_Extend.cs
Mall.Model/Extend/Education/RB_Education_Activity_Extend.cs
+5
-0
RB_Education_Consult_Extend.cs
Mall.Model/Extend/Education/RB_Education_Consult_Extend.cs
+5
-0
OrderStatistics_Query.cs
Mall.Model/Query/OrderStatistics_Query.cs
+7
-0
ActivityModule.cs
Mall.Module.Education/ActivityModule.cs
+20
-1
RB_AccountRepository.cs
Mall.Repository/Education/RB_AccountRepository.cs
+58
-0
RB_Education_ActivityRepository.cs
Mall.Repository/Education/RB_Education_ActivityRepository.cs
+4
-0
RB_Education_ConsultRepository.cs
Mall.Repository/Education/RB_Education_ConsultRepository.cs
+4
-0
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+46
-11
LiveHouseController.cs
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
+26
-10
WeChatPayController.cs
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
+149
-1
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+391
-1
EducationController.cs
Mall.WebApi/Controllers/Education/EducationController.cs
+2
-0
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+11
-1
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+4
-1
No files found.
Mall.Common/API/AppletUserInfo.cs
View file @
7ca1f0bf
...
...
@@ -32,6 +32,10 @@ namespace Mall.Common
/// <summary>
/// 教育学生id
/// </summary>
public
int
EduStudentId
{
get
;
set
;
}
/// 用户店铺id
/// </summary>
public
int
SmallShopId
{
get
;
set
;
}
...
...
Mall.Common/API/RequestParm.cs
View file @
7ca1f0bf
...
...
@@ -104,6 +104,12 @@ namespace Mall.Common.API
/// 微店id
/// </summary>
public
int
SmallShopsId
{
get
;
set
;
}
/// <summary>
/// 教育对应的学生id
/// </summary>
public
int
EduStudentId
{
get
;
set
;
}
public
int
open_school
{
get
;
set
;
}
/// <summary>
...
...
Mall.Model/Entity/Education/RB_Education_Consult.cs
View file @
7ca1f0bf
...
...
@@ -233,5 +233,11 @@ namespace Mall.Model.Entity.Education
public
decimal
CommissionPrice
{
get
;
set
;
}
/// <summary>
/// 0-甲鹤,1-甲小鹤
/// </summary>
public
int
WeiXinType
{
get
;
set
;
}
}
}
Mall.Model/Extend/Education/RB_Account_ViewModel.cs
0 → 100644
View file @
7ca1f0bf
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Education
;
namespace
Mall.Model.Extend.Education
{
/// <summary>
/// 账号视图实体类
/// </summary>
[
Serializable
]
public
class
RB_Account_ViewModel
:
RB_Account
{
/// <summary>
/// 账户用户名称
/// </summary>
public
string
AccountName
{
get
;
set
;
}
/// <summary>
/// 账号ids
/// </summary>
public
string
QIds
{
get
;
set
;
}
/// <summary>
/// 子项表编号
/// </summary>
public
string
QAccountIds
{
get
;
set
;
}
/// <summary>
/// 集团名称
/// </summary>
public
string
GroupName
{
get
;
set
;
}
/// <summary>
/// 查询账户正常 1是
/// </summary>
public
int
IsSelectLevelNor
{
get
;
set
;
}
/// <summary>
/// 离职状态
/// </summary>
public
int
LeaveStatus
{
get
;
set
;
}
/// <summary>
/// 学校名称
/// </summary>
public
string
SchoolName
{
get
;
set
;
}
/// <summary>
/// 集团Logo
/// </summary>
public
string
GroupLogo
{
get
;
set
;
}
/// <summary>
/// 用户头像
/// </summary>
public
string
UserIcon
{
get
;
set
;
}
/// <summary>
/// 部门编号
/// </summary>
public
int
Dept_Id
{
get
;
set
;
}
/// <summary>
/// 部门ids
/// </summary>
public
string
DeptIds
{
get
;
set
;
}
/// <summary>
/// 岗位编号
/// </summary>
public
int
Post_Id
{
get
;
set
;
}
/// <summary>
/// 岗位编号
/// </summary>
public
string
QPostIds
{
get
;
set
;
}
/// <summary>
/// 部门名称
/// </summary>
public
string
DeptName
{
get
;
set
;
}
/// <summary>
/// 岗位名称
/// </summary>
public
string
PostName
{
get
;
set
;
}
/// <summary>
/// 邮箱
/// </summary>
public
string
Email
{
get
;
set
;
}
}
}
Mall.Model/Extend/Education/RB_Education_Activity_Extend.cs
View file @
7ca1f0bf
...
...
@@ -191,5 +191,10 @@ namespace Mall.Model.Extend.Education
/// 活动安排 2021-06-25 Add By:W
/// </summary>
public
List
<
RB_Education_ActivityTitle_Extend
>
ActivityTitleList
{
get
;
set
;
}
/// <summary>
/// 教育erp学生id
/// </summary>
public
int
EduStudentId
{
get
;
set
;
}
}
}
Mall.Model/Extend/Education/RB_Education_Consult_Extend.cs
View file @
7ca1f0bf
...
...
@@ -76,6 +76,11 @@ namespace Mall.Model.Extend.Education
/// </summary>
public
string
EduSellName
{
get
;
set
;
}
/// <summary>
/// 学生名称
/// </summary>
public
string
EduStudentName
{
get
;
set
;
}
/// <summary>
/// 生日
/// </summary>
...
...
Mall.Model/Query/OrderStatistics_Query.cs
View file @
7ca1f0bf
...
...
@@ -61,6 +61,13 @@ namespace Mall.Model.Query
/// </summary>
public
decimal
Unit_Price
{
get
;
set
;
}
/// <summary>
/// 单价
/// </summary>
public
decimal
EndUnit_Price
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
...
...
Mall.Module.Education/ActivityModule.cs
View file @
7ca1f0bf
...
...
@@ -411,7 +411,7 @@ namespace Mall.Module.Education
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
string
.
Format
(
"SetActivityModule_Msg:{0}"
,
Common
.
Plugin
.
JsonHelper
.
Serialize
(
model
)));
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
string
.
Format
(
"SetActivityModule_Msg:{0}"
,
Common
.
Plugin
.
JsonHelper
.
Serialize
(
model
)));
education_ActivityRepository
.
DBSession
.
Rollback
(
"SetActivityModule"
);
return
false
;
}
...
...
@@ -629,6 +629,19 @@ namespace Mall.Module.Education
/// <summary>
/// 获取学员账号列表扩展列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Account_ViewModel
>
GetStudentExt
(
RB_Account_ViewModel
query
)
{
return
RB_AccountRepository
.
GetStudentExt
(
query
);
}
/// <summary>
/// 获取教育用户的基础信息
/// </summary>
...
...
@@ -816,6 +829,12 @@ namespace Mall.Module.Education
var
employeeList
=
RB_AccountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
{
QIds
=
qIds
}).
ToList
();
list
.
ForEach
(
x
=>
x
.
EduSellName
=
x
.
EduUserId
>
0
?
employeeList
.
Where
(
y
=>
y
.
Id
==
x
.
EduUserId
).
FirstOrDefault
()?.
EmployeeName
:
""
);
}
if
(
list
.
Any
(
x
=>
x
.
EduStudentId
>
0
))
{
string
qIds
=
string
.
Join
(
","
,
list
.
Where
(
x
=>
x
.
EduStudentId
>
0
).
Distinct
().
Select
(
x
=>
x
.
EduStudentId
));
var
employeeList
=
RB_AccountRepository
.
GetStudentExt
(
new
RB_Account_ViewModel
{
QIds
=
qIds
}).
ToList
();
list
.
ForEach
(
x
=>
x
.
EduStudentName
=
x
.
EduStudentId
>
0
?
employeeList
.
Where
(
y
=>
y
.
Id
==
x
.
EduStudentId
).
FirstOrDefault
()?.
AccountName
:
""
);
}
List
<
RB_Finance_Extend
>
flist
=
new
List
<
RB_Finance_Extend
>();
string
orderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
flist
=
financeRepository
.
GetListJH
(
new
RB_Finance_Extend
()
{
ReFinanceIds2
=
orderIds
});
...
...
Mall.Repository/Education/RB_AccountRepository.cs
View file @
7ca1f0bf
...
...
@@ -211,5 +211,63 @@ WHERE 1=1 AND A.FunctionCode='{0}' AND A.Id IN(SELECT Action_Id FROM rb_role_fun
return
result
>
0
;
}
/// <summary>
/// 获取学员账号列表扩展列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Account_ViewModel
>
GetStudentExt
(
RB_Account_ViewModel
query
)
{
StringBuilder
where
=
new
StringBuilder
();
StringBuilder
where2
=
new
StringBuilder
();
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
Account
))
{
where
.
AppendFormat
(
" AND A.{0}='{1}' "
,
nameof
(
RB_Account_ViewModel
.
Account
),
query
.
Account
.
Trim
());
}
if
(
query
.
AccountType
>
0
)
{
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
AccountType
),
(
int
)
query
.
AccountType
);
}
if
(
query
.
Id
>
0
)
{
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
Id
),
query
.
Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QIds
))
{
where
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Account_ViewModel
.
Id
),
query
.
QIds
);
}
if
(
query
.
AccountId
>
0
)
{
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
AccountId
),
query
.
AccountId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QAccountIds
))
{
where
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Account_ViewModel
.
AccountId
),
query
.
QAccountIds
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
OpenId
))
{
where
.
AppendFormat
(
" AND A.{0}='{1}' "
,
nameof
(
RB_Account_ViewModel
.
OpenId
),
query
.
OpenId
);
}
}
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(G.GroupName,'') AS GroupName,IFNULL(s.SName,'') AS SchoolName,IFNULL(G.Logo,'') AS GroupLogo
,IFNULL(B.StuName,'') AS AccountName
FROM rb_account AS A INNER JOIN rb_student AS B ON A.AccountId=B.StuId
LEFT JOIN rb_group AS g ON A.Group_Id=g.GId
LEFT JOIN rb_school AS s ON A.School_Id=s.SId
WHERE 1=1 {0}
"
,
where
.
ToString
());
var
list
=
Get
<
RB_Account_ViewModel
>(
builder
.
ToString
()).
ToList
();
return
list
;
}
}
}
Mall.Repository/Education/RB_Education_ActivityRepository.cs
View file @
7ca1f0bf
...
...
@@ -229,6 +229,10 @@ WHERE 1=1
if
(
query
.
CreateBy
>
0
)
{
builder
.
AppendFormat
(
" AND D.{0}={1} "
,
nameof
(
RB_Education_Consult_Extend
.
UserId
),
query
.
CreateBy
);
}
//当前用户参加的活动
if
(
query
.
EduStudentId
>
0
)
{
builder
.
AppendFormat
(
" AND D.{0}={1} "
,
nameof
(
RB_Education_Consult_Extend
.
EduStudentId
),
query
.
EduStudentId
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Education_Activity_Extend
.
Id
));
...
...
Mall.Repository/Education/RB_Education_ConsultRepository.cs
View file @
7ca1f0bf
...
...
@@ -640,6 +640,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND c.{0}={1} "
,
nameof
(
RB_Education_Consult_Extend
.
UserId
),
query
.
UserId
);
}
if
(
query
.
EduStudentId
>
0
)
{
builder
.
AppendFormat
(
" AND c.{0}={1} "
,
nameof
(
RB_Education_Consult_Extend
.
EduStudentId
),
query
.
EduStudentId
);
}
}
builder
.
AppendFormat
(
" order by c.Id desc"
);
return
GetPage
<
RB_Education_Consult_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
7ca1f0bf
...
...
@@ -71,7 +71,7 @@ namespace Mall.Repository.Product
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
IsOffline
)}
=
{(
int
)
dmodel
.
IsOffline
}
"
;
}
if
(
dmodel
.
IsNotSelectCancel
==
1
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
<>
{(
int
)
OrderStatusEnum
.
Cancel
}
"
;
...
...
@@ -688,9 +688,9 @@ WHERE od.GoodsId={goodsId} and o.`Status`=0 and o.OrderStatus <> 7 GROUP BY o.Us
SELECT SUM(od.Number) as OrderNum FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
WHERE od.GoodsId=
{
goodsId
}
and o.`Status`=0 and o.OrderStatus <> 7"
;
var
model2
=
Get
<
RB_Goods_Order_Extend
>(
sql2
).
FirstOrDefault
();
if
(
model2
!=
null
)
{
return
model2
.
OrderNum
??
0
;
...
...
@@ -1134,7 +1134,7 @@ LEFT JOIN rb_member_user as c on b.UserId=c.Id
where
+=
$@" and a.
{
nameof
(
RB_Goods_Order
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
payMemerNumWhere
+=
$@" and
{
nameof
(
RB_Goods_Order
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
PlatformType
>
0
&&
dmodel
.
OrderStatus
!=
4
&&
dmodel
.
OrderStatus
!=
5
)
if
(
dmodel
.
PlatformType
>
0
&&
dmodel
.
OrderStatus
!=
4
&&
dmodel
.
OrderStatus
!=
5
)
{
where
+=
$@" and a.
{
nameof
(
RB_Goods_Order
.
OrderSource
)}
=
{(
int
)
dmodel
.
PlatformType
}
"
;
payMemerNumWhere
+=
$@" and
{
nameof
(
RB_Goods_Order
.
OrderSource
)}
=
{(
int
)
dmodel
.
PlatformType
}
"
;
...
...
@@ -1217,13 +1217,13 @@ AS t GROUP BY t.CreateDate DESC ";
/// <param name="startDate">开始日期</param>
/// <param name="endDate">结束日期</param>
/// <returns></returns>
public
List
<
RB_Member_User_Extend
>
GetOrderUserStatisticsRepository
(
DataStatistics_Query
dmodel
,
string
startDate
,
string
endDate
)
public
List
<
RB_Member_User_Extend
>
GetOrderUserStatisticsRepository
(
DataStatistics_Query
dmodel
,
string
startDate
,
string
endDate
)
{
string
where
=
""
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and a.
{
nameof
(
RB_Goods_Order
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
...
...
@@ -1246,7 +1246,7 @@ INNER JOIN
WHERE 1=1 {2}
"
,
startDate
,
endDate
,
where
);
var
list
=
Get
<
RB_Member_User_Extend
>(
builder
.
ToString
()).
ToList
();
return
list
;
}
...
...
@@ -1582,7 +1582,18 @@ GROUP BY od.GoodsId,o.OrderId
{
where
+=
$" and b.CompanyId=
{
dmodel
.
CompanyId
}
"
;
}
if
(
dmodel
.
Unit_Price
>
0
)
{
where
+=
$" and b.Unit_Price >=
{
dmodel
.
Unit_Price
}
"
;
}
if
(
dmodel
.
EndUnit_Price
>
0
)
{
where
+=
$" and b.Unit_Price <=
{
dmodel
.
EndUnit_Price
}
"
;
}
if
(
dmodel
.
CompanyId
>
0
)
{
where
+=
$" and b.CompanyId=
{
dmodel
.
CompanyId
}
"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
StartDate
))
{
where
+=
$" and DATE_FORMAT(a.PaymentTime,'%Y-%m-%d' )>=DATE_FORMAT('
{
dmodel
.
StartDate
}
','%Y-%m-%d' ) "
;
...
...
@@ -1724,7 +1735,14 @@ GROUP BY b.Id order by b.Id asc";
{
where
+=
$" and b.CompanyId=
{
dmodel
.
CompanyId
}
"
;
}
if
(
dmodel
.
Unit_Price
>
0
)
{
where
+=
$" and b.Unit_Price >=
{
dmodel
.
Unit_Price
}
"
;
}
if
(
dmodel
.
EndUnit_Price
>
0
)
{
where
+=
$" and b.Unit_Price <=
{
dmodel
.
EndUnit_Price
}
"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
StartDate
))
{
where
+=
$" and DATE_FORMAT(a.PaymentTime,'%Y-%m-%d' )>=DATE_FORMAT('
{
dmodel
.
StartDate
}
','%Y-%m-%d' ) "
;
...
...
@@ -1790,6 +1808,14 @@ GROUP BY b.Id order by b.Id asc";
{
where
+=
$" and b.CompanyId=
{
dmodel
.
CompanyId
}
"
;
}
if
(
dmodel
.
Unit_Price
>
0
)
{
where
+=
$" and b.Unit_Price >=
{
dmodel
.
Unit_Price
}
"
;
}
if
(
dmodel
.
EndUnit_Price
>
0
)
{
where
+=
$" and b.Unit_Price <=
{
dmodel
.
EndUnit_Price
}
"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
Ids
))
{
where
+=
$" and b.Id in(
{
dmodel
.
Ids
}
) "
;
...
...
@@ -1928,6 +1954,14 @@ GROUP BY b.Id order by b.Id asc";
{
where
+=
$" and b.Id in(
{
dmodel
.
Ids
}
) "
;
}
if
(
dmodel
.
Unit_Price
>
0
)
{
where
+=
$" and b.Unit_Price >=
{
dmodel
.
Unit_Price
}
"
;
}
if
(
dmodel
.
EndUnit_Price
>
0
)
{
where
+=
$" and b.Unit_Price <=
{
dmodel
.
EndUnit_Price
}
"
;
}
//if (!string.IsNullOrWhiteSpace(dmodel.StartDate))
//{
// where += $" and DATE_FORMAT(oa.FinishTime,'%Y-%m-%d' )>=DATE_FORMAT('{dmodel.StartDate}','%Y-%m-%d' ) ";
...
...
@@ -2336,7 +2370,7 @@ GROUP BY o.OrderId
/// <param name="GoodsId"></param>
/// <param name="UserId"></param>
/// <returns></returns>
public
List
<
RB_Goods_Order_Extend
>
GetCourseOrderIsPay
(
string
GoodsIds
,
int
UserId
)
public
List
<
RB_Goods_Order_Extend
>
GetCourseOrderIsPay
(
string
GoodsIds
,
int
UserId
)
{
string
sql
=
$@"
SELECT o.OrderId,od.GoodsId,o.PaymentTime FROM rb_goods_order o
...
...
@@ -2623,7 +2657,8 @@ WHERE gc.CategoryId in ({dmodel.RangeIds})
GROUP BY od.Id "
;
return
Get
<
RB_Goods_Activity_Extend
>(
sql
).
ToList
();
}
else
{
else
{
string
sql
=
$@"
SELECT od.Id,od.Number,od.Final_Price,o.OrderId,o.
{(
dmodel
.
ActiveObject
==
1
?
"DistributorTree"
:
"UserTree"
)}
as UserTree FROM rb_goods_orderdetail od
LEFT JOIN rb_goods_order o ON o.OrderId = od.OrderId
...
...
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
View file @
7ca1f0bf
...
...
@@ -754,13 +754,24 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{
totalReturn
=
Math
.
Round
((
totalReturn
*
(
Convert
.
ToDecimal
(
Config
.
SettlementRate
)
/
100
)),
2
,
MidpointRounding
.
AwayFromZero
);
}
decimal
AvgGrossProfit
=
0
;
int
GoodsNum
=
0
;
decimal
totalGrossProfit
=
0
;
if
(
list
!=
null
&&
list
.
Any
())
{
totalGrossProfit
=
list
.
Sum
(
x
=>
x
.
GrossProfit
);
GoodsNum
=
list
.
Sum
(
x
=>
x
.
Number
);
if
(
GoodsNum
>
0
)
{
AvgGrossProfit
=
(
Math
.
Round
((
totalGrossProfit
/
Convert
.
ToDecimal
(
GoodsNum
)),
2
,
MidpointRounding
.
AwayFromZero
));
}
}
var
retult
=
new
{
OrderNo
=
""
,
GoodsName
=
""
,
Unit_Price
=
list
.
Sum
(
x
=>
x
.
Unit_Price
),
//单价
Number
=
list
.
Sum
(
x
=>
x
.
Number
),
//数量
Number
=
GoodsNum
,
//数量
SupplierName
=
""
,
Final_Price
=
list
.
Sum
(
x
=>
x
.
Final_Price
),
//数量
FreightMoney
=
list
.
Sum
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
FreightMoney
)
?
Convert
.
ToDecimal
(
x
.
FreightMoney
)
:
0
),
...
...
@@ -787,8 +798,9 @@ namespace Mall.WebApi.Controllers.AppletWeChat
RealMoney
=
list
.
Sum
(
x
=>
x
.
RealMoney
),
YFMoney
=
list
.
Sum
(
x
=>
x
.
YFMoney
),
PayMoney
=
list
.
Sum
(
x
=>
x
.
PayMoney
),
GrossProfit
=
list
.
Sum
(
x
=>
x
.
GrossProfit
)
,
GrossProfit
=
totalGrossProfit
,
CompanyName
=
""
,
AvgGrossProfit
,
//平均毛利率
GrossProfitRate
,
//毛利率的平均值
};
...
...
@@ -1385,7 +1397,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
model
?.
PresentFXMonth
,
model
?.
Advertising
,
model
?.
SubName
,
MarketingLogo
=
tempLogo
,
MarketingLogo
=
tempLogo
,
model
?.
ShelvesDate
,
model
?.
DownDate
,
model
?.
VideoType
,
...
...
@@ -1412,7 +1424,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
requestParm
.
msg
.
ToString
());
string
Month
=
parms
.
GetStringValue
(
"Month"
);
//月份
if
(
string
.
IsNullOrEmpty
(
Month
))
{
if
(
string
.
IsNullOrEmpty
(
Month
))
{
return
ApiResult
.
ParamIsNull
();
}
try
...
...
@@ -1508,7 +1521,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetDSMoreMonthStatistics
(
object
requestMsg
)
{
public
ApiResult
GetDSMoreMonthStatistics
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
requestParm
.
msg
.
ToString
());
string
StartTime
=
parms
.
GetStringValue
(
"StartTime"
);
//开始时间 月
...
...
@@ -1628,11 +1642,12 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetDSYearStartistics
(
object
requestMsg
)
{
public
ApiResult
GetDSYearStartistics
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
requestParm
.
msg
.
ToString
());
int
StartYear
=
parms
.
GetInt
(
"StartYear"
,
0
);
//开始时间 年
int
EndYear
=
parms
.
GetInt
(
"EndYear"
,
0
);
//结束时间 年
int
StartYear
=
parms
.
GetInt
(
"StartYear"
,
0
);
//开始时间 年
int
EndYear
=
parms
.
GetInt
(
"EndYear"
,
0
);
//结束时间 年
if
(
StartYear
<=
0
||
EndYear
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
...
...
@@ -1653,7 +1668,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
FileContentResult
GetDSYearStartisticsToExcel
(
object
requestMsg
)
{
public
FileContentResult
GetDSYearStartisticsToExcel
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
requestParm
.
msg
.
ToString
());
int
StartYear
=
parms
.
GetInt
(
"StartYear"
,
0
);
//开始时间 年
...
...
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
View file @
7ca1f0bf
...
...
@@ -924,6 +924,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
demodel
.
EduStudentId
=
(
bmodel
!=
null
&&
bmodel
.
Id
>
0
)
?
bmodel
.
StudentId
:
0
;
demodel
.
IsCommission
=
1
;
demodel
.
IsRollCall
=
1
;
demodel
.
WeiXinType
=
0
;
var
umodel
=
userModule
.
GetMemberUserInfo
(
demodel
.
UserId
);
demodel
.
OrderSource
=
umodel
.
Source
;
//判断当前人的点数
...
...
@@ -988,8 +989,155 @@ namespace Mall.WebApi.Controllers.AppletWeChat
#
endregion
#
region
甲小鹤活动报名
/// <summary>
/// 活动报名
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
[
HttpPost
]
[
Microsoft
.
AspNetCore
.
Authorization
.
AllowAnonymous
]
public
ApiResult
SetActivityEnrollInfoJXH
()
{
bool
flag
=
false
;
var
request
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
if
(
userInfo
==
null
)
{
userInfo
=
new
AppletUserInfo
{
UserId
=
RequestParm
.
UserId
,
MallBaseId
=
RequestParm
.
MallBaseId
,
TenantId
=
RequestParm
.
TenantId
,
EduStudentId
=
RequestParm
.
EduStudentId
};
}
Model
.
Extend
.
Education
.
RB_Education_Consult_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
Model
.
Extend
.
Education
.
RB_Education_Consult_Extend
>(
request
.
msg
.
ToString
());
demodel
.
EduStudentId
=
userInfo
.
EduStudentId
;
var
model
=
activityModule
.
GetActivityModule
(
demodel
.
ActivityId
);
var
list
=
activityModule
.
GetCommerceConsultListRepository
(
new
Model
.
Extend
.
Education
.
RB_Education_Consult_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
ActivityId
=
demodel
.
ActivityId
,
EnrollState
=
1
,
EduStudentId
=
userInfo
.
EduStudentId
,
OrderStatus
=
1
});
if
(
list
.
Any
())
{
return
ApiResult
.
Failed
(
"已存在报名信息"
);
}
if
(
model
==
null
||
model
.
Status
==
Common
.
Enum
.
DateStateEnum
.
Delete
)
{
return
ApiResult
.
Failed
(
"活动不存在"
);
}
if
(
model
.
SignStartTime
>=
DateTime
.
Now
)
{
return
ApiResult
.
Failed
(
"报名还未开始,无法报名"
);
}
if
(
model
.
SignEndTime
<=
DateTime
.
Now
)
{
return
ApiResult
.
Failed
(
"已过了报名时间,无法报名"
);
}
var
bmodel
=
activityModule
.
GetEducationBaseInfo
(
new
Model
.
Extend
.
Education
.
RB_Education_BaseInfo_Extend
()
{
MallBaseId
=
model
.
MallBaseId
,
TenantId
=
model
.
TenantId
,
UserId
=
userInfo
.
UserId
}).
FirstOrDefault
();
if
(
model
.
Distinguish
==
0
)
{
if
(
demodel
.
Sex
==
0
)
{
return
ApiResult
.
Failed
(
"您的性别保密,无法报名"
);
}
if
(
demodel
.
Sex
==
1
)
{
int
ManPeopleNum
=
activityModule
.
GetActivityEnrollNum
(
demodel
.
ActivityId
,
1
);
if
(
model
.
ManNum
<=
ManPeopleNum
)
{
return
ApiResult
.
Failed
(
"已报满,无法报名"
);
}
}
else
if
(
demodel
.
Sex
==
2
)
{
int
WoManPeopleNum
=
activityModule
.
GetActivityEnrollNum
(
demodel
.
ActivityId
,
2
);
if
(
model
.
WoManNum
<=
WoManPeopleNum
)
{
return
ApiResult
.
Failed
(
"已报满,无法报名"
);
}
}
else
{
return
ApiResult
.
Failed
(
"性别未维护,无法报名"
);
}
}
else
{
int
ManPeopleNum
=
activityModule
.
GetActivityEnrollNum
(
demodel
.
ActivityId
,
0
);
if
(
model
.
ManNum
<=
ManPeopleNum
)
{
return
ApiResult
.
Failed
(
"已报满,无法报名"
);
}
}
if
(
model
.
AgeLimit
==
0
)
{
if
(
string
.
IsNullOrWhiteSpace
(
demodel
.
StuBirth
))
{
return
ApiResult
.
Failed
(
"您未绑定学员信息无法获取到年龄,无法报名"
);
}
int
Age
=
Convert
.
ToInt32
(
Common
.
Plugin
.
StringHelper
.
GetAge
(
demodel
.
StuBirth
));
if
(
model
.
StartAge
>
0
&&
model
.
EndAge
>
0
)
{
if
(
Age
<
model
.
StartAge
||
Age
>
model
.
EndAge
)
{
return
ApiResult
.
Failed
(
$"年龄限制在
{
model
.
StartAge
}
-
{
model
.
EndAge
}
岁,无法报名"
);
}
}
else
if
(
model
.
StartAge
>
0
&&
model
.
EndAge
==
0
)
{
if
(
Age
<
model
.
StartAge
)
{
return
ApiResult
.
Failed
(
$"年龄必须大于
{
model
.
StartAge
}
岁,无法报名"
);
}
}
else
if
(
model
.
StartAge
==
0
&&
model
.
EndAge
>
0
)
{
if
(
Age
>
model
.
EndAge
)
{
return
ApiResult
.
Failed
(
$"年龄必须小于
{
model
.
EndAge
}
岁,无法报名"
);
}
}
}
demodel
.
Sex
=
bmodel
?.
Sex
??
0
;
Random
R
=
new
Random
();
int
Rstr
=
R
.
Next
(
111
,
999
);
demodel
.
OrderNo
=
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
)
+
Rstr
;
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
Status
=
0
;
demodel
.
IsCancelConfirm
=
model
.
IsCancelConfirm
;
demodel
.
CreateTime
=
System
.
DateTime
.
Now
;
demodel
.
IsCommission
=
1
;
demodel
.
IsRollCall
=
1
;
demodel
.
WeiXinType
=
1
;
var
umodel
=
userModule
.
GetMemberUserInfo
(
demodel
.
UserId
);
demodel
.
OrderSource
=
umodel
.
Source
;
//判断当前人的点数
if
(
demodel
.
PaymentWay
==
Common
.
Enum
.
Goods
.
OrderPaymentTypeEnum
.
PayPoint
)
{
if
(
umodel
==
null
||
umodel
.
Id
==
0
)
{
return
ApiResult
.
Failed
(
"用户信息不存在"
);
}
if
(
model
.
PointNum
==
demodel
.
TotalPoint
)
{
if
(
umodel
.
PointNum
<
model
.
PointNum
)
{
return
ApiResult
.
Failed
(
"您的点数不足,请充值后再试"
);
}
}
else
{
return
ApiResult
.
Failed
(
"支付点数不正确"
);
}
demodel
.
PaymentTime
=
System
.
DateTime
.
Now
;
demodel
.
OrderStatus
=
1
;
flag
=
activityModule
.
SetActivityEnrollInfo
(
demodel
,
umodel
)
>
0
;
return
flag
?
ApiResult
.
Success
(
"报名成功"
)
:
ApiResult
.
Failed
(
"出错了,请联系管理员"
);
}
else
if
(
demodel
.
PaymentWay
==
Common
.
Enum
.
Goods
.
OrderPaymentTypeEnum
.
OnlinePayment
)
{
return
ApiResult
.
Failed
(
"您暂时在线支付"
);
}
return
ApiResult
.
Failed
(
"支付方式错误"
);
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
7ca1f0bf
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/Education/EducationController.cs
View file @
7ca1f0bf
...
...
@@ -2420,6 +2420,8 @@ namespace Mall.WebApi.Controllers.Education
x
.
UserId
,
x
.
ActivityId
,
x
.
EduStudentId
,
x
.
EduStudentName
,
x
.
WeiXinType
,
x
.
Remark
,
x
.
IsApplyForCancel
,
PaymentWay
=
x
.
PaymentWay
.
HasValue
?
(
int
)
x
.
PaymentWay
:
0
,
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
7ca1f0bf
...
...
@@ -561,10 +561,13 @@ namespace Mall.WebApi.Controllers.TradePavilion
if
(
oldModel
.
UserId
!=
userInfo
.
UserId
)
{
return
ApiResult
.
Failed
(
"无法修改此载体"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StartingInfo
)
)
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StartingInfo
))
{
query
.
FirstStoreTest
=
1
;
}
else
{
query
.
FirstStoreTest
=
0
;
}
if
(
query
.
OpenTime
.
HasValue
)
{
...
...
@@ -572,6 +575,13 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
query
.
OpeningStatus
=
1
;
}
else
{
query
.
OpeningStatus
=
0
;
}
}
else
{
query
.
OpeningStatus
=
0
;
}
bool
flag
=
carrierModule
.
SetCarrier
(
query
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
...
...
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
7ca1f0bf
...
...
@@ -1573,10 +1573,13 @@ namespace Mall.WebApi.Controllers.TradePavilion
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StartingInfo
)
)
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StartingInfo
))
{
query
.
FirstStoreTest
=
1
;
}
else
{
query
.
FirstStoreTest
=
0
;
}
query
.
ShopNum
=
query
.
ShopNum
??
0
;
query
.
BuiltUpArea
=
query
.
BuiltUpArea
??
0
;
query
.
EndBuiltUpArea
=
query
.
EndBuiltUpArea
??
0
;
...
...
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