作者 tangxuhui

添加搜索条件

@@ -5,4 +5,5 @@ import "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domai @@ -5,4 +5,5 @@ import "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domai
5 type SettingListQuery struct { 5 type SettingListQuery struct {
6 //操作人 6 //操作人
7 Operator domain.Operator `json:"-"` 7 Operator domain.Operator `json:"-"`
  8 + Key string `json:"key"`
8 } 9 }
@@ -19,7 +19,9 @@ func (srv SystemSettingService) GetSystemSettingList(systemSettingListQuery *que @@ -19,7 +19,9 @@ func (srv SystemSettingService) GetSystemSettingList(systemSettingListQuery *que
19 creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic( 19 creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
20 systemSettingListQuery.Operator, 20 systemSettingListQuery.Operator,
21 ) 21 )
22 - result, err := creationBasicGateway.SystemSettingSearch(allied_creation_basic.ReqSystemSettingSearch{}) 22 + result, err := creationBasicGateway.SystemSettingSearch(allied_creation_basic.ReqSystemSettingSearch{
  23 + SettingName: systemSettingListQuery.Key,
  24 + })
23 return result, err 25 return result, err
24 } 26 }
25 27
@@ -34,6 +34,7 @@ type ( @@ -34,6 +34,7 @@ type (
34 //获取企业的系统设置列表 34 //获取企业的系统设置列表
35 type ( 35 type (
36 ReqSystemSettingSearch struct { 36 ReqSystemSettingSearch struct {
  37 + SettingName string `json:"settingName"` //配置名称搜索
37 } 38 }
38 39
39 DataSystemSettingSearch struct { 40 DataSystemSettingSearch struct {
@@ -13,9 +13,12 @@ type SystemSettingController struct { @@ -13,9 +13,12 @@ type SystemSettingController struct {
13 13
14 func (controller SystemSettingController) SystemSettingSearch() { 14 func (controller SystemSettingController) SystemSettingSearch() {
15 systemSettingService := service.NewSystemSettingService(nil) 15 systemSettingService := service.NewSystemSettingService(nil)
16 - settingListQuery := &query.SettingListQuery{  
17 - Operator: controller.GetOperator(), 16 + settingListQuery := &query.SettingListQuery{}
  17 + err := controller.Unmarshal(settingListQuery)
  18 + if err != nil {
  19 + log.Logger.Debug("json err:" + err.Error())
18 } 20 }
  21 + settingListQuery.Operator = controller.GetOperator()
19 data, err := systemSettingService.GetSystemSettingList(settingListQuery) 22 data, err := systemSettingService.GetSystemSettingList(settingListQuery)
20 controller.Response(data, err) 23 controller.Response(data, err)
21 } 24 }