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
a0237677
Commit
a0237677
authored
Jun 16, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
f8616a0c
f4b92651
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
295 additions
and
209 deletions
+295
-209
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+76
-35
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+158
-158
UserCommonModule.cs
Mall.Module.User/UserCommonModule.cs
+55
-12
RB_DiscountCouponRepository.cs
...Repository/MarketingCenter/RB_DiscountCouponRepository.cs
+3
-3
WeChatNotifyController.cs
...WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
+3
-1
No files found.
Mall.Module.Product/OrderModule.cs
View file @
a0237677
This diff is collapsed.
Click to expand it.
Mall.Module.User/MiniProgramModule.cs
View file @
a0237677
This diff is collapsed.
Click to expand it.
Mall.Module.User/UserCommonModule.cs
View file @
a0237677
...
...
@@ -44,20 +44,25 @@ namespace Mall.Module.User
/// 订单信息
/// </summary>
private
readonly
RB_Goods_OrderRepository
goods_OrderRepository
=
new
RB_Goods_OrderRepository
();
/// <summary>
/// 订单商品信息
/// </summary>
private
readonly
RB_Goods_OrderDetailRepository
goodsOrderDetailRepository
=
new
RB_Goods_OrderDetailRepository
();
/// <summary>
/// 会员信息
/// </summary>
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
private
readonly
MiniProgramModule
appletWeChatModule
=
new
MiniProgramModule
();
/// <summary>
/// 初始化分销基础配置
/// </summary>
/// <param name="TenantId"></param>
/// <param name="MallBaseId"></param>
/// <returns></returns>
public
bool
InitializeDistributorBasicsInfo
(
int
TenantId
,
int
MallBaseId
)
public
bool
InitializeDistributorBasicsInfo
(
int
TenantId
,
int
MallBaseId
)
{
var
OModel
=
distributor_BasicsRepository
.
GetList
(
new
RB_Distributor_Basics_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
}).
FirstOrDefault
();
if
(
OModel
==
null
)
...
...
@@ -93,7 +98,8 @@ namespace Mall.Module.User
HpReferralsGradeAudit
=
2
})
>
0
;
}
else
{
else
{
return
true
;
}
}
...
...
@@ -112,7 +118,7 @@ namespace Mall.Module.User
{
Id
=
0
,
ApplicationAgreement
=
"分销申请协议"
,
HeadImage
=
Common
.
Config
.
GetFileUrl
(
"/Upload/Set/1587968479000.png"
),
HeadImage
=
Common
.
Config
.
GetFileUrl
(
"/Upload/Set/1587968479000.png"
),
BottomImage
=
Common
.
Config
.
GetFileUrl
(
"/Upload/Set/1587968716000.png"
),
ButtonColor
=
"#FF4544"
,
ButtonFilletPX
=
40
,
...
...
@@ -149,7 +155,8 @@ namespace Mall.Module.User
UpdateDate
=
DateTime
.
Now
})
>
0
;
}
else
{
else
{
return
true
;
}
}
...
...
@@ -160,7 +167,8 @@ namespace Mall.Module.User
/// <param name="TenantId"></param>
/// <param name="MallBaseId"></param>
/// <returns></returns>
public
bool
InitializeCategoryStyleInfo
(
int
TenantId
,
int
MallBaseId
)
{
public
bool
InitializeCategoryStyleInfo
(
int
TenantId
,
int
MallBaseId
)
{
var
OModel
=
product_CategoryStyleRepository
.
GetList
(
new
RB_Product_CategoryStyle_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
}).
FirstOrDefault
();
if
(
OModel
==
null
)
{
...
...
@@ -177,7 +185,8 @@ namespace Mall.Module.User
UpdateDate
=
DateTime
.
Now
})
>
0
;
}
else
{
else
{
return
true
;
}
}
...
...
@@ -188,7 +197,8 @@ namespace Mall.Module.User
/// <param name="TenantId"></param>
/// <param name="MallBaseId"></param>
/// <returns></returns>
public
bool
InitializeProductRecommendInfo
(
int
TenantId
,
int
MallBaseId
)
{
public
bool
InitializeProductRecommendInfo
(
int
TenantId
,
int
MallBaseId
)
{
var
oModel
=
product_RecommendRepository
.
GetList
(
new
RB_Product_Recommend_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
}).
FirstOrDefault
();
if
(
oModel
==
null
)
{
...
...
@@ -209,7 +219,8 @@ namespace Mall.Module.User
UpdateDate
=
DateTime
.
Now
})
>
0
;
}
else
{
else
{
return
true
;
}
}
...
...
@@ -226,11 +237,28 @@ namespace Mall.Module.User
/// <param name="Money">金额</param>
/// <param name="Pay_Result">状态</param>
/// <returns></returns>
public
bool
InsertOrderPayInfo
(
int
UserId
,
int
OrderId
,
string
Out_Trade_No
,
string
Transaction_Id
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
PayWay
,
string
PayType
,
decimal
Money
,
DateTime
Time_End
,
int
Pay_Result
)
{
public
bool
InsertOrderPayInfo
(
int
UserId
,
int
OrderId
,
string
Out_Trade_No
,
string
Transaction_Id
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
PayWay
,
string
PayType
,
decimal
Money
,
DateTime
Time_End
,
int
Pay_Result
)
{
var
umodel
=
member_UserRepository
.
GetEntity
(
UserId
);
if
(
umodel
==
null
)
{
if
(
umodel
==
null
)
{
return
false
;
}
//判断订单状态是否是待支付 2020-06-16 Add By:W
var
oldOrder
=
goods_OrderRepository
.
GetEntity
(
OrderId
);
if
(
oldOrder
==
null
)
{
return
false
;
}
if
(
oldOrder
.
OrderStatus
!=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
NonPayment
)
{
return
false
;
}
//获取订单商品
var
orderGoodsList
=
goodsOrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
{
TenantId
=
oldOrder
.
TenantId
,
MallBaseId
=
oldOrder
.
MallBaseId
,
OrderId
=
oldOrder
.
OrderId
});
bool
flag
=
goods_Online_TradeRepository
.
Insert
(
new
Model
.
Entity
.
Product
.
RB_Goods_Online_Trade
()
{
Id
=
0
,
...
...
@@ -254,7 +282,8 @@ namespace Mall.Module.User
Transaction_Id
=
Transaction_Id
,
Type
=
1
})
>
0
;
if
(
flag
)
{
if
(
flag
)
{
//更新订单信息
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitSendGoods
},
...
...
@@ -287,6 +316,20 @@ namespace Mall.Module.User
};
member_UserRepository
.
Update
(
keyValues1
,
wheres1
);
}
//发送订阅消息
string
goodsName
=
orderGoodsList
.
FirstOrDefault
().
GoodsName
;
if
(
orderGoodsList
.
Count
>
1
)
{
goodsName
+=
"等"
+
orderGoodsList
.
Count
+
"件商品"
;
}
appletWeChatModule
.
SendOrderSucceedMsg
(
oldOrder
.
TenantId
,
oldOrder
.
MallBaseId
,
umodel
.
OpenId
,
oldOrder
.
OrderNo
,
oldOrder
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
"微信"
,
goodsName
);
}
return
flag
;
}
...
...
Mall.Repository/MarketingCenter/RB_DiscountCouponRepository.cs
View file @
a0237677
...
...
@@ -157,16 +157,16 @@ namespace Mall.Repository.MarketingCenter
}
if
(!
string
.
IsNullOrWhiteSpace
(
goodsClassWhere
))
{
goodsClassWhere
+=
$" or (c.ProductId =
{
item
.
Key
}
and
a
.MinConsumePrice<=
{
nowPrice
}
) "
;
goodsClassWhere
+=
$" or (c.ProductId =
{
item
.
Key
}
and
b
.MinConsumePrice<=
{
nowPrice
}
) "
;
}
else
{
goodsClassWhere
+=
$" (c.ProductId =
{
item
.
Key
}
and
a
.MinConsumePrice<=
{
nowPrice
}
) "
;
goodsClassWhere
+=
$" (c.ProductId =
{
item
.
Key
}
and
b
.MinConsumePrice<=
{
nowPrice
}
) "
;
}
}
goodsClassWhere
=
" and ("
+
goodsClassWhere
+
")"
;
decimal
allPrice
=
query
.
ProductList
.
Sum
(
x
=>
x
.
GoodsPrice
);
allWhere
=
$" and
a
.MinConsumePrice<=
{
allPrice
}
"
;
allWhere
=
$" and
b
.MinConsumePrice<=
{
allPrice
}
"
;
}
}
...
...
Mall.WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
View file @
a0237677
...
...
@@ -68,6 +68,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
#
region
新增订单支付信息
userCommonModule
.
InsertOrderPayInfo
(
UserId
,
OrderId
,
sOrderNo
,
TransactionId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
PayType
,
dPaid
,
PayDate
,
0
);
#
endregion
}
//告诉微信我们已经处理成功,不需要再调用我们的接口了
...
...
@@ -75,7 +77,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
req
.
SetParameter
(
"return_msg"
,
"OK"
);
var
reqXml
=
req
.
ParseXml
();
return
reqXml
;
// return ApiResult.Success("", reqXml);
// return ApiResult.Success("", reqXml);
}
else
{
...
...
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