1、修复mysql数据库下,报表统计sql的语法错误。2、为方便前端在不部署接口及后端的情况下测试uni-app前端,默认增加了测试接口地址,3、mysql数据库字符串增加用户自定义变量支持

pull/38/head
JianWeie 4 years ago
parent b0c11a0c45
commit d7f6bed9ac

@ -79,8 +79,8 @@ namespace CoreCms.Net.Services
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10) x2,
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10) x3,
(SELECT @xi:=-1) x0 limit 0," + num + @") tmp_x
left join(
select* from CoreCmsOrder
left join (
select * from CoreCmsOrder
where 1 = 1
" + where + @"
) o on tmp_x.x = ((cast(date(o." + joinVal + @") as signed) - " + sTime.ToString("yyyy-MM-dd") + @") div(" + section + @"))
@ -90,10 +90,6 @@ namespace CoreCms.Net.Services
var sp = new List<SugarParameter>();
//sp.Add(section == 3600 ? new SugarParameter("@dataType", "HOUR") : new SugarParameter("@dataType", "DAY"));
//sp.Add(new SugarParameter("@sTime", sTime.ToString("yyyy-MM-dd HH:mm:ss")));
//sp.Add(new SugarParameter("@where", where));
//sp.Add(new SugarParameter("@num", num));
var list = _dal.SqlQuery(sqlStr, sp);
@ -140,10 +136,10 @@ namespace CoreCms.Net.Services
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10) x1,
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10) x2,
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10) x3,
(SELECT @xi:=-1) x0 limit 0," + num + @") tmp_x
left join(
select* from CoreCmsBillPayments
where 1 = 1
(SELECT @xi:=-1) x0 limit 0," + num + @") tmp_x
left join (
select * from CoreCmsBillPayments
where 1 = 1
" + where + @"
) o on tmp_x.x = ((cast(date(o." + joinVal + @") as signed) - " + sTime.ToString("yyyy-MM-dd") + @") div(" + section + @"))
group by tmp_x.x
@ -151,10 +147,7 @@ namespace CoreCms.Net.Services
}
var sp = new List<SugarParameter>();
//sp.Add(section == 3600 ? new SugarParameter("@dataType", "HOUR") : new SugarParameter("@dataType", "DAY"));
//sp.Add(new SugarParameter("@sTime", sTime.ToString("yyyy-MM-dd HH:mm:ss")));
//sp.Add(new SugarParameter("@where", where));
//sp.Add(new SugarParameter("@num", num));
var list = _dal.SqlQuery(sqlStr, sp);
@ -214,10 +207,7 @@ namespace CoreCms.Net.Services
}
var sp = new List<SugarParameter>();
//sp.Add(section == 3600 ? new SugarParameter("@dataType", "HOUR") : new SugarParameter("@dataType", "DAY"));
//sp.Add(new SugarParameter("@sTime", sTime.ToString("yyyy-MM-dd HH:mm:ss")));
//sp.Add(new SugarParameter("@where", where));
//sp.Add(new SugarParameter("@num", num));
var list = _dal.SqlQuery(sqlStr, sp);
return list;
@ -263,10 +253,10 @@ namespace CoreCms.Net.Services
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10) x1,
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10) x2,
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10) x3,
(SELECT @xi:=-1) x0 limit 0," + num + @") tmp_x
left join(
select* from CoreCmsUserTocash
where 1 = 1
(SELECT @xi:=-1) x0 limit 0," + num + @") tmp_x
left join (
select * from CoreCmsUserTocash
where 1 = 1
" + where + @"
) o on tmp_x.x = ((cast(date(o." + joinVal + @") as signed) - " + sTime.ToString("yyyy-MM-dd") + @") div(" + section + @"))
group by tmp_x.x
@ -274,10 +264,6 @@ namespace CoreCms.Net.Services
}
var sp = new List<SugarParameter>();
//sp.Add(section == 3600 ? new SugarParameter("@dataType", "HOUR") : new SugarParameter("@dataType", "DAY"));
//sp.Add(new SugarParameter("@sTime", sTime.ToString("yyyy-MM-dd HH:mm:ss")));
//sp.Add(new SugarParameter("@where", where));
sp.Add(new SugarParameter("@xi", num));
var list = _dal.SqlQuery(sqlStr, sp);

