|
@@ -64,6 +64,9 @@ func (c *CommonPhrasesService) CommonPhrasesAdd(param *knowledgeclient.CommonPhr
|
|
|
ok = false
|
|
|
msg = "操作失败"
|
|
|
}
|
|
|
+ } else {
|
|
|
+ ok = false
|
|
|
+ msg = "操作失败"
|
|
|
}
|
|
|
|
|
|
} else {
|
|
@@ -88,6 +91,9 @@ func (c *CommonPhrasesService) CommonPhrasesAdd(param *knowledgeclient.CommonPhr
|
|
|
ok = false
|
|
|
msg = "操作失败"
|
|
|
}
|
|
|
+ } else {
|
|
|
+ ok = false
|
|
|
+ msg = "操作失败"
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -126,7 +132,7 @@ func (c *CommonPhrasesService) CommonPhrasesList(param *knowledgeclient.CommonPh
|
|
|
var data []*knowledgeclient.CommonPhrases
|
|
|
count := Mysql.Count(util.COMMONPHRASES, map[string]interface{}{"status": 0, "appId": param.AppId, "entId": param.EntId})
|
|
|
if count > 0 {
|
|
|
- dataList := Mysql.Find(util.COMMONPHRASES, map[string]interface{}{"status": 0, "appId": param.AppId, "entId": param.EntId}, "", "id desc", cm.IntAll((param.PageIndex-1)*param.PageSize), cm.IntAll(param.PageSize))
|
|
|
+ dataList := Mysql.Find(util.COMMONPHRASES, map[string]interface{}{"status": 0, "appId": param.AppId, "entId": param.EntId}, "", "updateTime desc", cm.IntAll((param.PageIndex-1)*param.PageSize), cm.IntAll(param.PageSize))
|
|
|
if dataList != nil && len(*dataList) > 0 {
|
|
|
for _, val := range *dataList {
|
|
|
data = append(data, &knowledgeclient.CommonPhrases{
|