Commit 93a5f40a authored by 黄奎's avatar 黄奎

配置文件调整

parent 9681905b
......@@ -20,6 +20,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Web;
using Microsoft.Extensions.Hosting;
using System.Drawing;
namespace Mall.Common
{
......@@ -798,5 +799,39 @@ namespace Mall.Common
}
}
/// <summary>
/// 腾讯OSS配置
/// </summary>
public static JObject TencentOSS
{
get
{
JObject ossObj=new JObject();
ossObj["region"] = ReadConfigKey("tencentOSS", "region");
ossObj["bucket"] = ReadConfigKey("tencentOSS", "bucket");
ossObj["accessKeyId"] = ReadConfigKey("tencentOSS", "accessKeyId");
ossObj["accessKeySecret"] = ReadConfigKey("tencentOSS", "accessKeySecret");
ossObj["domain"] = ReadConfigKey("tencentOSS", "domain");
return ossObj;
}
}
/// <summary>
/// 阿里OSS配置
/// </summary>
public static JObject AliOSS
{
get
{
JObject ossObj = new JObject();
ossObj["region"] = ReadConfigKey("tencentOSS", "region");
ossObj["bucket"] = ReadConfigKey("tencentOSS", "bucket");
ossObj["accessKeyId"] = ReadConfigKey("tencentOSS", "accessKeyId");
ossObj["accessKeySecret"] = ReadConfigKey("tencentOSS", "accessKeySecret");
ossObj["domain"] = ReadConfigKey("tencentOSS", "domain");
return ossObj;
}
}
}
}
\ No newline at end of file
......@@ -54,6 +54,16 @@ namespace Mall.ThirdCore.Commom
return JObject.Parse(aliOss.ToString());
}
}
public static JObject TencentOSS
{
get
{
string aliOss = ReadConfigKey("AliSms");
return JObject.Parse(aliOss.ToString());
}
}
/// <summary>
/// 获取JPush配置
/// </summary>
......
......@@ -15,5 +15,5 @@
"masterSecret": "dda819c1de00c64ae0fad4c7"
},
//消息推送rabbit配置(ip,端口,账号,密码,推送队列名)
"WebPushRabbitConfig": "192.168.10.214,5672,rbAdmin,rbadmin123456,WebPushRabbitMQ"
"WebPushRabbitConfig": "192.168.5.214,5672,rbAdmin,rbadmin123456,WebPushRabbitMQ"
}
......@@ -25,7 +25,7 @@ namespace Mall.ThirdCore.Message
};
IsFinish = false;
string content = QueueHelper.Queue.Dequeue() as string;
Run(content);
//Run(content);
Init();
}
......@@ -34,11 +34,10 @@ namespace Mall.ThirdCore.Message
try
{
JObject obj = JObject.Parse(content);
switch (obj["cmd"].ToString().ToLower())
{
case "sms":
SendSMS(obj);
//SendSMS(obj);
break;
default:
break;
......
......@@ -12,6 +12,7 @@ using Mall.ThirdCore.Oss;
using Mall.Module.BaseSetUp;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json.Linq;
using Microsoft.AspNetCore.Authorization;
namespace Mall.WebApi.Controllers.File
{
......@@ -128,7 +129,7 @@ namespace Mall.WebApi.Controllers.File
var files = Request.Form.Files;
if (files.Count == 0)
{
return new ApiResult { resultCode = (int)ResultCode.Fail, message = "未选择文件", data = "" };
return new ApiResult { resultCode = (int)ResultCode.Fail, message = "未选择文件", data = "" };
}
string filename = files[0].FileName;
string fileExtention = System.IO.Path.GetExtension(files[0].FileName);
......@@ -151,9 +152,26 @@ namespace Mall.WebApi.Controllers.File
if (MallBaseId > 0)
{
var fileModel = mallBaseModule.GetFileStoreList(new Model.Entity.BaseSetUp.RB_File_Store { MallBaseId = MallBaseId, IsDefault = 1 }).FirstOrDefault();
if (fileModel != null) {
if (fileModel != null)
{
if (fileModel.StoreType == Common.Enum.MallBase.StoreTypeEnum.Tencent)
{
if (string.IsNullOrEmpty(fileModel.Region))
{
fileModel.Region = Common.Config.TencentOSS.GetStringValue("region");
}
if (string.IsNullOrEmpty(fileModel.SecretId))
{
fileModel.SecretId = Common.Config.TencentOSS.GetStringValue("accessKeyId");
}
if (string.IsNullOrEmpty(fileModel.SecretKey))
{
fileModel.SecretKey = Common.Config.TencentOSS.GetStringValue("accessKeySecret");
}
if (string.IsNullOrEmpty(fileModel.Bucket))
{
fileModel.Bucket = Common.Config.TencentOSS.GetStringValue("bucket");
}
IsDefault = false;
IOssService ossService = OssService.GetTencent(fileModel.Region, fileModel.SecretId, fileModel.SecretKey, fileModel.Bucket);
OssResult result = ossService.UploadFile(path_server, null);
......@@ -166,8 +184,25 @@ namespace Mall.WebApi.Controllers.File
}
return ApiResult.Success("", Common.Config.GetFileUrl(result.data.ToString()));
}
else if (fileModel.StoreType == Common.Enum.MallBase.StoreTypeEnum.Alicloud) {
else if (fileModel.StoreType == Common.Enum.MallBase.StoreTypeEnum.Alicloud)
{
IsDefault = false;
if (string.IsNullOrEmpty(fileModel.Region))
{
fileModel.Region = Common.Config.AliOSS.GetStringValue("region");
}
if (string.IsNullOrEmpty(fileModel.SecretId))
{
fileModel.SecretId = Common.Config.AliOSS.GetStringValue("accessKeyId");
}
if (string.IsNullOrEmpty(fileModel.SecretKey))
{
fileModel.SecretKey = Common.Config.AliOSS.GetStringValue("accessKeySecret");
}
if (string.IsNullOrEmpty(fileModel.Bucket))
{
fileModel.Bucket = Common.Config.AliOSS.GetStringValue("bucket");
}
IOssService ossService = OssService.GetAli(fileModel.Region, fileModel.SecretId, fileModel.SecretKey, fileModel.Bucket);
OssResult result = ossService.UploadFile(path_server, null);
try
......
......@@ -198,7 +198,7 @@ namespace Mall.WebApi
register.UseSenparcWeixin(senparcWeixinSetting.Value, senparcSetting.Value);
System.WebHttpContext.HttpContext.Configure(app.ApplicationServices.GetRequiredService<Microsoft.AspNetCore.Http.IHttpContextAccessor>());
//启动信息发送
Task.Run(() => MessageCore.Init());
//Task.Run(() => MessageCore.Init());
//获取前面注入的Quartz调度类
//var quartz = app.ApplicationServices.GetRequiredService<QuartzHelper>();
......
{
"ConnectionStrings": {
"DefaultConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_mall;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"DefaultConnection": "server=192.168.5.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; ",
"FinanceConnection": "server=192.168.5.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"FinanceConnectionPName": "MySql.Data.MySqlClient",
"UserConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_user;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"UserConnection": "server=192.168.5.214;user id=reborn;password=Reborn@2018;database=reborn_user;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"UserConnectionPName": "MySql.Data.MySqlClient",
"PropertyConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=property;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"PropertyConnection": "server=192.168.5.214;user id=reborn;password=Reborn@2018;database=property;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"PropertyConnectionPName": "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",
"ThinkConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_think;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"ThinkConnection": "server=192.168.5.214;user id=reborn;password=Reborn@2018;database=reborn_think;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"ThinkConnectionPName": "MySql.Data.MySqlClient"
},
"Logging": {
......@@ -31,7 +31,7 @@
"ApiExpirTime": 2592000,
"AllowedHosts": "*",
"OpenValidation": "False",
"UploadSiteUrl": "http://192.168.10.214:8120",
"UploadSiteUrl": "http://192.168.5.214:8120",
"ViewFileSiteUrl": "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com",
"AliFileSiteUrl": "https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com",
"ImKey": "b612b31e837c79c68f141aeb719d2b20",
......@@ -41,21 +41,21 @@
"ProjectUrl": "D:/project/GitProject/mallapp",
"DeveloperKitsPort": "15720",
"FirstPage": "pages/index/index.html",
"ByteDanceSendTemplate": "https://developer.toutiao.com/api/apps/game/template/send",
"sTenpayNotify": "http://mallapi.oytour.com/api/WeChatNotify/Notify", //΢����Ʒ�ص���ַ
"sTenpayRechargeNotify": "http://mallapi.oytour.com/api/WeChatNotify/RechargeNotify", //΢�ų�ֵ�ص���ַ
"sTenpayMemberBuyNotify": "http://mallapi.oytour.com/api/WeChatNotify/MemberBuyNotify", //΢�ų�ֵ�ص���ַ
"sTenpayVipBuyNotify": "http://mallapi.oytour.com/api/WeChatNotify/VipBuyNotify", //΢�Ź���VIP�ص���ַ
"sTenpayActivityNotify": "http://mallapi.oytour.com/api/WeChatNotify/ActivityNotify", //������������֧���ص���ַ
"NetworkDirector": 1756, //�������ܵ�id�������½���Ӧ���˻���ʱ��Ĵ�����
"RB_Branch_Id": 49, //�����˾id
"IncomeDirector": 1756, //�������봴����
"IncomeBranchId": 49, //�������봴���˹�˾
"ByteDanceSendTemplate": "https://developer.toutiao.com/api/apps/game/template/send", //抖音发送消息模板
"sTenpayNotify": "http://mallapi.oytour.com/api/WeChatNotify/Notify", //微信支付成功接口处理地址
"sTenpayRechargeNotify": "http://mallapi.oytour.com/api/WeChatNotify/RechargeNotify", //΢微信充值支付成功接口处理地址
"sTenpayMemberBuyNotify": "http://mallapi.oytour.com/api/WeChatNotify/MemberBuyNotify", //΢微信购买支付成功接口处理地址
"sTenpayVipBuyNotify": "http://mallapi.oytour.com/api/WeChatNotify/VipBuyNotify", //VIP购买会员微信购买支付成功接口处理地址
"sTenpayActivityNotify": "http://mallapi.oytour.com/api/WeChatNotify/ActivityNotify", //赞羊教育活动报名支付成功接口处理地址
"NetworkDirector": 1756, //网络主管的id,用于新建供应商账户的时候的创建人
"RB_Branch_Id": 49, //公司id
"IncomeDirector": 1756, //收款创建人的id,用于新建供应商账户的时候的创建人
"IncomeBranchId": 49, //收款创建人公司id
"IncomeDepartment": 331,
"ExpendDirector": 1756, //����֧��������
"ExpendBranchId": 49, //����֧�������˹�˾
"ExpendDirector": 1756, //付款创建人的id,用于新建供应商账户的时候的创建人
"ExpendBranchId": 49, //付款创建人公司id
"ExpendDepartment": 331,
"XuZongUserId": 111790, //���ܵ�id�������������¶���
"XuZongUserId": 111790, //徐总的id,用于区分线下订单
"RebornDMC": "reborn_dmc",
"PropertyDB": "test_property",
"IncomeFinanceApi": "http://192.168.10.2:8083/api/Mall/InsertFinanceBatchForMallIn",
......@@ -68,25 +68,25 @@
"FinanceKey": "FinanceMallInsertToERPViitto2020",
"SettlementRate": "0.60",
"EduSettlementRate": "0.54",
"EduXuZongId": 2602, //���ܵ�id�������������¶���
"EduXuZongId": 2602, //教育erp徐总的id,用于区分线下订单
"EduActivityIncomeFinanceId": "9",
"EduActivityExpendFinanceId": "9",
"EduRollCallActionCode": "ActivityRollCall",
"RedisSetting": {
"RedisServer": "192.168.10.214",
"RedisServer": "192.168.5.214",
"RedisPort": "6379",
"RedisPwd": "Viitto2018"
},
"VirtualDirectory": "WebFile",
"FileService": "2",
"IsNormalServer": 2,
"IsFirtsShopAutoExamine": 1, //�׵���ҵ��֤�Ƿ��ֶ����
"IsFirtsShopAutoExamine": 1, //首店企业认证是否自动审核,1-是
"FinanceSetting": {
"TenantId": 1,
"MallBaseId": 1,
"RemitTypeId": 10,
"RemitAccountId": 3012,
"ProcurementCTId": 224, //���²ɹ�
"ProcurementCTId": 224, //费用类型Id
"ProcurementFWId": 127,
"ProcurementDirector": 1756,
"ProcurementBranchId": 49,
......@@ -105,6 +105,22 @@
"HPSLShareConfig": {
"ShareImg": "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708660644000_869.jpg"
},
//�㸶���»ص�����˼ά�ӿڵ�ַ
"JJSWAdminApi": "http://192.168.10.128:5005"
//汇付天下回调进阶思维接口地址
"JJSWAdminApi": "http://192.168.10.128:5005",
//腾讯OSS配置
"tencentOSS": {
"region": "ap-chengdu",
"bucket": "viitto-1301420277",
"accessKeyId": "AKIDDPnbIzi8C1eqEOPP8dw6MNAg9H9ldDKd",
"accessKeySecret": "PdcLtOjslUzNFYdU4OSI1fKtdHpFT2Ob",
"domain": "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com"
},
//阿里OSS配置
"aliOSS": {
"region": "oss-cn-chengdu.aliyuncs.com",
"bucket": "vt-im-bucket",
"accessKeyId": "LTAI5tFgqt1pwnoA35cigYTr",
"accessKeySecret": "wXPoEqJ7qLdvX9iBluIebhCPSzoemy",
"domain": "https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com"
}
}
\ No newline at end of file
{
"ConnectionStrings": {
"DefaultConnection": "server=rm-bp1tj77h6kp0d02fbio.mysql.rds.aliyuncs.com;user id=reborn;password=Reborn@2018;database=uat_reborn_mall;CharSet=utf8; Convert Zero Datetime=true; ",
"DefaultConnectionPName": "MySql.Data.MySqlClient"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"JwtSecretKey": "@VIITTOREBORN*2018",
"JwtExpirTime": 2592000,
"ApiExpirTime": 2592000,
"AllowedHosts": "*",
"OpenValidation": "False",
"UploadSiteUrl": "http://192.168.10.214:8120",
"ViewFileSiteUrl": "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com",
"ImKey": "b612b31e837c79c68f141aeb719d2b20",
"ImSecret": "66000451fb72",
"Mongo": "mongodb://47.96.25.130: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",
"RedisSetting": {
"RedisServer": "47.96.23.199",
"RedisPort": "6379",
"RedisPwd": "Viitto2018"
},
"VirtualDirectory": "WebFile",
"FileService": "2",
"InitializeImages": {
"GradeEntranceImage": "1234566778"
}
}
\ No newline at end of file
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