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
1452b7bb
Commit
1452b7bb
authored
Jan 07, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
1
parents
b2bc63ce
1150867e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
14 deletions
+71
-14
OrderModule_Part.cs
Mall.Module.Product/OrderModule_Part.cs
+16
-2
MemberLookModule.cs
Mall.Module.User/MemberLookModule.cs
+48
-5
appsettings.json
Mall.WebApi/appsettings.json
+6
-6
appsettings.json
Mall.WindowsService/appsettings.json
+1
-1
No files found.
Mall.Module.Product/OrderModule_Part.cs
View file @
1452b7bb
...
...
@@ -4455,7 +4455,14 @@ namespace Mall.Module.Product
goodsName
=
goodsName
.
Substring
(
0
,
10
);
}
}
new
MiniProgramMsgModule
().
SendOrderCancelMsg
(
tenantId
,
mallBaseId
,
umodel
.
OpenId
,
omodel
.
OrderNo
,
"订单已取消"
,
(
omodel
.
Income
??
0
).
ToString
(),
goodsName
);
try
{
new
MiniProgramMsgModule
().
SendOrderCancelMsg
(
tenantId
,
mallBaseId
,
umodel
.
OpenId
,
omodel
.
OrderNo
,
"订单已取消"
,
(
omodel
.
Income
??
0
).
ToString
(),
goodsName
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"SendOrderCancelMsg订单强制取消发送订阅消息失败"
);
}
}
//记录日志
string
Content
=
$"empId:
{
empId
}
客人申请取消订单,审核:
{(
type
==
1
?
"同意"
:
"拒绝"
)}
"
;
...
...
@@ -4832,7 +4839,14 @@ namespace Mall.Module.Product
goodsName
=
goodsName
.
Substring
(
0
,
10
);
}
}
new
MiniProgramMsgModule
().
SendOrderCancelMsg
(
tenantId
,
mallBaseId
,
umodel
.
OpenId
,
omodel
.
OrderNo
,
"订单已取消"
,
(
omodel
.
Income
??
0
).
ToString
(),
goodsName
);
try
{
new
MiniProgramMsgModule
().
SendOrderCancelMsg
(
tenantId
,
mallBaseId
,
umodel
.
OpenId
,
omodel
.
OrderNo
,
"订单已取消"
,
(
omodel
.
Income
??
0
).
ToString
(),
goodsName
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"SendOrderCancelMsg订单强制取消发送订阅消息失败"
);
}
#
endregion
//记录日志
...
...
Mall.Module.User/MemberLookModule.cs
View file @
1452b7bb
...
...
@@ -58,8 +58,8 @@ namespace Mall.Module.User
public
bool
AddMemberLookModule
(
RB_Member_Look_Extend
model
)
{
#
region
验证当月时长已存在
string
STime
=
DateTime
.
Now
.
ToString
(
"yyyy-MM"
)
+
"-01"
;
string
ETime
=
Convert
.
ToDateTime
(
STime
).
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
string
STime
=
GetMondayDate
().
ToString
(
"yyyy-MM-dd"
);
//本周一
string
ETime
=
GetSundayDate
().
ToString
(
"yyyy-MM-dd"
);
//本周日
var
list
=
member_LookRepository
.
GetMemberLookListRepository
(
new
RB_Member_Look_Extend
()
{
MallBaseId
=
model
.
MallBaseId
,
UserId
=
model
.
UserId
,
CreateBy
=
model
.
CreateBy
,
StartTime
=
STime
,
EndTime
=
ETime
});
if
(
list
.
Any
())
{
return
false
;
...
...
@@ -79,8 +79,8 @@ namespace Mall.Module.User
/// <returns></returns>
public
object
GetWeChatLookUser
(
int
userId
,
AppletUserInfo
userInfo
,
out
bool
IsLook
)
{
string
STime
=
DateTime
.
Now
.
ToString
(
"yyyy-MM"
)
+
"-01"
;
string
ETime
=
Convert
.
ToDateTime
(
STime
).
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
string
STime
=
GetMondayDate
().
ToString
(
"yyyy-MM-dd"
);
//本周一
string
ETime
=
GetSundayDate
().
ToString
(
"yyyy-MM-dd"
);
//本周日
//首先查询是否已查看
IsLook
=
false
;
var
list
=
member_LookRepository
.
GetMemberLookListRepository
(
new
RB_Member_Look_Extend
()
{
MallBaseId
=
userInfo
.
MallBaseId
,
UserId
=
userId
,
CreateBy
=
userInfo
.
UserId
,
StartTime
=
STime
,
EndTime
=
ETime
});
...
...
@@ -88,7 +88,7 @@ namespace Mall.Module.User
{
IsLook
=
true
;
}
//查询
当月已查看
次数
//查询
本周已查看次数 ld 2021-11-15 修改为周
次数
int
LookNum
=
member_LookRepository
.
GetMemberLookNum
(
userInfo
.
MallBaseId
,
userInfo
.
UserId
,
STime
,
ETime
);
//查询用户可查看次数
var
umodel
=
member_UserRepository
.
GetEntity
(
userInfo
.
UserId
);
...
...
@@ -108,5 +108,48 @@ namespace Mall.Module.User
SurplusNum
=
TotalNum
-
LookNum
>
0
?
TotalNum
-
LookNum
:
0
};
}
#
region
计算本周日期
/// <summary>
/// 计算本周的周一日期
/// </summary>
/// <returns></returns>
private
DateTime
GetMondayDate
()
{
return
GetMondayDate
(
DateTime
.
Now
);
}
/// <summary>
/// 计算本周周日的日期
/// </summary>
/// <returns></returns>
private
DateTime
GetSundayDate
()
{
return
GetSundayDate
(
DateTime
.
Now
);
}
/// <summary>
/// 计算某日起始日期(礼拜一的日期)
/// </summary>
/// <param name="someDate">该周中任意一天</param>
/// <returns>返回礼拜一日期,后面的具体时、分、秒和传入值相等</returns>
private
DateTime
GetMondayDate
(
DateTime
someDate
)
{
int
i
=
someDate
.
DayOfWeek
-
DayOfWeek
.
Monday
;
if
(
i
==
-
1
)
i
=
6
;
// i值 > = 0 ,因为枚举原因,Sunday排在最前,此时Sunday-Monday=-1,必须+7=6。
TimeSpan
ts
=
new
TimeSpan
(
i
,
0
,
0
,
0
);
return
someDate
.
Subtract
(
ts
);
}
/// <summary>
/// 计算某日结束日期(礼拜日的日期)
/// </summary>
/// <param name="someDate">该周中任意一天</param>
/// <returns>返回礼拜日日期,后面的具体时、分、秒和传入值相等</returns>
private
DateTime
GetSundayDate
(
DateTime
someDate
)
{
int
i
=
someDate
.
DayOfWeek
-
DayOfWeek
.
Sunday
;
if
(
i
!=
0
)
i
=
7
-
i
;
// 因为枚举原因,Sunday排在最前,相减间隔要被7减。
TimeSpan
ts
=
new
TimeSpan
(
i
,
0
,
0
,
0
);
return
someDate
.
Add
(
ts
);
}
#
endregion
}
}
Mall.WebApi/appsettings.json
View file @
1452b7bb
{
"ConnectionStrings"
:
{
"DefaultConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=
test
_mall;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DefaultConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=
reborn
_mall;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
,
"FinanceConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"FinanceConnectionPName"
:
"MySql.Data.MySqlClient"
,
...
...
@@ -55,12 +55,12 @@
"XuZongUserId"
:
111790
,
//徐总的id,用于区分线下订单
"RebornDMC"
:
"reborn_dmc"
,
"PropertyDB"
:
"test_property"
,
"IncomeFinanceApi"
:
"http://192.168.
2
0.7:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.
2
0.7:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"ZYRefundFinanceApi"
:
"http://192.168.
2
0.7:8083/api/Mall/SetMallOrderSalesTheWayRefund"
,
"IncomeFinanceApi"
:
"http://192.168.
1
0.7:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.
1
0.7:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"ZYRefundFinanceApi"
:
"http://192.168.
1
0.7:8083/api/Mall/SetMallOrderSalesTheWayRefund"
,
"PropertyApi"
:
"http://192.168.1.13:8087/api/ECWorkFlow/SetECSuppliesStockInFlow"
,
"EduOrderApi"
:
"http://192.168.
2
0.17:8017/api/Order/SetBatchClassOrder"
,
"EduUpdateGoodsSpecification"
:
"http://192.168.
2
0.17:8017/api/Order/UpdateGoodsSpecification"
,
"EduOrderApi"
:
"http://192.168.
1
0.17:8017/api/Order/SetBatchClassOrder"
,
"EduUpdateGoodsSpecification"
:
"http://192.168.
1
0.17:8017/api/Order/UpdateGoodsSpecification"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"SettlementRate"
:
"0.60"
,
"EduSettlementRate"
:
"0.54"
,
...
...
Mall.WindowsService/appsettings.json
View file @
1452b7bb
...
...
@@ -39,7 +39,7 @@
"RebornDMC"
:
"reborn_dmc"
,
"IncomeFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"EduUpdateGoodsSpecification"
:
"http://192.168.
2
0.17:8017/api/Order/UpdateGoodsSpecification"
,
"EduUpdateGoodsSpecification"
:
"http://192.168.
1
0.17:8017/api/Order/UpdateGoodsSpecification"
,
"PayCertificateUrl"
:
"D:/project/GitProject/Shopping/Mall.WebApi/"
,
"SettlementRate"
:
"0.60"
,
//
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
...
...
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