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
e401ddc1
Commit
e401ddc1
authored
Jul 01, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改的信息
parent
751f6769
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
2 deletions
+80
-2
OrderPayReidsCache.cs
Mall.CacheManager/AppletWeChat/OrderPayReidsCache.cs
+66
-0
DataConstant.cs
Mall.CacheManager/DataStatistic/DataConstant.cs
+6
-0
RB_Recharge_Settings.cs
Mall.Model/Entity/MarketingCenter/RB_Recharge_Settings.cs
+6
-0
LiveHouseController.cs
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
+2
-2
No files found.
Mall.CacheManager/AppletWeChat/OrderPayReidsCache.cs
0 → 100644
View file @
e401ddc1
using
Mall.CacheManager.DataStatistic
;
using
Mall.Common.Plugin.Redis
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.CacheManager.AppletWeChat
{
public
class
OrderPayReidsCache
{
static
RedisHelper
redis
=
new
RedisHelper
(
DataStatistic
.
DataConstant
.
REDIS_DB2
,
DataStatistic
.
DataConstant
.
DATA_OrderPayId
);
/// <summary>
/// 设置缓存
/// </summary>
/// <param name="value"></param>
public
static
void
Set
(
string
cacheKey
,
string
value
,
TimeSpan
ts
)
{
try
{
// TimeSpan ts = DateTime.Now.AddMinutes(10) - DateTime.Now;
redis
.
StringSet
(
cacheKey
,
value
,
ts
);
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"DATA_OrderPayId"
);
}
}
/// <summary>
/// 获取缓存
/// </summary>
/// <returns></returns>
public
static
string
Get
(
string
Key
)
{
string
cacheKey
=
DataConstant
.
DATA_OrderPayId
+
Key
;
try
{
Object
obj
=
redis
.
Get
(
cacheKey
);
if
(
obj
!=
null
)
{
return
obj
.
ToString
();
}
}
catch
(
Exception
ex
)
{
//再获取一次缓存
try
{
System
.
Threading
.
Thread
.
Sleep
(
500
);
Object
obj
=
redis
.
Get
(
cacheKey
);
if
(
obj
!=
null
)
{
return
obj
.
ToString
();
}
}
catch
(
Exception
ex2
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex2
,
"DATA_OrderPayId2"
);
}
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"DATA_OrderPayId"
);
}
return
""
;
}
}
}
Mall.CacheManager/DataStatistic/DataConstant.cs
View file @
e401ddc1
...
...
@@ -21,5 +21,11 @@ namespace Mall.CacheManager.DataStatistic
/// 微信小程序token
/// </summary>
public
static
readonly
string
DATA_WeiXinToken
=
"DATA_WeiXinToken_"
;
/// <summary>
///订单支付缓存
/// </summary>
public
static
readonly
string
DATA_OrderPayId
=
"DATA_OrderPayId_"
;
}
}
Mall.Model/Entity/MarketingCenter/RB_Recharge_Settings.cs
View file @
e401ddc1
...
...
@@ -30,6 +30,12 @@ namespace Mall.Model.Entity.MarketingCenter
public
DateTime
CreateDate
{
get
;
set
;
}
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 是否显示充值余额按钮0-否,1-是 2020-07-01 add By:w
/// </summary>
public
int
IsOpenBtn
{
get
;
set
;
}
/// <summary>
/// 开启余额功能0-否,1-是
/// </summary>
...
...
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
View file @
e401ddc1
...
...
@@ -121,7 +121,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item
.
ALLCommission
=
item
.
CostFreight
+
item
.
CostMoney
+
item
.
PackingMoney
+
item
.
GoodsFreight
+
item
.
OneCommission
+
item
.
TwoCommission
+
item
.
OtherPrice
;
item
.
NoPaid
=
item
.
ALLCommission
-
item
.
Paid
;
item
.
GrossProfit
=
item
.
AllPrice
-
item
.
ALLCommission
;
item
.
GrossProfitRate
=
item
.
AllPrice
==
0
?
0
:
item
.
GrossProfit
/
item
.
AllPrice
;
item
.
GrossProfitRate
=
item
.
AllPrice
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
item
.
AllPrice
),
2
,
MidpointRounding
.
AwayFromZero
);
}
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
;
...
...
@@ -183,7 +183,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item
.
ALLCommission
=
item
.
CostFreight
+
item
.
CostMoney
+
item
.
PackingMoney
+
item
.
GoodsFreight
+
item
.
OneCommission
+
item
.
TwoCommission
+
item
.
OtherPrice
;
item
.
NoPaid
=
item
.
ALLCommission
-
item
.
Paid
;
item
.
GrossProfit
=
item
.
AllPrice
-
item
.
ALLCommission
;
item
.
GrossProfitRate
=
item
.
AllPrice
==
0
?
0
:
item
.
GrossProfit
/
item
.
AllPrice
;
item
.
GrossProfitRate
=
item
.
AllPrice
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
item
.
AllPrice
),
2
,
MidpointRounding
.
AwayFromZero
)
;
}
#
region
组装数据
int
Num
=
0
;
...
...
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