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
90e7ff83
Commit
90e7ff83
authored
Aug 05, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
818850ce
16690a20
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
134 additions
and
75 deletions
+134
-75
RB_Goods_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Extend.cs
+5
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+5
-2
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+6
-2
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+16
-10
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+102
-61
No files found.
Mall.Model/Extend/Product/RB_Goods_Extend.cs
View file @
90e7ff83
...
...
@@ -192,5 +192,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
RB_FreeShipping_Extend
FreeShippingModel
{
get
;
set
;
}
/// <summary>
/// 供应商-我的产品
/// </summary>
public
List
<
object
>
SupplierSpecificationList
{
get
;
set
;
}
}
}
Mall.Module.Product/OrderModule.cs
View file @
90e7ff83
...
...
@@ -331,15 +331,18 @@ namespace Mall.Module.Product
if
(
freeShippingList
!=
null
&&
freeShippingList
.
Any
())
{
var
nowcategory
=
categoryList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
Select
(
x
=>
x
.
CategoryId
);
var
nowcategory
=
categoryList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
Select
(
x
=>
x
.
CategoryId
);
var
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
FirstOrDefault
();
var
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
FirstOrDefault
();
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
FirstOrDefault
();
}
item
.
FreeShippingModel
=
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
?
new
RB_FreeShipping_Extend
()
:
fullNumPinkageModel
;
}
else
{
item
.
FreeShippingModel
=
new
RB_FreeShipping_Extend
();
}
}
...
...
Mall.Module.Product/ProductModule.cs
View file @
90e7ff83
...
...
@@ -1066,6 +1066,10 @@ namespace Mall.Module.Product
}
model
.
FreeShippingModel
=
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
?
new
RB_FreeShipping_Extend
()
:
fullNumPinkageModel
;
}
else
{
model
.
FreeShippingModel
=
new
RB_FreeShipping_Extend
();
}
}
...
...
@@ -1936,8 +1940,8 @@ namespace Mall.Module.Product
is_sell_well
=
model
.
IsSellWell
,
is_negotiable
=
model
.
IsGoodsNegotiable
,
freeShippingName
=
model
.
FreeShippingModel
.
Name
,
fullMoneyPinkage
=
model
.
FreeShippingModel
.
FullMoneyPinkage
,
fullNumPinkage
=
model
.
FreeShippingModel
.
FullNumPinkage
,
fullMoneyPinkage
=
model
.
FreeShippingModel
.
FullMoneyPinkage
??
0
,
fullNumPinkage
=
model
.
FreeShippingModel
.
FullNumPinkage
??
0
,
cats
=
model
.
CategoryList
.
Select
(
x
=>
new
{
x
.
CategoryId
,
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
90e7ff83
...
...
@@ -64,9 +64,9 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
TenantId
,
x
.
MallBaseId
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
FreeShippingName
=
x
.
FreeShippingModel
.
Name
,
FreeShippingFullMoneyPinkage
=
x
.
FreeShippingModel
.
FullMoneyPinkage
,
FreeShippingFullNumPinkage
=
x
.
FreeShippingModel
.
FullNumPinkage
,
FreeShippingName
=
x
.
FreeShippingModel
.
Name
,
FreeShippingFullMoneyPinkage
=
x
.
FreeShippingModel
.
FullMoneyPinkage
??
0
,
FreeShippingFullNumPinkage
=
x
.
FreeShippingModel
.
FullNumPinkage
??
0
,
});
List
<
object
>
robj
=
new
List
<
object
>()
{
new
{
...
...
@@ -489,10 +489,11 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetAppletOrderCommissionInitialize
()
{
public
ApiResult
SetAppletOrderCommissionInitialize
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
bool
flag
=
orderModule
.
SetAppletOrderCommissionInitialize
(
OrderId
);
return
ApiResult
.
Success
(
""
,
flag
);
...
...
@@ -635,10 +636,12 @@ namespace Mall.WebApi.Controllers.MallBase
var
detailModel
=
orderModule
.
GetOrderDetailInfo
(
demodel
.
OrderDetialId
??
0
);
var
omodel
=
orderModule
.
GetOrderInfo
(
detailModel
?.
OrderId
??
0
);
if
(
omodel
==
null
)
{
if
(
omodel
==
null
)
{
return
ApiResult
.
ParamIsNull
(
"订单不存在"
);
}
if
(
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
&&
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
Received
&&
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
Completed
)
{
if
(
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
&&
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
Received
&&
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
Completed
)
{
return
ApiResult
.
ParamIsNull
(
"订单状态不正确"
);
}
...
...
@@ -665,8 +668,10 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
}
else
{
if
(
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
)
{
else
{
if
(
omodel
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
)
{
return
ApiResult
.
ParamIsNull
(
"订单状态不正确"
);
}
}
...
...
@@ -1011,7 +1016,8 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
Rparms
.
GetStringValue
(
"Success"
).
ToLower
()
==
"true"
)
{
List
<
Model
.
Query
.
ExpressTraces
>
list
=
JsonConvert
.
DeserializeObject
<
List
<
Model
.
Query
.
ExpressTraces
>>(
Rparms
.
GetStringValue
(
"Traces"
));
if
(
list
.
Any
())
{
if
(
list
.
Any
())
{
list
=
list
.
OrderByDescending
(
x
=>
x
.
AcceptTime
).
ToList
();
}
return
ApiResult
.
Success
(
""
,
list
);
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
90e7ff83
...
...
@@ -1433,51 +1433,118 @@ namespace Mall.WebApi.Controllers.User
var
SpecificationList
=
productModule
.
GetSpecificationList
(
new
RB_Goods_Specification_Extend
()
{
GoodsIds
=
goodsIds
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
var
SpecificationPriceList
=
productModule
.
GetSpecificationPriceList
(
new
RB_Goods_SpecificationPrice_Extend
()
{
GoodsIds
=
goodsIds
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
var
SpecificationValueList
=
productModule
.
GetSpecificationValueList
(
new
RB_Goods_SpecificationValue_Extend
()
{
GoodsIds
=
goodsIds
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
foreach
(
var
item
in
list
.
Where
(
x
=>
x
.
IsCustomSpecification
==
1
)
)
foreach
(
var
item
in
list
)
{
item
.
SpecificationList
=
new
List
<
RB_Goods_Specification_Extend
>();
item
.
SpecificationPriceList
=
new
List
<
RB_Goods_SpecificationPrice_Extend
>();
item
.
SpecificationList
=
SpecificationList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
if
(
item
.
SpecificationList
.
Any
()
)
#
region
组装价格
List
<
object
>
priceList
=
new
List
<
object
>
();
if
(
item
.
IsCustomSpecification
==
1
)
{
var
svlist
=
SpecificationValueList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
foreach
(
var
itemValue
in
svlist
)
item
.
SpecificationPriceList
=
SpecificationPriceList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
item
.
SpecificationList
=
SpecificationList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
if
(
item
.
SpecificationList
.
Any
())
{
itemValue
.
ImagePath
=
itemValue
.
Image
;
}
foreach
(
var
itemValue
in
item
.
SpecificationList
)
{
itemValue
.
SpecificationValueList
=
svlist
.
Where
(
x
=>
x
.
SpecificationId
==
itemValue
.
Id
).
ToList
();
var
svlist
=
SpecificationValueList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
foreach
(
var
itemSpecificationValue
in
svlist
)
{
itemSpecificationValue
.
ImagePath
=
itemSpecificationValue
.
Image
;
}
foreach
(
var
itemSpecification
in
item
.
SpecificationList
)
{
itemSpecification
.
SpecificationValueList
=
svlist
.
Where
(
x
=>
x
.
SpecificationId
==
itemSpecification
.
Id
).
ToList
();
}
}
}
int
SortNum
=
1
;
item
.
SpecificationPriceList
=
SpecificationPriceList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
foreach
(
var
itemPrice
in
item
.
SpecificationPriceList
)
{
if
(!
string
.
IsNullOrEmpty
(
itemPrice
.
SpecificationSort
))
if
(
item
.
SpecificationPriceList
.
Any
()
&&
item
.
SpecificationList
.
Any
())
{
var
ssarr
=
itemPrice
.
SpecificationSort
.
Split
(
':'
);
int
Sort
=
Convert
.
ToInt32
(
ssarr
[
0
]);
string
pic_url
=
item
.
SpecificationList
[
0
].
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Sort
).
FirstOrDefault
()?.
ImagePath
;
List
<
object
>
AttrList
=
new
List
<
object
>();
for
(
int
i
=
0
;
i
<
ssarr
.
Length
;
i
++)
List
<
RB_Goods_Specification_Extend
>
SpecificationListToPrice
=
new
List
<
RB_Goods_Specification_Extend
>();
List
<
RB_Goods_SpecificationValue_Extend
>
SpecificationValueListToPrice
=
new
List
<
RB_Goods_SpecificationValue_Extend
>();
bool
IsHaveSellingPriceZero
=
false
;
if
(
item
.
SpecificationPriceList
.
Where
(
x
=>
x
.
SellingPrice
>
0
).
Count
()
!=
item
.
SpecificationPriceList
.
Count
())
{
//有数量为0的
IsHaveSellingPriceZero
=
true
;
}
foreach
(
var
itemSpecificationPrice
in
item
.
SpecificationPriceList
.
Where
(
x
=>
x
.
SellingPrice
>
0
))
{
var
smodel
=
item
.
SpecificationList
[
i
];
var
svmodel
=
smodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Convert
.
ToInt32
(
ssarr
[
i
])).
FirstOrDefault
();
AttrList
.
Add
(
new
var
ssarr
=
itemSpecificationPrice
.
SpecificationSort
.
Split
(
':'
);
int
Sort
=
Convert
.
ToInt32
(
ssarr
[
0
]);
string
pic_url
=
item
.
SpecificationList
[
0
].
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Sort
).
FirstOrDefault
()?.
ImagePath
;
List
<
object
>
attr_list
=
new
List
<
object
>();
for
(
int
i
=
0
;
i
<
ssarr
.
Length
;
i
++)
{
var
smodel
=
item
.
SpecificationList
[
i
];
if
(
IsHaveSellingPriceZero
&&
!
SpecificationListToPrice
.
Where
(
x
=>
x
.
Id
==
smodel
.
Id
).
Any
())
{
SpecificationListToPrice
.
Add
(
smodel
);
}
var
svmodel
=
smodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Convert
.
ToInt32
(
ssarr
[
i
])).
FirstOrDefault
();
if
(
IsHaveSellingPriceZero
&&
!
SpecificationValueListToPrice
.
Where
(
x
=>
x
.
Id
==
svmodel
.
Id
).
Any
())
{
SpecificationValueListToPrice
.
Add
(
svmodel
);
}
attr_list
.
Add
(
new
{
attr_group_name
=
smodel
.
Name
,
attr_group_id
=
smodel
.
Sort
,
attr_id
=
svmodel
.
Id
,
attr_name
=
svmodel
.
Name
});
}
priceList
.
Add
(
new
{
SName
=
smodel
.
Name
,
SId
=
smodel
.
Id
,
SVId
=
svmodel
.
Sort
,
SVName
=
svmodel
.
Name
id
=
itemSpecificationPrice
.
Id
,
goods_id
=
itemSpecificationPrice
.
Id
,
sign_id
=
itemSpecificationPrice
.
SpecificationSort
,
stock
=
itemSpecificationPrice
.
InventoryNum
,
price
=
itemSpecificationPrice
.
SellingPrice
,
no
=
itemSpecificationPrice
.
GoodsNumbers
,
weight
=
itemSpecificationPrice
.
GoodsWeight
,
costPrice
=
itemSpecificationPrice
.
CostMoney
,
pic_url
,
is_delete
=
itemSpecificationPrice
.
Status
,
attr_list
});
}
itemPrice
.
AttrList
=
AttrList
;
//当只有一组规格项目时
if
(
IsHaveSellingPriceZero
&&
SpecificationListToPrice
.
Any
()
&&
item
.
SpecificationList
.
Count
()
==
1
)
{
foreach
(
var
itemSpecificationList
in
SpecificationListToPrice
)
{
itemSpecificationList
.
SpecificationValueList
=
SpecificationValueListToPrice
.
Where
(
x
=>
x
.
SpecificationId
==
itemSpecificationList
.
Id
).
OrderBy
(
x
=>
x
.
Sort
).
ToList
();
}
SpecificationListToPrice
=
SpecificationListToPrice
.
Where
(
x
=>
x
.
SpecificationValueList
.
Any
()).
ToList
();
//有价格小于等于0的 在前端展示时 需屏蔽掉
item
.
SpecificationList
=
SpecificationListToPrice
;
}
}
itemPrice
.
SortNum
=
SortNum
;
SortNum
++;
}
item
.
SpecificationPriceList
=
item
.
SpecificationPriceList
.
OrderByDescending
(
x
=>
x
.
SortNum
).
ToList
();
else
{
decimal
price_member
=
item
.
SellingPrice
??
0
;
//未设会员价格的话 就为销售价格
priceList
.
Add
(
new
{
id
=
0
,
goods_id
=
item
.
Id
,
sign_id
=
""
,
stock
=
item
.
InventoryNum
,
price
=
item
.
SellingPrice
??
0
,
costPrice
=
item
.
CostPrice
,
no
=
item
.
GoodsNumbers
,
weight
=
item
.
GoodsWeight
,
pic_url
=
""
,
is_delete
=
0
,
attr_list
=
new
List
<
object
>(){
new
{
attr_group_name
=
"规格"
,
attr_group_id
=
0
,
attr_id
=
0
,
attr_name
=
item
.
DefaultSpecificationName
}
},
});
}
item
.
SupplierSpecificationList
=
priceList
;
#
endregion
}
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
...
...
@@ -1498,33 +1565,7 @@ namespace Mall.WebApi.Controllers.User
x
.
SalesNum
,
x
.
IsQuickBuy
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
SpecificationList
=
x
.
SpecificationList
.
Select
(
xy
=>
new
{
xy
.
Id
,
xy
.
EnabledImage
,
xy
.
Name
,
xy
.
Sort
,
SpecificationValueList
=
xy
.
SpecificationValueList
.
Select
(
y
=>
new
{
y
.
Id
,
y
.
Image
,
y
.
ImagePath
,
y
.
Name
,
y
.
Sort
})
}),
SpecificationPriceList
=
x
.
SpecificationPriceList
.
Select
(
xy
=>
new
{
xy
.
Id
,
xy
.
GoodsNumbers
,
xy
.
GoodsWeight
,
xy
.
InventoryNum
,
xy
.
SellingPrice
,
xy
.
SpecificationSort
,
xy
.
AttrList
,
xy
.
Commission
,
xy
.
CostMoney
}),
x
.
SupplierSpecificationList
});
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