fix: delete ims user and voip auth
This commit is contained in:
@@ -4,13 +4,13 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"be.ems/features/ue/model"
|
||||
dborm "be.ems/lib/core/datasource"
|
||||
"be.ems/lib/log"
|
||||
"be.ems/src/framework/datasource"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/framework/utils/repo"
|
||||
"be.ems/features/ue/model"
|
||||
)
|
||||
|
||||
// 实例化数据层 VoIPAuthRepository 结构体
|
||||
@@ -22,11 +22,10 @@ var NewVoIPAuthRepository = &VoIPAuthRepository{
|
||||
left join sys_tenant t on t.tenant_id = s.tenant_id and t.status = 1`,
|
||||
|
||||
resultMap: map[string]string{
|
||||
"id": "ID",
|
||||
"ne_id": "NeId",
|
||||
"user_name": "UserName",
|
||||
"password": "Password",
|
||||
|
||||
"id": "ID",
|
||||
"ne_id": "NeId",
|
||||
"user_name": "UserName",
|
||||
"password": "Password",
|
||||
|
||||
"tenant_id": "TenantID",
|
||||
"tenant_name": "TenantName", // Tenant name for multi-tenancy
|
||||
@@ -235,7 +234,7 @@ func (r *VoIPAuthRepository) Inserts(uArr []model.VoIPAuth) int64 {
|
||||
|
||||
// Delete 删除实体
|
||||
func (r *VoIPAuthRepository) Delete(userName, neId string) int64 {
|
||||
tx := datasource.DefaultDB().Where("user_name = ? and ne_id = ?", userName, neId).Delete(&VoIPAuthRepository{})
|
||||
tx := datasource.DefaultDB().Where("user_name = ? and ne_id = ?", userName, neId).Delete(&model.VoIPAuth{})
|
||||
if err := tx.Error; err != nil {
|
||||
logger.Errorf("Delete err => %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user