12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- package com.ym.adminap.controller;
- import com.ym.adminap.enity.AppResultJson;
- public class BaseController
- {
- /**
- * 接口返回体
- * @param status 状态编码
- * @param info 返回消息
- * @param data 数据包
- * @param other 附加数据包
- * @return
- */
- public AppResultJson ResultController(String status, String messge, Object data, Object other)
- {
- AppResultJson result = new AppResultJson();
- result.status = "1";
- result.messge = messge;
- result.data = data;
- result.other = other;
- return result;
- }
- /**
- * 接口返回体
- * @param status 状态编码
- * @param info 返回消息
- * @param data 数据包
- * @return
- */
- public AppResultJson ResultController(String status, String messge, Object data)
- {
- AppResultJson result = new AppResultJson();
- result.status = "1";
- result.messge = messge;
- result.data = data;
- return result;
- }
- /**
- * 接口返回体
- * @param status 状态编码
- * @param data 数据包
- * @return
- */
- public AppResultJson ResultController(String status, Object data)
- {
- AppResultJson result = new AppResultJson();
- result.status = "1";
- result.data = data;
- return result;
- }
- /**
- * 接口返回体
- * @param status 状态编码
- * @param info 返回消息
- * @return
- */
- public AppResultJson ResultController(String status, String messge)
- {
- AppResultJson result = new AppResultJson();
- result.status = "1";
- result.messge = messge;
- return result;
- }
- }
|