Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
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
黄奎
Education
Commits
6e85a8c3
Commit
6e85a8c3
authored
Mar 16, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1资产商品化
parent
98c1e4b0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
273 additions
and
36 deletions
+273
-36
FinanceConfigTypeEnum.cs
Edu.Common/Enum/Course/FinanceConfigTypeEnum.cs
+18
-0
RB_Goods_Order.cs
Edu.Model/Entity/Goods/RB_Goods_Order.cs
+5
-31
RB_Goods_OrderDetail.cs
Edu.Model/Entity/Goods/RB_Goods_OrderDetail.cs
+125
-0
RB_Goods_OrderDetail_ViewModel.cs
Edu.Model/ViewModel/Goods/RB_Goods_OrderDetail_ViewModel.cs
+19
-0
EduGoodsModule.cs
Edu.Module.Goods/EduGoodsModule.cs
+33
-0
RB_EduGoods_OrderDetailRepository.cs
Edu.Repository/Goods/RB_EduGoods_OrderDetailRepository.cs
+50
-0
EudGoodsController.cs
Edu.WebApi/Controllers/Goods/EudGoodsController.cs
+23
-5
No files found.
Edu.Common/Enum/Course/FinanceConfigTypeEnum.cs
View file @
6e85a8c3
...
...
@@ -93,5 +93,23 @@ namespace Edu.Common.Enum.Course
/// </summary>
[
EnumField
(
"教育咖啡劵"
)]
EduCoffee
=
15
,
/// <summary>
/// 教育商品- 资产
/// </summary>
[
EnumField
(
"教育资产商品"
)]
EduProperty
=
16
,
/// <summary>
/// 教育商品- 资产 取消退款
/// </summary>
[
EnumField
(
"教育资产商品取消退款"
)]
EduPropertyRefund
=
17
,
/// <summary>
/// 教育商品- 运费成本
/// </summary>
[
EnumField
(
"教育资产商品运费成本"
)]
EduFreightCost
=
18
,
}
}
Edu.Model/Entity/Goods/RB_Goods_Order.cs
View file @
6e85a8c3
...
...
@@ -62,16 +62,6 @@ namespace Edu.Model.Entity.Goods
/// </summary>
public
int
PaymentWay
{
get
;
set
;
}
/// <summary>
/// 单价
/// </summary>
public
decimal
Unit_Price
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
public
int
Number
{
get
;
set
;
}
/// <summary>
/// 应收金额
/// </summary>
...
...
@@ -88,7 +78,7 @@ namespace Edu.Model.Entity.Goods
public
decimal
Fee
{
get
;
set
;
}
/// <summary>
/// 退款
/// 退款
金额
/// </summary>
public
decimal
Refund
{
get
;
set
;
}
...
...
@@ -112,26 +102,6 @@ namespace Edu.Model.Entity.Goods
/// </summary>
public
DateTime
?
CancelTime
{
get
;
set
;
}
/// <summary>
/// 教育商品id
/// </summary>
public
int
GoodsId
{
get
;
set
;
}
/// <summary>
/// 对应电商商品ID
/// </summary>
public
int
MallGoodsId
{
get
;
set
;
}
/// <summary>
/// 商品名称
/// </summary>
public
string
GoodsName
{
get
;
set
;
}
/// <summary>
/// 封面图
/// </summary>
public
string
CoverImage
{
get
;
set
;
}
/// <summary>
/// 总成本价格
/// </summary>
...
...
@@ -162,5 +132,9 @@ namespace Edu.Model.Entity.Goods
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 总运费成本
/// </summary>
public
decimal
FreightCostMoney
{
get
;
set
;
}
}
}
Edu.Model/Entity/Goods/RB_Goods_OrderDetail.cs
0 → 100644
View file @
6e85a8c3
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Goods
{
/// <summary>
/// 教育商品订单明细实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_OrderDetail
{
/// <summary>
/// 明细ID
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// OrderId
/// </summary>
public
int
OrderId
{
get
;
set
;
}
/// <summary>
/// 对应电商订单ID
/// </summary>
public
int
MallOrderId
{
get
;
set
;
}
/// <summary>
/// 对应电商订单明细ID
/// </summary>
public
int
MallOrderDetailId
{
get
;
set
;
}
/// <summary>
/// 单价
/// </summary>
public
decimal
Unit_Price
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
public
int
Number
{
get
;
set
;
}
/// <summary>
/// 应收金额
/// </summary>
public
decimal
PreferPrice
{
get
;
set
;
}
/// <summary>
/// 实收金额
/// </summary>
public
decimal
Income
{
get
;
set
;
}
/// <summary>
/// 手续费
/// </summary>
public
decimal
Fee
{
get
;
set
;
}
/// <summary>
/// 运费
/// </summary>
public
decimal
FreightMoney
{
get
;
set
;
}
/// <summary>
/// 教育商品id
/// </summary>
public
int
GoodsId
{
get
;
set
;
}
/// <summary>
/// 对应电商商品ID
/// </summary>
public
int
MallGoodsId
{
get
;
set
;
}
/// <summary>
/// 商品名称
/// </summary>
public
string
GoodsName
{
get
;
set
;
}
/// <summary>
/// 封面图
/// </summary>
public
string
CoverImage
{
get
;
set
;
}
/// <summary>
/// 总成本价格
/// </summary>
public
decimal
CostMoney
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 集团ID
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 对应的物料档案ID
/// </summary>
public
int
MaterialId
{
get
;
set
;
}
/// <summary>
/// 商品运费成本
/// </summary>
public
decimal
FreightCostMoney
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Goods/RB_Goods_OrderDetail_ViewModel.cs
0 → 100644
View file @
6e85a8c3
using
Edu.Model.Entity.Goods
;
using
Edu.Model.ViewModel.Finance
;
using
System
;
using
System.Collections.Generic
;
namespace
Edu.Model.ViewModel.Goods
{
/// <summary>
/// 教育商品订单明细扩展类
/// </summary>
[
Serializable
]
public
class
RB_Goods_OrderDetail_ViewModel
:
RB_Goods_OrderDetail
{
/// <summary>
/// 订单IDs
/// </summary>
public
string
OrderIds
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Goods/EduGoodsModule.cs
View file @
6e85a8c3
...
...
@@ -34,6 +34,11 @@ namespace Edu.Module.Goods
/// 账号
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
/// 字典
/// </summary>
private
readonly
Rb_dictvalueRepository
dictvalueRepository
=
new
Rb_dictvalueRepository
();
#
region
咖啡劵
/// <summary>
...
...
@@ -76,6 +81,34 @@ namespace Edu.Module.Goods
}
return
list
;
}
#
endregion
#
region
推送企业微信
/// <summary>
/// 推送企业微信消息 (资产商品下单后)
/// </summary>
/// <param name="goodsName"></param>
/// <param name="orderNo"></param>
/// <returns></returns>
public
string
SetMallOrderWeChatMessage
(
string
goodsName
,
string
orderNo
,
decimal
money
,
string
orderTime
,
int
group_Id
)
{
string
OrderNotice
=
dictvalueRepository
.
GetList
(
new
Model
.
ViewModel
.
User
.
RB_Dictvalue_Extend
()
{
RB_Group_id
=
group_Id
,
DictKey
=
"Goods_OrderNotice"
}).
FirstOrDefault
()?.
Content
??
""
;
if
(!
string
.
IsNullOrEmpty
(
OrderNotice
))
{
var
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Model
.
ViewModel
.
User
.
Employee_ViewModel
()
{
Group_Id
=
group_Id
,
QIds
=
OrderNotice
});
foreach
(
var
item
in
empList
)
{
if
(!
string
.
IsNullOrEmpty
(
item
.
WorkUserId
))
{
var
recipientPath
=
HttpUtility
.
UrlEncode
(
$"/stuMan/coffeeManage/order"
);
var
content
=
$"<font color='info'>商品下单通知</font>\n>**概要信息** \n>商品名称:<font color='warning'>
{
goodsName
}
</font>\n>订单编号:<font color='warning'>
{
orderNo
}
</font>\n>订单金额:<font color='warning'>
{
money
}
</font>\n>下单日期:<font color='warning'>
{
orderTime
}
</font>\n>请 点 击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
item
.
Id
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
item
.
WorkUserId
,
"商品下单通知"
);
}
}
}
return
""
;
}
#
endregion
}
...
...
Edu.Repository/Goods/RB_EduGoods_OrderDetailRepository.cs
0 → 100644
View file @
6e85a8c3
using
Edu.Model.Entity.Goods
;
using
Edu.Model.ViewModel.Goods
;
using
System.Collections.Generic
;
using
System.Linq
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Goods
{
/// <summary>
/// 教育商品订单明细仓储
/// </summary>
public
class
RB_EduGoods_OrderDetailRepository
:
BaseRepository
<
RB_Goods_OrderDetail
>
{
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderDetail_ViewModel
>
GetList
(
RB_Goods_OrderDetail_ViewModel
demodel
)
{
var
parameters
=
new
DynamicParameters
();
string
where
=
$@" 1=1 and Status =0"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
MallBaseId
)}
=
{
demodel
.
MallBaseId
}
"
;
}
if
(
demodel
.
OrderId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
}
if
(
demodel
.
MallOrderId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
MallOrderId
)}
=
{
demodel
.
MallOrderId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
OrderIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
OrderId
)}
in(
{
demodel
.
OrderIds
}
)"
;
}
string
sql
=
$@" select * from RB_Goods_OrderDetail where
{
where
}
order by Id desc"
;
return
Get
<
RB_Goods_OrderDetail_ViewModel
>(
sql
,
parameters
).
ToList
();
}
}
}
Edu.WebApi/Controllers/Goods/EudGoodsController.cs
View file @
6e85a8c3
...
...
@@ -10,6 +10,7 @@ using Edu.Common.Plugin;
using
Edu.Model.ViewModel.Goods
;
using
Edu.Module.Goods
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
...
...
@@ -51,8 +52,6 @@ namespace Edu.WebApi.Controllers.Goods
x
.
EmName
,
x
.
UserId
,
x
.
UserName
,
x
.
Unit_Price
,
x
.
Number
,
x
.
PreferPrice
,
x
.
Income
,
x
.
Fee
,
...
...
@@ -61,9 +60,6 @@ namespace Edu.WebApi.Controllers.Goods
x
.
OrderStatus
,
PaymentTime
=
x
.
PaymentTime
.
ToString
(
"yyyy-MM-dd HH:mm"
),
CancelTime
=
x
.
CancelTime
.
HasValue
?
x
.
CancelTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
x
.
GoodsId
,
x
.
GoodsName
,
x
.
CoverImage
,
IncomeList
=
x
.
IncomeList
.
Select
(
z
=>
new
{
z
.
FrID
,
...
...
@@ -81,5 +77,27 @@ namespace Edu.WebApi.Controllers.Goods
return
ApiResult
.
Success
(
""
,
pmodel
);
}
#
endregion
#
region
推送企业微信
[
AllowAnonymous
]
[
HttpPost
]
public
ApiResult
SetMallOrderWeChatMessage
()
{
string
GoodsName
=
base
.
ParmJObj
.
GetStringValue
(
"GoodsName"
);
string
OrderNo
=
base
.
ParmJObj
.
GetStringValue
(
"OrderNo"
);
decimal
Money
=
base
.
ParmJObj
.
GetDecimal
(
"Money"
);
string
OrderTime
=
base
.
ParmJObj
.
GetStringValue
(
"OrderTime"
);
int
GroupId
=
base
.
ParmJObj
.
GetInt
(
"GroupId"
,
0
);
string
msg
=
goodsModule
.
SetMallOrderWeChatMessage
(
GoodsName
,
OrderNo
,
Money
,
OrderTime
,
GroupId
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
#
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