فهرست منبع

Merge branch 'dev/v1.0.3_rjj' of SocialPlatform/knowledgeBase into feature/v1.0.3

duxin 2 سال پیش
والد
کامیت
4b0c5c6c4f
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      rpc/knowledge/internal/service/commonPhrasesService.go

+ 7 - 1
rpc/knowledge/internal/service/commonPhrasesService.go

@@ -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{