|
@@ -959,30 +959,31 @@ func (this *YanxuanSpecialController) AuthorSearch() {
|
|
|
keyWord := this.GetString("KeyWord")
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
-
|
|
|
+ resp := new(cygx.CygxYanxuanSpecialKeyWordListReesp)
|
|
|
//关键词搜索
|
|
|
if keyWord != "" {
|
|
|
keyWord = "%" + keyWord + "%"
|
|
|
condition += ` AND art.nick_name like ? `
|
|
|
pars = append(pars, keyWord)
|
|
|
- }
|
|
|
-
|
|
|
- list, tmpErr := cygx.GetYanxuanSpecialAuthorList(condition, pars, 0, 99)
|
|
|
- if tmpErr != nil {
|
|
|
- br.Msg = "获取失败"
|
|
|
- br.ErrMsg = "获取失败, Err:" + tmpErr.Error()
|
|
|
- return
|
|
|
- }
|
|
|
- resp := new(cygx.CygxYanxuanSpecialKeyWordListReesp)
|
|
|
- if len(list) > 0 {
|
|
|
- for _, v := range list {
|
|
|
- item := new(cygx.CygxYanxuanSpecialKeyWordReesp)
|
|
|
- item.KeyWord = v.NickName
|
|
|
- resp.List = append(resp.List, item)
|
|
|
+ list, tmpErr := cygx.GetYanxuanSpecialAuthorList(condition, pars, 0, 99)
|
|
|
+ if tmpErr != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取失败, Err:" + tmpErr.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(list) > 0 {
|
|
|
+ for _, v := range list {
|
|
|
+ item := new(cygx.CygxYanxuanSpecialKeyWordReesp)
|
|
|
+ item.KeyWord = v.NickName
|
|
|
+ resp.List = append(resp.List, item)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ resp.List = make([]*cygx.CygxYanxuanSpecialKeyWordReesp, 0)
|
|
|
}
|
|
|
} else {
|
|
|
resp.List = make([]*cygx.CygxYanxuanSpecialKeyWordReesp, 0)
|
|
|
}
|
|
|
+
|
|
|
br.Data = resp
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|