(tenant_id: str, select_key: str)
| 47 | |
| 48 | |
| 49 | def get_single_config_info(tenant_id: str, select_key: str): |
| 50 | with get_db_session() as session: |
| 51 | result = session.query(TenantConfig).filter( |
| 52 | TenantConfig.tenant_id == tenant_id, |
| 53 | TenantConfig.config_key == select_key, |
| 54 | TenantConfig.delete_flag == "N" |
| 55 | ).first() |
| 56 | |
| 57 | if result: |
| 58 | record_info = { |
| 59 | "config_value": result.config_value, |
| 60 | "tenant_config_id": result.tenant_config_id |
| 61 | } |
| 62 | |
| 63 | return record_info |
| 64 | else: |
| 65 | return {} |
| 66 | |
| 67 | |
| 68 | def insert_config(insert_data: Dict[str, Any]): |