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
2f4c09b1
Commit
2f4c09b1
authored
Jul 13, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区域+售后
parent
e47294ad
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
186 additions
and
8 deletions
+186
-8
OrderDeliveryMethodEnum.cs
Mall.Common/Enum/Goods/OrderDeliveryMethodEnum.cs
+2
-2
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+4
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+100
-5
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+20
-0
RB_Logistics_RulesRegionRepository.cs
...epository/BaseSetUp/RB_Logistics_RulesRegionRepository.cs
+37
-1
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+5
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+18
-0
No files found.
Mall.Common/Enum/Goods/OrderDeliveryMethodEnum.cs
View file @
2f4c09b1
...
...
@@ -18,9 +18,9 @@ namespace Mall.Common.Enum.Goods
[
EnumField
(
"快递配送"
)]
ExpressDistribution
=
1
,
/// <summary>
/// 到店
核销
/// 到店
自提
/// </summary>
[
EnumField
(
"到店
核销
"
)]
[
EnumField
(
"到店
自提
"
)]
VerificationShop
=
2
,
/// <summary>
/// 同城配送
...
...
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
2f4c09b1
...
...
@@ -43,6 +43,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
int
?
GoodsId
{
get
;
set
;
}
/// <summary>
/// 分销用户id
/// </summary>
public
int
?
DistributionUserId
{
get
;
set
;
}
/// <summary>
/// 商品订单数量
/// </summary>
public
int
?
OrderNum
{
get
;
set
;
}
...
...
Mall.Module.Product/OrderModule.cs
View file @
2f4c09b1
...
...
@@ -1136,6 +1136,19 @@ namespace Mall.Module.Product
var
mpriceList
=
goods_MemberPriceRepository
.
GetList
(
new
RB_Goods_MemberPrice_Extend
()
{
GoodsIds
=
GoodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
//区域
var
AreaList
=
goods_AreaRepository
.
GetList
(
new
RB_Goods_Area_Extend
()
{
GoodsIds
=
GoodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
#
region
查询外部设置区域限购
List
<
int
>
RAreaList
=
new
List
<
int
>();
var
RulesAreaModel
=
logistics_RulesRepository
.
GetLogisticsRulesList
(
new
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_Rules_Extend
()
{
RulesType
=
Common
.
Enum
.
MallBase
.
RulesTypeEnum
.
AreaBuy
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}).
FirstOrDefault
();
if
(
RulesAreaModel
!=
null
&&
RulesAreaModel
.
IsOpenMinPrice
==
1
)
{
var
RegionAreaList
=
logistics_RulesRegionRepository
.
GetListForSingle
(
new
Model
.
Extend
.
BaseSetUp
.
RB_Logistics_RulesRegion_Extend
()
{
RulesPriceId
=
RulesAreaModel
.
ID
,
RulesType
=
Common
.
Enum
.
MallBase
.
RulesTypeEnum
.
AreaBuy
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
if
(
RegionAreaList
.
Any
())
{
//允许以下区域购买
RAreaList
=
RegionAreaList
.
Select
(
x
=>
x
.
RegionId
).
Distinct
().
ToList
();
}
}
#
endregion
//返佣
var
DistributionCommissionList
=
new
List
<
RB_Goods_DistributionCommission_Extend
>();
if
(
demodel
.
DetailList
.
Where
(
x
=>
x
.
SeparateDistribution
==
1
).
Any
())
...
...
@@ -1687,12 +1700,27 @@ namespace Mall.Module.Product
var
areaGoods
=
AreaList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
ToList
();
bool
address_disabled
=
false
;
if
(
gmodel
.
IsAreaBuy
==
1
&&
areaGoods
.
Any
()
)
if
(
demodel
.
DeliveryMethod
!=
OrderDeliveryMethodEnum
.
VerificationShop
)
{
if
(!
areaGoods
.
Where
(
x
=>
disList
.
Contains
(
x
.
AreaId
??
0
)).
Any
())
if
(
gmodel
.
IsAreaBuy
==
1
&&
areaGoods
.
Any
())
{
if
(!
areaGoods
.
Where
(
x
=>
disList
.
Contains
(
x
.
AreaId
??
0
)).
Any
())
{
address_disabled
=
true
;
address_enable
=
false
;
}
}
else
{
address_disabled
=
true
;
address_enable
=
false
;
//验证基础设置区域购买
if
(
RAreaList
.
Any
())
{
if
(!
RAreaList
.
Where
(
x
=>
disList
.
Contains
(
x
)).
Any
())
{
address_disabled
=
true
;
address_enable
=
false
;
}
}
}
}
...
...
@@ -4079,7 +4107,74 @@ namespace Mall.Module.Product
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
goods_OrderAfterSaleRepository
.
Update
(
keyValues
,
wheres
);
bool
flag
=
goods_OrderAfterSaleRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
//流程
goods_OrderAfterSaleLogRepository
.
Insert
(
new
RB_Goods_OrderAfterSaleLog
()
{
Id
=
0
,
Content
=
"买家已发货"
,
Type
=
1
,
ReOrderId
=
reOrderId
,
TenantId
=
tenantId
,
CreateDate
=
DateTime
.
Now
,
MallBaseId
=
mallBaseId
});
return
true
;
}
return
flag
;
}
/// <summary>
/// 后台处理买家发货
/// </summary>
/// <param name="reOrderId"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
SetUserOrderAfterSaleSendGoods
(
int
reOrderId
,
int
tenantId
,
int
mallBaseId
)
{
var
omodel
=
goods_OrderAfterSaleRepository
.
GetEntity
(
reOrderId
);
if
(
omodel
==
null
)
{
return
false
;
}
if
(
omodel
.
ReOrderStatus
!=
OrderAfterSaleStatusEnum
.
DeliveryToBuyer
)
{
return
false
;
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>();
if
(
omodel
.
Type
==
2
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderStatus
),
OrderAfterSaleStatusEnum
.
ReceivedBySeller
);
}
else
{
keyValues
.
Add
(
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderStatus
),
OrderAfterSaleStatusEnum
.
RefundedBySeller
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderId
),
FiledValue
=
reOrderId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
goods_OrderAfterSaleRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
//流程
goods_OrderAfterSaleLogRepository
.
Insert
(
new
RB_Goods_OrderAfterSaleLog
()
{
Id
=
0
,
Content
=
"管理员操作无需客人发货"
,
Type
=
1
,
ReOrderId
=
reOrderId
,
TenantId
=
tenantId
,
CreateDate
=
DateTime
.
Now
,
MallBaseId
=
mallBaseId
});
return
true
;
}
return
flag
;
}
/// <summary>
...
...
Mall.Module.Product/ProductModule.cs
View file @
2f4c09b1
...
...
@@ -1662,6 +1662,26 @@ namespace Mall.Module.Product
IsAllowShare
=
2
;
}
if
((
model
.
IsCustomSpecification
??
2
)
!=
1
)
{
var
VauleL
=
new
List
<
RB_Goods_SpecificationValue_Extend
>
{
new
RB_Goods_SpecificationValue_Extend
()
{
Sort
=
0
,
Name
=
model
.
DefaultSpecificationName
,
ImagePath
=
""
}
};
model
.
SpecificationList
=
new
List
<
RB_Goods_Specification_Extend
>
{
new
RB_Goods_Specification_Extend
()
{
Sort
=
0
,
Name
=
"规格"
,
SpecificationValueList
=
VauleL
}
};
}
return
new
{
goods
=
new
...
...
Mall.Repository/BaseSetUp/RB_Logistics_RulesRegionRepository.cs
View file @
2f4c09b1
...
...
@@ -57,6 +57,42 @@ LEFT JOIN {DestinationTableName} as c on b.ParentID = c.ID WHERE a.{nameof(RB_
}
/// <summary>
/// 获取物流地区列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Logistics_RulesRegion_Extend
>
GetListForSingle
(
RB_Logistics_RulesRegion_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@
$" SELECT a.* FROM
{
TableName
}
as a WHERE a.
{
nameof
(
RB_Logistics_RulesRegion_Extend
.
Status
)}
=0"
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Logistics_RulesRegion_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
RulesType
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Logistics_RulesRegion_Extend
.
RulesType
)}
=
{(
int
)
query
.
RulesType
}
"
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Logistics_RulesRegion_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(
query
.
RulesPriceId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Logistics_RulesRegion_Extend
.
RulesPriceId
)}
=
{
query
.
RulesPriceId
}
"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
PriceIds
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Logistics_RulesRegion_Extend
.
RulesPriceId
)}
in (
{
query
.
PriceIds
}
)"
);
}
}
return
Get
<
RB_Logistics_RulesRegion_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
2f4c09b1
...
...
@@ -326,10 +326,15 @@ where {where} order by o.CreateDate desc";
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Recycled
)}
=
{(
int
)
dmodel
.
Recycled
}
"
;
}
if
(
dmodel
.
DistributionUserId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderCommission
.
UserId
)}
=
{
dmodel
.
DistributionUserId
}
"
;
}
string
sql
=
$@"SELECT o.*,u.Name as UserName FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
INNER JOIN rb_member_user u on o.UserId=u.Id
LEFT JOIN rb_goods_ordercommission oc on o.OrderId = oc.OrderId
where
{
where
}
group by o.OrderId order by o.CreateDate desc"
;
return
GetPage
<
RB_Goods_Order_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
2f4c09b1
...
...
@@ -1757,7 +1757,25 @@ namespace Mall.WebApi.Controllers.MallBase
}
/// <summary>
/// 后台处理用户发货
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetUserOrderAfterSaleSendGoods
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
ReOrderId
=
parms
.
GetInt
(
"ReOrderId"
,
0
);
if
(
ReOrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
bool
flag
=
orderModule
.
SetUserOrderAfterSaleSendGoods
(
ReOrderId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
...
...
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