@ -2,8 +2,8 @@
* CoreShop全局配置文件
* @version 1.0.0
*/
//接口请求地址
export const apiBaseUrl = 'https://api.demo.coreshop.com.cn';
//接口请求地址如果需要不部署接口端的情况下测试uni-app可以直接替换为官方测试接口https://api.coreshop.corecms.net
export const apiBaseUrl = 'https://api.coreshop.corecms.net';
//项目静态资源请求地址如果使用官方的静态文件地址可以直接替换为https://files.coreshop.corecms.net
export const apiFilesUrl = 'https://files.coreshop.corecms.net';

@ -14,7 +14,7 @@
dbProvider="Microsoft.Data.SqlClient.SqlConnection, Microsoft.Data.SqlClient"
connectionString="Server=127.0.0.1;Database=BaseMIS;User ID=sa;Password=123456"
-->
<target name="log_database" xsi:type="Database" dbProvider="MySql.Data.MySqlClient.MySqlConnection,Mysql.Data" connectionString="Server=mysql;Port=3306;Database=coreshop;Uid=root;Pwd=admin">
<target name="log_database" xsi:type="Database" dbProvider="MySql.Data.MySqlClient.MySqlConnection,Mysql.Data" connectionString="Server=panel.corecms.net;Port=3306;Database=CoreShopMysql;Uid=CoreShopMysql;Pwd=sstV0Qvbo7T9Zi7;CharSet=utf8;pooling=true;SslMode=None;Allow User Variables=true">
<commandText>
INSERT INTO SysNLogRecords
(LogDate,LogLevel,LogType,LogTitle,Logger,Message,MachineName,MachineIp,NetRequestMethod

@ -5,7 +5,7 @@
//SqlServerMultipleActiveResultSets=true
// Service mysql
"SqlConnection": "Server=mysql;Port=3306;Database=CoreShop;Uid=root;Pwd=admin"
"SqlConnection": "Server=127.0.0.1;Port=3306;Database=CoreShop;Uid=CoreShop;Pwd=CoreShop;CharSet=utf8;pooling=true;SslMode=None;Allow User Variables=true"
// Mysqlmysql5.7
},
//
@ -14,15 +14,15 @@
"PassWord": "CoreShop"
},
"AppConfig": {
"AppUrl": "https://admin.demo.CoreShop.com.cn/", //
"AppInterFaceUrl": "https://api.demo.CoreShop.com.cn/" //
"AppUrl": "https://admin.coreshop.corecms.net/", //
"AppInterFaceUrl": "https://api.coreshop.corecms.net/" //
},
//redisredis
"RedisConfig": {
"Enabled": false, //redis
"UseRedisMessageQueue": false, //redis
// Service redis
"ConnectionString": "redis:6379,password=123456,connectTimeout=1000,connectRetry=1,syncTimeout=10000,DefaultDatabase=8" //redis
"ConnectionString": "127.0.0.1:6379,password=CoreShop,connectTimeout=3000,connectRetry=1,syncTimeout=10000,DefaultDatabase=10" //redis
},
//jwt
"JwtConfig": {

@ -4,8 +4,9 @@
//"SqlConnection": "Server=127.0.0.1;uid=CoreShop;pwd=CoreShop;Database=CoreShop;MultipleActiveResultSets=true;"
//SqlServerMultipleActiveResultSets=true
"SqlConnection": "Server=mysql;Port=3306;Database=CoreShop;Uid=root;Pwd=admin"
// Mysqlmysql5.7
// Service mysql
"SqlConnection": "Server=127.0.0.1;Port=3306;Database=CoreShop;Uid=CoreShop;Pwd=CoreShop;CharSet=utf8;pooling=true;SslMode=None;Allow User Variables=true"
// Mysqlmysql5.7
},
//
"HangFire": {
@ -13,14 +14,15 @@
"PassWord": "CoreShop"
},
"AppConfig": {
"AppUrl": "https://admin.demo.CoreShop.com.cn/", //
"AppInterFaceUrl": "https://api.demo.CoreShop.com.cn/" //
"AppUrl": "https://admin.coreshop.corecms.net/", //
"AppInterFaceUrl": "https://api.coreshop.corecms.net/" //
},
//redisredis
"RedisConfig": {
"Enabled": false, //redis
"UseRedisMessageQueue": false, //redis
"ConnectionString": "redis:6379,password=123456,connectTimeout=1000,connectRetry=1,syncTimeout=10000,DefaultDatabase=8" //redis
// Service redis
"ConnectionString": "127.0.0.1:6379,password=CoreShop,connectTimeout=3000,connectRetry=1,syncTimeout=10000,DefaultDatabase=10" //redis
},
//jwt
"JwtConfig": {

Loading…
Cancel
Save