标签:class import ken new tco EOS mod dev his
一、封装公共参数
import java.util.TreeMap; public class RequestCommonParams { public TreeMap<String, Object> staticParams; public TreeMap<String, Object> getStaticParams() { return staticParams; } public void setStaticParams(TreeMap<String, Object> staticParams) { this.staticParams = staticParams; } /** * 移动端公共参数 * @return TreeMap */ public RequestCommonParams(){ TreeMap<String, Object> map = new TreeMap<>(); map.put("clientMac", "9e:ee:fb:0f:5b:b8"); map.put("clientDensity", "3.0"); map.put("latitude", "255"); map.put("longitude", "255"); map.put("isJailbroken", "0"); map.put("JailReason", "NO Jail"); map.put("clientVersion", "3.1.0"); map.put("deviceId", "9e:ee:fb:0f:5b:b8"); map.put("platform", "Android"); //Android map.put("deviceInfo", "{\"deviceModel\":\"MI 5\",\"deviceOs\":\"23_6.0.1\"}"); map.put("network", "wifi"); map.put("screenSize", "1920*1080"); map.put("clientIp", "10.0.3.15"); setStaticParams(map); } }
二、调用公共参数
TreeMap<String, Object> map = (new SalesRequestCommonParams()).getStaticParams(); //新增入参 map.put("username", "chu01"); map.put("password", 123);
标签:class import ken new tco EOS mod dev his
原文地址:https://www.cnblogs.com/chushujin/p/11378778.html