skyline преди 2 години
родител
ревизия
3f8a930514
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      service/src/main/java/com/kym/service/miniapp/impl/ChargeServiceImpl.java

+ 3 - 2
service/src/main/java/com/kym/service/miniapp/impl/ChargeServiceImpl.java

@@ -15,7 +15,6 @@ import com.kym.service.miniapp.ChargeOrderService;
 import com.kym.service.miniapp.ChargeService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.Map;
@@ -175,7 +174,9 @@ public class ChargeServiceImpl implements ChargeService {
     }
 
     public String getConnectorId(String connectorId) {
-        if (connectorId.length() == 6) {
+        if (connectorId.length() == 17) {
+            return connectorId;
+        } else if (connectorId.length() == 6) {
             // 查询EN+设备SN
             var equipmentRelation = equipmentRelationService.getByShortId(connectorId);
             connectorId = equipmentRelation.getEquipmentId();