| | |
| | | import okhttp3.Response; |
| | | import okhttp3.ResponseBody; |
| | | import org.apache.commons.codec.digest.DigestUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.sy.mapper.ArdSyCarMapper; |
| | | import com.ruoyi.sy.domain.ArdSyCar; |
| | |
| | | RedisCache redisCache; |
| | | @Resource |
| | | private ArdSyCarDayMapper ardSyCarDayMapper; |
| | | |
| | | @Value("${minio.endpoint}") |
| | | private String minioEndpoint; |
| | | |
| | | private Map<Integer, Map<String, String>> logInMap = new HashMap(); |
| | | |
| | |
| | | for (Result<Item> result : myObjects) { |
| | | Item item = result.get(); |
| | | Map<String, String> map = new HashMap(); |
| | | String[] strArr = item.objectName().split("/"); |
| | | map.put("carType", strArr[1]); |
| | | map.put("carModel", "sycar/" + item.objectName()); |
| | | switch (item.objectName()) { |
| | | /*switch (item.objectName()) { |
| | | case "carmodel/aodi.glb": |
| | | map.put("carType", "奥迪"); |
| | | break; |
| | |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }*/ |
| | | listObjetcName.add(map); |
| | | } |
| | | return listObjetcName; |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | //log.error("minio获取桶下对象异常:" + ex.getMessage()); |
| | | } |
| | | } |
| | |
| | | if (result != null) { |
| | | if (result.get("carPicture") != null) { |
| | | if (!((String) result.get("carPicture")).equals("")) { |
| | | String url = ((String) result.get("carPicture")).split("sycar")[0]; |
| | | String carModel = url + (String) result.get("carModel"); |
| | | /*String url = ((String) result.get("carPicture")).split("sycar")[0]; |
| | | String carModel = url + (String) result.get("carModel");*/ |
| | | String carModel = this.minioEndpoint + "/" + (String) result.get("carModel"); |
| | | result.put("carModel", carModel); |
| | | } |
| | | } |
| | |
| | | for (int i = 0; i < carList.size(); i++) { |
| | | ArdSyCar ardSyCar = carList.get(i); |
| | | if (carId.equals(ardSyCar.getCarId())) { |
| | | String url = ""; |
| | | /*String url = ""; |
| | | if (ardSyCar.getCarPicture() != null) { |
| | | if (!ardSyCar.getCarPicture().equals("")) { |
| | | url = ardSyCar.getCarPicture().split("sycar")[0]; |
| | | } |
| | | } |
| | | m.put("carModel", url + ardSyCar.getCarModel());//zns |
| | | }*/ |
| | | m.put("carModel", this.minioEndpoint + "/" + ardSyCar.getCarModel());//zns |
| | | //m.put("carModel",ardSyCar.getCarModel()); |
| | | m.put("carTypeArd", ardSyCar.getCarType()); |
| | | m.put("carBrand", ardSyCar.getCarBrand()); |