public OptResult Update(PermVM vmEditPer) { OptResult rst = null; // var token = base.ParseToken(ActionContext); var per = OOMapper.Map <PermVM, Permission>(vmEditPer); rst = _perSrv.Update(per); return(rst); }
public OptResult Add(PermVM vmAddPer) { OptResult rst = null; if (vmAddPer == null) { rst = OptResult.Build(ResultCode.ParamError, "参数不能为空"); return(rst); } // var token = base.ParseToken(ActionContext); var per = OOMapper.Map <PermVM, Permission>(vmAddPer); rst = _perSrv.Add(per); return(rst); }