mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-03 23:56:37 +08:00
同步
This commit is contained in:
@@ -50,6 +50,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
if ( user_data!=null)
|
||||
{
|
||||
var token = MakeJwt.app(new jwtUser() {user=user_data,menuIds= menuList});
|
||||
|
||||
JobModel.visitNum += 1;
|
||||
return Result.Success().SetData(new { user = new { user_data.id, user_data.username, user_data.introduction, user_data.icon, user_data.nick }, token });
|
||||
}
|
||||
return Result.Error();
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
_cacheClientDB = cacheClientDB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查
|
||||
@@ -38,8 +38,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
[HttpGet]
|
||||
public Result GetSetting()
|
||||
{
|
||||
var setDto = Common.Helper.JsonHelper.ParseFormByJson<SettingDto>(_cacheClientDB.Get<string>(RedisConst.key));
|
||||
return Result.Success().SetData(setDto);
|
||||
var setDto = Common.Helper.JsonHelper.StrToObj<SettingDto>(_cacheClientDB.Get<string>(RedisConst.key));
|
||||
return Result.Success().SetData( setDto);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,14 +48,13 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
/// <param name="settingDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public Result UpdateSetting(SettingDto settingDto)
|
||||
public Result UpdateSetting(SettingDto settingDto)
|
||||
{
|
||||
var setDto = Common.Helper.JsonHelper.GetJSON<SettingDto>(settingDto);
|
||||
var setDto = Common.Helper.JsonHelper.ObjToStr<SettingDto>(settingDto);
|
||||
|
||||
_cacheClientDB.Set(RedisConst.key, setDto);
|
||||
_cacheClientDB.Set(RedisConst.key, setDto);
|
||||
return Result.Success();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Yi.Framework.ApiMicroservice
|
||||
#region
|
||||
//错误抓取反馈注入
|
||||
#endregion
|
||||
//app.UseErrorHandlingService();
|
||||
app.UseErrorHandlingService();
|
||||
|
||||
#region
|
||||
//静态文件注入
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"Cors_Enabled": true,
|
||||
"RabbitMQ_Enabled": false,
|
||||
"Redis_Enabled": true,
|
||||
"RedisSeed_Enabled": false,
|
||||
"RedisSeed_Enabled": true,
|
||||
"Kafka_Enabled": false,
|
||||
"MutiDB_Enabled": false,
|
||||
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
Reference in New Issue
Block a user