获取文档备注模板
()
| 220 | |
| 221 | //获取文档备注模板 |
| 222 | func (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 | } |
nothing calls this directly
no test coverage detected