|
@@ -51,11 +51,10 @@ func (c *DocCatController) GetById(docCatId int64) *JsonResult {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (c *DocCatController) Create() *JsonResult {
|
|
func (c *DocCatController) Create() *JsonResult {
|
|
|
- ocId := c.GetCurOcId()
|
|
|
|
|
|
|
+ ocId := c.GetCurOcId()
|
|
|
userId := c.GetCurUserId()
|
|
userId := c.GetCurUserId()
|
|
|
|
|
|
|
|
docCat := &datamodel.DocCat{}
|
|
docCat := &datamodel.DocCat{}
|
|
|
-
|
|
|
|
|
if err := c.Ctx.ReadJSON(docCat); err != nil {
|
|
if err := c.Ctx.ReadJSON(docCat); err != nil {
|
|
|
return ResultErr("读取数据失败", nil)
|
|
return ResultErr("读取数据失败", nil)
|
|
|
}
|
|
}
|
|
@@ -70,7 +69,7 @@ func (c *DocCatController) Create() *JsonResult {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (c *DocCatController) Update() *JsonResult {
|
|
func (c *DocCatController) Update() *JsonResult {
|
|
|
- ocId := c.GetCurOcId()
|
|
|
|
|
|
|
+ ocId := c.GetCurOcId()
|
|
|
userId := c.GetCurUserId()
|
|
userId := c.GetCurUserId()
|
|
|
|
|
|
|
|
docCat := &datamodel.DocCat{}
|
|
docCat := &datamodel.DocCat{}
|
|
@@ -88,12 +87,12 @@ func (c *DocCatController) Update() *JsonResult {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (c *DocCatController) DeleteByID(docCatId int64) *JsonResult {
|
|
func (c *DocCatController) DeleteByID(docCatId int64) *JsonResult {
|
|
|
- ocId := c.GetCurOcId()
|
|
|
|
|
|
|
+ ocId := c.GetCurOcId()
|
|
|
userId := c.GetCurUserId()
|
|
userId := c.GetCurUserId()
|
|
|
|
|
|
|
|
m := make(map[string]interface{})
|
|
m := make(map[string]interface{})
|
|
|
- m["ocId"] = ocId
|
|
|
|
|
- m["docCatId"] = docCatId
|
|
|
|
|
|
|
+ m["ocId"] = ocId
|
|
|
|
|
+ m["docCatId"] = docCatId
|
|
|
m["deletedBy"] = userId
|
|
m["deletedBy"] = userId
|
|
|
if err := c.Service.Delete(m); err != nil {
|
|
if err := c.Service.Delete(m); err != nil {
|
|
|
return ResultErr(err.Error(), nil)
|
|
return ResultErr(err.Error(), nil)
|