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
76212641
Commit
76212641
authored
Aug 06, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
824d0e27
58fa7bb2
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
132 additions
and
67 deletions
+132
-67
Config.cs
Mall.Common/Config.cs
+13
-3
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+40
-1
AppletGoodsController.cs
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
+55
-40
Mall.WebApi.csproj
Mall.WebApi/Mall.WebApi.csproj
+4
-5
Startup.cs
Mall.WebApi/Startup.cs
+6
-11
appsettings.json
Mall.WebApi/appsettings.json
+8
-7
Mall.sln
Mall.sln
+6
-0
No files found.
Mall.Common/Config.cs
View file @
76212641
...
@@ -161,18 +161,28 @@ namespace Mall.Common
...
@@ -161,18 +161,28 @@ namespace Mall.Common
/// </summary>
/// </summary>
/// <param name="key"></param>
/// <param name="key"></param>
/// <returns></returns>
/// <returns></returns>
public
static
string
ReadConfigKey
(
string
key
)
public
static
string
ReadConfigKey
(
string
key
,
string
subKey
=
""
)
{
{
string
valueStr
=
""
;
try
try
{
{
return
Configuration
.
GetSection
(
key
).
Value
;
if
(!
string
.
IsNullOrWhiteSpace
(
subKey
))
{
valueStr
=
Configuration
.
GetSection
(
key
)[
subKey
].
ToString
();
}
else
{
valueStr
=
Configuration
.
GetSection
(
key
).
Value
;
}
}
}
catch
catch
{
{
return
""
;
}
}
return
valueStr
;
}
}
/// <summary>
/// <summary>
/// 阿里云oss域名
/// 阿里云oss域名
/// </summary>
/// </summary>
...
...
Mall.Module.Product/ProductModule.cs
View file @
76212641
...
@@ -246,6 +246,17 @@ namespace Mall.Module.Product
...
@@ -246,6 +246,17 @@ namespace Mall.Module.Product
}
}
string
goodsIds2
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
string
goodsIds2
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
List
<
RB_Goods_Order_Extend
>
orderlist
=
goods_OrderRepository
.
GetGoodsOrderNum
(
goodsIds
:
goodsIds2
);
List
<
RB_Goods_Order_Extend
>
orderlist
=
goods_OrderRepository
.
GetGoodsOrderNum
(
goodsIds
:
goodsIds2
);
//2020-08-06 Add by:W 查询商品分类获取分类包邮规则
string
allGoodsIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
var
goodsCategoryList
=
goods_CategoryRepository
.
GetList
(
new
RB_Goods_Category_Extend
()
{
GoodsIds
=
allGoodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
string
categoryIds
=
string
.
Join
(
","
,
goodsCategoryList
.
Select
(
x
=>
x
.
CategoryId
).
Distinct
());
List
<
RB_FreeShipping_Extend
>
freeShippingList
=
new
List
<
RB_FreeShipping_Extend
>();
if
(!
string
.
IsNullOrWhiteSpace
(
categoryIds
))
{
freeShippingList
=
freeShippingRepository
.
GetFreeShippingListByCategoryIds
(
new
RB_FreeShipping_Extend
{
MallBaseId
=
demodel
.
MallBaseId
,
TenantId
=
demodel
.
TenantId
,
CategoryIds
=
categoryIds
});
}
//2020-08-06 Add by:W End
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
item
.
CoverImage
=
""
;
item
.
CoverImage
=
""
;
...
@@ -269,7 +280,35 @@ namespace Mall.Module.Product
...
@@ -269,7 +280,35 @@ namespace Mall.Module.Product
}
}
item
.
SalesNum
+=
(
orderlist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
FirstOrDefault
()?.
OrderNum
??
0
);
item
.
SalesNum
+=
(
orderlist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
FirstOrDefault
()?.
OrderNum
??
0
);
//2020-08-06 Add by:W 查询商品分类获取分类包邮规则
if
(
freeShippingList
!=
null
&&
freeShippingList
.
Any
())
{
var
nowcategory
=
goodsCategoryList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
Select
(
x
=>
x
.
CategoryId
);
var
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
ThenByDescending
(
x
=>
x
.
ID
).
FirstOrDefault
();
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
ThenByDescending
(
x
=>
x
.
ID
).
FirstOrDefault
();
}
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
&&
x
.
CategoryId
==
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
ThenByDescending
(
x
=>
x
.
ID
).
FirstOrDefault
();
}
}
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
nowcategory
.
Contains
(
x
.
CategoryId
)
&&
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
&&
x
.
CategoryId
==
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
ThenByDescending
(
x
=>
x
.
ID
).
FirstOrDefault
();
}
item
.
FreeShippingModel
=
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
?
new
RB_FreeShipping_Extend
()
:
fullNumPinkageModel
;
}
else
{
item
.
FreeShippingModel
=
new
RB_FreeShipping_Extend
();
}
//2020-08-06 Add by:W End
}
}
}
return
list
;
return
list
;
}
}
...
@@ -1059,7 +1098,7 @@ namespace Mall.Module.Product
...
@@ -1059,7 +1098,7 @@ namespace Mall.Module.Product
var
freeShippingList
=
freeShippingRepository
.
GetFreeShippingListByCategoryIds
(
new
RB_FreeShipping_Extend
{
MallBaseId
=
model
.
MallBaseId
,
TenantId
=
model
.
TenantId
,
CategoryIds
=
categoryIds
});
var
freeShippingList
=
freeShippingRepository
.
GetFreeShippingListByCategoryIds
(
new
RB_FreeShipping_Extend
{
MallBaseId
=
model
.
MallBaseId
,
TenantId
=
model
.
TenantId
,
CategoryIds
=
categoryIds
});
if
(
freeShippingList
!=
null
&&
freeShippingList
.
Any
())
if
(
freeShippingList
!=
null
&&
freeShippingList
.
Any
())
{
{
var
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
ThenByDescending
(
x
=>
x
.
ID
).
FirstOrDefault
();
var
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullNumPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullNumPinkage
).
ThenByDescending
(
x
=>
x
.
ID
).
FirstOrDefault
();
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
if
(
fullNumPinkageModel
==
null
||
fullNumPinkageModel
.
ID
<=
0
)
{
{
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
ThenByDescending
(
x
=>
x
.
ID
).
FirstOrDefault
();
fullNumPinkageModel
=
freeShippingList
.
Where
(
x
=>
x
.
IsFreeShipping
==
1
&&
x
.
IsEnable
==
1
&&
x
.
FullMoneyPinkage
>
0
&&
x
.
CategoryId
>
0
).
OrderBy
(
x
=>
x
.
FullMoneyPinkage
).
ThenByDescending
(
x
=>
x
.
ID
).
FirstOrDefault
();
...
...
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
View file @
76212641
...
@@ -75,7 +75,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -75,7 +75,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetProductCategoryTreeList
(
object
requestMsg
)
{
public
ApiResult
GetProductCategoryTreeList
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
if
(
parms
.
MallBaseId
<=
0
)
if
(
parms
.
MallBaseId
<=
0
)
{
{
...
@@ -96,7 +97,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -96,7 +97,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetProductCategoryStyleInfo
(
object
requestMsg
)
{
public
ApiResult
GetProductCategoryStyleInfo
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
if
(
parms
.
MallBaseId
<=
0
)
if
(
parms
.
MallBaseId
<=
0
)
{
{
...
@@ -123,7 +125,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -123,7 +125,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetAppletGoodsPageList
(
object
requestMsg
)
{
public
ApiResult
GetAppletGoodsPageList
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
if
(
parms
.
MallBaseId
<=
0
)
if
(
parms
.
MallBaseId
<=
0
)
{
{
...
@@ -183,8 +186,10 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -183,8 +186,10 @@ namespace Mall.WebApi.Controllers.MallBase
memberGrade
=
productModule
.
GetMemberGradeList
(
new
RB_Member_Grade_Extend
()
{
Id
=
userModel
.
MemberGrade
??
0
,
Enabled
=
1
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}).
FirstOrDefault
();
memberGrade
=
productModule
.
GetMemberGradeList
(
new
RB_Member_Grade_Extend
()
{
Id
=
userModel
.
MemberGrade
??
0
,
Enabled
=
1
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}).
FirstOrDefault
();
}
}
}
}
if
(
list
.
Any
())
{
if
(
list
.
Any
())
foreach
(
var
model
in
list
)
{
{
foreach
(
var
model
in
list
)
{
#
region
组装价格
#
region
组装价格
List
<
object
>
priceList
=
new
List
<
object
>();
List
<
object
>
priceList
=
new
List
<
object
>();
if
(
model
.
IsCustomSpecification
==
1
)
if
(
model
.
IsCustomSpecification
==
1
)
...
@@ -295,33 +300,37 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -295,33 +300,37 @@ namespace Mall.WebApi.Controllers.MallBase
#
region
会员价格
#
region
会员价格
decimal
memberprice
=
model
.
SellingPrice
??
0
;
decimal
memberprice
=
model
.
SellingPrice
??
0
;
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
&&
model
.
EnjoyMember
==
1
&&
model
.
SeparateSetMember
==
1
&&
model
.
MemberPriceList
.
Any
())
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
);
memberprice
=
model
.
MemberPriceList
.
Where
(
x
=>
x
.
MemberGrade
==
userModel
.
MemberGrade
).
Min
(
x
=>
x
.
MemberPrice
??
0
);
}
}
else
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
)
else
if
(
UserId
>
0
&&
userModel
.
MemberGrade
>
0
)
{
{
memberprice
=
memberprice
*
(
memberGrade
?.
Discount
??
10
)
/
10
;
memberprice
=
memberprice
*
(
memberGrade
?.
Discount
??
10
)
/
10
;
}
}
#
endregion
#
endregion
RList
.
Add
(
new
{
RList
.
Add
(
new
id
=
model
.
Id
,
{
sign
=
""
,
id
=
model
.
Id
,
name
=
model
.
Name
,
sign
=
""
,
cover_pic
=
model
.
CoverImage
,
name
=
model
.
Name
,
video_url
=
model
.
VideoAddress
,
cover_pic
=
model
.
CoverImage
,
original_price
=
model
.
OriginalPrice
,
video_url
=
model
.
VideoAddress
,
unit
=
model
.
Unit
,
original_price
=
model
.
OriginalPrice
,
page_url
=
"/pages/goods/goods?id="
+
model
.
Id
,
unit
=
model
.
Unit
,
is_negotiable
=
model
.
IsGoodsNegotiable
,
page_url
=
"/pages/goods/goods?id="
+
model
.
Id
,
is_level
=
model
.
EnjoyMember
,
is_negotiable
=
model
.
IsGoodsNegotiable
,
level_price
=
memberprice
,
is_level
=
model
.
EnjoyMember
,
price
=
(
model
.
SellingPrice
??
0
).
ToString
(
"#0.00"
),
level_price
=
memberprice
,
price_content
=
"¥"
+
(
model
.
SellingPrice
??
0
).
ToString
(
"#0.00"
),
price
=
(
model
.
SellingPrice
??
0
).
ToString
(
"#0.00"
),
is_sales
=
model
.
GoodsStatus
,
price_content
=
"¥"
+
(
model
.
SellingPrice
??
0
).
ToString
(
"#0.00"
),
sales
=
"已售"
+
model
.
SalesNum
+
"件"
,
is_sales
=
model
.
GoodsStatus
,
attr_groups
=
model
.
SpecificationList
.
Select
(
x
=>
new
sales
=
"已售"
+
model
.
SalesNum
+
"件"
,
freeShippingName
=
model
.
FreeShippingModel
.
Name
,
freeShippingFullMoneyPinkage
=
model
.
FreeShippingModel
.
FullMoneyPinkage
??
0
,
freeShippingFullNumPinkage
=
model
.
FreeShippingModel
.
FullNumPinkage
??
0
,
attr_groups
=
model
.
SpecificationList
.
Select
(
x
=>
new
{
{
attr_group_id
=
x
.
Sort
,
attr_group_id
=
x
.
Sort
,
attr_group_name
=
x
.
Name
,
attr_group_name
=
x
.
Name
,
...
@@ -332,9 +341,9 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -332,9 +341,9 @@ namespace Mall.WebApi.Controllers.MallBase
pic_url
=
z
.
ImagePath
pic_url
=
z
.
ImagePath
})
})
}),
}),
attr
=
priceList
,
attr
=
priceList
,
goods_stock
=
model
.
InventoryNum
,
goods_stock
=
model
.
InventoryNum
,
goods_num
=
model
.
InventoryNum
goods_num
=
model
.
InventoryNum
});
});
}
}
}
}
...
@@ -349,7 +358,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -349,7 +358,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetAppletGoodsInfo
(
object
requestMsg
)
{
public
ApiResult
GetAppletGoodsInfo
(
object
requestMsg
)
{
var
req
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
req
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
if
(
req
.
MallBaseId
<=
0
)
if
(
req
.
MallBaseId
<=
0
)
{
{
...
@@ -357,7 +367,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -357,7 +367,8 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
JObject
prams
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
JObject
prams
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
GoodsId
=
prams
.
GetInt
(
"GoodsId"
,
0
);
int
GoodsId
=
prams
.
GetInt
(
"GoodsId"
,
0
);
if
(
GoodsId
<=
0
)
{
if
(
GoodsId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
return
ApiResult
.
ParamIsNull
();
}
}
int
UserId
=
req
.
UserId
;
int
UserId
=
req
.
UserId
;
...
@@ -746,7 +757,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -746,7 +757,8 @@ namespace Mall.WebApi.Controllers.MallBase
is_quick_shop
=
model
.
IsQuickBuy
,
is_quick_shop
=
model
.
IsQuickBuy
,
is_sell_well
=
model
.
IsSellWell
,
is_sell_well
=
model
.
IsSellWell
,
is_negotiable
=
model
.
IsGoodsNegotiable
,
is_negotiable
=
model
.
IsGoodsNegotiable
,
cats
=
model
.
CategoryList
.
Select
(
x
=>
new
{
cats
=
model
.
CategoryList
.
Select
(
x
=>
new
{
x
.
CategoryId
,
x
.
CategoryId
,
x
.
CategoryName
x
.
CategoryName
})
//分类
})
//分类
...
@@ -901,7 +913,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -901,7 +913,8 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
ParamIsNull
();
return
ApiResult
.
ParamIsNull
();
}
}
RB_Goods_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Extend
>(
parms
.
msg
.
ToString
());
RB_Goods_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Extend
>(
parms
.
msg
.
ToString
());
if
(!
demodel
.
RecommendType
.
HasValue
&&
demodel
.
RecommendType
<=
0
)
{
if
(!
demodel
.
RecommendType
.
HasValue
&&
demodel
.
RecommendType
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递推荐类型"
);
return
ApiResult
.
ParamIsNull
(
"请传递推荐类型"
);
}
}
...
@@ -1134,7 +1147,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -1134,7 +1147,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// <param name="requestMsg"></param>
/// <param name="requestMsg"></param>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetAppletVipGradeInfo
(
object
requestMsg
)
{
public
ApiResult
GetAppletVipGradeInfo
(
object
requestMsg
)
{
var
req
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
req
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
if
(
req
.
MallBaseId
<=
0
)
if
(
req
.
MallBaseId
<=
0
)
{
{
...
@@ -1153,7 +1167,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -1153,7 +1167,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetGoodsPoster
()
{
public
ApiResult
GetGoodsPoster
()
{
string
address
=
new
HtmlToImgHelper
().
GetHtmlToImage
();
string
address
=
new
HtmlToImgHelper
().
GetHtmlToImage
();
return
ApiResult
.
Success
(
""
,
address
);
return
ApiResult
.
Success
(
""
,
address
);
}
}
...
...
Mall.WebApi/Mall.WebApi.csproj
View file @
76212641
...
@@ -9,11 +9,10 @@
...
@@ -9,11 +9,10 @@
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<PackageReference Include="DotNetCore.CAP" Version="
3.0
.0" />
<PackageReference Include="DotNetCore.CAP" Version="
2.6
.0" />
<PackageReference Include="DotNetCore.CAP.M
ySql" Version="3.0
.0" />
<PackageReference Include="DotNetCore.CAP.M
ongoDB" Version="2.6
.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="
3.0
.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="
2.6
.0" />
<PackageReference Include="JWT" Version="5.3.1" />
<PackageReference Include="JWT" Version="5.3.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" />
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
</ItemGroup>
</ItemGroup>
...
@@ -31,7 +30,7 @@
...
@@ -31,7 +30,7 @@
<ProjectReference Include="..\Mall.ThirdCore\Mall.ThirdCore.csproj" />
<ProjectReference Include="..\Mall.ThirdCore\Mall.ThirdCore.csproj" />
</ItemGroup>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="
https://json-schema.org/draft/2019-09/schema
" /></VisualStudio></ProjectExtensions>
</Project>
</Project>
Mall.WebApi/Startup.cs
View file @
76212641
...
@@ -5,7 +5,6 @@ using System.Linq;
...
@@ -5,7 +5,6 @@ using System.Linq;
using
System.Text.Encodings.Web
;
using
System.Text.Encodings.Web
;
using
System.Text.Unicode
;
using
System.Text.Unicode
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Messages
;
using
Mall.ThirdCore.Message
;
using
Mall.ThirdCore.Message
;
using
Mall.WebApi.Filter
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Builder
;
using
Microsoft.AspNetCore.Builder
;
...
@@ -63,18 +62,14 @@ namespace Mall.WebApi
...
@@ -63,18 +62,14 @@ namespace Mall.WebApi
services
.
AddCap
(
x
=>
services
.
AddCap
(
x
=>
{
{
x
.
UseMySql
(
config
=>
x
.
UseMongoDB
(
Common
.
Config
.
ReadConfigKey
(
"Mongo"
));
{
config
.
ConnectionString
=
"server=192.168.2.214;user id=reborn;password=Reborn@2018;database=cap;CharSet=utf8; Convert Zero Datetime=true;"
;
});
x
.
UseRabbitMQ
(
cfg
=>
x
.
UseRabbitMQ
(
cfg
=>
{
{
cfg
.
HostName
=
"47.96.25.130"
;
cfg
.
HostName
=
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"HostName"
)
;
cfg
.
VirtualHost
=
"/"
;
cfg
.
VirtualHost
=
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"VirtualHost"
)
;
cfg
.
Port
=
Convert
.
ToInt32
(
5672
);
cfg
.
Port
=
Convert
.
ToInt32
(
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"Port"
)
);
cfg
.
UserName
=
"guest"
;
cfg
.
UserName
=
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"UserName"
)
;
cfg
.
Password
=
"viitto2019"
;
cfg
.
Password
=
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"Password"
)
;
});
});
//失败后的重试次数,默认50次;在FailedRetryInterval默认60秒的情况下,即默认重试50*60秒(50分钟)之后放弃失败重试
//失败后的重试次数,默认50次;在FailedRetryInterval默认60秒的情况下,即默认重试50*60秒(50分钟)之后放弃失败重试
x
.
FailedRetryCount
=
10
;
x
.
FailedRetryCount
=
10
;
...
...
Mall.WebApi/appsettings.json
View file @
76212641
{
{
"ConnectionStrings"
:
{
"ConnectionStrings"
:
{
"DefaultConnection"
:
"server=192.168.2.214;user id=reborn;password=Reborn@2018;database=test_reborn_mall_
4
;CharSet=utf8; Convert Zero Datetime=true; "
,
"DefaultConnection"
:
"server=192.168.2.214;user id=reborn;password=Reborn@2018;database=test_reborn_mall_
3
;CharSet=utf8; Convert Zero Datetime=true; "
,
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
,
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
,
"FinanceConnection"
:
"server=192.168.2.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true; "
,
"FinanceConnection"
:
"server=192.168.2.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true; "
,
"FinanceConnectionPName"
:
"MySql.Data.MySqlClient"
,
"FinanceConnectionPName"
:
"MySql.Data.MySqlClient"
,
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
"ViewFileSiteUrl"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com"
,
"ViewFileSiteUrl"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com"
,
"ImKey"
:
"b612b31e837c79c68f141aeb719d2b20"
,
"ImKey"
:
"b612b31e837c79c68f141aeb719d2b20"
,
"ImSecret"
:
"66000451fb72"
,
"ImSecret"
:
"66000451fb72"
,
//
"Mongo"
:
"mongodb://192.168.2.214:27017"
,
"Mongo"
:
"mongodb://47.96.25.130:27017"
,
"Mongo"
:
"mongodb://47.96.25.130:27017"
,
"MongoDBName"
:
"Mall"
,
"MongoDBName"
:
"Mall"
,
"ProjectUrl"
:
"D:/project/GitProject/mallapp"
,
"ProjectUrl"
:
"D:/project/GitProject/mallapp"
,
...
@@ -50,11 +49,13 @@
...
@@ -50,11 +49,13 @@
"PaymentFinanceApi"
:
"http://testapi.oytour.com/api/Mall/InsertFinanceBatchForMallOut"
,
"PaymentFinanceApi"
:
"http://testapi.oytour.com/api/Mall/InsertFinanceBatchForMallOut"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"SettlementRate"
:
"0.60"
,
"SettlementRate"
:
"0.60"
,
//
"RedisSetting"
:
{
"RabbitMqConfig"
:
{
//
"RedisServer"
:
"192.168.2.214"
,
"HostName"
:
"47.96.25.130"
,
//
"RedisPort"
:
"6379"
,
"VirtualHost"
:
"/"
,
//
"RedisPwd"
:
"123456"
"Port"
:
5672
,
//
},
"UserName"
:
"guest"
,
"Password"
:
"viitto2019"
},
"RedisSetting"
:
{
"RedisSetting"
:
{
"RedisServer"
:
"47.96.23.199"
,
"RedisServer"
:
"47.96.23.199"
,
"RedisPort"
:
"6379"
,
"RedisPort"
:
"6379"
,
...
...
Mall.sln
View file @
76212641
...
@@ -41,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.WindowsService", "Mall
...
@@ -41,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.WindowsService", "Mall
EndProject
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.Property", "Mall.Module.Property\Mall.Module.Property.csproj", "{C7DE85C9-8620-47A9-AE2F-DD1408DD886B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.Property", "Mall.Module.Property\Mall.Module.Property.csproj", "{C7DE85C9-8620-47A9-AE2F-DD1408DD886B}"
EndProject
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.AOP", "Mall.AOP\Mall.AOP.csproj", "{231B6093-D5A7-4FEB-A624-7FACE432EA86}"
EndProject
Global
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Any CPU = Debug|Any CPU
...
@@ -107,6 +109,10 @@ Global
...
@@ -107,6 +109,10 @@ Global
{C7DE85C9-8620-47A9-AE2F-DD1408DD886B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7DE85C9-8620-47A9-AE2F-DD1408DD886B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7DE85C9-8620-47A9-AE2F-DD1408DD886B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7DE85C9-8620-47A9-AE2F-DD1408DD886B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7DE85C9-8620-47A9-AE2F-DD1408DD886B}.Release|Any CPU.Build.0 = Release|Any CPU
{C7DE85C9-8620-47A9-AE2F-DD1408DD886B}.Release|Any CPU.Build.0 = Release|Any CPU
{231B6093-D5A7-4FEB-A624-7FACE432EA86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{231B6093-D5A7-4FEB-A624-7FACE432EA86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{231B6093-D5A7-4FEB-A624-7FACE432EA86}.Release|Any CPU.ActiveCfg = Release|Any CPU
{231B6093-D5A7-4FEB-A624-7FACE432EA86}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
HideSolutionNode = FALSE
...
...
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