Commit 4541a85a authored by 吴春's avatar 吴春

1

parent 0b109486
...@@ -227,8 +227,10 @@ namespace Mall.Common ...@@ -227,8 +227,10 @@ namespace Mall.Common
} }
} }
public static string GetAliOssFileUrl { public static string GetAliOssFileUrl
get { {
get
{
return ReadConfigKey("AliFileSiteUrl"); return ReadConfigKey("AliFileSiteUrl");
} }
} }
...@@ -616,6 +618,18 @@ namespace Mall.Common ...@@ -616,6 +618,18 @@ namespace Mall.Common
} }
} }
/// <summary>
/// 需要同步小程序统计数据的MallBaseId(格式1,2,3)
/// </summary>
public static string WechatStatisticsMallBaseId
{
get
{
return ReadConfigKey("WechatStatisticsMallBaseId");
}
}
/// <summary> /// <summary>
/// 生成收入财务单据 /// 生成收入财务单据
/// </summary> /// </summary>
...@@ -692,7 +706,7 @@ namespace Mall.Common ...@@ -692,7 +706,7 @@ namespace Mall.Common
return ReadConfigKey("EduSettlementRate"); return ReadConfigKey("EduSettlementRate");
} }
} }
/// <summary> /// <summary>
/// 资产管理数据库 /// 资产管理数据库
...@@ -807,7 +821,7 @@ namespace Mall.Common ...@@ -807,7 +821,7 @@ namespace Mall.Common
{ {
get get
{ {
JObject ossObj=new JObject(); JObject ossObj = new JObject();
ossObj["region"] = ReadConfigKey("tencentOSS", "region"); ossObj["region"] = ReadConfigKey("tencentOSS", "region");
ossObj["bucket"] = ReadConfigKey("tencentOSS", "bucket"); ossObj["bucket"] = ReadConfigKey("tencentOSS", "bucket");
ossObj["accessKeyId"] = ReadConfigKey("tencentOSS", "accessKeyId"); ossObj["accessKeyId"] = ReadConfigKey("tencentOSS", "accessKeyId");
......
...@@ -5,7 +5,7 @@ namespace Mall.WindowsService.Helper ...@@ -5,7 +5,7 @@ namespace Mall.WindowsService.Helper
{ {
public class TimersHelper public class TimersHelper
{ {
private static int inTimer6 = 0; private static int inTimer6 = 0;
private static int inTimer7 = 0; private static int inTimer7 = 0;
private static int inTimer8 = 0; private static int inTimer8 = 0;
...@@ -23,17 +23,17 @@ namespace Mall.WindowsService.Helper ...@@ -23,17 +23,17 @@ namespace Mall.WindowsService.Helper
{ {
Thread.Sleep(1000 * 60); Thread.Sleep(1000 * 60);
LogHelper.Write("RevenueFinance=====Start"); LogHelper.Write("RevenueFinance=====Start");
bool flag= Module.FinanceModule.OrderIncomeFinanceModule(); bool flag = Module.FinanceModule.OrderIncomeFinanceModule();
LogHelper.Write("RevenueFinance=====End " + flag); LogHelper.Write("RevenueFinance=====End " + flag);
#region 退款制单 #region 退款制单
LogHelper.Write("AutoCreateFinanceRefund=====Start"); LogHelper.Write("AutoCreateFinanceRefund=====Start");
flag= Module.FinanceModule.AutoCreateFinanceRefund(); flag = Module.FinanceModule.AutoCreateFinanceRefund();
LogHelper.Write("AutoCreateFinanceRefund=====End "+flag); LogHelper.Write("AutoCreateFinanceRefund=====End " + flag);
#endregion #endregion
#region 分享商VIP过期时间 #region 分享商VIP过期时间
LogHelper.Write("DistributorVipModule=====Start"); LogHelper.Write("DistributorVipModule=====Start");
flag= Module.FinanceModule.DistributorVipModule(); flag = Module.FinanceModule.DistributorVipModule();
LogHelper.Write("DistributorVipModule=====End "+flag); LogHelper.Write("DistributorVipModule=====End " + flag);
#endregion #endregion
#region 电商统计 #region 电商统计
...@@ -43,7 +43,7 @@ namespace Mall.WindowsService.Helper ...@@ -43,7 +43,7 @@ namespace Mall.WindowsService.Helper
LogHelper.Write("UpdateToDayUserStatistics=====Start"); LogHelper.Write("UpdateToDayUserStatistics=====Start");
try try
{ {
flag= new Module.UserStatisticsModule().UpdateToDayUserStatistics("", ""); flag = new Module.UserStatisticsModule().UpdateToDayUserStatistics("", "");
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -68,12 +68,27 @@ namespace Mall.WindowsService.Helper ...@@ -68,12 +68,27 @@ namespace Mall.WindowsService.Helper
{ {
Thread.Sleep(1000 * 60); Thread.Sleep(1000 * 60);
LogHelper.Write("AutoCancelOrder=====Start"); LogHelper.Write("AutoCancelOrder=====Start");
bool flag= Module.FinanceModule.AutoCancelOrder(); bool flag = Module.FinanceModule.AutoCancelOrder();
LogHelper.Write("AutoCancelOrder=====End " + flag); 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>
/// 自动收货订单 /// 自动收货订单
/// </summary> /// </summary>
......
...@@ -7,7 +7,7 @@ namespace Mall.WindowsService ...@@ -7,7 +7,7 @@ namespace Mall.WindowsService
{ {
static void Main(string[] args) static void Main(string[] args)
{ {
// Module.FinanceModule.AutoCancelOrder(); //Module.CuiPingModule.AddWechatStatistics();
ServiceBase[] services = new ServiceBase[] { new WindowsService() }; ServiceBase[] services = new ServiceBase[] { new WindowsService() };
ServiceBase.Run(services); ServiceBase.Run(services);
} }
......
...@@ -14,6 +14,7 @@ namespace Mall.WindowsService ...@@ -14,6 +14,7 @@ namespace Mall.WindowsService
//private System.Timers.Timer timer8;//会员购买储值卡收入 //private System.Timers.Timer timer8;//会员购买储值卡收入
//private System.Timers.Timer timer9;//相亲每日随机查询信息删除 //private System.Timers.Timer timer9;//相亲每日随机查询信息删除
//private System.Timers.Timer timer10; //教育咖啡劵 //private System.Timers.Timer timer10; //教育咖啡劵
private System.Timers.Timer timer11; //定时同步翠屏商务局的小程序统计信息
public WindowsService() public WindowsService()
{ {
InitializeComponent(); InitializeComponent();
...@@ -121,6 +122,17 @@ namespace Mall.WindowsService ...@@ -121,6 +122,17 @@ namespace Mall.WindowsService
//timer10.Enabled = true; //timer10.Enabled = true;
#endregion #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() protected override void OnStop()
......
{ {
"ConnectionStrings": { "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", "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", "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" "EduConnectionPName": "MySql.Data.MySqlClient"
}, },
"Logging": { "Logging": {
...@@ -23,33 +23,34 @@ ...@@ -23,33 +23,34 @@
"ViewFileSiteUrl": "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com", "ViewFileSiteUrl": "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com",
"ImKey": "b612b31e837c79c68f141aeb719d2b20", "ImKey": "b612b31e837c79c68f141aeb719d2b20",
"ImSecret": "66000451fb72", "ImSecret": "66000451fb72",
"Mongo": "mongodb://192.168.2.214:27017", "Mongo": "mongodb://192.168.5.214:27017",
"MongoDBName": "Mall", "MongoDBName": "Mall",
"ProjectUrl": "D:/project/GitProject/tripfriend", "ProjectUrl": "D:/project/GitProject/tripfriend",
"DeveloperKitsPort": "63994", "DeveloperKitsPort": "63994",
"FirstPage": "pages/index/index.html", "FirstPage": "pages/index/index.html",
"ByteDanceSendTemplate": "https://developer.toutiao.com/api/apps/game/template/send", "ByteDanceSendTemplate": "https://developer.toutiao.com/api/apps/game/template/send",
"sTenpayNotify": "http://mallapi.oytour.com/api/WeChatNotify/Notify", //微信回调地 "sTenpayNotify": "http://mallapi.oytour.com/api/WeChatNotify/Notify", //΢�Żص���ַ
"IncomeDirector": 1756, //财务收入创建人 "IncomeDirector": 1756, //�������봴����
"IncomeBranchId": 49, //财务收入创建人公 "IncomeBranchId": 49, //�������봴���˹�˾
"IncomeDepartment": 331, "IncomeDepartment": 331,
"ExpendDirector": 1756, //财务支出创建人 "ExpendDirector": 1756, //����֧��������
"ExpendBranchId": 49, //财务支出创建人公 "ExpendBranchId": 49, //����֧�������˹�˾
"ExpendDepartment": 331, "ExpendDepartment": 331,
"NetworkDirector": 1756, //网络主管的id,用于新建供应商账户的时候的创建人 "NetworkDirector": 1756, //�������ܵ�id�������½���Ӧ���˻���ʱ��Ĵ�����
"RB_Branch_Id": 49, //所属公司id "RB_Branch_Id": 49, //�����˾id
"RebornDMC": "reborn_dmc", "RebornDMC": "reborn_dmc",
"IncomeFinanceApi": "http://192.168.10.16:8083/api/Mall/InsertFinanceBatchForMallIn", "IncomeFinanceApi": "http://192.168.5.16:8083/api/Mall/InsertFinanceBatchForMallIn",
"PaymentFinanceApi": "http://192.168.10.16:8083/api/Mall/InsertFinanceBatchForMallOut", "PaymentFinanceApi": "http://192.168.5.16:8083/api/Mall/InsertFinanceBatchForMallOut",
"EduUpdateGoodsSpecification": "http://192.168.10.17:8017/api/Order/UpdateGoodsSpecification", "EduUpdateGoodsSpecification": "http://192.168.5.17:8017/api/Order/UpdateGoodsSpecification",
"WechatStatisticsMallBaseId": "1",//20
"PayCertificateUrl": "D:/project/GitProject/Shopping/Mall.WebApi/", "PayCertificateUrl": "D:/project/GitProject/Shopping/Mall.WebApi/",
"SettlementRate": "0.60", "SettlementRate": "0.60",
//"FinanceKey": "FinanceMallInsertToERPViitto2020", //"FinanceKey": "FinanceMallInsertToERPViitto2020",
"FinanceKey": "FinanceMallInsertToERPViitto2020", "FinanceKey": "FinanceMallInsertToERPViitto2020",
"RedisSetting": { "RedisSetting": {
"RedisServer": "192.168.2.214", "RedisServer": "192.168.5.214",
"RedisPort": "6379", "RedisPort": "6379",
"RedisPwd": "123456" "RedisPwd": "Viitto2018"
}, },
"VirtualDirectory": "WebFile", "VirtualDirectory": "WebFile",
"FileService": "2", "FileService": "2",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment