MCPcopy Index your code
hub / github.com/TruthHun/DocHub / RemarkTpl

Method RemarkTpl

controllers/AdminControllers/DocController.go:222–240  ·  view source on GitHub ↗

获取文档备注模板

()

Source from the content-addressed store, hash-verified

220
221//获取文档备注模板
222func (this *DocController) RemarkTpl() {
223 if this.Ctx.Request.Method == "GET" {
224 DsId, _ := this.GetInt("dsid")
225 if DsId > 0 {
226 remark := models.NewDocumentRemark().GetContentTplByDsId(DsId)
227 this.ResponseJson(true, "获取成功", remark)
228 } else {
229 this.ResponseJson(false, "DsId不能为空")
230 }
231 } else {
232 var rm models.DocumentRemark
233 this.ParseForm(&rm)
234 if err := models.NewDocumentRemark().Insert(rm); err != nil {
235 this.ResponseJson(false, fmt.Sprintf("操作失败:%v", err.Error()))
236 } else {
237 this.ResponseJson(true, "操作成功")
238 }
239 }
240}

Callers

nothing calls this directly

Calls 4

GetContentTplByDsIdMethod · 0.80
ParseFormMethod · 0.80
InsertMethod · 0.80
ResponseJsonMethod · 0.45

Tested by

no test coverage detected