fix: delete ims user and voip auth
This commit is contained in:
@@ -82,6 +82,10 @@ func (r *IMSUserRepository) SelectPage(query map[string]any) map[string]any {
|
||||
conditions = append(conditions, "msisdn like concat(concat('%', ?), '%')")
|
||||
params = append(params, strings.Trim(v.(string), " "))
|
||||
}
|
||||
if v, ok := query["tag"]; ok && v != "" {
|
||||
conditions = append(conditions, "tag=?")
|
||||
params = append(params, strings.Trim(v.(string), " "))
|
||||
}
|
||||
if v, ok := query["imsis"]; ok && v != "" {
|
||||
placeholder := repo.KeyPlaceholderByQuery(len(v.([]any)))
|
||||
conditions = append(conditions, fmt.Sprintf("imsi in (%s)", placeholder))
|
||||
@@ -240,7 +244,7 @@ func (r *IMSUserRepository) Inserts(uArr []model.IMSUser) int64 {
|
||||
|
||||
// Delete 删除实体
|
||||
func (r *IMSUserRepository) Delete(imsi, neId string) int64 {
|
||||
tx := datasource.DefaultDB().Where("imsi = ? and ne_id = ?", imsi, neId).Delete(&IMSUserRepository{})
|
||||
tx := datasource.DefaultDB().Where("imsi = ? and ne_id = ?", imsi, neId).Delete(&model.IMSUser{})
|
||||
if err := tx.Error; err != nil {
|
||||
logger.Errorf("Delete err => %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user