CPD Results
The following document contains the results of PMD's CPD 6.29.0.
Duplications
File |
Line |
com/foxinmy/weixin4j/mp/api/ShakeAroundApi.java |
142 |
com/foxinmy/weixin4j/mp/api/ShakeAroundApi.java |
207 |
jsonObject.put("type", 2);
jsonObject.put("last_seen", lastDeviceId);
if (pageSize > 50) {
pageSize = 50;
}
jsonObject.put("count", pageSize);
WeixinResponse response = weixinExecutor
.post(String.format(device_search_uri, tokenManager.getAccessToken()), jsonObject.toJSONString());
JSONObject json = response.getAsJson();
JSONObject data = json.getJSONObject("data");
String deviceStr = data.getString("devices");
List<Device> devices = JSON.parseArray(deviceStr, Device.class);
Pagedata<Device> pagedata = new Pagedata<Device>(null, data.getIntValue("total_count"), devices);
return pagedata;
}
/**
* 查询已有的设备ID、UUID、Major、Minor、激活状态、备注信息、关联门店、关联页面等信息
* 查询 设备Id 下的所有的设备
*
* @param applyId the apply id
* @return the list
* @author fengyapeng
* @since 2016 -10-13 10:49:39
*/
public List<Device> deviceSearchDevicesByApplyId(Integer applyId) throws WeixinException { |
File |
Line |
com/foxinmy/weixin4j/mp/api/CardApi.java |
143 |
com/foxinmy/weixin4j/mp/api/QrApi.java |
45 |
String qr_uri = getRequestUri("card_qr_ticket_uri");
WeixinResponse response = weixinExecutor.post(
String.format(qr_uri, token.getAccessToken()),
JSON.toJSONString(parameter));
QRResult result = response.getAsObject(new TypeReference<QRResult>() {
});
qr_uri = String.format(getRequestUri("qr_image_uri"),
result.getTicket());
response = weixinExecutor.get(qr_uri);
result.setShowUrl(qr_uri);
try {
result.setContent(IOUtil.toByteArray(response.getBody()));
} catch (IOException e) {
throw new WeixinException(e);
}
return result;
} |