美文网首页
ResultVOUtil

ResultVOUtil

作者: 御风_2fd9 | 来源:发表于2018-12-14 23:39 被阅读62次

    package com.imooc.utils;

    import com.imooc.VO.ResultVO;

    /**

    • Created by 廖师兄

    • 2017-05-15 00:22
      */
      public class ResultVOUtil {

      public static ResultVO success(Object object) {
      ResultVO resultVO = new ResultVO();
      resultVO.setData(object);
      resultVO.setCode(0);
      resultVO.setMsg("成功");
      return resultVO;
      }

      public static ResultVO success() {
      return success(null);
      }

      public static ResultVO error(Integer code, String msg) {
      ResultVO resultVO = new ResultVO();
      resultVO.setCode(code);
      resultVO.setMsg(msg);
      return resultVO;
      }
      }

    相关文章

      网友评论

          本文标题:ResultVOUtil

          本文链接:https://www.haomeiwen.com/subject/sitohqtx.html