作者 tangxuhui

错误修复

{"D:\\workspaceGo\\src\\allied-creation-basic\\pkg\\port\\beego":1629527715980690100}
\ No newline at end of file
{"D:\\workspaceGo\\src\\allied-creation-basic\\pkg\\port\\beego":1629534039183149400}
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@ package domain
// 字典
type Dictionary struct {
// 字典编号 主键
DictionaryId int64 `json:"dictionaryId"`
DictionaryId int64 `json:"dictionaryId,string"`
// 字典编码
DictCode string `json:"dictCode"`
// 字典名称
... ...
... ... @@ -14,8 +14,6 @@ type Dictionary struct {
DictName string
// 备注信息
Describe string
// 是否可见【1:不可以】【2:可以】
IsShow int
// 字典值列表
DictItems []domain.DictionaryItem
}
... ...
... ... @@ -119,7 +119,7 @@ func (repository *DictionaryRepository) Find(queryOptions map[string]interface{}
query.SetOffsetAndLimit(20)
query.SetOrderDirect("dictionary_id", "DESC")
if v, ok := queryOptions["dictCodeIn"]; ok {
query.Where("dict_code IN (?)", pg.Array(v))
query.WhereIn("dict_code IN (?)", v)
}
if count, err := query.SelectAndCount(); err != nil {
return 0, dictionarys, err
... ...
... ... @@ -12,9 +12,11 @@ type DictionaryController struct {
func (controller *DictionaryController) returnPageListData(count int64, data interface{}, err error, pageNumber int) {
dataMap := map[string]interface{}{
"totalRow": count,
"grid": map[string]interface{}{
"total": count,
"pageNumber": pageNumber,
"list": data,
},
}
controller.Response(dataMap, err)
}
... ...