target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void disable_debugging_first_line_has_include_and_one_empty_line_nothing_else_results_in_one_empty_line() throws Exception { assertEquals("\n", supportToTest.disableDebugging(EXPECTED_DEBUG_ENABLED_CODE+"\n\n")); }
public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1); } return data; }
DebugBashCodeToggleSupport { public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1...
DebugBashCodeToggleSupport { public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1...
DebugBashCodeToggleSupport { public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1...
DebugBashCodeToggleSupport { public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1...
@Test public void token_starts_with_heredoc_is_heredoc() { assertTrue(new ParseToken("<< xyz").isHereDoc()); }
public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); }
ParseToken { public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); } }
ParseToken { public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment();...
ParseToken { public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment();...
@Test public void token_starts_with_heredoc_is_no_herestring() { assertFalse(new ParseToken("<< xyz").isHereString()); }
public boolean isHereString() { return getSafeText().startsWith("<<<"); }
ParseToken { public boolean isHereString() { return getSafeText().startsWith("<<<"); } }
ParseToken { public boolean isHereString() { return getSafeText().startsWith("<<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isHereString() { return getSafeText().startsWith("<<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingl...
ParseToken { public boolean isHereString() { return getSafeText().startsWith("<<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingl...
@Test public void token_starts_with_herestring_is_no_heredoc() { assertFalse(new ParseToken("<<< xyz").isHereDoc()); }
public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); }
ParseToken { public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); } }
ParseToken { public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment();...
ParseToken { public boolean isHereDoc() { return ! isHereString() && getSafeText().startsWith("<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment();...
@Test public void token_starts_with_herestring_is_herestring() { assertTrue(new ParseToken("<<< xyz").isHereString()); }
public boolean isHereString() { return getSafeText().startsWith("<<<"); }
ParseToken { public boolean isHereString() { return getSafeText().startsWith("<<<"); } }
ParseToken { public boolean isHereString() { return getSafeText().startsWith("<<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isHereString() { return getSafeText().startsWith("<<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingl...
ParseToken { public boolean isHereString() { return getSafeText().startsWith("<<<"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingl...
@Test public void token_starts_with_hash_space_xyz_is_comment() { assertTrue(new ParseToken("# xyz").isComment()); }
public boolean isComment() { return getSafeText().startsWith("#"); }
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } }
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingleStri...
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingleStri...
@Test public void token_starts_with_hash_xyz_is_comment() { assertTrue(new ParseToken("#xyz").isComment()); }
public boolean isComment() { return getSafeText().startsWith("#"); }
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } }
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingleStri...
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingleStri...
@Test public void token_starts_with_a_is_no_comment() { assertFalse(new ParseToken("axyz").isComment()); }
public boolean isComment() { return getSafeText().startsWith("#"); }
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } }
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingleStri...
ParseToken { public boolean isComment() { return getSafeText().startsWith("#"); } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String createTypeDescription(); boolean isComment(); boolean isSingleStri...
@Test public void single_string_xxx_is_string() { assertTrue(new ParseToken("'xxx'").isString()); }
public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; }
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } }
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String creat...
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String creat...
@Test public void double_ticked_string_xxx_is_string() { assertTrue(new ParseToken("`xxx`").isString()); }
public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; }
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } }
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String creat...
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String creat...
@Test public void double_string_xxx_is_string() { assertTrue(new ParseToken("\"xxx\"").isString()); }
public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; }
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } }
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); }
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String creat...
ParseToken { public boolean isString() { boolean isString = isSingleString() || isDoubleString() || isDoubleTickedString(); return isString; } ParseToken(); ParseToken(String text); ParseToken(String text, int start, int end); String getText(); int getStart(); int getEnd(); @Override String toString(); String creat...
@Test public void disable_debugging_first_line_has_include_and_comment_after_include_only_comment_remains() throws Exception { assertEquals("#! /bin/mybash", supportToTest.disableDebugging(EXPECTED_DEBUG_ENABLED_CODE + "#! /bin/mybash")); }
public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1); } return data; }
DebugBashCodeToggleSupport { public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1...
DebugBashCodeToggleSupport { public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1...
DebugBashCodeToggleSupport { public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1...
DebugBashCodeToggleSupport { public String disableDebugging(String sourceCode) throws IOException { int index = sourceCode.indexOf(DEBUG_POSTFIX); if (index == -1) { return sourceCode; } int pos = index + DEBUG_POSTFIX.length(); String data = sourceCode.substring(pos); if (data.startsWith("\n")) { data=data.substring(1...
@Test public void testNext() { long pre = System.currentTimeMillis(); long start = pre; for (int i = 0; i < 100; i++) { while (source.hasNext()) { source.next(); } System.out.print((System.currentTimeMillis() - pre) + " "); pre = System.currentTimeMillis(); } long total = System.currentTimeMillis()-start; System.out.pr...
@Override public Print next() { return cacheNext(); }
JdbcTemplateLocationDataSource implements LocationDataSource { @Override public Print next() { return cacheNext(); } }
JdbcTemplateLocationDataSource implements LocationDataSource { @Override public Print next() { return cacheNext(); } JdbcTemplateLocationDataSource(JdbcTemplate tmplate); }
JdbcTemplateLocationDataSource implements LocationDataSource { @Override public Print next() { return cacheNext(); } JdbcTemplateLocationDataSource(JdbcTemplate tmplate); @Override Print next(); @Override Print prev(); @Override boolean hasNext(); }
JdbcTemplateLocationDataSource implements LocationDataSource { @Override public Print next() { return cacheNext(); } JdbcTemplateLocationDataSource(JdbcTemplate tmplate); @Override Print next(); @Override Print prev(); @Override boolean hasNext(); }
@Test public void testIsCrossWall() { Point p1 = new Point(0,0); Point p2 = new Point(5,5); Assert.assertTrue(wall.isCrossWall(p1, p2)); Point p3 = new Point(3,3); Assert.assertTrue(!wall.isCrossWall(p1, p3)); Point p4 = new Point(6,2); Point p5 = new Point(3,10); Assert.assertTrue(wall.isCrossWall(p4, p5)); Point p6 =...
public boolean isCrossWall(Point a, Point b) { if (x2 < Math.min(a.getX(), b.getX()) || x1 > Math.max(a.getX(), b.getX())) { return false; } if (y2 < Math.min(a.getY(), b.getY()) || y1 > Math.max(a.getY(), b.getY())) { return false; } if (isInWall(b.getX(), b.getY()) && !isInWall(a.getX(), a.getY())) { return true; } i...
WallInfo { public boolean isCrossWall(Point a, Point b) { if (x2 < Math.min(a.getX(), b.getX()) || x1 > Math.max(a.getX(), b.getX())) { return false; } if (y2 < Math.min(a.getY(), b.getY()) || y1 > Math.max(a.getY(), b.getY())) { return false; } if (isInWall(b.getX(), b.getY()) && !isInWall(a.getX(), a.getY())) { retur...
WallInfo { public boolean isCrossWall(Point a, Point b) { if (x2 < Math.min(a.getX(), b.getX()) || x1 > Math.max(a.getX(), b.getX())) { return false; } if (y2 < Math.min(a.getY(), b.getY()) || y1 > Math.max(a.getY(), b.getY())) { return false; } if (isInWall(b.getX(), b.getY()) && !isInWall(a.getX(), a.getY())) { retur...
WallInfo { public boolean isCrossWall(Point a, Point b) { if (x2 < Math.min(a.getX(), b.getX()) || x1 > Math.max(a.getX(), b.getX())) { return false; } if (y2 < Math.min(a.getY(), b.getY()) || y1 > Math.max(a.getY(), b.getY())) { return false; } if (isInWall(b.getX(), b.getY()) && !isInWall(a.getX(), a.getY())) { retur...
WallInfo { public boolean isCrossWall(Point a, Point b) { if (x2 < Math.min(a.getX(), b.getX()) || x1 > Math.max(a.getX(), b.getX())) { return false; } if (y2 < Math.min(a.getY(), b.getY()) || y1 > Math.max(a.getY(), b.getY())) { return false; } if (isInWall(b.getX(), b.getY()) && !isInWall(a.getX(), a.getY())) { retur...
@Test public void testLoadPaths() { CountDownLatch latch = new CountDownLatch(1); LoadPaths.loadStaticPath("paths.xml", latch); System.out.println("path: "); System.out.println(LoadPaths.paths); }
public static void loadStaticPath(String filename, CountDownLatch latch){ List<StaticPath> tmpPaths = new ArrayList<StaticPath>(); try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(LoadPaths.class.getClassLoa...
LoadPaths { public static void loadStaticPath(String filename, CountDownLatch latch){ List<StaticPath> tmpPaths = new ArrayList<StaticPath>(); try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(LoadPaths.class...
LoadPaths { public static void loadStaticPath(String filename, CountDownLatch latch){ List<StaticPath> tmpPaths = new ArrayList<StaticPath>(); try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(LoadPaths.class...
LoadPaths { public static void loadStaticPath(String filename, CountDownLatch latch){ List<StaticPath> tmpPaths = new ArrayList<StaticPath>(); try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(LoadPaths.class...
LoadPaths { public static void loadStaticPath(String filename, CountDownLatch latch){ List<StaticPath> tmpPaths = new ArrayList<StaticPath>(); try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(LoadPaths.class...
@Test public void testSelectSort() { Random random = new Random(); List<Result> rs = new ArrayList<>(); for (int i = 0; i < 10; i++) { rs.add(new Result(random.nextDouble(), null)); } for (Result r : rs) { System.out.print(r.value() + " "); } System.out.println(); List<Result> ret1 = CommonUtils.selectSort(rs, 3, "eucl...
@SuppressWarnings("unchecked") public static List<Result> selectSort(List<Result> results, int k, String distanceMethod) { int len = results.size(); assert len >= k; TreeSet<Result> set; Comparator<Result> comp = distanceMethod.trim().equals("euclidean") ? new AscendingOrderComparator() : new DescendingOrderComparator(...
CommonUtils { @SuppressWarnings("unchecked") public static List<Result> selectSort(List<Result> results, int k, String distanceMethod) { int len = results.size(); assert len >= k; TreeSet<Result> set; Comparator<Result> comp = distanceMethod.trim().equals("euclidean") ? new AscendingOrderComparator() : new DescendingOr...
CommonUtils { @SuppressWarnings("unchecked") public static List<Result> selectSort(List<Result> results, int k, String distanceMethod) { int len = results.size(); assert len >= k; TreeSet<Result> set; Comparator<Result> comp = distanceMethod.trim().equals("euclidean") ? new AscendingOrderComparator() : new DescendingOr...
CommonUtils { @SuppressWarnings("unchecked") public static List<Result> selectSort(List<Result> results, int k, String distanceMethod) { int len = results.size(); assert len >= k; TreeSet<Result> set; Comparator<Result> comp = distanceMethod.trim().equals("euclidean") ? new AscendingOrderComparator() : new DescendingOr...
CommonUtils { @SuppressWarnings("unchecked") public static List<Result> selectSort(List<Result> results, int k, String distanceMethod) { int len = results.size(); assert len >= k; TreeSet<Result> set; Comparator<Result> comp = distanceMethod.trim().equals("euclidean") ? new AscendingOrderComparator() : new DescendingOr...
@Test public void testEnqueue() { for (int i = 0; i < Constant.SLOW_QUEUE_LENGTH; i++) { Point t = new Point(i, i); Point r = queue.enqueue(t, Constant.FAST_QUEUE_LENGTH); System.out.println("t: " + t + " r: " + r); Assert.assertTrue(t.equals(r)); } for (int i = 0; i < 5; i++) { Point p = new Point(i + 100, i + 100); S...
public Point enqueue(Point p, int level) { assert level == Constant.SLOW_QUEUE_LENGTH || level == Constant.NORMAL_QUEUE_LENGTH || level == Constant.FAST_QUEUE_LENGTH || level == Constant.MAX_QUEUE_LENGTH; if (this._queue.size() < Constant.MAX_QUEUE_LENGTH + 1) { return (Point)p.clone(); } Point result = calculateAvgV2(...
PointQueue { public Point enqueue(Point p, int level) { assert level == Constant.SLOW_QUEUE_LENGTH || level == Constant.NORMAL_QUEUE_LENGTH || level == Constant.FAST_QUEUE_LENGTH || level == Constant.MAX_QUEUE_LENGTH; if (this._queue.size() < Constant.MAX_QUEUE_LENGTH + 1) { return (Point)p.clone(); } Point result = ca...
PointQueue { public Point enqueue(Point p, int level) { assert level == Constant.SLOW_QUEUE_LENGTH || level == Constant.NORMAL_QUEUE_LENGTH || level == Constant.FAST_QUEUE_LENGTH || level == Constant.MAX_QUEUE_LENGTH; if (this._queue.size() < Constant.MAX_QUEUE_LENGTH + 1) { return (Point)p.clone(); } Point result = ca...
PointQueue { public Point enqueue(Point p, int level) { assert level == Constant.SLOW_QUEUE_LENGTH || level == Constant.NORMAL_QUEUE_LENGTH || level == Constant.FAST_QUEUE_LENGTH || level == Constant.MAX_QUEUE_LENGTH; if (this._queue.size() < Constant.MAX_QUEUE_LENGTH + 1) { return (Point)p.clone(); } Point result = ca...
PointQueue { public Point enqueue(Point p, int level) { assert level == Constant.SLOW_QUEUE_LENGTH || level == Constant.NORMAL_QUEUE_LENGTH || level == Constant.FAST_QUEUE_LENGTH || level == Constant.MAX_QUEUE_LENGTH; if (this._queue.size() < Constant.MAX_QUEUE_LENGTH + 1) { return (Point)p.clone(); } Point result = ca...
@Test public void testAsUnmodifiableKDTree() throws KeySizeException, KeyDuplicateException, KeyMissingException { KDTree kd = new KDTree(2); kd.insert(new double[]{1,2},1); kd.insert(new double[]{2,2},2); KDTree tree = KDTreeTool.unmodifiableKDTree(kd); int val = (int) tree.nearest(new double[]{1,2}); System.out.print...
public static KDTree unmodifiableKDTree(KDTree tree) { UnmodifiableKDTree kdTree = new KDTreeTool.UnmodifiableKDTree(2); kdTree.setKdTree(tree); return kdTree; }
KDTreeTool { public static KDTree unmodifiableKDTree(KDTree tree) { UnmodifiableKDTree kdTree = new KDTreeTool.UnmodifiableKDTree(2); kdTree.setKdTree(tree); return kdTree; } }
KDTreeTool { public static KDTree unmodifiableKDTree(KDTree tree) { UnmodifiableKDTree kdTree = new KDTreeTool.UnmodifiableKDTree(2); kdTree.setKdTree(tree); return kdTree; } }
KDTreeTool { public static KDTree unmodifiableKDTree(KDTree tree) { UnmodifiableKDTree kdTree = new KDTreeTool.UnmodifiableKDTree(2); kdTree.setKdTree(tree); return kdTree; } static KDTree unmodifiableKDTree(KDTree tree); }
KDTreeTool { public static KDTree unmodifiableKDTree(KDTree tree) { UnmodifiableKDTree kdTree = new KDTreeTool.UnmodifiableKDTree(2); kdTree.setKdTree(tree); return kdTree; } static KDTree unmodifiableKDTree(KDTree tree); }
@Test public void testChecker() { Random rand = new Random(); for (int i = 0; i < 40; i++) { Point p = new Point(i*50 + rand.nextInt(10), 1300 + rand.nextInt(10)); PathPoint pp = new PathPoint(p, 0); Point ret = checker.checker(pp); if (ret != null) { System.out.println(ret); } else { System.out.println("fail"); } } fo...
public Point checker(PathPoint pathPoint) { int x = pathPoint.getX(), y = pathPoint.getY(); int angle = pathPoint.angle(); if (queue.size() > 0) { PathPoint lastPoint = this.queue.peekLast(); int distance = (int) Math.sqrt(Math.pow(lastPoint.getX() - x, 2) + Math.pow(lastPoint.getY() + y, 2)); if (distance < 40) { retu...
StaticPathChecker { public Point checker(PathPoint pathPoint) { int x = pathPoint.getX(), y = pathPoint.getY(); int angle = pathPoint.angle(); if (queue.size() > 0) { PathPoint lastPoint = this.queue.peekLast(); int distance = (int) Math.sqrt(Math.pow(lastPoint.getX() - x, 2) + Math.pow(lastPoint.getY() + y, 2)); if (d...
StaticPathChecker { public Point checker(PathPoint pathPoint) { int x = pathPoint.getX(), y = pathPoint.getY(); int angle = pathPoint.angle(); if (queue.size() > 0) { PathPoint lastPoint = this.queue.peekLast(); int distance = (int) Math.sqrt(Math.pow(lastPoint.getX() - x, 2) + Math.pow(lastPoint.getY() + y, 2)); if (d...
StaticPathChecker { public Point checker(PathPoint pathPoint) { int x = pathPoint.getX(), y = pathPoint.getY(); int angle = pathPoint.angle(); if (queue.size() > 0) { PathPoint lastPoint = this.queue.peekLast(); int distance = (int) Math.sqrt(Math.pow(lastPoint.getX() - x, 2) + Math.pow(lastPoint.getY() + y, 2)); if (d...
StaticPathChecker { public Point checker(PathPoint pathPoint) { int x = pathPoint.getX(), y = pathPoint.getY(); int angle = pathPoint.angle(); if (queue.size() > 0) { PathPoint lastPoint = this.queue.peekLast(); int distance = (int) Math.sqrt(Math.pow(lastPoint.getX() - x, 2) + Math.pow(lastPoint.getY() + y, 2)); if (d...
@Test public void testPF() { Point point = new Point(1000, 1000); pf.init(point); for (int i = 1; i < 5; i++) { Sensors ss = CommonUtils.buildSensorsData(); pf.predict(ss, 0.1); Point p = new Point(1000 , 1000 + i*Constant.NORMAL_STEP_LENGTH); double[][] r = {{0.1, 0}, {0, 0.1}}; Matrix R = new Matrix(r); Point ret = p...
public PF(int n) { this.particleNumbers = n; MIN_NEFF = 2*n/3; particles = new Particle[particleNumbers]; LOGGER.debug("particle numbers: {}", particleNumbers); }
PF implements Filter { public PF(int n) { this.particleNumbers = n; MIN_NEFF = 2*n/3; particles = new Particle[particleNumbers]; LOGGER.debug("particle numbers: {}", particleNumbers); } }
PF implements Filter { public PF(int n) { this.particleNumbers = n; MIN_NEFF = 2*n/3; particles = new Particle[particleNumbers]; LOGGER.debug("particle numbers: {}", particleNumbers); } PF(int n); }
PF implements Filter { public PF(int n) { this.particleNumbers = n; MIN_NEFF = 2*n/3; particles = new Particle[particleNumbers]; LOGGER.debug("particle numbers: {}", particleNumbers); } PF(int n); @Override void init(Point point); @Override void predict(Sensors sensor, double al); @Override Point update(Point fingerRet...
PF implements Filter { public PF(int n) { this.particleNumbers = n; MIN_NEFF = 2*n/3; particles = new Particle[particleNumbers]; LOGGER.debug("particle numbers: {}", particleNumbers); } PF(int n); @Override void init(Point point); @Override void predict(Sensors sensor, double al); @Override Point update(Point fingerRet...
@Test public void testCreate() throws Exception { WxCpDepart cpDepart = new WxCpDepart(); cpDepart.setName("子部门" + System.currentTimeMillis()); cpDepart.setParentId(1); cpDepart.setOrder(1); Integer departId = this.wxCpService.getDepartmentService().create(cpDepart); System.out.println(departId); }
@Override public Integer create(WxCpDepart depart) throws WxErrorException { String url = "https: String responseContent = this.mainService.post(url, depart.toJson()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return GsonHelper.getAsInteger(tmpJsonElement.getAsJsonObject().get("id")); }
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public Integer create(WxCpDepart depart) throws WxErrorException { String url = "https: String responseContent = this.mainService.post(url, depart.toJson()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return GsonHelper.get...
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public Integer create(WxCpDepart depart) throws WxErrorException { String url = "https: String responseContent = this.mainService.post(url, depart.toJson()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return GsonHelper.get...
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public Integer create(WxCpDepart depart) throws WxErrorException { String url = "https: String responseContent = this.mainService.post(url, depart.toJson()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return GsonHelper.get...
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public Integer create(WxCpDepart depart) throws WxErrorException { String url = "https: String responseContent = this.mainService.post(url, depart.toJson()); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return GsonHelper.get...
@Test(dataProvider = "oneDay") public void testGetArticleTotal(Date date) throws WxErrorException { List<WxDataCubeArticleTotal> results = this.wxService.getDataCubeService() .getArticleTotal(date, date); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeArticleTotal> getArticleTotal(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_ARTICLE_TOTAL, buildParams(beginDate, endDate)); return WxDataCubeArticleTotal.fromJson(responseContent); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleTotal> getArticleTotal(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_ARTICLE_TOTAL, buildParams(beginDate, endDate)); return WxDataCubeArticleTotal.fromJson(respon...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleTotal> getArticleTotal(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_ARTICLE_TOTAL, buildParams(beginDate, endDate)); return WxDataCubeArticleTotal.fromJson(respon...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleTotal> getArticleTotal(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_ARTICLE_TOTAL, buildParams(beginDate, endDate)); return WxDataCubeArticleTotal.fromJson(respon...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleTotal> getArticleTotal(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_ARTICLE_TOTAL, buildParams(beginDate, endDate)); return WxDataCubeArticleTotal.fromJson(respon...
@Test(dataProvider = "threeDays") public void testGetUserRead(Date beginDate, Date endDate) throws WxErrorException { List<WxDataCubeArticleResult> results = this.wxService.getDataCubeService() .getUserRead(beginDate, endDate); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeArticleResult> getUserRead(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserRead(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserRead(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserRead(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataCubeUserS...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserRead(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataCubeUserS...
@Test(dataProvider = "oneDay") public void testGetUserReadHour(Date date) throws WxErrorException { List<WxDataCubeArticleResult> results = this.wxService.getDataCubeService() .getUserReadHour(date, date); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeArticleResult> getUserReadHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ_HOUR, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserReadHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ_HOUR, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserReadHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ_HOUR, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserReadHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ_HOUR, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxData...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserReadHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_READ_HOUR, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxData...
@Test(dataProvider = "sevenDays") public void testGetUserShare(Date beginDate, Date endDate) throws WxErrorException { List<WxDataCubeArticleResult> results = this.wxService.getDataCubeService() .getUserShare(beginDate, endDate); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeArticleResult> getUserShare(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserShare(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserShare(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserShare(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataCubeUse...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserShare(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataCubeUse...
@Test(dataProvider = "oneDay") public void testGetUserShareHour(Date date) throws WxErrorException { List<WxDataCubeArticleResult> results = this.wxService.getDataCubeService() .getUserShareHour(date, date); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeArticleResult> getUserShareHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE_HOUR, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserShareHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE_HOUR, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserShareHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE_HOUR, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserShareHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE_HOUR, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDa...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeArticleResult> getUserShareHour(Date beginDate, Date endDate) throws WxErrorException { return this.getArticleResults(GET_USER_SHARE_HOUR, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDa...
@Test(dataProvider = "sevenDays") public void testGetUpstreamMsg(Date beginDate, Date endDate) throws WxErrorException { List<WxDataCubeMsgResult> results = this.wxService.getDataCubeService() .getUpstreamMsg(beginDate, endDate); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeMsgResult> getUpstreamMsg(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsg(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsg(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsg(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataCubeUserSu...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsg(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataCubeUserSu...
@Test(dataProvider = "oneDay") public void testGetUpstreamMsgHour(Date date) throws WxErrorException { List<WxDataCubeMsgResult> results = this.wxService.getDataCubeService() .getUpstreamMsgHour(date, date); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeMsgResult> getUpstreamMsgHour(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_HOUR, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgHour(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_HOUR, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgHour(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_HOUR, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgHour(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_HOUR, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataC...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgHour(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_HOUR, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataC...
@Test(dataProvider = "thirtyDays") public void testGetUpstreamMsgWeek(Date beginDate, Date endDate) throws WxErrorException { List<WxDataCubeMsgResult> results = this.wxService.getDataCubeService() .getUpstreamMsgWeek(beginDate, endDate); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeMsgResult> getUpstreamMsgWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_WEEK, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_WEEK, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_WEEK, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_WEEK, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataC...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_WEEK, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataC...
@Test(dataProvider = "thirtyDays") public void testGetUpstreamMsgMonth(Date beginDate, Date endDate) throws WxErrorException { List<WxDataCubeMsgResult> results = this.wxService.getDataCubeService() .getUpstreamMsgMonth(beginDate, endDate); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeMsgResult> getUpstreamMsgMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_MONTH, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_MONTH, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_MONTH, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_MONTH, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDat...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_MONTH, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDat...
@Test(dataProvider = "fifteenDays") public void testGetUpstreamMsgDist(Date beginDate, Date endDate) throws WxErrorException { List<WxDataCubeMsgResult> results = this.wxService.getDataCubeService() .getUpstreamMsgDist(beginDate, endDate); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeMsgResult> getUpstreamMsgDist(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDist(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDist(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDist(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataC...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDist(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override List<WxDataC...
@Test(dependsOnMethods = {"testListAll", "testUpdate", "testCreate"}) public void testAddUsers2Tag() throws Exception { List<String> userIds = Splitter.on("|").splitToList(this.configStorage.getUserId()); WxCpTagAddOrRemoveUsersResult result = this.wxService.getTagService().addUsers2Tag(this.tagId, userIds, null); asse...
@Override public WxCpTagAddOrRemoveUsersResult addUsers2Tag(String tagId, List<String> userIds, List<String> partyIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); if (userIds != null) { JsonArray jsonArray = new JsonArray(); for (Strin...
WxCpTagServiceImpl implements WxCpTagService { @Override public WxCpTagAddOrRemoveUsersResult addUsers2Tag(String tagId, List<String> userIds, List<String> partyIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); if (userIds != null) { Js...
WxCpTagServiceImpl implements WxCpTagService { @Override public WxCpTagAddOrRemoveUsersResult addUsers2Tag(String tagId, List<String> userIds, List<String> partyIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); if (userIds != null) { Js...
WxCpTagServiceImpl implements WxCpTagService { @Override public WxCpTagAddOrRemoveUsersResult addUsers2Tag(String tagId, List<String> userIds, List<String> partyIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); if (userIds != null) { Js...
WxCpTagServiceImpl implements WxCpTagService { @Override public WxCpTagAddOrRemoveUsersResult addUsers2Tag(String tagId, List<String> userIds, List<String> partyIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); if (userIds != null) { Js...
@Test(dataProvider = "thirtyDays") public void testGetUpstreamMsgDistWeek(Date beginDate, Date endDate) throws WxErrorException { List<WxDataCubeMsgResult> results = this.wxService.getDataCubeService() .getUpstreamMsgDistWeek(beginDate, endDate); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeMsgResult> getUpstreamMsgDistWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_WEEK, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDistWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_WEEK, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDistWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_WEEK, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDistWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_WEEK, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override Lis...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDistWeek(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_WEEK, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override Lis...
@Test(dataProvider = "thirtyDays") public void testGetUpstreamMsgDistMonth(Date beginDate, Date endDate) throws WxErrorException { List<WxDataCubeMsgResult> results = this.wxService.getDataCubeService() .getUpstreamMsgDistMonth(beginDate, endDate); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeMsgResult> getUpstreamMsgDistMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_MONTH, beginDate, endDate); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDistMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_MONTH, beginDate, endDate); } }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDistMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_MONTH, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDistMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_MONTH, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override L...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeMsgResult> getUpstreamMsgDistMonth(Date beginDate, Date endDate) throws WxErrorException { return this.getUpstreamMsg(GET_UPSTREAM_MSG_DIST_MONTH, beginDate, endDate); } WxMpDataCubeServiceImpl(WxMpService wxMpService); @Override L...
@Test(dataProvider = "thirtyDays") public void testGetInterfaceSummary(Date beginDate, Date endDate) throws WxErrorException { List<WxDataCubeInterfaceResult> results = this.wxService.getDataCubeService() .getInterfaceSummary(beginDate, endDate); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeInterfaceResult> getInterfaceSummary(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY, buildParams(beginDate, endDate)); return WxDataCubeInterfaceResult.fromJson(responseContent); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeInterfaceResult> getInterfaceSummary(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY, buildParams(beginDate, endDate)); return WxDataCubeInterfaceResult.f...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeInterfaceResult> getInterfaceSummary(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY, buildParams(beginDate, endDate)); return WxDataCubeInterfaceResult.f...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeInterfaceResult> getInterfaceSummary(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY, buildParams(beginDate, endDate)); return WxDataCubeInterfaceResult.f...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeInterfaceResult> getInterfaceSummary(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY, buildParams(beginDate, endDate)); return WxDataCubeInterfaceResult.f...
@Test(dataProvider = "oneDay") public void testGetInterfaceSummaryHour(Date date) throws WxErrorException { List<WxDataCubeInterfaceResult> results = this.wxService.getDataCubeService() .getInterfaceSummaryHour(date, date); Assert.assertNotNull(results); System.out.println(results); }
@Override public List<WxDataCubeInterfaceResult> getInterfaceSummaryHour(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY_HOUR, buildParams(beginDate, endDate)); return WxDataCubeInterfaceResult.fromJson(responseContent); }
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeInterfaceResult> getInterfaceSummaryHour(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY_HOUR, buildParams(beginDate, endDate)); return WxDataCubeInterfac...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeInterfaceResult> getInterfaceSummaryHour(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY_HOUR, buildParams(beginDate, endDate)); return WxDataCubeInterfac...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeInterfaceResult> getInterfaceSummaryHour(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY_HOUR, buildParams(beginDate, endDate)); return WxDataCubeInterfac...
WxMpDataCubeServiceImpl implements WxMpDataCubeService { @Override public List<WxDataCubeInterfaceResult> getInterfaceSummaryHour(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMpService.post(GET_INTERFACE_SUMMARY_HOUR, buildParams(beginDate, endDate)); return WxDataCubeInterfac...
@Test(dependsOnMethods = {"testUploadMaterial"}) public void testAddNews() throws WxErrorException { WxMpMaterialNews wxMpMaterialNewsSingle = new WxMpMaterialNews(); WxMpMaterialNews.WxMpMaterialNewsArticle article = new WxMpMaterialNews.WxMpMaterialNewsArticle(); article.setAuthor("author"); article.setThumbMediaId(t...
@Override public WxMpMaterialUploadResult materialNewsUpload(WxMpMaterialNews news) throws WxErrorException { if (news == null || news.isEmpty()) { throw new IllegalArgumentException("news is empty!"); } String url = MATERIAL_API_URL_PREFIX + "/add_news"; String responseContent = this.wxMpService.post(url, news.toJson(...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialUploadResult materialNewsUpload(WxMpMaterialNews news) throws WxErrorException { if (news == null || news.isEmpty()) { throw new IllegalArgumentException("news is empty!"); } String url = MATERIAL_API_URL_PREFIX + "/add_news"; String ...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialUploadResult materialNewsUpload(WxMpMaterialNews news) throws WxErrorException { if (news == null || news.isEmpty()) { throw new IllegalArgumentException("news is empty!"); } String url = MATERIAL_API_URL_PREFIX + "/add_news"; String ...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialUploadResult materialNewsUpload(WxMpMaterialNews news) throws WxErrorException { if (news == null || news.isEmpty()) { throw new IllegalArgumentException("news is empty!"); } String url = MATERIAL_API_URL_PREFIX + "/add_news"; String ...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialUploadResult materialNewsUpload(WxMpMaterialNews news) throws WxErrorException { if (news == null || news.isEmpty()) { throw new IllegalArgumentException("news is empty!"); } String url = MATERIAL_API_URL_PREFIX + "/add_news"; String ...
@Test(dependsOnMethods = {"testAddNews"}) public void testGetNewsInfo() throws WxErrorException { WxMpMaterialNews wxMpMaterialNewsSingle = this.wxService .getMaterialService().materialNewsInfo(this.singleNewsMediaId); WxMpMaterialNews wxMpMaterialNewsMultiple = this.wxService .getMaterialService().materialNewsInfo(thi...
@Override public WxMpMaterialNews materialNewsInfo(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/get_material"; return this.wxMpService.execute(MaterialNewsInfoRequestExecutor.create(this.wxMpService.getRequestHttp()), url, media_id); }
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialNews materialNewsInfo(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/get_material"; return this.wxMpService.execute(MaterialNewsInfoRequestExecutor.create(this.wxMpService.getRequestHttp()), url, m...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialNews materialNewsInfo(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/get_material"; return this.wxMpService.execute(MaterialNewsInfoRequestExecutor.create(this.wxMpService.getRequestHttp()), url, m...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialNews materialNewsInfo(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/get_material"; return this.wxMpService.execute(MaterialNewsInfoRequestExecutor.create(this.wxMpService.getRequestHttp()), url, m...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialNews materialNewsInfo(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/get_material"; return this.wxMpService.execute(MaterialNewsInfoRequestExecutor.create(this.wxMpService.getRequestHttp()), url, m...
@Test(dependsOnMethods = {"testUpdateNewsInfo"}) public void testMaterialNewsList() throws WxErrorException { WxMpMaterialNewsBatchGetResult wxMpMaterialNewsBatchGetResult = this.wxService.getMaterialService().materialNewsBatchGet(0, 20); assertNotNull(wxMpMaterialNewsBatchGetResult); }
@Override public WxMpMaterialNewsBatchGetResult materialNewsBatchGet(int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", WxConsts.MATERIAL_NEWS); params.put("offset", offset); params.put("count", c...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialNewsBatchGetResult materialNewsBatchGet(int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", WxConsts.MATERIAL_N...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialNewsBatchGetResult materialNewsBatchGet(int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", WxConsts.MATERIAL_N...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialNewsBatchGetResult materialNewsBatchGet(int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", WxConsts.MATERIAL_N...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialNewsBatchGetResult materialNewsBatchGet(int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", WxConsts.MATERIAL_N...
@Test(dependsOnMethods = {"testMaterialNewsList"}) public void testMaterialFileList() throws WxErrorException { WxMpMaterialFileBatchGetResult wxMpMaterialVoiceBatchGetResult = this.wxService.getMaterialService().materialFileBatchGet(WxConsts.MATERIAL_VOICE, 0, 20); WxMpMaterialFileBatchGetResult wxMpMaterialVideoBatch...
@Override public WxMpMaterialFileBatchGetResult materialFileBatchGet(String type, int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", type); params.put("offset", offset); params.put("count", count)...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialFileBatchGetResult materialFileBatchGet(String type, int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", type);...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialFileBatchGetResult materialFileBatchGet(String type, int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", type);...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialFileBatchGetResult materialFileBatchGet(String type, int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", type);...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMpMaterialFileBatchGetResult materialFileBatchGet(String type, int offset, int count) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/batchget_material"; Map<String, Object> params = new HashMap<>(); params.put("type", type);...
@Test(dependsOnMethods = {"testMaterialFileList"}, dataProvider = "allTestMaterial") public void testDeleteMaterial(String mediaId) throws WxErrorException { boolean result = this.wxService.getMaterialService().materialDelete(mediaId); assertTrue(result); }
@Override public boolean materialDelete(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/del_material"; return this.wxMpService.execute(MaterialDeleteRequestExecutor.create(this.wxMpService.getRequestHttp()), url, media_id); }
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public boolean materialDelete(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/del_material"; return this.wxMpService.execute(MaterialDeleteRequestExecutor.create(this.wxMpService.getRequestHttp()), url, media_id); } }
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public boolean materialDelete(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/del_material"; return this.wxMpService.execute(MaterialDeleteRequestExecutor.create(this.wxMpService.getRequestHttp()), url, media_id); } W...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public boolean materialDelete(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/del_material"; return this.wxMpService.execute(MaterialDeleteRequestExecutor.create(this.wxMpService.getRequestHttp()), url, media_id); } W...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public boolean materialDelete(String media_id) throws WxErrorException { String url = MATERIAL_API_URL_PREFIX + "/del_material"; return this.wxMpService.execute(MaterialDeleteRequestExecutor.create(this.wxMpService.getRequestHttp()), url, media_id); } W...
@Test(dependsOnMethods = {"testAddUsers2Tag", "testListAll", "testUpdate", "testCreate"}) public void testListUsersByTagId() throws Exception { List<WxCpUser> users = this.wxService.getTagService().listUsersByTagId(this.tagId); assertNotEquals(users.size(), 0); }
@Override public List<WxCpUser> listUsersByTagId(String tagId) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.create() .fromJson( tmpJsonElement.getAsJsonObject...
WxCpTagServiceImpl implements WxCpTagService { @Override public List<WxCpUser> listUsersByTagId(String tagId) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.cre...
WxCpTagServiceImpl implements WxCpTagService { @Override public List<WxCpUser> listUsersByTagId(String tagId) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.cre...
WxCpTagServiceImpl implements WxCpTagService { @Override public List<WxCpUser> listUsersByTagId(String tagId) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.cre...
WxCpTagServiceImpl implements WxCpTagService { @Override public List<WxCpUser> listUsersByTagId(String tagId) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.cre...
@Test(dataProvider = "mediaFiles") public void testUploadMedia(String mediaType, String fileType, String fileName) throws WxErrorException, IOException { try (InputStream inputStream = ClassLoader.getSystemResourceAsStream(fileName)) { WxMediaUploadResult res = this.wxService.getMaterialService().mediaUpload(mediaType,...
@Override public WxMediaUploadResult mediaUpload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException { try { return this.mediaUpload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); } catch (IOException e) { e.printStackTrace(); throw new WxErrorE...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMediaUploadResult mediaUpload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException { try { return this.mediaUpload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); } catch ...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMediaUploadResult mediaUpload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException { try { return this.mediaUpload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); } catch ...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMediaUploadResult mediaUpload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException { try { return this.mediaUpload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); } catch ...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public WxMediaUploadResult mediaUpload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException { try { return this.mediaUpload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); } catch ...
@Test(dependsOnMethods = {"testUploadMedia"}, dataProvider = "downloadMedia") public void testDownloadMedia(String mediaId) throws WxErrorException { File file = this.wxService.getMaterialService().mediaDownload(mediaId); assertNotNull(file); System.out.println(file.getAbsolutePath()); }
@Override public File mediaDownload(String media_id) throws WxErrorException { String url = MEDIA_API_URL_PREFIX + "/get"; return this.wxMpService.execute( MediaDownloadRequestExecutor.create(this.wxMpService.getRequestHttp(), this.wxMpService.getWxMpConfigStorage().getTmpDirFile()), url, "media_id=" + media_id); }
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public File mediaDownload(String media_id) throws WxErrorException { String url = MEDIA_API_URL_PREFIX + "/get"; return this.wxMpService.execute( MediaDownloadRequestExecutor.create(this.wxMpService.getRequestHttp(), this.wxMpService.getWxMpConfigStorag...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public File mediaDownload(String media_id) throws WxErrorException { String url = MEDIA_API_URL_PREFIX + "/get"; return this.wxMpService.execute( MediaDownloadRequestExecutor.create(this.wxMpService.getRequestHttp(), this.wxMpService.getWxMpConfigStorag...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public File mediaDownload(String media_id) throws WxErrorException { String url = MEDIA_API_URL_PREFIX + "/get"; return this.wxMpService.execute( MediaDownloadRequestExecutor.create(this.wxMpService.getRequestHttp(), this.wxMpService.getWxMpConfigStorag...
WxMpMaterialServiceImpl implements WxMpMaterialService { @Override public File mediaDownload(String media_id) throws WxErrorException { String url = MEDIA_API_URL_PREFIX + "/get"; return this.wxMpService.execute( MediaDownloadRequestExecutor.create(this.wxMpService.getRequestHttp(), this.wxMpService.getWxMpConfigStorag...
@Test(dataProvider = "sceneIds") public void testQrCodeCreateTmpTicket(int sceneId) throws WxErrorException { WxMpQrCodeTicket ticket = this.wxService.getQrcodeService().qrCodeCreateTmpTicket(sceneId, null); Assert.assertNotNull(ticket.getUrl()); Assert.assertNotNull(ticket.getTicket()); Assert.assertTrue(ticket.getExp...
@Override public WxMpQrCodeTicket qrCodeCreateTmpTicket(int sceneId, Integer expireSeconds) throws WxErrorException { if (sceneId == 0) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("临时二维码场景值不能为0!").build()); } if (expireSeconds != null && expireSeconds > 2592000) { throw new WxErrorExc...
WxMpQrcodeServiceImpl implements WxMpQrcodeService { @Override public WxMpQrCodeTicket qrCodeCreateTmpTicket(int sceneId, Integer expireSeconds) throws WxErrorException { if (sceneId == 0) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("临时二维码场景值不能为0!").build()); } if (expireSeconds != nu...
WxMpQrcodeServiceImpl implements WxMpQrcodeService { @Override public WxMpQrCodeTicket qrCodeCreateTmpTicket(int sceneId, Integer expireSeconds) throws WxErrorException { if (sceneId == 0) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("临时二维码场景值不能为0!").build()); } if (expireSeconds != nu...
WxMpQrcodeServiceImpl implements WxMpQrcodeService { @Override public WxMpQrCodeTicket qrCodeCreateTmpTicket(int sceneId, Integer expireSeconds) throws WxErrorException { if (sceneId == 0) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("临时二维码场景值不能为0!").build()); } if (expireSeconds != nu...
WxMpQrcodeServiceImpl implements WxMpQrcodeService { @Override public WxMpQrCodeTicket qrCodeCreateTmpTicket(int sceneId, Integer expireSeconds) throws WxErrorException { if (sceneId == 0) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("临时二维码场景值不能为0!").build()); } if (expireSeconds != nu...
@Test(dataProvider = "sceneIds") public void testQrCodeCreateLastTicket(int sceneId) throws WxErrorException { WxMpQrCodeTicket ticket = this.wxService.getQrcodeService().qrCodeCreateLastTicket(sceneId); Assert.assertNotNull(ticket.getUrl()); Assert.assertNotNull(ticket.getTicket()); Assert.assertTrue(ticket.getExpire_...
@Override public WxMpQrCodeTicket qrCodeCreateLastTicket(int sceneId) throws WxErrorException { if (sceneId < 1 || sceneId > 100000) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("永久二维码的场景值目前只支持1--100000!").build()); } String url = API_URL_PREFIX + "/create"; JsonObject json = new JsonO...
WxMpQrcodeServiceImpl implements WxMpQrcodeService { @Override public WxMpQrCodeTicket qrCodeCreateLastTicket(int sceneId) throws WxErrorException { if (sceneId < 1 || sceneId > 100000) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("永久二维码的场景值目前只支持1--100000!").build()); } String url = AP...
WxMpQrcodeServiceImpl implements WxMpQrcodeService { @Override public WxMpQrCodeTicket qrCodeCreateLastTicket(int sceneId) throws WxErrorException { if (sceneId < 1 || sceneId > 100000) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("永久二维码的场景值目前只支持1--100000!").build()); } String url = AP...
WxMpQrcodeServiceImpl implements WxMpQrcodeService { @Override public WxMpQrCodeTicket qrCodeCreateLastTicket(int sceneId) throws WxErrorException { if (sceneId < 1 || sceneId > 100000) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("永久二维码的场景值目前只支持1--100000!").build()); } String url = AP...
WxMpQrcodeServiceImpl implements WxMpQrcodeService { @Override public WxMpQrCodeTicket qrCodeCreateLastTicket(int sceneId) throws WxErrorException { if (sceneId < 1 || sceneId > 100000) { throw new WxErrorException(WxError.newBuilder().setErrorCode(-1).setErrorMsg("永久二维码的场景值目前只支持1--100000!").build()); } String url = AP...
@Test public void testTagCreate() throws Exception { String tagName = "测试标签" + System.currentTimeMillis(); WxUserTag res = this.wxService.getUserTagService().tagCreate(tagName); System.out.println(res); this.tagId = res.getId(); Assert.assertEquals(tagName, res.getName()); }
@Override public WxUserTag tagCreate(String name) throws WxErrorException { String url = API_URL_PREFIX + "/create"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("name", name); json.add("tag", tagJson); String responseContent = this.wxMpService.post(url, json.toString()...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public WxUserTag tagCreate(String name) throws WxErrorException { String url = API_URL_PREFIX + "/create"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("name", name); json.add("tag", tagJson); String respo...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public WxUserTag tagCreate(String name) throws WxErrorException { String url = API_URL_PREFIX + "/create"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("name", name); json.add("tag", tagJson); String respo...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public WxUserTag tagCreate(String name) throws WxErrorException { String url = API_URL_PREFIX + "/create"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("name", name); json.add("tag", tagJson); String respo...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public WxUserTag tagCreate(String name) throws WxErrorException { String url = API_URL_PREFIX + "/create"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("name", name); json.add("tag", tagJson); String respo...
@Test public void testTagGet() throws Exception { List<WxUserTag> res = this.wxService.getUserTagService().tagGet(); System.out.println(res); Assert.assertNotNull(res); }
@Override public List<WxUserTag> tagGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; String responseContent = this.wxMpService.get(url, null); return WxUserTag.listFromJson(responseContent); }
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public List<WxUserTag> tagGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; String responseContent = this.wxMpService.get(url, null); return WxUserTag.listFromJson(responseContent); } }
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public List<WxUserTag> tagGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; String responseContent = this.wxMpService.get(url, null); return WxUserTag.listFromJson(responseContent); } WxMpUserTagServiceImpl(WxMpService wxMpService); }
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public List<WxUserTag> tagGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; String responseContent = this.wxMpService.get(url, null); return WxUserTag.listFromJson(responseContent); } WxMpUserTagServiceImpl(WxMpService wxMpService); @O...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public List<WxUserTag> tagGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; String responseContent = this.wxMpService.get(url, null); return WxUserTag.listFromJson(responseContent); } WxMpUserTagServiceImpl(WxMpService wxMpService); @O...
@Test(dependsOnMethods = {"testTagCreate"}) public void testTagUpdate() throws Exception { String tagName = "修改标签" + System.currentTimeMillis(); Boolean res = this.wxService.getUserTagService().tagUpdate(this.tagId, tagName); System.out.println(res); Assert.assertTrue(res); }
@Override public Boolean tagUpdate(Long id, String name) throws WxErrorException { String url = API_URL_PREFIX + "/update"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); tagJson.addProperty("name", name); json.add("tag", tagJson); String responseContent = this...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public Boolean tagUpdate(Long id, String name) throws WxErrorException { String url = API_URL_PREFIX + "/update"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); tagJson.addProperty("name", name); ...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public Boolean tagUpdate(Long id, String name) throws WxErrorException { String url = API_URL_PREFIX + "/update"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); tagJson.addProperty("name", name); ...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public Boolean tagUpdate(Long id, String name) throws WxErrorException { String url = API_URL_PREFIX + "/update"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); tagJson.addProperty("name", name); ...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public Boolean tagUpdate(Long id, String name) throws WxErrorException { String url = API_URL_PREFIX + "/update"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); tagJson.addProperty("name", name); ...
@Test(dependsOnMethods = {"testTagCreate"}) public void testTagDelete() throws Exception { Boolean res = this.wxService.getUserTagService().tagDelete(this.tagId); System.out.println(res); Assert.assertTrue(res); }
@Override public Boolean tagDelete(Long id) throws WxErrorException { String url = API_URL_PREFIX + "/delete"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); json.add("tag", tagJson); String responseContent = this.wxMpService.post(url, json.toString()); WxError...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public Boolean tagDelete(Long id) throws WxErrorException { String url = API_URL_PREFIX + "/delete"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); json.add("tag", tagJson); String responseContent...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public Boolean tagDelete(Long id) throws WxErrorException { String url = API_URL_PREFIX + "/delete"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); json.add("tag", tagJson); String responseContent...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public Boolean tagDelete(Long id) throws WxErrorException { String url = API_URL_PREFIX + "/delete"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); json.add("tag", tagJson); String responseContent...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public Boolean tagDelete(Long id) throws WxErrorException { String url = API_URL_PREFIX + "/delete"; JsonObject json = new JsonObject(); JsonObject tagJson = new JsonObject(); tagJson.addProperty("id", id); json.add("tag", tagJson); String responseContent...
@Test public void testTagListUser() throws Exception { WxTagListUser res = this.wxService.getUserTagService().tagListUser(this.tagId, null); System.out.println(res); Assert.assertNotNull(res); }
@Override public WxTagListUser tagListUser(Long tagId, String nextOpenid) throws WxErrorException { String url = "https: JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); json.addProperty("next_openid", StringUtils.trimToEmpty(nextOpenid)); String responseContent = this.wxMpService.post(url, json.to...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public WxTagListUser tagListUser(Long tagId, String nextOpenid) throws WxErrorException { String url = "https: JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); json.addProperty("next_openid", StringUtils.trimToEmpty(nextOpenid)); Stri...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public WxTagListUser tagListUser(Long tagId, String nextOpenid) throws WxErrorException { String url = "https: JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); json.addProperty("next_openid", StringUtils.trimToEmpty(nextOpenid)); Stri...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public WxTagListUser tagListUser(Long tagId, String nextOpenid) throws WxErrorException { String url = "https: JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); json.addProperty("next_openid", StringUtils.trimToEmpty(nextOpenid)); Stri...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public WxTagListUser tagListUser(Long tagId, String nextOpenid) throws WxErrorException { String url = "https: JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); json.addProperty("next_openid", StringUtils.trimToEmpty(nextOpenid)); Stri...
@Test public void testBatchTagging() throws Exception { String[] openids = new String[]{((TestConfigStorage) this.wxService.getWxMpConfigStorage()).getOpenid()}; boolean res = this.wxService.getUserTagService().batchTagging(this.tagId, openids); System.out.println(res); Assert.assertTrue(res); }
@Override public boolean batchTagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchtagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(); for (String openid : openids) { openidArrayJson.add(open...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public boolean batchTagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchtagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(); f...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public boolean batchTagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchtagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(); f...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public boolean batchTagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchtagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(); f...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public boolean batchTagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchtagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(); f...
@Test(dependsOnMethods = {"testListUsersByTagId", "testAddUsers2Tag", "testListAll", "testUpdate", "testCreate"}) public void testRemoveUsersFromTag() throws Exception { List<String> userIds = Splitter.on("|").splitToList(this.configStorage.getUserId()); WxCpTagAddOrRemoveUsersResult result = this.wxService.getTagServi...
@Override public WxCpTagAddOrRemoveUsersResult removeUsersFromTag(String tagId, List<String> userIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); JsonArray jsonArray = new JsonArray(); for (String userId : userIds) { jsonArray.add(new ...
WxCpTagServiceImpl implements WxCpTagService { @Override public WxCpTagAddOrRemoveUsersResult removeUsersFromTag(String tagId, List<String> userIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); JsonArray jsonArray = new JsonArray(); for...
WxCpTagServiceImpl implements WxCpTagService { @Override public WxCpTagAddOrRemoveUsersResult removeUsersFromTag(String tagId, List<String> userIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); JsonArray jsonArray = new JsonArray(); for...
WxCpTagServiceImpl implements WxCpTagService { @Override public WxCpTagAddOrRemoveUsersResult removeUsersFromTag(String tagId, List<String> userIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); JsonArray jsonArray = new JsonArray(); for...
WxCpTagServiceImpl implements WxCpTagService { @Override public WxCpTagAddOrRemoveUsersResult removeUsersFromTag(String tagId, List<String> userIds) throws WxErrorException { String url = "https: JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("tagid", tagId); JsonArray jsonArray = new JsonArray(); for...
@Test public void testBatchUntagging() throws Exception { String[] openids = new String[]{((TestConfigStorage) this.wxService.getWxMpConfigStorage()).getOpenid()}; boolean res = this.wxService.getUserTagService().batchUntagging(this.tagId, openids); System.out.println(res); Assert.assertTrue(res); }
@Override public boolean batchUntagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchuntagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(); for (String openid : openids) { openidArrayJson.add(...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public boolean batchUntagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchuntagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public boolean batchUntagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchuntagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public boolean batchUntagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchuntagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public boolean batchUntagging(Long tagId, String[] openids) throws WxErrorException { String url = API_URL_PREFIX + "/members/batchuntagging"; JsonObject json = new JsonObject(); json.addProperty("tagid", tagId); JsonArray openidArrayJson = new JsonArray(...
@Test public void testUserTagList() throws Exception { List<Long> res = this.wxService.getUserTagService().userTagList( ((TestConfigStorage) this.wxService.getWxMpConfigStorage()).getOpenid()); System.out.println(res); Assert.assertNotNull(res); }
@Override public List<Long> userTagList(String openid) throws WxErrorException { String url = API_URL_PREFIX + "/getidlist"; JsonObject json = new JsonObject(); json.addProperty("openid", openid); String responseContent = this.wxMpService.post(url, json.toString()); return WxMpGsonBuilder.create().fromJson( new JsonPar...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public List<Long> userTagList(String openid) throws WxErrorException { String url = API_URL_PREFIX + "/getidlist"; JsonObject json = new JsonObject(); json.addProperty("openid", openid); String responseContent = this.wxMpService.post(url, json.toString())...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public List<Long> userTagList(String openid) throws WxErrorException { String url = API_URL_PREFIX + "/getidlist"; JsonObject json = new JsonObject(); json.addProperty("openid", openid); String responseContent = this.wxMpService.post(url, json.toString())...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public List<Long> userTagList(String openid) throws WxErrorException { String url = API_URL_PREFIX + "/getidlist"; JsonObject json = new JsonObject(); json.addProperty("openid", openid); String responseContent = this.wxMpService.post(url, json.toString())...
WxMpUserTagServiceImpl implements WxMpUserTagService { @Override public List<Long> userTagList(String openid) throws WxErrorException { String url = API_URL_PREFIX + "/getidlist"; JsonObject json = new JsonObject(); json.addProperty("openid", openid); String responseContent = this.wxMpService.post(url, json.toString())...
@Test(dataProvider = "menu") public void testMenuCreate(WxMenu wxMenu) throws WxErrorException { System.out.println(wxMenu.toJson()); this.wxService.getMenuService().menuCreate(wxMenu); }
@Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String result = this.wxMpService.post(url, menuJson); log.d...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
@Test public void testMenuTryMatch() throws Exception { WxMenu menu = this.wxService.getMenuService().menuTryMatch("..."); System.out.println(menu); }
@Override public WxMenu menuTryMatch(String userid) throws WxErrorException { String url = API_URL_PREFIX + "/trymatch"; JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("user_id", userid); try { String resultContent = this.wxMpService.post(url, jsonObject.toString()); return WxMenu.fromJson(resultConte...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMenu menuTryMatch(String userid) throws WxErrorException { String url = API_URL_PREFIX + "/trymatch"; JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("user_id", userid); try { String resultContent = this.wxMpService.post(url, jsonObjec...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMenu menuTryMatch(String userid) throws WxErrorException { String url = API_URL_PREFIX + "/trymatch"; JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("user_id", userid); try { String resultContent = this.wxMpService.post(url, jsonObjec...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMenu menuTryMatch(String userid) throws WxErrorException { String url = API_URL_PREFIX + "/trymatch"; JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("user_id", userid); try { String resultContent = this.wxMpService.post(url, jsonObjec...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMenu menuTryMatch(String userid) throws WxErrorException { String url = API_URL_PREFIX + "/trymatch"; JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("user_id", userid); try { String resultContent = this.wxMpService.post(url, jsonObjec...
@Test public void testGetSelfMenuInfo() throws Exception { WxMpGetSelfMenuInfoResult selfMenuInfo = this.wxService.getMenuService().getSelfMenuInfo(); System.out.println(selfMenuInfo); }
@Override public WxMpGetSelfMenuInfoResult getSelfMenuInfo() throws WxErrorException { String url = "https: String resultContent = this.wxMpService.get(url, null); return WxMpGetSelfMenuInfoResult.fromJson(resultContent); }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMpGetSelfMenuInfoResult getSelfMenuInfo() throws WxErrorException { String url = "https: String resultContent = this.wxMpService.get(url, null); return WxMpGetSelfMenuInfoResult.fromJson(resultContent); } }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMpGetSelfMenuInfoResult getSelfMenuInfo() throws WxErrorException { String url = "https: String resultContent = this.wxMpService.get(url, null); return WxMpGetSelfMenuInfoResult.fromJson(resultContent); } WxMpMenuServiceImpl(WxMpService wxMpService); }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMpGetSelfMenuInfoResult getSelfMenuInfo() throws WxErrorException { String url = "https: String resultContent = this.wxMpService.get(url, null); return WxMpGetSelfMenuInfoResult.fromJson(resultContent); } WxMpMenuServiceImpl(WxMpService wxMpService); @...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMpGetSelfMenuInfoResult getSelfMenuInfo() throws WxErrorException { String url = "https: String resultContent = this.wxMpService.get(url, null); return WxMpGetSelfMenuInfoResult.fromJson(resultContent); } WxMpMenuServiceImpl(WxMpService wxMpService); @...
@Test public void testCreateConditionalMenu() throws WxErrorException { String json = "{\n" + " \"button\":[\n" + " { \n" + " \"type\":\"click\",\n" + " \"name\":\"今日歌曲\",\n" + " \"key\":\"V1001_TODAY_MUSIC\" \n" + " },\n" + " { \n" + " \"name\":\"菜单\",\n" + " \"sub_button\":[\n" + " { \n" + " \"type\":\"view\",\n" + "...
@Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String result = this.wxMpService.post(url, menuJson); log.d...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
@Test(dependsOnMethods = {"testCreateConditionalMenu"}) public void testDeleteConditionalMenu() throws WxErrorException { this.wxService.getMenuService().menuDelete(menuId); }
@Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); } }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); } WxMpMenuServiceImpl(WxMpService wxMpService); }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); } WxMpMenuServiceImpl(WxMpService wxMpService); @Override String menuCreate(WxMenu menu)...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); } WxMpMenuServiceImpl(WxMpService wxMpService); @Override String menuCreate(WxMenu menu)...
@Test public void testCreateMenu_by_json() throws WxErrorException { String a = "{\n" + " \"button\": [\n" + " {\n" + " \"type\": \"click\",\n" + " \"name\": \"今日歌曲\",\n" + " \"key\": \"V1001_TODAY_MUSIC\"\n" + " },\n" + " {\n" + " \"name\": \"菜单\",\n" + " \"sub_button\": [\n" + " {\n" + " \"type\": \"view\",\n" + " \"...
@Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String result = this.wxMpService.post(url, menuJson); log.d...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public String menuCreate(WxMenu menu) throws WxErrorException { String menuJson = menu.toJson(); String url = API_URL_PREFIX + "/create"; if (menu.getMatchRule() != null) { url = API_URL_PREFIX + "/addconditional"; } log.debug("开始创建菜单:{}", menuJson); String res...
@Test(dependsOnMethods = {"testMenuCreate"}) public void testMenuGet() throws WxErrorException { WxMpMenu wxMenu = this.wxService.getMenuService().menuGet(); Assert.assertNotNull(wxMenu); System.out.println(wxMenu.toJson()); }
@Override public WxMpMenu menuGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; try { String resultContent = this.wxMpService.get(url, null); return WxMpMenu.fromJson(resultContent); } catch (WxErrorException e) { if (e.getError().getErrorCode() == 46003) { return null; } throw e; } }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMpMenu menuGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; try { String resultContent = this.wxMpService.get(url, null); return WxMpMenu.fromJson(resultContent); } catch (WxErrorException e) { if (e.getError().getErrorCode() == 46...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMpMenu menuGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; try { String resultContent = this.wxMpService.get(url, null); return WxMpMenu.fromJson(resultContent); } catch (WxErrorException e) { if (e.getError().getErrorCode() == 46...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMpMenu menuGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; try { String resultContent = this.wxMpService.get(url, null); return WxMpMenu.fromJson(resultContent); } catch (WxErrorException e) { if (e.getError().getErrorCode() == 46...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public WxMpMenu menuGet() throws WxErrorException { String url = API_URL_PREFIX + "/get"; try { String resultContent = this.wxMpService.get(url, null); return WxMpMenu.fromJson(resultContent); } catch (WxErrorException e) { if (e.getError().getErrorCode() == 46...
@Test(dependsOnMethods = {"testMenuGet","testMenuCreate"}) public void testMenuDelete() throws WxErrorException { this.wxService.getMenuService().menuDelete(); }
@Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); } }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); } WxMpMenuServiceImpl(WxMpService wxMpService); }
WxMpMenuServiceImpl implements WxMpMenuService { @Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); } WxMpMenuServiceImpl(WxMpService wxMpService); @Override String menuCreate(WxMenu menu)...
WxMpMenuServiceImpl implements WxMpMenuService { @Override public void menuDelete() throws WxErrorException { String url = API_URL_PREFIX + "/delete"; String result = this.wxMpService.get(url, null); log.debug("删除菜单结果:{}", result); } WxMpMenuServiceImpl(WxMpService wxMpService); @Override String menuCreate(WxMenu menu)...
@Test(dependsOnMethods = {"testRemoveUsersFromTag", "testListUsersByTagId", "testAddUsers2Tag", "testListAll", "testUpdate", "testCreate"}) public void testDelete() throws Exception { this.wxService.getTagService().delete(this.tagId); }
@Override public void delete(String tagId) throws WxErrorException { String url = "https: this.mainService.get(url, null); }
WxCpTagServiceImpl implements WxCpTagService { @Override public void delete(String tagId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } }
WxCpTagServiceImpl implements WxCpTagService { @Override public void delete(String tagId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } WxCpTagServiceImpl(WxCpService mainService); }
WxCpTagServiceImpl implements WxCpTagService { @Override public void delete(String tagId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } WxCpTagServiceImpl(WxCpService mainService); @Override String create(String tagName); @Override void update(String tagId, String tagName); @Override...
WxCpTagServiceImpl implements WxCpTagService { @Override public void delete(String tagId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } WxCpTagServiceImpl(WxCpService mainService); @Override String create(String tagName); @Override void update(String tagId, String tagName); @Override...
@Test public void test() { WxMpXmlOutTransferKefuMessage m = new WxMpXmlOutTransferKefuMessage(); m.setCreateTime(1399197672L); m.setFromUserName("fromuser"); m.setToUserName("touser"); String expected = "<xml>" + "<ToUserName><![CDATA[touser]]></ToUserName>" + "<FromUserName><![CDATA[fromuser]]></FromUserName>" + "<Cr...
public void setTransInfo(TransInfo transInfo) { this.transInfo = transInfo; }
WxMpXmlOutTransferKefuMessage extends WxMpXmlOutMessage { public void setTransInfo(TransInfo transInfo) { this.transInfo = transInfo; } }
WxMpXmlOutTransferKefuMessage extends WxMpXmlOutMessage { public void setTransInfo(TransInfo transInfo) { this.transInfo = transInfo; } WxMpXmlOutTransferKefuMessage(); }
WxMpXmlOutTransferKefuMessage extends WxMpXmlOutMessage { public void setTransInfo(TransInfo transInfo) { this.transInfo = transInfo; } WxMpXmlOutTransferKefuMessage(); TransInfo getTransInfo(); void setTransInfo(TransInfo transInfo); }
WxMpXmlOutTransferKefuMessage extends WxMpXmlOutMessage { public void setTransInfo(TransInfo transInfo) { this.transInfo = transInfo; } WxMpXmlOutTransferKefuMessage(); TransInfo getTransInfo(); void setTransInfo(TransInfo transInfo); }
@Test public void testFromJson() { String json = "{\r\n" + " \"kf_online_list\": [\r\n" + " {\r\n" + " \"kf_account\": \"test1@test\", \r\n" + " \"status\": 1, \r\n" + " \"kf_id\": \"1001\", \r\n" + " \"auto_accept\": 0, \r\n" + " \"accepted_case\": 1\r\n" + " },\r\n" + " {\r\n" + " \"kf_account\": \"test2@test\", \r\n...
public static WxMpKfOnlineList fromJson(String json) { return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpKfOnlineList.class); }
WxMpKfOnlineList { public static WxMpKfOnlineList fromJson(String json) { return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpKfOnlineList.class); } }
WxMpKfOnlineList { public static WxMpKfOnlineList fromJson(String json) { return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpKfOnlineList.class); } }
WxMpKfOnlineList { public static WxMpKfOnlineList fromJson(String json) { return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpKfOnlineList.class); } static WxMpKfOnlineList fromJson(String json); @Override String toString(); List<WxMpKfInfo> getKfOnlineList(); void setKfOnlineList(List<WxMpKfInfo> kfOnlineList...
WxMpKfOnlineList { public static WxMpKfOnlineList fromJson(String json) { return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpKfOnlineList.class); } static WxMpKfOnlineList fromJson(String json); @Override String toString(); List<WxMpKfInfo> getKfOnlineList(); void setKfOnlineList(List<WxMpKfInfo> kfOnlineList...
@Test public void testToJson() throws Exception { WxMpTemplateMessage tm = WxMpTemplateMessage.builder() .toUser("OPENID") .templateId("ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY") .miniProgram(new WxMpTemplateMessage.MiniProgram("xiaochengxuappid12345", "index?foo=bar")) .url("http: .build(); tm.addWxMpTemplateData( ...
public String toJson() { return WxMpGsonBuilder.INSTANCE.create().toJson(this); }
WxMpTemplateMessage implements Serializable { public String toJson() { return WxMpGsonBuilder.INSTANCE.create().toJson(this); } }
WxMpTemplateMessage implements Serializable { public String toJson() { return WxMpGsonBuilder.INSTANCE.create().toJson(this); } WxMpTemplateMessage(); }
WxMpTemplateMessage implements Serializable { public String toJson() { return WxMpGsonBuilder.INSTANCE.create().toJson(this); } WxMpTemplateMessage(); static WxMpTemplateMessageBuilder builder(); String getToUser(); void setToUser(String toUser); String getTemplateId(); void setTemplateId(String templateId); String get...
WxMpTemplateMessage implements Serializable { public String toJson() { return WxMpGsonBuilder.INSTANCE.create().toJson(this); } WxMpTemplateMessage(); static WxMpTemplateMessageBuilder builder(); String getToUser(); void setToUser(String toUser); String getTemplateId(); void setTemplateId(String templateId); String get...
@Test(dataProvider = "mediaData") public void testUploadMedia(String mediaType, String fileType, String fileName) throws WxErrorException, IOException { try (InputStream inputStream = ClassLoader.getSystemResourceAsStream(fileName)) { WxMediaUploadResult res = this.wxService.getMediaService().upload(mediaType, fileType...
@Override public WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException, IOException { return this.upload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException, IOException { return this.upload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); } }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException, IOException { return this.upload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); } WxCpMediaServic...
WxCpMediaServiceImpl implements WxCpMediaService { @Override public WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException, IOException { return this.upload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); } WxCpMediaServic...
WxCpMediaServiceImpl implements WxCpMediaService { @Override public WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream) throws WxErrorException, IOException { return this.upload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType)); } WxCpMediaServic...
@Test(dependsOnMethods = {"testUploadMedia"}, dataProvider = "downloadMedia") public void testDownloadMedia(String media_id) throws WxErrorException { File file = this.wxService.getMediaService().download(media_id); assertNotNull(file); System.out.println(file); }
@Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( MediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_id=" + mediaId); }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( MediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_i...
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( MediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_i...
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( MediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_i...
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( MediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_i...
@Test public void testAuthenticate() throws Exception { this.wxCpService.getUserService().authenticate("abc"); }
@Override public void authenticate(String userId) throws WxErrorException { String url = "https: this.mainService.get(url, null); }
WxCpUserServiceImpl implements WxCpUserService { @Override public void authenticate(String userId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } }
WxCpUserServiceImpl implements WxCpUserService { @Override public void authenticate(String userId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } WxCpUserServiceImpl(WxCpService mainService); }
WxCpUserServiceImpl implements WxCpUserService { @Override public void authenticate(String userId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } WxCpUserServiceImpl(WxCpService mainService); @Override void authenticate(String userId); @Override void create(WxCpUser user); @Override v...
WxCpUserServiceImpl implements WxCpUserService { @Override public void authenticate(String userId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } WxCpUserServiceImpl(WxCpService mainService); @Override void authenticate(String userId); @Override void create(WxCpUser user); @Override v...
@Test public void testCreate() throws Exception { WxCpUser user = new WxCpUser(); user.setUserId(userId); user.setName("Some Woman"); user.setDepartIds(new Integer[]{2}); user.setEmail("none@none.com"); user.setGender(WxCpUser.Gender.FEMAIL); user.setMobile("13560084979"); user.setPosition("woman"); user.setTelephone("...
@Override public void create(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); }
WxCpUserServiceImpl implements WxCpUserService { @Override public void create(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); } }
WxCpUserServiceImpl implements WxCpUserService { @Override public void create(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); } WxCpUserServiceImpl(WxCpService mainService); }
WxCpUserServiceImpl implements WxCpUserService { @Override public void create(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); } WxCpUserServiceImpl(WxCpService mainService); @Override void authenticate(String userId); @Override void create(WxCpUser user); @Overri...
WxCpUserServiceImpl implements WxCpUserService { @Override public void create(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); } WxCpUserServiceImpl(WxCpService mainService); @Override void authenticate(String userId); @Override void create(WxCpUser user); @Overri...
@Test(dependsOnMethods = "testCreate") public void testUpdate() throws Exception { WxCpUser user = new WxCpUser(); user.setUserId(userId); user.setName("Some Woman"); user.addExtAttr("爱好", "table2"); this.wxCpService.getUserService().update(user); }
@Override public void update(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); }
WxCpUserServiceImpl implements WxCpUserService { @Override public void update(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); } }
WxCpUserServiceImpl implements WxCpUserService { @Override public void update(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); } WxCpUserServiceImpl(WxCpService mainService); }
WxCpUserServiceImpl implements WxCpUserService { @Override public void update(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); } WxCpUserServiceImpl(WxCpService mainService); @Override void authenticate(String userId); @Override void create(WxCpUser user); @Overri...
WxCpUserServiceImpl implements WxCpUserService { @Override public void update(WxCpUser user) throws WxErrorException { String url = "https: this.mainService.post(url, user.toJson()); } WxCpUserServiceImpl(WxCpService mainService); @Override void authenticate(String userId); @Override void create(WxCpUser user); @Overri...
@Test(dependsOnMethods = {"testCreate", "testUpdate"}) public void testDelete() throws Exception { this.wxCpService.getUserService().delete(userId); }
@Override public void delete(String... userIds) throws WxErrorException { if (userIds.length == 1) { this.deleteOne(userIds[0]); } String url = "https: JsonObject jsonObject = new JsonObject(); JsonArray jsonArray = new JsonArray(); for (String userid : userIds) { jsonArray.add(new JsonPrimitive(userid)); } jsonObject....
WxCpUserServiceImpl implements WxCpUserService { @Override public void delete(String... userIds) throws WxErrorException { if (userIds.length == 1) { this.deleteOne(userIds[0]); } String url = "https: JsonObject jsonObject = new JsonObject(); JsonArray jsonArray = new JsonArray(); for (String userid : userIds) { jsonAr...
WxCpUserServiceImpl implements WxCpUserService { @Override public void delete(String... userIds) throws WxErrorException { if (userIds.length == 1) { this.deleteOne(userIds[0]); } String url = "https: JsonObject jsonObject = new JsonObject(); JsonArray jsonArray = new JsonArray(); for (String userid : userIds) { jsonAr...
WxCpUserServiceImpl implements WxCpUserService { @Override public void delete(String... userIds) throws WxErrorException { if (userIds.length == 1) { this.deleteOne(userIds[0]); } String url = "https: JsonObject jsonObject = new JsonObject(); JsonArray jsonArray = new JsonArray(); for (String userid : userIds) { jsonAr...
WxCpUserServiceImpl implements WxCpUserService { @Override public void delete(String... userIds) throws WxErrorException { if (userIds.length == 1) { this.deleteOne(userIds[0]); } String url = "https: JsonObject jsonObject = new JsonObject(); JsonArray jsonArray = new JsonArray(); for (String userid : userIds) { jsonAr...
@Test public void testListAll() throws Exception { System.out.println("=================获取部门"); List<WxCpDepart> departList = this.wxCpService.getDepartmentService().listAll(); assertNotNull(departList); assertTrue(departList.size() > 0); for (WxCpDepart g : departList) { this.depart = g; System.out.println(this.depart...
@Override public List<WxCpDepart> listAll() throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.create() .fromJson(tmpJsonElement.getAsJsonObject().get("department")...
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public List<WxCpDepart> listAll() throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.create()...
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public List<WxCpDepart> listAll() throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.create()...
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public List<WxCpDepart> listAll() throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.create()...
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public List<WxCpDepart> listAll() throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); JsonElement tmpJsonElement = new JsonParser().parse(responseContent); return WxCpGsonBuilder.INSTANCE.create()...
@Test(dependsOnMethods = "testUpdate") public void testGetById() throws Exception { WxCpUser user = this.wxCpService.getUserService().getById(userId); assertNotNull(user); }
@Override public WxCpUser getById(String userid) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); return WxCpUser.fromJson(responseContent); }
WxCpUserServiceImpl implements WxCpUserService { @Override public WxCpUser getById(String userid) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); return WxCpUser.fromJson(responseContent); } }
WxCpUserServiceImpl implements WxCpUserService { @Override public WxCpUser getById(String userid) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); return WxCpUser.fromJson(responseContent); } WxCpUserServiceImpl(WxCpService mainService); }
WxCpUserServiceImpl implements WxCpUserService { @Override public WxCpUser getById(String userid) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); return WxCpUser.fromJson(responseContent); } WxCpUserServiceImpl(WxCpService mainService); @Override void authenticat...
WxCpUserServiceImpl implements WxCpUserService { @Override public WxCpUser getById(String userid) throws WxErrorException { String url = "https: String responseContent = this.mainService.get(url, null); return WxCpUser.fromJson(responseContent); } WxCpUserServiceImpl(WxCpService mainService); @Override void authenticat...
@Test public void testListByDepartment() throws Exception { List<WxCpUser> users = this.wxCpService.getUserService().listByDepartment(1, true, 0); assertNotEquals(users.size(), 0); for (WxCpUser user : users) { System.out.println(ToStringBuilder.reflectionToString(user, ToStringStyle.MULTI_LINE_STYLE)); } }
@Override public List<WxCpUser> listByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status != null) { params += "&status=" + status; } else { params...
WxCpUserServiceImpl implements WxCpUserService { @Override public List<WxCpUser> listByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status != null)...
WxCpUserServiceImpl implements WxCpUserService { @Override public List<WxCpUser> listByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status != null)...
WxCpUserServiceImpl implements WxCpUserService { @Override public List<WxCpUser> listByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status != null)...
WxCpUserServiceImpl implements WxCpUserService { @Override public List<WxCpUser> listByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status != null)...
@Test public void testListSimpleByDepartment() throws Exception { List<WxCpUser> users = this.wxCpService.getUserService().listSimpleByDepartment(1, true, 0); assertNotEquals(users.size(), 0); for (WxCpUser user : users) { System.out.println(ToStringBuilder.reflectionToString(user, ToStringStyle.MULTI_LINE_STYLE)); } }
@Override public List<WxCpUser> listSimpleByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status != null) { params += "&status=" + status; } else { ...
WxCpUserServiceImpl implements WxCpUserService { @Override public List<WxCpUser> listSimpleByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status !=...
WxCpUserServiceImpl implements WxCpUserService { @Override public List<WxCpUser> listSimpleByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status !=...
WxCpUserServiceImpl implements WxCpUserService { @Override public List<WxCpUser> listSimpleByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status !=...
WxCpUserServiceImpl implements WxCpUserService { @Override public List<WxCpUser> listSimpleByDepartment(Integer departId, Boolean fetchChild, Integer status) throws WxErrorException { String url = "https: String params = ""; if (fetchChild != null) { params += "&fetch_child=" + (fetchChild ? "1" : "0"); } if (status !=...
@Test public void testGetPayInfo() throws Exception { Map<String, String> payInfo = this.payService.getPayInfo(WxPayUnifiedOrderRequest.newBuilder() .body("我去") .totalFee(1) .spbillCreateIp("111111") .notifyURL("111111") .tradeType("JSAPI") .outTradeNo("111111") .openid(((XmlWxPayConfig) this.payService.getConfig()).ge...
@Override public Map<String, String> getPayInfo(WxPayUnifiedOrderRequest request) throws WxPayException { WxPayUnifiedOrderResult unifiedOrderResult = this.unifiedOrder(request); String prepayId = unifiedOrderResult.getPrepayId(); if (StringUtils.isBlank(prepayId)) { throw new RuntimeException(String.format("无法获取prepay...
WxPayServiceImpl implements WxPayService { @Override public Map<String, String> getPayInfo(WxPayUnifiedOrderRequest request) throws WxPayException { WxPayUnifiedOrderResult unifiedOrderResult = this.unifiedOrder(request); String prepayId = unifiedOrderResult.getPrepayId(); if (StringUtils.isBlank(prepayId)) { throw new...
WxPayServiceImpl implements WxPayService { @Override public Map<String, String> getPayInfo(WxPayUnifiedOrderRequest request) throws WxPayException { WxPayUnifiedOrderResult unifiedOrderResult = this.unifiedOrder(request); String prepayId = unifiedOrderResult.getPrepayId(); if (StringUtils.isBlank(prepayId)) { throw new...
WxPayServiceImpl implements WxPayService { @Override public Map<String, String> getPayInfo(WxPayUnifiedOrderRequest request) throws WxPayException { WxPayUnifiedOrderResult unifiedOrderResult = this.unifiedOrder(request); String prepayId = unifiedOrderResult.getPrepayId(); if (StringUtils.isBlank(prepayId)) { throw new...
WxPayServiceImpl implements WxPayService { @Override public Map<String, String> getPayInfo(WxPayUnifiedOrderRequest request) throws WxPayException { WxPayUnifiedOrderResult unifiedOrderResult = this.unifiedOrder(request); String prepayId = unifiedOrderResult.getPrepayId(); if (StringUtils.isBlank(prepayId)) { throw new...
@Test public void testDownloadBill() throws Exception { WxPayBillResult wxPayBillResult = this.payService.downloadBill("20170101", "ALL", "GZIP", "1111111"); assertNotNull(wxPayBillResult); this.payService.downloadBill("", "", "", null); }
@Override public WxPayBillResult downloadBill(String billDate, String billType, String tarType, String deviceInfo) throws WxPayException { WxPayDownloadBillRequest request = new WxPayDownloadBillRequest(); request.setBillType(billType); request.setBillDate(billDate); request.setTarType(tarType); request.setDeviceInfo(d...
WxPayServiceImpl implements WxPayService { @Override public WxPayBillResult downloadBill(String billDate, String billType, String tarType, String deviceInfo) throws WxPayException { WxPayDownloadBillRequest request = new WxPayDownloadBillRequest(); request.setBillType(billType); request.setBillDate(billDate); request.s...
WxPayServiceImpl implements WxPayService { @Override public WxPayBillResult downloadBill(String billDate, String billType, String tarType, String deviceInfo) throws WxPayException { WxPayDownloadBillRequest request = new WxPayDownloadBillRequest(); request.setBillType(billType); request.setBillDate(billDate); request.s...
WxPayServiceImpl implements WxPayService { @Override public WxPayBillResult downloadBill(String billDate, String billType, String tarType, String deviceInfo) throws WxPayException { WxPayDownloadBillRequest request = new WxPayDownloadBillRequest(); request.setBillType(billType); request.setBillDate(billDate); request.s...
WxPayServiceImpl implements WxPayService { @Override public WxPayBillResult downloadBill(String billDate, String billType, String tarType, String deviceInfo) throws WxPayException { WxPayDownloadBillRequest request = new WxPayDownloadBillRequest(); request.setBillType(billType); request.setBillDate(billDate); request.s...
@Test public void testReport() throws Exception { WxPayReportRequest request = new WxPayReportRequest(); request.setInterfaceUrl("hahahah"); request.setSignType("HMAC-SHA256"); request.setExecuteTime(1000); request.setReturnCode("aaa"); request.setResultCode("aaa"); request.setUserIp("8.8.8"); this.payService.report(re...
public void report(WxPayReportRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/payitil/report"; String responseContent = this.post(url, request.toXML(), true); WxPayCommonResult result = WxPayBaseResult.fromXML(responseContent, WxPayCommonResult.clas...
WxPayServiceImpl implements WxPayService { public void report(WxPayReportRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/payitil/report"; String responseContent = this.post(url, request.toXML(), true); WxPayCommonResult result = WxPayBaseResult.from...
WxPayServiceImpl implements WxPayService { public void report(WxPayReportRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/payitil/report"; String responseContent = this.post(url, request.toXML(), true); WxPayCommonResult result = WxPayBaseResult.from...
WxPayServiceImpl implements WxPayService { public void report(WxPayReportRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/payitil/report"; String responseContent = this.post(url, request.toXML(), true); WxPayCommonResult result = WxPayBaseResult.from...
WxPayServiceImpl implements WxPayService { public void report(WxPayReportRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/payitil/report"; String responseContent = this.post(url, request.toXML(), true); WxPayCommonResult result = WxPayBaseResult.from...
@Test public void testRefund() throws Exception { WxPayRefundResult result = this.payService.refund( WxPayRefundRequest.newBuilder() .outRefundNo("aaa") .outTradeNo("1111") .totalFee(1222) .refundFee(111) .build()); this.logger.info(result.toString()); }
@Override public WxPayRefundResult refund(WxPayRefundRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/refund"; String responseContent = this.postWithKey(url, request.toXML()); WxPayRefundResult result = WxPayBaseResult.fromXML(responseCont...
WxPayServiceImpl implements WxPayService { @Override public WxPayRefundResult refund(WxPayRefundRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/refund"; String responseContent = this.postWithKey(url, request.toXML()); WxPayRefundResult re...
WxPayServiceImpl implements WxPayService { @Override public WxPayRefundResult refund(WxPayRefundRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/refund"; String responseContent = this.postWithKey(url, request.toXML()); WxPayRefundResult re...
WxPayServiceImpl implements WxPayService { @Override public WxPayRefundResult refund(WxPayRefundRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/refund"; String responseContent = this.postWithKey(url, request.toXML()); WxPayRefundResult re...
WxPayServiceImpl implements WxPayService { @Override public WxPayRefundResult refund(WxPayRefundRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/refund"; String responseContent = this.postWithKey(url, request.toXML()); WxPayRefundResult re...
@Test public void testRefundQuery() throws Exception { WxPayRefundQueryResult result; result = this.payService.refundQuery("1", "", "", ""); this.logger.info(result.toString()); result = this.payService.refundQuery("", "2", "", ""); this.logger.info(result.toString()); result = this.payService.refundQuery("", "", "3", ...
@Override public WxPayRefundQueryResult refundQuery(String transactionId, String outTradeNo, String outRefundNo, String refundId) throws WxPayException { WxPayRefundQueryRequest request = new WxPayRefundQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo)); request.setTransactionId(StringUtils.trimT...
WxPayServiceImpl implements WxPayService { @Override public WxPayRefundQueryResult refundQuery(String transactionId, String outTradeNo, String outRefundNo, String refundId) throws WxPayException { WxPayRefundQueryRequest request = new WxPayRefundQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo));...
WxPayServiceImpl implements WxPayService { @Override public WxPayRefundQueryResult refundQuery(String transactionId, String outTradeNo, String outRefundNo, String refundId) throws WxPayException { WxPayRefundQueryRequest request = new WxPayRefundQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo));...
WxPayServiceImpl implements WxPayService { @Override public WxPayRefundQueryResult refundQuery(String transactionId, String outTradeNo, String outRefundNo, String refundId) throws WxPayException { WxPayRefundQueryRequest request = new WxPayRefundQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo));...
WxPayServiceImpl implements WxPayService { @Override public WxPayRefundQueryResult refundQuery(String transactionId, String outTradeNo, String outRefundNo, String refundId) throws WxPayException { WxPayRefundQueryRequest request = new WxPayRefundQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo));...
@Test public void testSendRedpack() throws Exception { WxPaySendRedpackRequest request = new WxPaySendRedpackRequest(); request.setActName("abc"); request.setClientIp("aaa"); request.setMchBillNo("aaaa"); request.setReOpenid(((XmlWxPayConfig) this.payService.getConfig()).getOpenid()); WxPaySendRedpackResult redpackResu...
@Override public WxPaySendRedpackResult sendRedpack(WxPaySendRedpackRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/sendredpack"; if (request.getAmtType() != null) { url = this.getPayBaseUrl() + "/mmpaymkttransfers/sendgroupredpack...
WxPayServiceImpl implements WxPayService { @Override public WxPaySendRedpackResult sendRedpack(WxPaySendRedpackRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/sendredpack"; if (request.getAmtType() != null) { url = this.getPayBaseU...
WxPayServiceImpl implements WxPayService { @Override public WxPaySendRedpackResult sendRedpack(WxPaySendRedpackRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/sendredpack"; if (request.getAmtType() != null) { url = this.getPayBaseU...
WxPayServiceImpl implements WxPayService { @Override public WxPaySendRedpackResult sendRedpack(WxPaySendRedpackRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/sendredpack"; if (request.getAmtType() != null) { url = this.getPayBaseU...
WxPayServiceImpl implements WxPayService { @Override public WxPaySendRedpackResult sendRedpack(WxPaySendRedpackRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/sendredpack"; if (request.getAmtType() != null) { url = this.getPayBaseU...
@Test public void testQueryRedpack() throws Exception { WxPayRedpackQueryResult redpackResult = this.payService.queryRedpack("aaaa"); this.logger.info(redpackResult.toString()); }
@Override public WxPayRedpackQueryResult queryRedpack(String mchBillNo) throws WxPayException { WxPayRedpackQueryRequest request = new WxPayRedpackQueryRequest(); request.setMchBillNo(mchBillNo); request.setBillType("MCHT"); request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers...
WxPayServiceImpl implements WxPayService { @Override public WxPayRedpackQueryResult queryRedpack(String mchBillNo) throws WxPayException { WxPayRedpackQueryRequest request = new WxPayRedpackQueryRequest(); request.setMchBillNo(mchBillNo); request.setBillType("MCHT"); request.checkAndSign(this.getConfig()); String url =...
WxPayServiceImpl implements WxPayService { @Override public WxPayRedpackQueryResult queryRedpack(String mchBillNo) throws WxPayException { WxPayRedpackQueryRequest request = new WxPayRedpackQueryRequest(); request.setMchBillNo(mchBillNo); request.setBillType("MCHT"); request.checkAndSign(this.getConfig()); String url =...
WxPayServiceImpl implements WxPayService { @Override public WxPayRedpackQueryResult queryRedpack(String mchBillNo) throws WxPayException { WxPayRedpackQueryRequest request = new WxPayRedpackQueryRequest(); request.setMchBillNo(mchBillNo); request.setBillType("MCHT"); request.checkAndSign(this.getConfig()); String url =...
WxPayServiceImpl implements WxPayService { @Override public WxPayRedpackQueryResult queryRedpack(String mchBillNo) throws WxPayException { WxPayRedpackQueryRequest request = new WxPayRedpackQueryRequest(); request.setMchBillNo(mchBillNo); request.setBillType("MCHT"); request.checkAndSign(this.getConfig()); String url =...
@Test(dependsOnMethods = {"testListAll", "testCreate"}) public void testUpdate() throws Exception { System.out.println("=================更新部门"); this.depart.setName("子部门改名" + System.currentTimeMillis()); this.wxCpService.getDepartmentService().update(this.depart); }
@Override public void update(WxCpDepart group) throws WxErrorException { String url = "https: this.mainService.post(url, group.toJson()); }
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public void update(WxCpDepart group) throws WxErrorException { String url = "https: this.mainService.post(url, group.toJson()); } }
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public void update(WxCpDepart group) throws WxErrorException { String url = "https: this.mainService.post(url, group.toJson()); } WxCpDepartmentServiceImpl(WxCpService mainService); }
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public void update(WxCpDepart group) throws WxErrorException { String url = "https: this.mainService.post(url, group.toJson()); } WxCpDepartmentServiceImpl(WxCpService mainService); @Override Integer create(WxCpDepart depart); @Override void update(...
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public void update(WxCpDepart group) throws WxErrorException { String url = "https: this.mainService.post(url, group.toJson()); } WxCpDepartmentServiceImpl(WxCpService mainService); @Override Integer create(WxCpDepart depart); @Override void update(...
@Test public void testUnifiedOrder() throws WxPayException { WxPayUnifiedOrderResult result = this.payService .unifiedOrder(WxPayUnifiedOrderRequest.newBuilder() .body("我去") .totalFee(1) .spbillCreateIp("111111") .notifyURL("111111") .tradeType("JSAPI") .openid(((XmlWxPayConfig) this.payService.getConfig()).getOpenid()...
@Override public WxPayUnifiedOrderResult unifiedOrder(WxPayUnifiedOrderRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/unifiedorder"; String responseContent = this.post(url, request.toXML(), true); WxPayUnifiedOrderResult result = WxPayBaseResul...
WxPayServiceImpl implements WxPayService { @Override public WxPayUnifiedOrderResult unifiedOrder(WxPayUnifiedOrderRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/unifiedorder"; String responseContent = this.post(url, request.toXML(), true); WxPa...
WxPayServiceImpl implements WxPayService { @Override public WxPayUnifiedOrderResult unifiedOrder(WxPayUnifiedOrderRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/unifiedorder"; String responseContent = this.post(url, request.toXML(), true); WxPa...
WxPayServiceImpl implements WxPayService { @Override public WxPayUnifiedOrderResult unifiedOrder(WxPayUnifiedOrderRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/unifiedorder"; String responseContent = this.post(url, request.toXML(), true); WxPa...
WxPayServiceImpl implements WxPayService { @Override public WxPayUnifiedOrderResult unifiedOrder(WxPayUnifiedOrderRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/unifiedorder"; String responseContent = this.post(url, request.toXML(), true); WxPa...
@Test public void testQueryOrder() throws WxPayException { this.logger.info(this.payService.queryOrder("11212121", null).toString()); this.logger.info(this.payService.queryOrder(null, "11111").toString()); }
@Override public WxPayOrderQueryResult queryOrder(String transactionId, String outTradeNo) throws WxPayException { WxPayOrderQueryRequest request = new WxPayOrderQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo)); request.setTransactionId(StringUtils.trimToNull(transactionId)); request.checkAndSi...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderQueryResult queryOrder(String transactionId, String outTradeNo) throws WxPayException { WxPayOrderQueryRequest request = new WxPayOrderQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo)); request.setTransactionId(StringUtils.tri...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderQueryResult queryOrder(String transactionId, String outTradeNo) throws WxPayException { WxPayOrderQueryRequest request = new WxPayOrderQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo)); request.setTransactionId(StringUtils.tri...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderQueryResult queryOrder(String transactionId, String outTradeNo) throws WxPayException { WxPayOrderQueryRequest request = new WxPayOrderQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo)); request.setTransactionId(StringUtils.tri...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderQueryResult queryOrder(String transactionId, String outTradeNo) throws WxPayException { WxPayOrderQueryRequest request = new WxPayOrderQueryRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo)); request.setTransactionId(StringUtils.tri...
@Test public void testCloseOrder() throws WxPayException { this.logger.info(this.payService.closeOrder("11212121").toString()); }
@Override public WxPayOrderCloseResult closeOrder(String outTradeNo) throws WxPayException { if (StringUtils.isBlank(outTradeNo)) { throw new IllegalArgumentException("out_trade_no不能为空"); } WxPayOrderCloseRequest request = new WxPayOrderCloseRequest(); request.setOutTradeNo(StringUtils.trimToNull(outTradeNo)); request....
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderCloseResult closeOrder(String outTradeNo) throws WxPayException { if (StringUtils.isBlank(outTradeNo)) { throw new IllegalArgumentException("out_trade_no不能为空"); } WxPayOrderCloseRequest request = new WxPayOrderCloseRequest(); request.setOutTradeNo(St...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderCloseResult closeOrder(String outTradeNo) throws WxPayException { if (StringUtils.isBlank(outTradeNo)) { throw new IllegalArgumentException("out_trade_no不能为空"); } WxPayOrderCloseRequest request = new WxPayOrderCloseRequest(); request.setOutTradeNo(St...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderCloseResult closeOrder(String outTradeNo) throws WxPayException { if (StringUtils.isBlank(outTradeNo)) { throw new IllegalArgumentException("out_trade_no不能为空"); } WxPayOrderCloseRequest request = new WxPayOrderCloseRequest(); request.setOutTradeNo(St...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderCloseResult closeOrder(String outTradeNo) throws WxPayException { if (StringUtils.isBlank(outTradeNo)) { throw new IllegalArgumentException("out_trade_no不能为空"); } WxPayOrderCloseRequest request = new WxPayOrderCloseRequest(); request.setOutTradeNo(St...
@Test public void testEntPay() throws WxPayException { WxEntPayRequest request = new WxEntPayRequest(); this.logger.info(this.payService.entPay(request).toString()); }
@Override public WxEntPayResult entPay(WxEntPayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/promotion/transfers"; String responseContent = this.postWithKey(url, request.toXML()); WxEntPayResult result = WxPayBaseResult.fromXML(r...
WxPayServiceImpl implements WxPayService { @Override public WxEntPayResult entPay(WxEntPayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/promotion/transfers"; String responseContent = this.postWithKey(url, request.toXML()); WxEntP...
WxPayServiceImpl implements WxPayService { @Override public WxEntPayResult entPay(WxEntPayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/promotion/transfers"; String responseContent = this.postWithKey(url, request.toXML()); WxEntP...
WxPayServiceImpl implements WxPayService { @Override public WxEntPayResult entPay(WxEntPayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/promotion/transfers"; String responseContent = this.postWithKey(url, request.toXML()); WxEntP...
WxPayServiceImpl implements WxPayService { @Override public WxEntPayResult entPay(WxEntPayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/promotion/transfers"; String responseContent = this.postWithKey(url, request.toXML()); WxEntP...
@Test public void testQueryEntPay() throws WxPayException { this.logger.info(this.payService.queryEntPay("11212121").toString()); }
@Override public WxEntPayQueryResult queryEntPay(String partnerTradeNo) throws WxPayException { WxEntPayQueryRequest request = new WxEntPayQueryRequest(); request.setPartnerTradeNo(partnerTradeNo); request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/mmpaymkttransfers/gettransferinfo"; String r...
WxPayServiceImpl implements WxPayService { @Override public WxEntPayQueryResult queryEntPay(String partnerTradeNo) throws WxPayException { WxEntPayQueryRequest request = new WxEntPayQueryRequest(); request.setPartnerTradeNo(partnerTradeNo); request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/m...
WxPayServiceImpl implements WxPayService { @Override public WxEntPayQueryResult queryEntPay(String partnerTradeNo) throws WxPayException { WxEntPayQueryRequest request = new WxEntPayQueryRequest(); request.setPartnerTradeNo(partnerTradeNo); request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/m...
WxPayServiceImpl implements WxPayService { @Override public WxEntPayQueryResult queryEntPay(String partnerTradeNo) throws WxPayException { WxEntPayQueryRequest request = new WxEntPayQueryRequest(); request.setPartnerTradeNo(partnerTradeNo); request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/m...
WxPayServiceImpl implements WxPayService { @Override public WxEntPayQueryResult queryEntPay(String partnerTradeNo) throws WxPayException { WxEntPayQueryRequest request = new WxEntPayQueryRequest(); request.setPartnerTradeNo(partnerTradeNo); request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/m...
@Test public void testCreateScanPayQrcodeMode1() throws Exception { String productId = "abc"; byte[] bytes = this.payService.createScanPayQrcodeMode1(productId, null, null); Path qrcodeFilePath = Files.createTempFile("qrcode_", ".jpg"); Files.write(qrcodeFilePath, bytes); String qrcodeContent = QrcodeUtils.decodeQrcode...
@Override public byte[] createScanPayQrcodeMode1(String productId, File logoFile, Integer sideLength) { String content = this.createScanPayQrcodeMode1(productId); return this.createQrcode(content, logoFile, sideLength); }
WxPayServiceImpl implements WxPayService { @Override public byte[] createScanPayQrcodeMode1(String productId, File logoFile, Integer sideLength) { String content = this.createScanPayQrcodeMode1(productId); return this.createQrcode(content, logoFile, sideLength); } }
WxPayServiceImpl implements WxPayService { @Override public byte[] createScanPayQrcodeMode1(String productId, File logoFile, Integer sideLength) { String content = this.createScanPayQrcodeMode1(productId); return this.createQrcode(content, logoFile, sideLength); } }
WxPayServiceImpl implements WxPayService { @Override public byte[] createScanPayQrcodeMode1(String productId, File logoFile, Integer sideLength) { String content = this.createScanPayQrcodeMode1(productId); return this.createQrcode(content, logoFile, sideLength); } @Override WxPayConfig getConfig(); @Override void setC...
WxPayServiceImpl implements WxPayService { @Override public byte[] createScanPayQrcodeMode1(String productId, File logoFile, Integer sideLength) { String content = this.createScanPayQrcodeMode1(productId); return this.createQrcode(content, logoFile, sideLength); } @Override WxPayConfig getConfig(); @Override void setC...
@Test public void testCreateScanPayQrcodeMode2() throws Exception { String qrcodeContent = "abc"; byte[] bytes = this.payService.createScanPayQrcodeMode2(qrcodeContent, null, null); Path qrcodeFilePath = Files.createTempFile("qrcode_", ".jpg"); Files.write(qrcodeFilePath, bytes); assertEquals(QrcodeUtils.decodeQrcode(q...
@Override public byte[] createScanPayQrcodeMode2(String codeUrl, File logoFile, Integer sideLength) { return this.createQrcode(codeUrl, logoFile, sideLength); }
WxPayServiceImpl implements WxPayService { @Override public byte[] createScanPayQrcodeMode2(String codeUrl, File logoFile, Integer sideLength) { return this.createQrcode(codeUrl, logoFile, sideLength); } }
WxPayServiceImpl implements WxPayService { @Override public byte[] createScanPayQrcodeMode2(String codeUrl, File logoFile, Integer sideLength) { return this.createQrcode(codeUrl, logoFile, sideLength); } }
WxPayServiceImpl implements WxPayService { @Override public byte[] createScanPayQrcodeMode2(String codeUrl, File logoFile, Integer sideLength) { return this.createQrcode(codeUrl, logoFile, sideLength); } @Override WxPayConfig getConfig(); @Override void setConfig(WxPayConfig config); @Override WxPayRefundResult refund...
WxPayServiceImpl implements WxPayService { @Override public byte[] createScanPayQrcodeMode2(String codeUrl, File logoFile, Integer sideLength) { return this.createQrcode(codeUrl, logoFile, sideLength); } @Override WxPayConfig getConfig(); @Override void setConfig(WxPayConfig config); @Override WxPayRefundResult refund...
@Test public void testGetOrderNotifyResult() throws Exception { }
@Override public WxPayOrderNotifyResult getOrderNotifyResult(String xmlData) throws WxPayException { try { log.debug("微信支付回调参数详细:{}", xmlData); WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData); log.debug("微信支付回调结果对象:{}", result); result.checkResult(this); return result; } catch (WxPayException e)...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderNotifyResult getOrderNotifyResult(String xmlData) throws WxPayException { try { log.debug("微信支付回调参数详细:{}", xmlData); WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData); log.debug("微信支付回调结果对象:{}", result); result.checkResult(this)...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderNotifyResult getOrderNotifyResult(String xmlData) throws WxPayException { try { log.debug("微信支付回调参数详细:{}", xmlData); WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData); log.debug("微信支付回调结果对象:{}", result); result.checkResult(this)...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderNotifyResult getOrderNotifyResult(String xmlData) throws WxPayException { try { log.debug("微信支付回调参数详细:{}", xmlData); WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData); log.debug("微信支付回调结果对象:{}", result); result.checkResult(this)...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderNotifyResult getOrderNotifyResult(String xmlData) throws WxPayException { try { log.debug("微信支付回调参数详细:{}", xmlData); WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData); log.debug("微信支付回调结果对象:{}", result); result.checkResult(this)...
@Test public void testMicropay() throws Exception { WxPayMicropayResult result = this.payService.micropay(WxPayMicropayRequest.newBuilder() .body("body") .outTradeNo("aaaaa") .totalFee(123) .spbillCreateIp("127.0.0.1") .authCode("aaa") .build()); this.logger.info(result.toString()); }
@Override public WxPayMicropayResult micropay(WxPayMicropayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/micropay"; String responseContent = this.post(url, request.toXML(), true); WxPayMicropayResult result = WxPayBaseResult.fromXML(responseCo...
WxPayServiceImpl implements WxPayService { @Override public WxPayMicropayResult micropay(WxPayMicropayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/micropay"; String responseContent = this.post(url, request.toXML(), true); WxPayMicropayResult ...
WxPayServiceImpl implements WxPayService { @Override public WxPayMicropayResult micropay(WxPayMicropayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/micropay"; String responseContent = this.post(url, request.toXML(), true); WxPayMicropayResult ...
WxPayServiceImpl implements WxPayService { @Override public WxPayMicropayResult micropay(WxPayMicropayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/micropay"; String responseContent = this.post(url, request.toXML(), true); WxPayMicropayResult ...
WxPayServiceImpl implements WxPayService { @Override public WxPayMicropayResult micropay(WxPayMicropayRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/pay/micropay"; String responseContent = this.post(url, request.toXML(), true); WxPayMicropayResult ...
@Test public void testGetConfig() throws Exception { }
@Override public WxPayConfig getConfig() { return this.config; }
WxPayServiceImpl implements WxPayService { @Override public WxPayConfig getConfig() { return this.config; } }
WxPayServiceImpl implements WxPayService { @Override public WxPayConfig getConfig() { return this.config; } }
WxPayServiceImpl implements WxPayService { @Override public WxPayConfig getConfig() { return this.config; } @Override WxPayConfig getConfig(); @Override void setConfig(WxPayConfig config); @Override WxPayRefundResult refund(WxPayRefundRequest request); @Override WxPayRefundQueryResult refundQuery(String transactionId,...
WxPayServiceImpl implements WxPayService { @Override public WxPayConfig getConfig() { return this.config; } @Override WxPayConfig getConfig(); @Override void setConfig(WxPayConfig config); @Override WxPayRefundResult refund(WxPayRefundRequest request); @Override WxPayRefundQueryResult refundQuery(String transactionId,...
@Test(dependsOnMethods = "testUpdate") public void testDelete() throws Exception { System.out.println("=================删除部门"); System.out.println(this.depart.getId() + ":" + this.depart.getName()); this.wxCpService.getDepartmentService().delete(this.depart.getId()); }
@Override public void delete(Integer departId) throws WxErrorException { String url = "https: this.mainService.get(url, null); }
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public void delete(Integer departId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } }
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public void delete(Integer departId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } WxCpDepartmentServiceImpl(WxCpService mainService); }
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public void delete(Integer departId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } WxCpDepartmentServiceImpl(WxCpService mainService); @Override Integer create(WxCpDepart depart); @Override void update(WxCpDepart ...
WxCpDepartmentServiceImpl implements WxCpDepartmentService { @Override public void delete(Integer departId) throws WxErrorException { String url = "https: this.mainService.get(url, null); } WxCpDepartmentServiceImpl(WxCpService mainService); @Override Integer create(WxCpDepart depart); @Override void update(WxCpDepart ...
@Test public void testSetConfig() throws Exception { }
@Override public void setConfig(WxPayConfig config) { this.config = config; }
WxPayServiceImpl implements WxPayService { @Override public void setConfig(WxPayConfig config) { this.config = config; } }
WxPayServiceImpl implements WxPayService { @Override public void setConfig(WxPayConfig config) { this.config = config; } }
WxPayServiceImpl implements WxPayService { @Override public void setConfig(WxPayConfig config) { this.config = config; } @Override WxPayConfig getConfig(); @Override void setConfig(WxPayConfig config); @Override WxPayRefundResult refund(WxPayRefundRequest request); @Override WxPayRefundQueryResult refundQuery(String t...
WxPayServiceImpl implements WxPayService { @Override public void setConfig(WxPayConfig config) { this.config = config; } @Override WxPayConfig getConfig(); @Override void setConfig(WxPayConfig config); @Override WxPayRefundResult refund(WxPayRefundRequest request); @Override WxPayRefundQueryResult refundQuery(String t...
@Test public void testReverseOrder() throws Exception { WxPayOrderReverseResult result = this.payService.reverseOrder(WxPayOrderReverseRequest.newBuilder() .outTradeNo("1111") .build()); assertNotNull(result); this.logger.info(result.toString()); }
@Override public WxPayOrderReverseResult reverseOrder(WxPayOrderReverseRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/reverse"; String responseContent = this.postWithKey(url, request.toXML()); WxPayOrderReverseResult result = WxPayBaseRe...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderReverseResult reverseOrder(WxPayOrderReverseRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/reverse"; String responseContent = this.postWithKey(url, request.toXML()); W...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderReverseResult reverseOrder(WxPayOrderReverseRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/reverse"; String responseContent = this.postWithKey(url, request.toXML()); W...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderReverseResult reverseOrder(WxPayOrderReverseRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/reverse"; String responseContent = this.postWithKey(url, request.toXML()); W...
WxPayServiceImpl implements WxPayService { @Override public WxPayOrderReverseResult reverseOrder(WxPayOrderReverseRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/secapi/pay/reverse"; String responseContent = this.postWithKey(url, request.toXML()); W...
@Test public void testShorturl() throws Exception { String longUrl = "weixin: String result = this.payService.shorturl(new WxPayShorturlRequest(longUrl)); assertNotNull(result); this.logger.info(result); result = this.payService.shorturl(longUrl); assertNotNull(result); this.logger.info(result); }
@Override public String shorturl(WxPayShorturlRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/shorturl"; String responseContent = this.post(url, request.toXML(), true); WxPayShorturlResult result = WxPayBaseResult.fromXML(responseContent, WxPa...
WxPayServiceImpl implements WxPayService { @Override public String shorturl(WxPayShorturlRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/shorturl"; String responseContent = this.post(url, request.toXML(), true); WxPayShorturlResult result = Wx...
WxPayServiceImpl implements WxPayService { @Override public String shorturl(WxPayShorturlRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/shorturl"; String responseContent = this.post(url, request.toXML(), true); WxPayShorturlResult result = Wx...
WxPayServiceImpl implements WxPayService { @Override public String shorturl(WxPayShorturlRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/shorturl"; String responseContent = this.post(url, request.toXML(), true); WxPayShorturlResult result = Wx...
WxPayServiceImpl implements WxPayService { @Override public String shorturl(WxPayShorturlRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/shorturl"; String responseContent = this.post(url, request.toXML(), true); WxPayShorturlResult result = Wx...
@Test public void testAuthcode2Openid() throws Exception { String authCode = "11111"; String result = this.payService.authcode2Openid(new WxPayAuthcode2OpenidRequest(authCode)); assertNotNull(result); this.logger.info(result); result = this.payService.authcode2Openid(authCode); assertNotNull(result); this.logger.info(r...
@Override public String authcode2Openid(WxPayAuthcode2OpenidRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/authcodetoopenid"; String responseContent = this.post(url, request.toXML(), true); WxPayAuthcode2OpenidResult result = WxPayBaseResult....
WxPayServiceImpl implements WxPayService { @Override public String authcode2Openid(WxPayAuthcode2OpenidRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/authcodetoopenid"; String responseContent = this.post(url, request.toXML(), true); WxPayAuth...
WxPayServiceImpl implements WxPayService { @Override public String authcode2Openid(WxPayAuthcode2OpenidRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/authcodetoopenid"; String responseContent = this.post(url, request.toXML(), true); WxPayAuth...
WxPayServiceImpl implements WxPayService { @Override public String authcode2Openid(WxPayAuthcode2OpenidRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/authcodetoopenid"; String responseContent = this.post(url, request.toXML(), true); WxPayAuth...
WxPayServiceImpl implements WxPayService { @Override public String authcode2Openid(WxPayAuthcode2OpenidRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); String url = this.getPayBaseUrl() + "/tools/authcodetoopenid"; String responseContent = this.post(url, request.toXML(), true); WxPayAuth...