no message
parent
540229aa5e
commit
33e10b99ab
|
@ -795,7 +795,18 @@ func DeleteDocTemplate(c *gin.Context) {
|
|||
defer func() {
|
||||
c.JSON(200, resp)
|
||||
}()
|
||||
type ReqDeleteDocTemplate struct {
|
||||
sid := c.Param("id")
|
||||
id,e := strconv.Atoi(sid)
|
||||
if nil != e{
|
||||
log.Print(e.Error())
|
||||
return
|
||||
}
|
||||
|
||||
e = model.DeleteDocTemplate(int32(id))
|
||||
if nil != e{
|
||||
log.Print(e.Error())
|
||||
return
|
||||
}
|
||||
resp.Data = nil
|
||||
resp.Msg = "OK"
|
||||
resp.Status = 0
|
||||
}
|
|
@ -37,7 +37,7 @@ func UpdateDocTemplate(templ DocTemplate) error{
|
|||
}
|
||||
|
||||
func DeleteDocTemplate(id int32) error{
|
||||
sql := fmt.Sprintf(`delete from doc_template doc_template memo.id = '%d'`,id)
|
||||
sql := fmt.Sprintf(`delete from doc_template where id = '%d'`,id)
|
||||
_, e := db.GetMysqlClient().Query(sql)
|
||||
if nil != e {
|
||||
logs.Error(e.Error())
|
||||
|
|
Loading…
Reference in New Issue