[Backend]修正缺少參數導致無法正確刪除權限的Bug
This commit is contained in:
		
							parent
							
								
									f906ffb799
								
							
						
					
					
						commit
						1f0b200ef8
					
				| @ -458,7 +458,7 @@ namespace Backend.Controllers | |||||||
|             { |             { | ||||||
|                 await backendRepository.PurgeOneByGuidWithCustomDBNameAndTable("building_menu", $"building_tag = '{post.building_tag}' and main_system_tag = '{post.main_system_tag}' and sub_system_tag = '{post.sub_system_tag}'"); |                 await backendRepository.PurgeOneByGuidWithCustomDBNameAndTable("building_menu", $"building_tag = '{post.building_tag}' and main_system_tag = '{post.main_system_tag}' and sub_system_tag = '{post.sub_system_tag}'"); | ||||||
|                 var subV = await backendRepository.GetOneAsync<VariableInfo>(@$"select * from variable where system_value = @sub_system_tag and system_type = @sub_system_type and deleted = 0", new { sub_system_tag = post.sub_system_tag, sub_system_type = sub_system_type }); |                 var subV = await backendRepository.GetOneAsync<VariableInfo>(@$"select * from variable where system_value = @sub_system_tag and system_type = @sub_system_type and deleted = 0", new { sub_system_tag = post.sub_system_tag, sub_system_type = sub_system_type }); | ||||||
|                 var authcode = await backendRepository.GetOneAsync<string>(@$"select AuthCode from auth_page where building_tag = @building_tag and ShowView = @sub_id", new {post.building_tag, subV.id}); |                 var authcode = await backendRepository.GetOneAsync<string>(@$"select AuthCode from auth_page where building_tag = @building_tag and ShowView = @sub_id", new { building_tag = post.building_tag, sub_id = subV.id}); | ||||||
|                 if (authcode != null) |                 if (authcode != null) | ||||||
|                 { |                 { | ||||||
|                     await backendRepository.PurgeOneByGuidWithCustomDBNameAndTable("role_auth", $" AuthCode = '{authcode}'"); |                     await backendRepository.PurgeOneByGuidWithCustomDBNameAndTable("role_auth", $" AuthCode = '{authcode}'"); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user