package com.ruoyi.project.mobile.domain; import java.io.Serializable; /** * App发起请求的Header */ public class ApiRequestHeader implements Serializable { public static final String HEADER_CODE = "code";//请求类型(service方法名) public static final String HEADER_USERID = "userId";//用户id(登陆之后必带) public static final String HEADER_LOGINNAME = "loginName";//用户登录帐号 public static final String HEADER_TOKEN = "token";//登陆成功获得token(登陆之后请求的接口必带) public static final String HEADER_DEVICETYPE = "deviceType";//设备类型(1 安卓 2 IOS) public static final String HEADER_DEVICEID = "deviceId";// 设备id public static final String HEADER_APPTYPE = "appType";//app类型(1用户端 2管理员端) /** * 请求类型(service方法名) */ public String code = ""; /** * 用户id(登陆之后必带) */ public String userId = ""; /** * 用户登录帐号 */ public String loginName = ""; /** * 令牌 */ public String token = ""; /** * 设备类型(1 安卓 2 IOS) */ public String deviceType = ""; /** * 设备id */ public String deviceId = ""; /** * app类型(1用户端 2管理员端) */ public String appType = ""; @Override public boolean equals(Object apiRequestHeader) { if (apiRequestHeader == null || getClass() != apiRequestHeader.getClass()) return false; ApiRequestHeader header = (ApiRequestHeader) apiRequestHeader; if (userId != null ? !userId.equals(header.userId) : header.userId != null) { return false; } if (loginName != null ? !loginName.equals(header.loginName) : header.loginName != null) { return false; } if (token != null ? !token.equals(header.token) : header.token != null) { return false; } if (deviceType != null ? !deviceType.equals(header.deviceType) : header.deviceType != null) { return false; } if (deviceId != null ? !deviceId.equals(header.deviceId) : header.deviceId != null) { return false; } return appType != null ? appType.equals(header.appType) : header.appType == null; } }