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
0093b91a
Commit
0093b91a
authored
Nov 07, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
610ca82f
1ce7fb4d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
20 deletions
+66
-20
WeiXinHelper.cs
Mall.Common/Plugin/WeiXinHelper.cs
+2
-2
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+25
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+17
-3
RB_DiscountCouponRepository.cs
...Repository/MarketingCenter/RB_DiscountCouponRepository.cs
+4
-6
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+15
-6
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+2
-2
AppletLoginController.cs
Mall.WebApi/Controllers/User/AppletLoginController.cs
+1
-0
No files found.
Mall.Common/Plugin/WeiXinHelper.cs
View file @
0093b91a
...
...
@@ -52,8 +52,8 @@ namespace Mall.Common.Plugin
if
(
result
!=
null
&&
!
string
.
IsNullOrEmpty
(
result
))
{
JObject
jObj
=
JObject
.
Parse
(
result
);
miniAppUserCache
.
UserOpenId
=
jObj
[
"openid"
].
ToString
(
);
miniAppUserCache
.
UserUnoinid
=
jObj
[
"unionid"
].
ToString
(
);
miniAppUserCache
.
UserOpenId
=
jObj
.
GetStringValue
(
"openid"
);
miniAppUserCache
.
UserUnoinid
=
jObj
.
GetStringValue
(
"unionid"
);
}
}
catch
(
Exception
ex
)
...
...
Mall.Module.Product/OrderModule.cs
View file @
0093b91a
...
...
@@ -4561,7 +4561,31 @@ namespace Mall.Module.Product
goods_OrderRepository
.
DBSession
.
Commit
();
//任务执行 订单记录当前用户的所有上级
Task
.
Run
(()
=>
SaveOrderUserAllParent
(
demodel
.
UserId
??
0
,
OrderId
));
return
ApiResult
.
Success
(
""
,
new
{
OrderId
});
//进阶小课堂回调
if
(
demodel
.
TenantId
==
27
&&
demodel
.
OrderStatus
==
OrderStatusEnum
.
Completed
)
{
Task
.
Run
(()
=>
{
try
{
string
url
=
Common
.
Config
.
JJSWAdminApi
+
"/api/Third/SynchronousMallOrder"
;
var
postData
=
new
{
Msg
=
new
{
OrderId
=
OrderId
}
};
string
str
=
HttpHelper
.
HttpPost
(
url
,
Common
.
Plugin
.
JsonHelper
.
Serialize
(
postData
));
}
catch
{
}
});
}
return
ApiResult
.
Success
(
""
,
new
{
OrderId
,
demodel
.
OrderStatus
});
}
catch
(
Exception
ex
)
{
...
...
Mall.Module.Product/ProductModule.cs
View file @
0093b91a
...
...
@@ -2133,12 +2133,26 @@ namespace Mall.Module.Product
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
(
model
.
SpecificationPriceList
.
Where
(
x
=>
x
.
SellingPrice
>
0
).
Count
()
!=
model
.
SpecificationPriceList
.
Count
())
//进阶小课堂商品价格可以为0 HK 2022-11-01新增条件
if
(
model
.
TenantId
==
27
)
{
//有数量为0的
IsHaveSellingPriceZero
=
true
;
}
foreach
(
var
item
in
model
.
SpecificationPriceList
.
Where
(
x
=>
x
.
SellingPrice
>
0
))
else
{
if
(
model
.
SpecificationPriceList
.
Where
(
x
=>
x
.
SellingPrice
>
0
).
Count
()
!=
model
.
SpecificationPriceList
.
Count
())
{
//有数量为0的
IsHaveSellingPriceZero
=
true
;
}
}
var
tempList
=
model
.
SpecificationPriceList
.
Where
(
x
=>
x
.
SellingPrice
>
0
);
//进阶小课堂商品价格可以为0 HK 2022-11-01新增条件
if
(
model
.
TenantId
==
27
)
{
tempList
=
model
.
SpecificationPriceList
;
}
foreach
(
var
item
in
tempList
)
{
var
ssarr
=
item
.
SpecificationSort
.
Split
(
':'
);
int
Sort
=
Convert
.
ToInt32
(
ssarr
[
0
]);
...
...
Mall.Repository/MarketingCenter/RB_DiscountCouponRepository.cs
View file @
0093b91a
...
...
@@ -111,7 +111,6 @@ namespace Mall.Repository.MarketingCenter
string
allWhere
=
""
;
//通用
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
where
+=
$" AND b.
{
nameof
(
RB_DiscountCoupon_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
;
...
...
@@ -126,9 +125,7 @@ namespace Mall.Repository.MarketingCenter
}
if
(
query
.
ProductList
!=
null
&&
query
.
ProductList
.
Any
())
{
List
<
int
>
allGoodsClass
=
new
List
<
int
>();
foreach
(
var
item
in
query
.
ProductList
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
goodsWhere
))
...
...
@@ -148,7 +145,6 @@ namespace Mall.Repository.MarketingCenter
foreach
(
var
item
in
goodsClassList
)
{
decimal
nowPrice
=
0
;
foreach
(
var
classItem
in
query
.
ProductList
)
{
if
(
classItem
.
GoodsClassId
.
Any
(
x
=>
x
==
item
.
Key
))
...
...
@@ -165,10 +161,12 @@ namespace Mall.Repository.MarketingCenter
goodsClassWhere
+=
$" (c.ProductId =
{
item
.
Key
}
and b.MinConsumePrice<=
{
nowPrice
}
) "
;
}
}
goodsClassWhere
=
" and ("
+
goodsClassWhere
+
")"
;
if
(!
string
.
IsNullOrEmpty
(
goodsClassWhere
))
{
goodsClassWhere
=
" and ("
+
goodsClassWhere
+
")"
;
}
decimal
allPrice
=
query
.
ProductList
.
Sum
(
x
=>
x
.
GoodsPrice
);
allWhere
=
$" and b.MinConsumePrice<=
{
allPrice
}
"
;
}
}
string
sql
=
@
$" SELECT a.ID as MemberCouponId,a.UserId,b.`Name`,b.CouponType,b.UseType,b.MinConsumePrice,b.DiscountsPrice,b.MaxDiscountsPrice,b.`Describe`,a.StartDate,a.EndDate,b.ID from rb_member_discountcoupon as a
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
0093b91a
...
...
@@ -540,19 +540,29 @@ namespace Mall.WebApi.Controllers.MallBase
}
item
.
Specification
=
JsonConvert
.
SerializeObject
(
item
.
SpecificationList
);
}
if
(((
demodel
.
Income
??
0
)
+
((
demodel
.
DepositMoney
)))
<=
0
)
demodel
.
TenantId
=
userInfo
.
TenantId
;
//进阶小课堂价格可以为0 hk 2022-11-01修改
if
(
demodel
.
TenantId
!=
27
)
{
return
ApiResult
.
ParamIsNull
(
"订单金额不正确"
);
if
(((
demodel
.
Income
??
0
)
+
((
demodel
.
DepositMoney
)))
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"订单金额不正确"
);
}
}
demodel
.
OrderStatus
=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
NonPayment
;
//进阶小课堂价格可以为0
if
(
demodel
.
TenantId
==
27
&&
demodel
.
Income
==
0
)
{
demodel
.
OrderStatus
=
OrderStatusEnum
.
Completed
;
}
demodel
.
BuyerMessage
??=
""
;
//买家留言
demodel
.
OrderSource
??=
UserSourceEnum
.
WeiXin
;
#
region
赋默认值
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
Country
??=
2
;
demodel
.
OrderStatus
=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
NonPayment
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
Fee
??=
0
;
demodel
.
FreightMoney
??=
0
;
...
...
@@ -579,7 +589,6 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
IsOffline
=
0
;
}
}
#
endregion
return
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
0093b91a
...
...
@@ -407,7 +407,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
if
(
carrierModule
.
ValidateCarrierName
(
query
.
CarrierName
,
userInfo
.
MallBaseId
))
{
return
ApiResult
.
Failed
(
"该载体名称已存在,请选择绑定已有载体"
);
//
return ApiResult.Failed("该载体名称已存在,请选择绑定已有载体");
}
}
...
...
@@ -418,7 +418,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
var
carrmodel
=
carrierModule
.
GetCarrierModel
(
new
RB_Carrier_Extend
{
ID
=
query
.
ExistCarrierId
,
TenantId
=
query
.
TenantId
,
MallBaseId
=
query
.
MallBaseId
});
if
(
carrmodel
.
UserId
>
0
)
{
return
ApiResult
.
Failed
(
"该载体已被其他用户认证,请核实后再试"
);
//
return ApiResult.Failed("该载体已被其他用户认证,请核实后再试");
}
}
#
endregion
...
...
Mall.WebApi/Controllers/User/AppletLoginController.cs
View file @
0093b91a
...
...
@@ -106,6 +106,7 @@ namespace Mall.WebApi.Controllers.User
{
return
ApiResult
.
ParamIsNull
(
"请传递唯一码"
);
}
//查询用户默认分组
var
groupModel
=
memberGroupModule
.
GetMemberGroupListModule
(
new
RB_Member_Group_Extend
()
{
...
...
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