Commit 5218cb3d authored by 钱雯君's avatar 钱雯君

add

parent cb1c41af
......@@ -161,6 +161,53 @@ public class PkActivityService {
}
public Response betActGroup(String betName) throws Exception{
String url = "http://" + ManagerHost + "/newmanager/betActGroup";
Map<String,Object> para = new HashMap<>();
para.put("title",betName);
JSONObject jsonParam = JSONObject.parseObject(JSON.toJSONString(para));
Response betGroupResponse = given().contentType("application/json;charset=UTF-8").cookies(authorization.ssoLogin()).body(jsonParam).post(url);
betGroupResponse.prettyPrint();
try{
Assert.assertEquals(betGroupResponse.jsonPath().getString("success"),"true");
}catch(Exception e){
throw new Exception("创建pk活动组接口失败,返回信息:"+betGroupResponse.asString());
}catch(Error er){
throw new Exception("创建pk活动组接口失败,返回信息:"+betGroupResponse.asString());
}
return betGroupResponse;
}
public Response appGroupRelation(String adPositions,String adSwitch,String appIds,String groupId) throws Exception{
String url = "http://" + ManagerHost + "/newmanager/appGroupRelation";
Map<String,Object> para = new HashMap<>();
para.put("adPositions",adPositions);
para.put("adSwitch",adSwitch);
para.put("appIds",appIds);
para.put("groupId",groupId);
JSONObject jsonParam = JSONObject.parseObject(JSON.toJSONString(para));
Response betGroupRelationResponse = given().contentType("application/json;charset=UTF-8").cookies(authorization.ssoLogin()).body(jsonParam).post(url);
betGroupRelationResponse.prettyPrint();
try{
Assert.assertEquals(betGroupRelationResponse.jsonPath().getString("success"),"true");
}catch(Exception e){
throw new Exception("创建pk活动组关系接口失败,返回信息:"+betGroupRelationResponse.asString());
}catch(Error er){
throw new Exception("创建pk活动组关系接口失败,返回信息:"+betGroupRelationResponse.asString());
}
return betGroupRelationResponse;
}
// public static void main(String[] args) throws Exception{
// String endTime = "2021-12-31 23:55:00";
// PkActivityService pkActivityService = new PkActivityService();
......
......@@ -54,15 +54,15 @@ public class TypeChangeUtil {
public static void main(String[] args) {
CreditTool tool = new CreditTool("jlg88lyxz7siqtmr", "1x0eap95f4xfi77uaptrnwh9ewzvlm");
String url="http://activity.m.duibatest.com.cn/autoLogin/autologin?";
String url="http://activity.m.duiba.com.cn/autoLogin/autologin?";
Map<String, String> params=new HashMap<>();
params.put("uid", "8");//中文
params.put("times","1");
params.put("uid", "1");//中文
params.put("times","6");
params.put("validType","0");
params.put("bizid", UUID.randomUUID().toString().replace("-",""));
//params.put("credits","0");
params.put("redirect","http://activity.m.duibatest.com.cn/hdtool/index?id=20719");
params.put("actid","20719");
params.put("redirect","http://activity.m.duiba.com.cn/hdtool/index?id=3212716");
params.put("actid","3212716");
params.put("addType","0");
params.put("timestamp",System.currentTimeMillis()+"");
String autologinUrl= tool.buildUrlWithSign(url,params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment