Authored by zhaoyue

add hasReport

... ... @@ -3,7 +3,7 @@ git add --all src/*
git add --all lib/*
git add push.sh
git add pom.xml
git commit -m "MOD data share"
git commit -m "add hasReport"
git push origin master
git status
git pull
... ...
... ... @@ -8,8 +8,8 @@ public interface Constants {
* 服务地址
*/
// String URL_PREFIX = "http://127.0.0.1:8090";
String URL_PREFIX = "https://www.hanhezy.com:8090/";
// String URL_PREFIX = "https://www.hanhezy.com:8090/";
String URL_PREFIX = "https://api.xkljk.com/";
/**
* 测试用 用户名、密码、openid、openidtype
*/
... ...
package com.xkl.internal;
import com.xkl.Constants;
import com.xkl.HttpTools;
import com.xkl.RtnCodeTools;
import com.xkl.partner.TokenTest;
import org.junit.Assert;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
/**
* zhaoyue 2017-05-13
*/
public class HasReportTest {
private static final String URL_HAS_REPORT = Constants.URL_PREFIX + "/hasReport";
@Test
public void testHasReport() {
Map<String, String> params = new HashMap<String, String>();
params.put("username", Constants.USR_ACC);
params.put("t", HttpTools.getNow());
params.put("type", Constants.KEY_ID);
params.put("sign", HttpTools.getSign(params));
String response = HttpTools.requestByMap(URL_HAS_REPORT, "GET", params);
System.out.println(response);
// RtnCodeTools.verifyCode(response, 11400) ||
// 返回11401有报告,11400没有报告
Assert.assertTrue(RtnCodeTools.verifyCode(response, 11401));
}
}
... ...