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
4541a85a
Commit
4541a85a
authored
Dec 05, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0b109486
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
30 deletions
+72
-30
Config.cs
Mall.Common/Config.cs
+18
-4
TimersHelper.cs
Mall.WindowsService/Helper/TimersHelper.cs
+24
-9
Program.cs
Mall.WindowsService/Program.cs
+1
-1
WindowsService.cs
Mall.WindowsService/WindowsService.cs
+12
-0
appsettings.json
Mall.WindowsService/appsettings.json
+17
-16
No files found.
Mall.Common/Config.cs
View file @
4541a85a
...
...
@@ -227,8 +227,10 @@ namespace Mall.Common
}
}
public
static
string
GetAliOssFileUrl
{
get
{
public
static
string
GetAliOssFileUrl
{
get
{
return
ReadConfigKey
(
"AliFileSiteUrl"
);
}
}
...
...
@@ -616,6 +618,18 @@ namespace Mall.Common
}
}
/// <summary>
/// 需要同步小程序统计数据的MallBaseId(格式1,2,3)
/// </summary>
public
static
string
WechatStatisticsMallBaseId
{
get
{
return
ReadConfigKey
(
"WechatStatisticsMallBaseId"
);
}
}
/// <summary>
/// 生成收入财务单据
/// </summary>
...
...
@@ -692,7 +706,7 @@ namespace Mall.Common
return
ReadConfigKey
(
"EduSettlementRate"
);
}
}
/// <summary>
/// 资产管理数据库
...
...
@@ -807,7 +821,7 @@ namespace Mall.Common
{
get
{
JObject
ossObj
=
new
JObject
();
JObject
ossObj
=
new
JObject
();
ossObj
[
"region"
]
=
ReadConfigKey
(
"tencentOSS"
,
"region"
);
ossObj
[
"bucket"
]
=
ReadConfigKey
(
"tencentOSS"
,
"bucket"
);
ossObj
[
"accessKeyId"
]
=
ReadConfigKey
(
"tencentOSS"
,
"accessKeyId"
);
...
...
Mall.WindowsService/Helper/TimersHelper.cs
View file @
4541a85a
...
...
@@ -5,7 +5,7 @@ namespace Mall.WindowsService.Helper
{
public
class
TimersHelper
{
private
static
int
inTimer6
=
0
;
private
static
int
inTimer7
=
0
;
private
static
int
inTimer8
=
0
;
...
...
@@ -23,17 +23,17 @@ namespace Mall.WindowsService.Helper
{
Thread
.
Sleep
(
1000
*
60
);
LogHelper
.
Write
(
"RevenueFinance=====Start"
);
bool
flag
=
Module
.
FinanceModule
.
OrderIncomeFinanceModule
();
bool
flag
=
Module
.
FinanceModule
.
OrderIncomeFinanceModule
();
LogHelper
.
Write
(
"RevenueFinance=====End "
+
flag
);
#
region
退款制单
LogHelper
.
Write
(
"AutoCreateFinanceRefund=====Start"
);
flag
=
Module
.
FinanceModule
.
AutoCreateFinanceRefund
();
LogHelper
.
Write
(
"AutoCreateFinanceRefund=====End "
+
flag
);
flag
=
Module
.
FinanceModule
.
AutoCreateFinanceRefund
();
LogHelper
.
Write
(
"AutoCreateFinanceRefund=====End "
+
flag
);
#
endregion
#
region
分享商
VIP
过期时间
LogHelper
.
Write
(
"DistributorVipModule=====Start"
);
flag
=
Module
.
FinanceModule
.
DistributorVipModule
();
LogHelper
.
Write
(
"DistributorVipModule=====End "
+
flag
);
flag
=
Module
.
FinanceModule
.
DistributorVipModule
();
LogHelper
.
Write
(
"DistributorVipModule=====End "
+
flag
);
#
endregion
#
region
电商统计
...
...
@@ -43,7 +43,7 @@ namespace Mall.WindowsService.Helper
LogHelper
.
Write
(
"UpdateToDayUserStatistics=====Start"
);
try
{
flag
=
new
Module
.
UserStatisticsModule
().
UpdateToDayUserStatistics
(
""
,
""
);
flag
=
new
Module
.
UserStatisticsModule
().
UpdateToDayUserStatistics
(
""
,
""
);
}
catch
(
Exception
ex
)
{
...
...
@@ -68,12 +68,27 @@ namespace Mall.WindowsService.Helper
{
Thread
.
Sleep
(
1000
*
60
);
LogHelper
.
Write
(
"AutoCancelOrder=====Start"
);
bool
flag
=
Module
.
FinanceModule
.
AutoCancelOrder
();
bool
flag
=
Module
.
FinanceModule
.
AutoCancelOrder
();
LogHelper
.
Write
(
"AutoCancelOrder=====End "
+
flag
);
}
}
/// <summary>
/// 自动取消订单【10分钟执行一次】
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public
void
AddWechatStatistics
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
DateTime
now
=
DateTime
.
Now
;
if
(
now
.
Hour
==
1
)
{
Thread
.
Sleep
(
1000
*
60
);
LogHelper
.
Write
(
"AddWechatStatistics=====Start"
);
bool
flag
=
Module
.
CuiPingModule
.
AddWechatStatistics
();
LogHelper
.
Write
(
"AddWechatStatistics=====End "
+
flag
);
}
}
/// <summary>
/// 自动收货订单
/// </summary>
...
...
Mall.WindowsService/Program.cs
View file @
4541a85a
...
...
@@ -7,7 +7,7 @@ namespace Mall.WindowsService
{
static
void
Main
(
string
[]
args
)
{
//
Module.FinanceModule.AutoCancelOrder
();
//
Module.CuiPingModule.AddWechatStatistics
();
ServiceBase
[]
services
=
new
ServiceBase
[]
{
new
WindowsService
()
};
ServiceBase
.
Run
(
services
);
}
...
...
Mall.WindowsService/WindowsService.cs
View file @
4541a85a
...
...
@@ -14,6 +14,7 @@ namespace Mall.WindowsService
//private System.Timers.Timer timer8;//会员购买储值卡收入
//private System.Timers.Timer timer9;//相亲每日随机查询信息删除
//private System.Timers.Timer timer10; //教育咖啡劵
private
System
.
Timers
.
Timer
timer11
;
//定时同步翠屏商务局的小程序统计信息
public
WindowsService
()
{
InitializeComponent
();
...
...
@@ -121,6 +122,17 @@ namespace Mall.WindowsService
//timer10.Enabled = true;
#
endregion
#
region
订单取消定时器
timer11
=
new
System
.
Timers
.
Timer
{
Interval
=
1000
*
60
//1分钟检测一次,10分钟执行一次
};
timer11
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
helper
.
AddWechatStatistics
);
timer11
.
Enabled
=
true
;
#
endregion
}
protected
override
void
OnStop
()
...
...
Mall.WindowsService/appsettings.json
View file @
4541a85a
{
"ConnectionStrings"
:
{
"DefaultConnection"
:
"server=192.168.
10
.214;user id=reborn;password=Reborn@2018;database=reborn_mall;CharSet=utf8; Convert Zero Datetime=true; "
,
"DefaultConnection"
:
"server=192.168.
5
.214;user id=reborn;password=Reborn@2018;database=reborn_mall;CharSet=utf8; Convert Zero Datetime=true; "
,
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
,
"FinanceConnection"
:
"server=192.168.
10
.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true; "
,
"FinanceConnection"
:
"server=192.168.
5
.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true; "
,
"FinanceConnectionPName"
:
"MySql.Data.MySqlClient"
,
"EduConnection"
:
"server=192.168.
10
.214;user id=reborn;password=Reborn@2018;database=test_edu2;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"EduConnection"
:
"server=192.168.
5
.214;user id=reborn;password=Reborn@2018;database=test_edu2;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"EduConnectionPName"
:
"MySql.Data.MySqlClient"
},
"Logging"
:
{
...
...
@@ -23,33 +23,34 @@
"ViewFileSiteUrl"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com"
,
"ImKey"
:
"b612b31e837c79c68f141aeb719d2b20"
,
"ImSecret"
:
"66000451fb72"
,
"Mongo"
:
"mongodb://192.168.
2
.214:27017"
,
"Mongo"
:
"mongodb://192.168.
5
.214:27017"
,
"MongoDBName"
:
"Mall"
,
"ProjectUrl"
:
"D:/project/GitProject/tripfriend"
,
"DeveloperKitsPort"
:
"63994"
,
"FirstPage"
:
"pages/index/index.html"
,
"ByteDanceSendTemplate"
:
"https://developer.toutiao.com/api/apps/game/template/send"
,
"sTenpayNotify"
:
"http://mallapi.oytour.com/api/WeChatNotify/Notify"
,
//微
信回调地
址
"IncomeDirector"
:
1756
,
//
财务收入创建人
"IncomeBranchId"
:
49
,
//
财务收入创建人公
司
"sTenpayNotify"
:
"http://mallapi.oytour.com/api/WeChatNotify/Notify"
,
//
�Żص���ַ
"IncomeDirector"
:
1756
,
//
�������봴����
"IncomeBranchId"
:
49
,
//
�������봴���˹�˾
"IncomeDepartment"
:
331
,
"ExpendDirector"
:
1756
,
//
财务支出创建人
"ExpendBranchId"
:
49
,
//
财务支出创建人公
司
"ExpendDirector"
:
1756
,
//
����֧��������
"ExpendBranchId"
:
49
,
//
����֧�������˹�˾
"ExpendDepartment"
:
331
,
"NetworkDirector"
:
1756
,
//
网络主管的id,用于新建供应商账户的时候的创建人
"RB_Branch_Id"
:
49
,
//
所属公司i
d
"NetworkDirector"
:
1756
,
//
�������ܵ�id�������½���Ӧ���˻���ʱ��Ĵ�����
"RB_Branch_Id"
:
49
,
//
�����˾id
"RebornDMC"
:
"reborn_dmc"
,
"IncomeFinanceApi"
:
"http://192.168.10.16:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.10.16:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"EduUpdateGoodsSpecification"
:
"http://192.168.10.17:8017/api/Order/UpdateGoodsSpecification"
,
"IncomeFinanceApi"
:
"http://192.168.5.16:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.5.16:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"EduUpdateGoodsSpecification"
:
"http://192.168.5.17:8017/api/Order/UpdateGoodsSpecification"
,
"WechatStatisticsMallBaseId"
:
"1"
,
//
20
"PayCertificateUrl"
:
"D:/project/GitProject/Shopping/Mall.WebApi/"
,
"SettlementRate"
:
"0.60"
,
//
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"RedisSetting"
:
{
"RedisServer"
:
"192.168.
2
.214"
,
"RedisServer"
:
"192.168.
5
.214"
,
"RedisPort"
:
"6379"
,
"RedisPwd"
:
"
123456
"
"RedisPwd"
:
"
Viitto2018
"
},
"VirtualDirectory"
:
"WebFile"
,
"FileService"
:
"2"
,
...
...
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