diff --git a/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoByProductId.java b/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoByProductId.java index 881f5f49..a378cc59 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoByProductId.java +++ b/ms-biz/src/main/java/com/ms/api/spi/move/GetProductInfoByProductId.java @@ -112,28 +112,28 @@ public class GetProductInfoByProductId extends SPIBaseService implements Extensi product.put("ddCategoryList", ""); } // 处理价格 - Double price = product.getDoubleValue("jd_price"); - JSONObject skuMap = product.getJSONObject("skuMap"); - Double consignPrice = 0D; - for (String key : skuMap.keySet()) { - JSONObject item = JSONObject.parseObject(skuMap.get(key).toString()); - Double cPrice = item.getDoubleValue("consignPrice"); - if (cPrice > consignPrice) { - consignPrice = cPrice; - } - } - if (Objects.isNull(consignPrice)) { - consignPrice = 0D; - } - MoveShopSetting moveShopSetting = moveShopSettingService.getDetailByShopId(shopId); - ModelMapper modelMapper = new ModelMapper(); - modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT); - MoveShopSettingBO condition = modelMapper.map(moveShopSetting, MoveShopSettingBO.class); - if (condition.getAliPriceType().equals(MoveConst.ALI_PRICE_TYPE_CONSIGN) && consignPrice > 0) { - price = consignPrice; - } - double mPrice = moveService.processConditionPrice(condition, price); - product.put("price", mPrice); +// Double price = product.getDoubleValue("jd_price"); +// JSONObject skuMap = product.getJSONObject("skuMap"); +// Double consignPrice = 0D; +// for (String key : skuMap.keySet()) { +// JSONObject item = JSONObject.parseObject(skuMap.get(key).toString()); +// Double cPrice = item.getDoubleValue("consignPrice"); +// if (cPrice > consignPrice) { +// consignPrice = cPrice; +// } +// } +// if (Objects.isNull(consignPrice)) { +// consignPrice = 0D; +// } +// MoveShopSetting moveShopSetting = moveShopSettingService.getDetailByShopId(shopId); +// ModelMapper modelMapper = new ModelMapper(); +// modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT); +// MoveShopSettingBO condition = modelMapper.map(moveShopSetting, MoveShopSettingBO.class); +// if (condition.getAliPriceType().equals(MoveConst.ALI_PRICE_TYPE_CONSIGN) && consignPrice > 0) { +// price = consignPrice; +// } +// double mPrice = moveService.processConditionPrice(condition, price); +// product.put("price", mPrice); productInfo.add(resObj.getJSONObject("productInfo")); log.info(res); } catch (Exception e) { diff --git a/ms-dal/src/main/resources/application.properties b/ms-dal/src/main/resources/application.properties index de9d8008..6b9433e0 100644 --- a/ms-dal/src/main/resources/application.properties +++ b/ms-dal/src/main/resources/application.properties @@ -1,13 +1,13 @@ #本地端口 -#server.port=9090 +server.port=9090 #开发库 -#spring.datasource.url=jdbc:mysql://rm-2ze492h01b2j0i718mo.mysql.rds.aliyuncs.com:3306/dd_light_ds_dev2?characterEncoding=utf-8&useSSL=false -#spring.redis.database=10 +spring.datasource.url=jdbc:mysql://rm-2ze492h01b2j0i718mo.mysql.rds.aliyuncs.com:3306/dd_light_ds_dev2?characterEncoding=utf-8&useSSL=false +spring.redis.database=10 #测试库 -spring.datasource.url=jdbc:mysql://rm-2ze492h01b2j0i718mo.mysql.rds.aliyuncs.com:3306/dd_light_ds_dev?characterEncoding=utf-8&useSSL=false -spring.redis.database=0 +#spring.datasource.url=jdbc:mysql://rm-2ze492h01b2j0i718mo.mysql.rds.aliyuncs.com:3306/dd_light_ds_dev?characterEncoding=utf-8&useSSL=false +#spring.redis.database=0 #=================测试环境 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver