[後端] 修改同步取tag_quantity問題

This commit is contained in:
dev02 2023-05-15 17:43:00 +08:00
parent 8c0738addf
commit 7271af8b0e

View File

@ -75,6 +75,7 @@ namespace Backend.Controllers
catch (Exception exception)
{
apiResult.Code = "9999";
apiResult.Msg = "【" + controllerName + "/" + actionName + "】" + exception.Message;
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
}
@ -92,7 +93,9 @@ namespace Backend.Controllers
bool result = false;
ApiResult<bool> apiResult = new ApiResult<bool>();
string tag_quantity = backEndConfig.Getobixtag_quantity();
var sqlObix = $@"SELECT system_value as Value, system_key as Name FROM variable WHERE deleted = 0 AND system_type = 'obixConfig'";
var variableObix = await backendRepository.GetAllAsync<Backend.Models.KeyValue>(sqlObix);
string tag_quantity = variableObix.Where(x => x.Name == "tag_quantity").Select(x => x.Value).FirstOrDefault();
try
{
@ -125,6 +128,7 @@ namespace Backend.Controllers
catch (Exception exception)
{
apiResult.Code = "9999";
apiResult.Msg = "【" + controllerName + "/" + actionName + "】" + exception.Message;
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
}
@ -170,6 +174,7 @@ namespace Backend.Controllers
catch (Exception exception)
{
apiResult.Code = "9999";
apiResult.Msg = "【" + controllerName + "/" + actionName + "】" + exception.Message;
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
}
@ -210,6 +215,7 @@ namespace Backend.Controllers
catch (Exception exception)
{
apiResult.Code = "9999";
apiResult.Msg = "【" + controllerName + "/" + actionName + "】" + exception.Message;
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
}