|
@@ -54,7 +54,7 @@ func (c *PositionController) Create() *JsonResult {
|
|
|
userId := c.GetCurUserId()
|
|
userId := c.GetCurUserId()
|
|
|
|
|
|
|
|
position := datamodel.Position{}
|
|
position := datamodel.Position{}
|
|
|
- position.OcId = ocId
|
|
|
|
|
|
|
+ position.OcId = ocId
|
|
|
position.CreatedBy = userId
|
|
position.CreatedBy = userId
|
|
|
if err := c.Ctx.ReadJSON(&position); err != nil {
|
|
if err := c.Ctx.ReadJSON(&position); err != nil {
|
|
|
return ResultErr("读取数据失败", nil)
|
|
return ResultErr("读取数据失败", nil)
|
|
@@ -77,7 +77,7 @@ func (c *PositionController) Update() *JsonResult {
|
|
|
return ResultErr("读取数据失败", nil)
|
|
return ResultErr("读取数据失败", nil)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- position.OcId = ocId
|
|
|
|
|
|
|
+ position.OcId = ocId
|
|
|
position.UpdatedBy = userId
|
|
position.UpdatedBy = userId
|
|
|
if err := c.Service.Update(&position); err != nil {
|
|
if err := c.Service.Update(&position); err != nil {
|
|
|
return ResultErr(err.Error(), nil)
|
|
return ResultErr(err.Error(), nil)
|
|
@@ -91,9 +91,9 @@ func (c *PositionController) DeleteByID(positionId int64) *JsonResult {
|
|
|
userId := c.GetCurUserId()
|
|
userId := c.GetCurUserId()
|
|
|
|
|
|
|
|
m := make(map[string]interface{})
|
|
m := make(map[string]interface{})
|
|
|
- m["ocId"] = ocId
|
|
|
|
|
|
|
+ m["ocId"] = ocId
|
|
|
m["positionId"] = positionId
|
|
m["positionId"] = positionId
|
|
|
- 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)
|
|
|
} else {
|
|
} else {
|