@Test public void testBatchAddMerchantUsers() { List<String> userIdList = new LinkedList<>(); for (int i = 0; i < 2; i++) { userIdList.add(UUID.randomUUID().toString().replace("-", "")); } BCRestfulCommonResult commonResult = userService.batchAddMerchantBuyers("test@beecloud.cn", userIdList); System.out.println(commonResult.getResultMsg()); Assert.assertTrue(commonResult.getResultCode() == 0); }
public BCRestfulCommonResult batchAddMerchantBuyers(String merchant, List<String> buyerIdList) { Map<String, Object> reqMap = new HashMap<>(); reqMap.put("email", merchant); reqMap.put("buyer_ids", buyerIdList); String url = BCHttpClientUtil.BEECLOUD_HOST + "/2/rest/users"; return BCHttpClientUtil.addRestObject(url, reqMap, BCRestfulCommonResult.class, true); }
BCMerchantBuyerService { public BCRestfulCommonResult batchAddMerchantBuyers(String merchant, List<String> buyerIdList) { Map<String, Object> reqMap = new HashMap<>(); reqMap.put("email", merchant); reqMap.put("buyer_ids", buyerIdList); String url = BCHttpClientUtil.BEECLOUD_HOST + "/2/rest/users"; return BCHttpClientUtil.addRestObject(url, reqMap, BCRestfulCommonResult.class, true); } }
BCMerchantBuyerService { public BCRestfulCommonResult batchAddMerchantBuyers(String merchant, List<String> buyerIdList) { Map<String, Object> reqMap = new HashMap<>(); reqMap.put("email", merchant); reqMap.put("buyer_ids", buyerIdList); String url = BCHttpClientUtil.BEECLOUD_HOST + "/2/rest/users"; return BCHttpClientUtil.addRestObject(url, reqMap, BCRestfulCommonResult.class, true); }  }
BCMerchantBuyerService { public BCRestfulCommonResult batchAddMerchantBuyers(String merchant, List<String> buyerIdList) { Map<String, Object> reqMap = new HashMap<>(); reqMap.put("email", merchant); reqMap.put("buyer_ids", buyerIdList); String url = BCHttpClientUtil.BEECLOUD_HOST + "/2/rest/users"; return BCHttpClientUtil.addRestObject(url, reqMap, BCRestfulCommonResult.class, true); }  BCRestfulCommonResult addMerchantBuyer(String buyerId); BCRestfulCommonResult batchAddMerchantBuyers(String merchant, List<String> buyerIdList); BCQueryMerchantBuyerResult getMerchantBuyers(String merchant, Long startTime, Long endTime); }
BCMerchantBuyerService { public BCRestfulCommonResult batchAddMerchantBuyers(String merchant, List<String> buyerIdList) { Map<String, Object> reqMap = new HashMap<>(); reqMap.put("email", merchant); reqMap.put("buyer_ids", buyerIdList); String url = BCHttpClientUtil.BEECLOUD_HOST + "/2/rest/users"; return BCHttpClientUtil.addRestObject(url, reqMap, BCRestfulCommonResult.class, true); }  BCRestfulCommonResult addMerchantBuyer(String buyerId); BCRestfulCommonResult batchAddMerchantBuyers(String merchant, List<String> buyerIdList); BCQueryMerchantBuyerResult getMerchantBuyers(String merchant, Long startTime, Long endTime);  }