| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import io.swagger.models.auth.In; |
| | | import org.springblade.jfpt.animalheat.util.ImageUtil; |
| | | import org.springblade.jfpt.parcel.service.ParcelService; |
| | | import org.springblade.jfpt.parcel.util.DateUtils; |
| | | import org.springblade.jfpt.parcel.util.HttpClientUtils; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, String> getParcelPic(String imgUrl) { |
| | | public Map<String, Object> getParcelPic(String imgUrl) { |
| | | //截取图片imgKey信息 |
| | | String[] imgKeys = imgUrl.split("=", imgUrl.length()); |
| | | String imgKey = imgKeys[1]; |
| | |
| | | map.put("imgKey",imgKey); |
| | | //执行http远程调用 |
| | | String s = HttpClientUtils.doGetHeaderPictureBase64(PARCEL_PICTURE_URL, PARCEL_KEY, PARCEL_SECRET, map); |
| | | map.put("imgBase64",s); |
| | | return map; |
| | | //获取图片的长宽 |
| | | Map<String, Object> imageMap = ImageUtil.getBase64ImageWidthAndHeight(s); |
| | | //封装数据 |
| | | imageMap.put("imgBase64",s); |
| | | //返回 |
| | | return imageMap; |
| | | } |
| | | |
| | | /** |