作者 陈志颖

fix:修复通过合伙人类型名称导出问题

@@ -325,7 +325,8 @@ func (dao OrderBaseDao) OrderListForExcel(companyId int64, partnerName string, o @@ -325,7 +325,8 @@ func (dao OrderBaseDao) OrderListForExcel(companyId int64, partnerName string, o
325 sqlstr += ` AND t1.partner_category@>'{"id":?}' ` 325 sqlstr += ` AND t1.partner_category@>'{"id":?}' `
326 } 326 }
327 if len(partnerCategoryName) > 0 { 327 if len(partnerCategoryName) > 0 {
328 - params = append(params, partnerCategoryName) 328 + like := "%" + partnerCategoryName + "%"
  329 + params = append(params, like)
329 sqlstr += ` AND t1.partner_category->> 'name' like ?` 330 sqlstr += ` AND t1.partner_category->> 'name' like ?`
330 } 331 }
331 if len(updateTime[0]) > 0 { 332 if len(updateTime[0]) > 0 {
@@ -67,8 +67,8 @@ func (repository *ColumnSettingRepository) Save(columnSetting *domain.ColumnSett @@ -67,8 +67,8 @@ func (repository *ColumnSettingRepository) Save(columnSetting *domain.ColumnSett
67 func (repository *ColumnSettingRepository) Remove(columnSetting *domain.ColumnSetting, columnSettings []*domain.ColumnSetting) (*domain.ColumnSetting, []*domain.ColumnSetting, error) { 67 func (repository *ColumnSettingRepository) Remove(columnSetting *domain.ColumnSetting, columnSettings []*domain.ColumnSetting) (*domain.ColumnSetting, []*domain.ColumnSetting, error) {
68 tx := repository.transactionContext.PgTx 68 tx := repository.transactionContext.PgTx
69 69
  70 + // 单个删除
70 if columnSetting != nil { 71 if columnSetting != nil {
71 - // 单个删除  
72 columnSettingModel := new(models.ColumnSetting) 72 columnSettingModel := new(models.ColumnSetting)
73 columnSettingModel.Id = columnSetting.Identify().(int64) 73 columnSettingModel.Id = columnSetting.Identify().(int64)
74 if _, err := tx.Model(columnSettingModel).WherePK().Delete(); err != nil { 74 if _, err := tx.Model(columnSettingModel).WherePK().Delete(); err != nil {
@@ -88,6 +88,7 @@ func (repository *ColumnSettingRepository) Remove(columnSetting *domain.ColumnSe @@ -88,6 +88,7 @@ func (repository *ColumnSettingRepository) Remove(columnSetting *domain.ColumnSe
88 return nil, columnSettings, err 88 return nil, columnSettings, err
89 } 89 }
90 } 90 }
  91 +
91 return columnSetting, columnSettings, nil 92 return columnSetting, columnSettings, nil
92 } 93 }
93 94