private static final Logger log = LoggerFactory.getLogger(LiveInteractionTest.class);
/**
* 提交中奖信息
* @throws IOException
*/
@Test
public void testAddReceiveInfo() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId=super.appId;
String appSecret=super.appSecret;
String userId = super.userId;
String timestamp=String.valueOf(System.currentTimeMillis());
//业务参数
String channelId = "2191532";
String lotteryId = "fwnsn85wp7";
String viewerId = "1615539698424";
String winnerCode = "XQaWEeJS";
String name = "xiao123";
String telephone = "18569550173";
String url = "http://api.polyv.net/live/v3/channel/chat/add-receive-info";
//http 调用逻辑
Map<String,String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp",timestamp);
requestMap.put("channelId",channelId);
requestMap.put("viewerId",viewerId);
requestMap.put("lotteryId",lotteryId);
requestMap.put("name",name);
requestMap.put("telephone",telephone);
requestMap.put("winnerCode",winnerCode);
requestMap.put("sign",LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.postFormBody(url,requestMap);
log.info("测试提交中奖信息接口返回值:{}",response);
//do somethings
}