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
b9b4e2d5
Commit
b9b4e2d5
authored
Oct 30, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'HK' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq
parents
83406134
cb811e3a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1262 additions
and
7 deletions
+1262
-7
RB_Goods_Order.cs
Mall.Model/Entity/Product/RB_Goods_Order.cs
+7
-1
RB_Goods_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Extend.cs
+5
-0
RB_Stores_Extend.cs
Mall.Model/Extend/User/RB_Stores_Extend.cs
+5
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+1141
-0
OfflineGoodsModule.cs
Mall.Module.Reserve/OfflineGoodsModule.cs
+32
-4
RB_StoresRepository.cs
Mall.Repository/User/RB_StoresRepository.cs
+5
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+57
-0
AppletStoresController.cs
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
+6
-1
OSGoodsController.cs
Mall.WebApi/Controllers/Reserve/OSGoodsController.cs
+4
-1
No files found.
Mall.Model/Entity/Product/RB_Goods_Order.cs
View file @
b9b4e2d5
...
...
@@ -309,7 +309,7 @@ namespace Mall.Model.Entity.Product
/// </summary>
public
int
?
SmallShopsId
{
get
;
set
;
}
/// <summary>
/// 订单分类 0正常订单 1司导订单 2教育订单
/// 订单分类 0正常订单 1司导订单 2教育订单
3-线下服务订单
/// </summary>
public
int
OrderClassify
{
get
;
set
;
}
/// <summary>
...
...
@@ -320,5 +320,11 @@ namespace Mall.Model.Entity.Product
/// 课程卡抵扣金额
/// </summary>
public
decimal
?
EducationMoney
{
get
;
set
;
}
/// <summary>
/// 门店编号
/// </summary>
public
int
StoresId
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Extend.cs
View file @
b9b4e2d5
...
...
@@ -349,5 +349,10 @@ namespace Mall.Model.Extend.Product
return
Common
.
ConvertHelper
.
ConvertToListInt
(
this
.
StoresIds
);
}
}
/// <summary>
/// 门店名称
/// </summary>
public
List
<
string
>
StoreNameList
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Stores_Extend.cs
View file @
b9b4e2d5
...
...
@@ -33,5 +33,10 @@ namespace Mall.Model.Entity.User
/// 距离公里数
/// </summary>
public
decimal
KM
{
get
;
set
;
}
/// <summary>
/// 查询门店编号
/// </summary>
public
string
QIds
{
get
;
set
;
}
}
}
Mall.Module.Product/OrderModule.cs
View file @
b9b4e2d5
This diff is collapsed.
Click to expand it.
Mall.Module.Reserve/OfflineGoodsModule.cs
View file @
b9b4e2d5
...
...
@@ -208,6 +208,11 @@ namespace Mall.Module.Product
/// </summary>
private
readonly
RB_Member_IntegralRepository
member_IntegralRepository
=
new
RB_Member_IntegralRepository
();
/// <summary>
/// 门店仓储层对象
/// </summary>
private
readonly
RB_StoresRepository
storesRepository
=
new
RB_StoresRepository
();
/// <summary>
/// 获取会员等级列表
...
...
@@ -250,9 +255,16 @@ namespace Mall.Module.Product
string
ids
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
var
clist
=
goods_CategoryRepository
.
GetList
(
new
RB_Goods_Category_Extend
()
{
GoodsIds
=
ids
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
olist
=
goods_OrderRepository
.
GetGoodsOrderNum
(
ids
);
var
storesIds
=
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
!
string
.
IsNullOrWhiteSpace
(
qitem
.
StoresIds
)).
Select
(
qitem
=>
qitem
.
StoresIds
));
List
<
RB_Stores_Extend
>
storeList
=
new
List
<
RB_Stores_Extend
>();
if
(!
string
.
IsNullOrWhiteSpace
(
storesIds
))
{
storeList
=
storesRepository
.
GetStoresListRepository
(
new
RB_Stores_Extend
()
{
QIds
=
storesIds
});
}
foreach
(
var
item
in
list
)
{
item
.
StoreNameList
=
new
List
<
string
>();
item
.
CategoryList
=
clist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
//轮播图
item
.
CoverImage
=
""
;
...
...
@@ -274,6 +286,24 @@ namespace Mall.Module.Product
}
}
item
.
GoodsBuyNum
=
olist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
FirstOrDefault
()?.
OrderNum
??
0
;
if
(!
string
.
IsNullOrEmpty
(
item
.
StoresIds
))
{
List
<
int
>
storesResultList
=
Common
.
ConvertHelper
.
ConvertToListInt
(
item
.
StoresIds
);
if
(
storesResultList
!=
null
&&
storesResultList
.
Count
>
0
)
{
foreach
(
var
sItem
in
storesResultList
)
{
string
storeName
=
storeList
?.
Where
(
qitem
=>
qitem
.
Id
==
sItem
)?.
FirstOrDefault
()?.
Name
??
""
;
if
(!
string
.
IsNullOrEmpty
(
storeName
))
{
item
.
StoreNameList
.
Add
(
storeName
);
}
}
}
}
}
}
return
list
;
...
...
@@ -828,7 +858,7 @@ namespace Mall.Module.Product
var
pupmodel
=
demodel
.
DistributionCommissionList
.
Where
(
x
=>
x
.
SpecificationSort
==
item
.
SpecificationSort
&&
x
.
DistributorGrade
==
item
.
DistributorGrade
).
FirstOrDefault
();
if
(
item
.
OneCommission
!=
pupmodel
.
OneCommission
||
item
.
TwoCommission
!=
pupmodel
.
TwoCommission
||
item
.
ThreeCommission
!=
pupmodel
.
ThreeCommission
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_DistributionCommission
.
OneCommission
),
pupmodel
.
OneCommission
},
{
nameof
(
RB_Goods_DistributionCommission
.
TwoCommission
),
pupmodel
.
TwoCommission
},
...
...
@@ -875,7 +905,7 @@ namespace Mall.Module.Product
var
pupmodel
=
demodel
.
MemberPriceList
.
Where
(
x
=>
x
.
SpecificationSort
==
item
.
SpecificationSort
&&
x
.
MemberGrade
==
item
.
MemberGrade
).
FirstOrDefault
();
if
(
item
.
MemberPrice
!=
pupmodel
.
MemberPrice
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_MemberPrice
.
MemberPrice
),
pupmodel
.
MemberPrice
}
};
...
...
@@ -943,8 +973,6 @@ namespace Mall.Module.Product
});
}
}
//插入分销佣金
if
(
demodel
.
SeparateDistribution
==
1
)
{
...
...
Mall.Repository/User/RB_StoresRepository.cs
View file @
b9b4e2d5
...
...
@@ -4,6 +4,7 @@ using System.Text;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.User
;
using
System.Linq
;
using
Mall.Model.Extend.MarketingCenter
;
namespace
Mall.Repository.User
{
...
...
@@ -137,6 +138,10 @@ WHERE 1 = 1 AND Status = 0 ");
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
Id
),
query
.
Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Stores_Extend
.
Id
),
query
.
QIds
);
}
if
(
query
.
Name
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Name
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Stores_Extend
.
Name
),
query
.
Name
.
Trim
());
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
b9b4e2d5
...
...
@@ -694,6 +694,63 @@ namespace Mall.WebApi.Controllers.MallBase
return
orderModule
.
SetAppletSDGoodsOrderInfo
(
demodel
);
}
/// <summary>
/// 线下服务下单
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetAppletOfflineGoodsOrderInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
req
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
Consignee
))
{
return
ApiResult
.
ParamIsNull
(
"请传递联系人"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
return
ApiResult
.
ParamIsNull
(
"请传递联系人手机号码"
);
}
demodel
.
DeliveryMethod
=
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
;
if
((
demodel
.
Income
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"订单金额不正确"
);
}
if
(
demodel
.
StoresId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请选择服务门店"
);
}
demodel
.
BuyerMessage
??=
""
;
//买家留言
demodel
.
OrderSource
??=
Common
.
Enum
.
User
.
UserSourceEnum
.
WeiXin
;
#
region
赋默认值
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
Country
??=
2
;
demodel
.
OrderStatus
=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
NonPayment
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
Fee
??=
0
;
demodel
.
FreightMoney
??=
0
;
demodel
.
HistoryOrderStatus
??=
0
;
demodel
.
IsApplyForCancel
??=
2
;
demodel
.
IsOrderCommission
??=
2
;
demodel
.
MerchantsNo
??=
""
;
demodel
.
Recycled
??=
2
;
demodel
.
Refund
??=
0
;
demodel
.
Status
=
0
;
demodel
.
AnchorName
??=
""
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
SmallShopsId
=
req
.
SmallShopsId
;
demodel
.
OrderClassify
=
3
;
demodel
.
DestinationAddress
??=
""
;
#
endregion
bool
flag
=
orderModule
.
SetAppletOfflineGoodsOrderModule
(
demodel
,
out
string
message
);
return
flag
?
ApiResult
.
Success
(
message
:
message
)
:
ApiResult
.
Failed
(
message
:
message
);
}
/// <summary>
/// ERP下单
/// </summary>
...
...
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
View file @
b9b4e2d5
...
...
@@ -77,7 +77,12 @@ namespace Mall.WebApi.Controllers.Reserve
storeTel
=
storeModel
?.
Tel
,
distance
=
storeModel
?.
KM
,
storeCoverImg
=
storeModel
?.
CoverImg
,
storeNavImg
=
storeModel
?.
NavImg
storeNavImg
=
storeModel
?.
NavImg
,
consumptionObj
=
new
{
consumptionStoreId
=
0
,
consumptionStoreName
=
"HK门店"
}
},
};
return
ApiResult
.
Success
(
data
:
result
);
...
...
Mall.WebApi/Controllers/Reserve/OSGoodsController.cs
View file @
b9b4e2d5
...
...
@@ -68,7 +68,10 @@ namespace Mall.WebApi.Controllers.Reserve
x
.
GoodsStatus
,
x
.
TenantId
,
x
.
MallBaseId
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
x
.
DepositMoney
,
x
.
IsChooseServicePerson
,
x
.
StoreNameList
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
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