[後端] 修改新增判斷重複增加條件過濾是啓用中的
This commit is contained in:
parent
3e8a1fef4c
commit
276e0052d7
@ -496,7 +496,7 @@ namespace Backend.Controllers
|
||||
try
|
||||
{
|
||||
var check = await backendRepository.GetOneAsync<string>($@"select floor_guid from variable where floor_guid != {post.Floor_guid} and building_tag = '{post.Building_tag}' and
|
||||
full_name = '{post.Full_name}';");
|
||||
full_name = '{post.Full_name}' and deleted = 0;");
|
||||
if (!string.IsNullOrEmpty(check))
|
||||
{
|
||||
apiResult.Code = "9998";
|
||||
|
@ -99,7 +99,7 @@ namespace Backend.Controllers
|
||||
|
||||
object param = new { Deleted = 0, id = post.id };
|
||||
|
||||
var check = await backendRepository.GetOneAsync<string>($"select id from variable where id != {post.id} and system_type = '{main_system_type}' and system_value = '{post.system_value}';");
|
||||
var check = await backendRepository.GetOneAsync<string>($"select id from variable where id != {post.id} and system_type = '{main_system_type}' and system_value = '{post.system_value}' and deleted = 0;");
|
||||
if (!string.IsNullOrEmpty(check))
|
||||
{
|
||||
apiResult.Code = "9998";
|
||||
@ -317,7 +317,7 @@ namespace Backend.Controllers
|
||||
|
||||
try
|
||||
{
|
||||
var check = await backendRepository.GetOneAsync<string>($"select id from variable where id != {post.id} and system_type = '{sub_system_type}' and system_value = '{post.system_value}';");
|
||||
var check = await backendRepository.GetOneAsync<string>($"select id from variable where id != {post.id} and system_type = '{sub_system_type}' and system_value = '{post.system_value}' and deleted = 0;");
|
||||
if (!string.IsNullOrEmpty(check))
|
||||
{
|
||||
apiResult.Code = "9998";
|
||||
|
@ -314,7 +314,7 @@ namespace Backend.Controllers
|
||||
|
||||
try
|
||||
{
|
||||
var check = await backendRepository.GetOneAsync<string>($"select role_guid from role where role_guid != '{post.Id}' and full_name = '{post.Name}';");
|
||||
var check = await backendRepository.GetOneAsync<string>($"select role_guid from role where role_guid != '{post.Id}' and full_name = '{post.Name}' and deleted = 0;");
|
||||
if (!string.IsNullOrEmpty(check))
|
||||
{
|
||||
apiResult.Code = "9998";
|
||||
|
@ -129,7 +129,7 @@ namespace Backend.Controllers
|
||||
try
|
||||
{
|
||||
var check = await backendRepository.GetOneAsync<string>($@"select id from variable where id != {post.id} and system_type = '{post.System_type}' and system_value = '{post.system_value}'
|
||||
and system_key = '{post.System_key}';");
|
||||
and system_key = '{post.System_key}' and deleted = 0;");
|
||||
if (!string.IsNullOrEmpty(check))
|
||||
{
|
||||
apiResult.Code = "9998";
|
||||
|
Loading…
Reference in New Issue
Block a user