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
68e95a3b
Commit
68e95a3b
authored
Sep 09, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单取消+微店调整
parent
fca629f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
13 deletions
+29
-13
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+17
-7
SmallShopsModule.cs
Mall.Module.User/SmallShopsModule.cs
+2
-2
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+10
-4
No files found.
Mall.Module.Product/OrderModule.cs
View file @
68e95a3b
...
...
@@ -6115,15 +6115,25 @@ namespace Mall.Module.Product
}
else
if
(
type
==
2
)
{
if
(
omodel
.
Order
Status
!=
OrderStatusEnum
.
WaitSendGoods
)
if
(
omodel
.
Order
Classify
==
1
)
{
return
false
;
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitSendGoods
||
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitReceiving
)
{
return
false
;
}
}
//物流
var
erlist
=
goods_ExpressRelevanceRepository
.
GetList
(
new
RB_Goods_ExpressRelevance_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderId
=
orderId
});
if
(
erlist
.
Any
())
else
{
return
false
;
//已有商品发货,无法退款
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitSendGoods
)
{
return
false
;
}
//物流
var
erlist
=
goods_ExpressRelevanceRepository
.
GetList
(
new
RB_Goods_ExpressRelevance_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderId
=
orderId
});
if
(
erlist
.
Any
())
{
return
false
;
//已有商品发货,无法退款
}
}
}
var
trans
=
goods_OrderRepository
.
DbTransaction
;
...
...
@@ -8601,6 +8611,7 @@ namespace Mall.Module.Product
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
CancelTime
),
DateTime
.
Now
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
ApplyForCancelStatus
),
1
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
RefundOrderNo
),
RefundOrderNo
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
Refund
),
omodel
.
Income
);
}
else
{
...
...
@@ -8608,7 +8619,6 @@ namespace Mall.Module.Product
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
OrderStatus
),
omodel
.
HistoryOrderStatus
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
RejectRemark
),
remark
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
IsApplyForCancel
),
2
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order
.
Refund
),
omodel
.
Income
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
...
...
Mall.Module.User/SmallShopsModule.cs
View file @
68e95a3b
...
...
@@ -867,7 +867,7 @@ namespace Mall.Module.User
//查询出所有商品id
string
goodsIds
=
string
.
Join
(
","
,
goodsList
.
Select
(
x
=>
x
.
GoodsId
??
0
).
Distinct
());
var
glist
=
goodsRepository
.
GetSingleList
(
new
RB_Goods_Extend
()
{
GoodsIds
=
goodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
glist
=
goodsRepository
.
GetSingleList
(
new
RB_Goods_Extend
()
{
GoodsIds
=
goodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}
,
true
);
foreach
(
var
item
in
glist
)
{
item
.
CoverImage
=
""
;
...
...
@@ -1021,7 +1021,7 @@ namespace Mall.Module.User
public
object
GetSmallShopsChooseGoodsPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_SmallShops_Price_Extend
demodel
)
{
List
<
object
>
RList
=
new
List
<
object
>();
var
glist
=
goodsRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
new
RB_Goods_Extend
()
{
Id
=
demodel
.
GoodsId
??
0
,
Name
=
demodel
.
GoodsName
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
glist
=
goodsRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
new
RB_Goods_Extend
()
{
Id
=
demodel
.
GoodsId
??
0
,
Name
=
demodel
.
GoodsName
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}
,
true
);
if
(
glist
.
Any
())
{
//查询出所有商品id
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
68e95a3b
...
...
@@ -22,9 +22,12 @@ namespace Mall.Repository.Product
/// <param name="rowCount">总条数</param>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Goods_Extend
dmodel
)
public
List
<
RB_Goods_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Goods_Extend
dmodel
,
bool
IsAllClassify
=
false
)
{
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0 and g.GoodsClassify=0"
;
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0 "
;
if
(
IsAllClassify
==
false
)
{
where
+=
$@" and g.GoodsClassify=0"
;
}
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
...
...
@@ -199,9 +202,12 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetSingleList
(
RB_Goods_Extend
dmodel
)
public
List
<
RB_Goods_Extend
>
GetSingleList
(
RB_Goods_Extend
dmodel
,
bool
IsAllClassify
=
false
)
{
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0 and g.GoodsClassify=0"
;
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0 "
;
if
(
IsAllClassify
==
false
)
{
where
+=
$@" and g.GoodsClassify=0"
;
}
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
...
...
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