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
f6308ca3
Commit
f6308ca3
authored
Jan 21, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c4fa3379
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
132 deletions
+144
-132
PropertyModule.cs
Mall.Module.Property/PropertyModule.cs
+4
-1
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+6
-2
AppletGoodsController.cs
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
+134
-129
No files found.
Mall.Module.Property/PropertyModule.cs
View file @
f6308ca3
...
...
@@ -1748,7 +1748,10 @@ namespace Mall.Module.Property
{
var
smodel
=
SpList
[
i
];
var
svmodel
=
smodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Convert
.
ToInt32
(
ssarr
[
i
])).
FirstOrDefault
();
AttrList
.
Add
(
smodel
.
Name
+
":"
+
svmodel
.
Name
);
if
(
svmodel
!=
null
)
{
AttrList
.
Add
(
smodel
.
Name
+
":"
+
svmodel
.
Name
);
}
}
item
.
AttrStr
=
JsonConvert
.
SerializeObject
(
AttrList
);
}
...
...
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
f6308ca3
...
...
@@ -2461,9 +2461,13 @@ namespace Mall.WebApi.Controllers.Education
EduStudentId
=
RequestParm
.
EduStudentId
};
}
// var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
req
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
ResultPageModel
pageModel
=
new
ResultPageModel
()
{
pageSize
=
jObj
.
GetInt
(
"pageSize"
),
pageIndex
=
jObj
.
GetInt
(
"pageIndex"
),
};
var
query
=
new
RB_Education_Activity_Extend
()
{
SelectIsEnd
=
jObj
.
GetInt
(
"SelectIsEnd"
,
0
),
...
...
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
View file @
f6308ca3
...
...
@@ -1172,173 +1172,178 @@ namespace Mall.WebApi.Controllers.MallBase
}
var
list
=
productModule
.
GetAppletGoodsRecommendListForZY
(
1
,
10
,
out
int
RecommendStatus
,
demodel
);
List
<
object
>
RList
=
new
List
<
object
>();
if
(
list
.
Any
())
try
{
foreach
(
var
model
in
list
)
if
(
list
.
Any
()
)
{
#
region
组装价格
List
<
object
>
priceList
=
new
List
<
object
>();
if
(
model
.
IsCustomSpecification
==
1
)
foreach
(
var
model
in
list
)
{
if
(
model
.
SpecificationPriceList
.
Any
()
&&
model
.
SpecificationList
.
Any
())
#
region
组装价格
List
<
object
>
priceList
=
new
List
<
object
>();
if
(
model
.
IsCustomSpecification
==
1
)
{
foreach
(
var
item
in
model
.
SpecificationPriceList
)
if
(
model
.
SpecificationPriceList
.
Any
()
&&
model
.
SpecificationList
.
Any
()
)
{
var
ssarr
=
item
.
SpecificationSort
.
Split
(
':'
);
int
Sort
=
Convert
.
ToInt32
(
ssarr
[
0
]);
string
pic_url
=
model
.
SpecificationList
[
0
].
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Sort
).
FirstOrDefault
()?.
ImagePath
;
List
<
object
>
attr_list
=
new
List
<
object
>();
if
(
ssarr
!=
null
&&
ssarr
.
Length
>
0
)
foreach
(
var
item
in
model
.
SpecificationPriceList
)
{
for
(
int
i
=
0
;
i
<
ssarr
.
Length
;
i
++)
var
ssarr
=
item
.
SpecificationSort
.
Split
(
':'
);
int
Sort
=
Convert
.
ToInt32
(
ssarr
[
0
]);
string
pic_url
=
model
.
SpecificationList
[
0
].
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Sort
).
FirstOrDefault
()?.
ImagePath
;
List
<
object
>
attr_list
=
new
List
<
object
>();
if
(
ssarr
!=
null
&&
ssarr
.
Length
>
0
)
{
var
smodel
=
model
.
SpecificationList
[
i
];
var
svmodel
=
smodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Convert
.
ToInt32
(
ssarr
[
i
])).
FirstOrDefault
();
if
(
svmodel
!=
null
)
for
(
int
i
=
0
;
i
<
ssarr
.
Length
;
i
++)
{
attr_list
.
Add
(
new
var
smodel
=
model
.
SpecificationList
[
i
];
var
svmodel
=
smodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Convert
.
ToInt32
(
ssarr
[
i
])).
FirstOrDefault
();
if
(
svmodel
!=
null
)
{
attr_group_name
=
smodel
.
Name
,
attr_group_id
=
smodel
.
Sort
,
attr_id
=
svmodel
.
Id
,
attr_name
=
svmodel
.
Name
});
attr_list
.
Add
(
new
{
attr_group_name
=
smodel
.
Name
,
attr_group_id
=
smodel
.
Sort
,
attr_id
=
svmodel
.
Id
,
attr_name
=
svmodel
.
Name
});
}
}
}
}
decimal
price_member
=
item
.
SellingPrice
??
0
;
//未设会员价格的话 就为销售价格
if
(
model
.
EnjoyMember
==
1
&&
model
.
SeparateSetMember
==
1
)
{
if
(
model
.
MemberPriceList
.
Any
())
decimal
price_member
=
item
.
SellingPrice
??
0
;
//未设会员价格的话 就为销售价格
if
(
model
.
EnjoyMember
==
1
&&
model
.
SeparateSetMember
==
1
)
{
if
(
model
.
MemberPriceList
.
Any
())
{
var
mlist
=
model
.
MemberPriceList
.
Where
(
x
=>
x
.
SpecificationSort
==
item
.
SpecificationSort
).
ToList
();
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
)
{
var
gmodel
=
mlist
.
Where
(
x
=>
x
.
MemberGrade
==
userModel
.
MemberGrade
).
FirstOrDefault
();
price_member
=
gmodel
.
MemberPrice
??
0
;
}
}
}
else
{
var
mlist
=
model
.
MemberPriceList
.
Where
(
x
=>
x
.
SpecificationSort
==
item
.
SpecificationSort
).
ToList
();
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
)
{
var
gmodel
=
mlist
.
Where
(
x
=>
x
.
MemberGrade
==
userModel
.
MemberGrade
).
FirstOrDefault
();
price_member
=
gmodel
.
MemberPrice
??
0
;
price_member
=
Math
.
Round
((
model
.
SellingPrice
??
0
)
*
(
memberGrade
?.
Discount
??
10
)
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
}
}
priceList
.
Add
(
new
{
id
=
item
.
Id
,
goods_id
=
model
.
Id
,
sign_id
=
item
.
SpecificationSort
,
stock
=
item
.
InventoryNum
,
price
=
item
.
SellingPrice
,
no
=
item
.
GoodsNumbers
,
weight
=
item
.
GoodsWeight
,
pic_url
,
is_delete
=
item
.
Status
,
attr_list
,
price_member
});
}
else
}
}
else
{
decimal
price_member
=
model
.
SellingPrice
??
0
;
//未设会员价格的话 就为销售价格
if
(
model
.
EnjoyMember
==
1
&&
model
.
SeparateSetMember
==
1
)
{
if
(
model
.
MemberPriceList
.
Any
())
{
var
mlist
=
model
.
MemberPriceList
;
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
)
{
price_member
=
Math
.
Round
((
model
.
SellingPrice
??
0
)
*
(
memberGrade
?.
Discount
??
10
)
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
var
gmodel
=
mlist
.
Where
(
x
=>
x
.
MemberGrade
==
userModel
.
MemberGrade
).
FirstOrDefault
();
price_member
=
gmodel
.
MemberPrice
??
0
;
}
}
priceList
.
Add
(
new
{
id
=
item
.
Id
,
goods_id
=
model
.
Id
,
sign_id
=
item
.
SpecificationSort
,
stock
=
item
.
InventoryNum
,
price
=
item
.
SellingPrice
,
no
=
item
.
GoodsNumbers
,
weight
=
item
.
GoodsWeight
,
pic_url
,
is_delete
=
item
.
Status
,
attr_list
,
price_member
});
}
}
}
else
{
decimal
price_member
=
model
.
SellingPrice
??
0
;
//未设会员价格的话 就为销售价格
if
(
model
.
EnjoyMember
==
1
&&
model
.
SeparateSetMember
==
1
)
{
if
(
model
.
MemberPriceList
.
Any
())
else
{
var
mlist
=
model
.
MemberPriceList
;
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
)
{
var
gmodel
=
mlist
.
Where
(
x
=>
x
.
MemberGrade
==
userModel
.
MemberGrade
).
FirstOrDefault
();
price_member
=
gmodel
.
MemberPrice
??
0
;
price_member
=
Math
.
Round
((
model
.
SellingPrice
??
0
)
*
(
memberGrade
?.
Discount
??
10
)
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
}
}
}
else
{
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
)
priceList
.
Add
(
new
{
price_member
=
Math
.
Round
((
model
.
SellingPrice
??
0
)
*
(
memberGrade
?.
Discount
??
10
)
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
}
id
=
0
,
goods_id
=
model
.
Id
,
sign_id
=
""
,
stock
=
model
.
InventoryNum
,
price
=
model
.
SellingPrice
??
0
,
no
=
model
.
GoodsNumbers
,
weight
=
model
.
GoodsWeight
,
pic_url
=
""
,
is_delete
=
0
,
attr_list
=
new
{
attr_group_name
=
"规格"
,
attr_group_id
=
0
,
attr_id
=
0
,
attr_name
=
model
.
DefaultSpecificationName
},
price_member
});
}
#
endregion
#
region
会员价格
decimal
memberprice
=
model
.
SellingPrice
??
0
;
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
&&
model
.
EnjoyMember
==
1
&&
model
.
SeparateSetMember
==
1
&&
model
.
MemberPriceList
.
Any
())
{
memberprice
=
model
.
MemberPriceList
.
Where
(
x
=>
x
.
MemberGrade
==
userModel
.
MemberGrade
).
Min
(
x
=>
x
.
MemberPrice
??
0
);
}
else
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
)
{
memberprice
=
memberprice
*
(
memberGrade
?.
Discount
??
10
)
/
10
;
}
#
endregion
price
List
.
Add
(
new
R
List
.
Add
(
new
{
id
=
0
,
goods_id
=
model
.
Id
,
sign_id
=
""
,
stock
=
model
.
InventoryNum
,
price
=
model
.
SellingPrice
??
0
,
no
=
model
.
GoodsNumbers
,
weight
=
model
.
GoodsWeight
,
pic_url
=
""
,
is_delete
=
0
,
attr_list
=
new
id
=
model
.
Id
,
sign
=
""
,
name
=
model
.
Name
,
cover_pic
=
model
.
CoverImage
,
video_url
=
model
.
VideoAddress
,
original_price
=
model
.
OriginalPrice
,
unit
=
model
.
Unit
,
page_url
=
"/pages/goods/goods?id="
+
model
.
Id
,
is_negotiable
=
model
.
IsGoodsNegotiable
,
is_level
=
model
.
EnjoyMember
,
level_price
=
memberprice
,
price
=
(
model
.
SellingPrice
??
0
).
ToString
(
"#0.00"
),
price_content
=
"¥"
+
(
model
.
SellingPrice
??
0
).
ToString
(
"#0.00"
),
is_sales
=
model
.
GoodsStatus
,
sales
=
"已售"
+
model
.
SalesNum
+
"件"
,
attr_groups
=
model
.
SpecificationList
.
Select
(
x
=>
new
{
attr_group_name
=
"规格"
,
attr_group_id
=
0
,
attr_id
=
0
,
attr_name
=
model
.
DefaultSpecificationName
},
price_member
attr_group_id
=
x
.
Sort
,
attr_group_name
=
x
.
Name
,
attr_list
=
x
.
SpecificationValueList
.
Select
(
z
=>
new
{
attr_id
=
z
.
Sort
,
attr_name
=
z
.
Name
,
pic_url
=
z
.
ImagePath
})
}),
attr
=
priceList
,
goods_stock
=
model
.
InventoryNum
,
goods_num
=
model
.
InventoryNum
,
subName
=
model
.
SubName
});
}
#
endregion
#
region
会员价格
decimal
memberprice
=
model
.
SellingPrice
??
0
;
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
&&
model
.
EnjoyMember
==
1
&&
model
.
SeparateSetMember
==
1
&&
model
.
MemberPriceList
.
Any
())
{
memberprice
=
model
.
MemberPriceList
.
Where
(
x
=>
x
.
MemberGrade
==
userModel
.
MemberGrade
).
Min
(
x
=>
x
.
MemberPrice
??
0
);
}
else
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
)
{
memberprice
=
memberprice
*
(
memberGrade
?.
Discount
??
10
)
/
10
;
}
#
endregion
RList
.
Add
(
new
{
id
=
model
.
Id
,
sign
=
""
,
name
=
model
.
Name
,
cover_pic
=
model
.
CoverImage
,
video_url
=
model
.
VideoAddress
,
original_price
=
model
.
OriginalPrice
,
unit
=
model
.
Unit
,
page_url
=
"/pages/goods/goods?id="
+
model
.
Id
,
is_negotiable
=
model
.
IsGoodsNegotiable
,
is_level
=
model
.
EnjoyMember
,
level_price
=
memberprice
,
price
=
(
model
.
SellingPrice
??
0
).
ToString
(
"#0.00"
),
price_content
=
"¥"
+
(
model
.
SellingPrice
??
0
).
ToString
(
"#0.00"
),
is_sales
=
model
.
GoodsStatus
,
sales
=
"已售"
+
model
.
SalesNum
+
"件"
,
attr_groups
=
model
.
SpecificationList
.
Select
(
x
=>
new
{
attr_group_id
=
x
.
Sort
,
attr_group_name
=
x
.
Name
,
attr_list
=
x
.
SpecificationValueList
.
Select
(
z
=>
new
{
attr_id
=
z
.
Sort
,
attr_name
=
z
.
Name
,
pic_url
=
z
.
ImagePath
})
}),
attr
=
priceList
,
goods_stock
=
model
.
InventoryNum
,
goods_num
=
model
.
InventoryNum
,
subName
=
model
.
SubName
});
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAppletGoodsRecommendListForZY:"
+
requestMsg
.
ToString
());
}
return
ApiResult
.
Success
(
""
,
new
{
RecommendStatus
,
...
...
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