Commit 32c5dced authored by 张艳玲's avatar 张艳玲

新增猜数字红包

parent 8145f868
package com.kjj.bean.lottery; package com.kjj.bean.lottery;
import lombok.Data;
@Data
public class CondDetail {
public class CondDetail {
//宝箱id
private String treasureConfId; private String treasureConfId;
//奖品领取状态
private boolean finishFlag;
public String getTreasureConfId() {
return treasureConfId;
}
public void setTreasureConfId(String treasureConfId) {
this.treasureConfId = treasureConfId;
}
/**
* 获取是否完成标记
* @return 是否完成标记
*/
public boolean isFinishFlag() {
return finishFlag;
}
public void setFinishFlag(boolean finishFlag) {
this.finishFlag = finishFlag;
}
} }
...@@ -23,9 +23,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -23,9 +23,7 @@ public class SaveAndUpdate implements AdminAuthorization {
public long welfareConfId; public long welfareConfId;
@BeforeClass @BeforeClass
public void setUp() { public void setUp() { BaseUtils.ssoLogin(); }
BaseUtils.ssoLogin();
}
@Test(description = "创建直播", priority = 1) @Test(description = "创建直播", priority = 1)
public void 创建直播() { public void 创建直播() {
......
...@@ -43,14 +43,17 @@ public class BaseUtils { ...@@ -43,14 +43,17 @@ public class BaseUtils {
response = network.postResponse(loginParams,SSO_DOLOGIN); response = network.postResponse(loginParams,SSO_DOLOGIN);
Map<String, String> ssoCookies = response.getCookies(); Map<String, String> ssoCookies = response.getCookies();
network.agentCookies.putAll(ssoCookies); //存入cookies
// 2.登录客集集管理后台 network.agentCookies.putAll(ssoCookies); //存入cookies
String redirectUrl = response.jsonPath().getString("redirect");//获取重定向地址 // // 2.登录客集集管理后台
response = network.getManagerCookies(redirectUrl); // String redirectUrl = response.jsonPath().getString("redirect");//获取重定向地址
// response = network.getManagerCookies(redirectUrl);
ssoCookies = response.getCookies(); ssoCookies = response.getCookies();
network.agentCookies.putAll(ssoCookies); network.agentCookies.putAll(ssoCookies);
network.agentHeaders.put("X-Csrf-Token",ssoCookies.get("csrf_token")); network.agentHeaders.put("X-Csrf-Token",ssoCookies.get("csrf_token"));
// 免登
network.agentCookies.put("sso_ticket", "autotest");
} }
/** /**
......
...@@ -57,7 +57,7 @@ public class JsonUtil { ...@@ -57,7 +57,7 @@ public class JsonUtil {
} }
public static <T> T parseResponseToBean1(Response response, Class<T> tClass){ public static <T> T parseResponseToBean1(Response response, Class<T> tClass){
Object data = response.jsonPath().getJsonObject("d"); Object data = response.jsonPath().getJsonObject("date");
String str = new JsonBuilder(data).toString(); String str = new JsonBuilder(data).toString();
return JSON.parseObject(str, tClass); return JSON.parseObject(str, tClass);
} }
......
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