|
@@ -3,7 +3,6 @@ package help_doc
|
|
import (
|
|
import (
|
|
"encoding/json"
|
|
"encoding/json"
|
|
"fmt"
|
|
"fmt"
|
|
- "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
|
"hongze/hz_crm_api/controllers"
|
|
"hongze/hz_crm_api/controllers"
|
|
"hongze/hz_crm_api/models"
|
|
"hongze/hz_crm_api/models"
|
|
"hongze/hz_crm_api/models/help_doc"
|
|
"hongze/hz_crm_api/models/help_doc"
|
|
@@ -12,6 +11,8 @@ import (
|
|
"strconv"
|
|
"strconv"
|
|
"strings"
|
|
"strings"
|
|
"time"
|
|
"time"
|
|
|
|
+
|
|
|
|
+ "github.com/rdlucklib/rdluck_tools/paging"
|
|
)
|
|
)
|
|
|
|
|
|
// HelpDocController 帮助文档
|
|
// HelpDocController 帮助文档
|
|
@@ -87,6 +88,17 @@ func (this *HelpDocController) Add() {
|
|
if req.Status == 2 {
|
|
if req.Status == 2 {
|
|
item.PublishTime = time.Now()
|
|
item.PublishTime = time.Now()
|
|
}
|
|
}
|
|
|
|
+ if req.Id > 0 {
|
|
|
|
+ tmpHelpDoc, err := help_doc.GetHelpDocById(int(req.Id))
|
|
|
|
+ if err != nil {
|
|
|
|
+ br.Msg = "保存失败"
|
|
|
|
+ br.ErrMsg = "查询帮助文档失败,Err:" + err.Error()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if tmpHelpDoc.Status != req.Status {
|
|
|
|
+ req.IsChange = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
if req.Id == 0 {
|
|
if req.Id == 0 {
|
|
id, e := help_doc.AddHelpDoc(item)
|
|
id, e := help_doc.AddHelpDoc(item)
|