fix: update tenancy failed

This commit is contained in:
2024-06-25 17:06:04 +08:00
parent 0faeb1e0ca
commit 267904be29
5 changed files with 10 additions and 5 deletions

View File

@@ -236,6 +236,10 @@ func (r *SysTenantImpl) IsUniqueTenancy(sysTenant model.SysTenant) bool {
// 查询条件拼接
var conditions []string
var params []any
if sysTenant.TenantID != "" {
conditions = append(conditions, "tenant_id != ?")
params = append(params, sysTenant.TenantID)
}
if sysTenant.TenancyType != "" {
conditions = append(conditions, "tenancy_type = ?")
params = append(params, sysTenant.TenancyType)