public Result RemoveWork([FromBody] EditWorkStatusReq req)
        {
            req.Status = (int)WorkStatusTypes.REMOVE;

            var result =
                SqlHelper.ExecuteNonQuery(SqlHelper.GetConnString(), CommandType.StoredProcedure, StoreProcedureConst
                                          .EditWorkStatus,
                                          EntitySqlHelper.GetParameters(req));

            if (result > 0)
            {
                //p:发送被删除通知

                return(EditStatusByRelation(new AccusationEditStatusByRelationParam()
                {
                    RelationId = req.Id,
                    Status = 2,
                    TargetType = AccusationTargetTypes.Work
                }));
            }
            else
            {
                return(new Failure(ResultMsgConst.OperationFailure));
            }
        }
        public Result WorkAccept([FromBody] AcceptReq req)
        {
            if (req == null)
            {
                return(new Failure("para is null"));
            }

            var msg = req.ValidInfo();

            if (msg != string.Empty)
            {
                return(new Failure(msg));
            }

            var result = SqlHelper.ExecuteNonQuery(SqlHelper.GetConnString(), CommandType.StoredProcedure,
                                                   "accusation_edit_item_status",
                                                   new SqlParameter("@id", req.Id),
                                                   new SqlParameter("@status", 2),
                                                   new SqlParameter("@userId", req.UserId));

            if (result > 0)
            {
                //p:发送举报成功通知

                var param = new EditWorkStatusReq()
                {
                    Id     = req.RelationId,
                    Status = (int)WorkStatusTypes.REMOVE,
                    UserId = req.RelationUserId
                };

                result =
                    SqlHelper.ExecuteNonQuery(SqlHelper.GetConnString(), CommandType.StoredProcedure, StoreProcedureConst
                                              .EditWorkStatus,
                                              EntitySqlHelper.GetParameters(param));

                if (result > 0)
                {
                    //p:发送被删除通知

                    return(new Success(ResultMsgConst.OperationSuccess));
                }
                else
                {
                    return(new Failure(ResultMsgConst.OperationFailure));
                }
            }
            else
            {
                return(new Failure(ResultMsgConst.OperationFailure));
            }
        }