diff --git a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java index 5ee1e42b..dcbd8ffb 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java +++ b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java @@ -236,7 +236,7 @@ public class OrderController { }else { Map map = new HashMap<>(); Long count = orderService.getOrderCountByStatus(OrderStatus.PAID.getId()); - map.put("count", count); + map.put("count", count == 0 ? -1 : count); map.put("time",Math.multiplyExact(count,execTime)); map.put("price",price); return Result.succeed(map,"获取成功"); diff --git a/zlt-business/order-center/src/main/resources/application.yml b/zlt-business/order-center/src/main/resources/application.yml index 3b8e12a6..bbdc7357 100644 --- a/zlt-business/order-center/src/main/resources/application.yml +++ b/zlt-business/order-center/src/main/resources/application.yml @@ -10,8 +10,8 @@ mybatis-plus: mapper-locations: classpath:/mapper/*Mapper.xml #实体扫描,多个package用逗号或者分号分隔 typeAliasesPackage: com.central.device.model - configuration: - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl +# configuration: +# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl global-config: db-config: id-type: auto diff --git a/zlt-business/order-center/src/main/resources/bootstrap.yml b/zlt-business/order-center/src/main/resources/bootstrap.yml index e780c4e4..1566517e 100644 --- a/zlt-business/order-center/src/main/resources/bootstrap.yml +++ b/zlt-business/order-center/src/main/resources/bootstrap.yml @@ -4,10 +4,10 @@ server: spring: application: name: order-center -# cloud: -# nacos: -# discovery: -# ip: 81.70.164.178 + cloud: + nacos: + discovery: + ip: 81.70.164.178 # cloud: # nacos: # discovery: diff --git a/zlt-config/src/main/resources/bootstrap.properties b/zlt-config/src/main/resources/bootstrap.properties index 469972e8..3589fb96 100644 --- a/zlt-config/src/main/resources/bootstrap.properties +++ b/zlt-config/src/main/resources/bootstrap.properties @@ -1,10 +1,10 @@ ########################## bootstrap级别通用配置 ########################## # 默认开发环境 -spring.profiles.active=dev +spring.profiles.active=prod ##### nacos(注册中心和配置中心)地址 -#spring.cloud.nacos.server-addr=47.94.136.130:8848 -spring.cloud.nacos.server-addr=127.0.0.1:8848 +spring.cloud.nacos.server-addr=47.94.136.130:8848 +#spring.cloud.nacos.server-addr=127.0.0.1:8848 spring.cloud.nacos.username=nacos spring.cloud.nacos.password=nacos spring.cloud.nacos.config.file-extension=yml