Przeglądaj źródła

开始开发充电桩功能

Your Name 3 lat temu
rodzic
commit
814729590e
22 zmienionych plików z 1919 dodań i 0 usunięć
  1. 97 0
      java110-bean/src/main/java/com/java110/dto/chargeMachine/ChargeMachineDto.java
  2. 83 0
      java110-bean/src/main/java/com/java110/dto/chargeMachinePort/ChargeMachinePortDto.java
  3. 96 0
      java110-bean/src/main/java/com/java110/po/chargeMachine/ChargeMachinePo.java
  4. 82 0
      java110-bean/src/main/java/com/java110/po/chargeMachinePort/ChargeMachinePortPo.java
  5. 115 0
      java110-db/src/main/resources/mapper/common/ChargeMachinePortV1ServiceDaoImplMapper.xml
  6. 133 0
      java110-db/src/main/resources/mapper/common/ChargeMachineV1ServiceDaoImplMapper.xml
  7. 68 0
      java110-interface/src/main/java/com/java110/intf/common/IChargeMachinePortV1InnerServiceSMO.java
  8. 68 0
      java110-interface/src/main/java/com/java110/intf/common/IChargeMachineV1InnerServiceSMO.java
  9. 72 0
      service-common/src/main/java/com/java110/common/cmd/chargeMachine/DeleteChargeMachineCmd.java
  10. 71 0
      service-common/src/main/java/com/java110/common/cmd/chargeMachine/DeleteChargeMachinePortCmd.java
  11. 87 0
      service-common/src/main/java/com/java110/common/cmd/chargeMachine/ListChargeMachineCmd.java
  12. 83 0
      service-common/src/main/java/com/java110/common/cmd/chargeMachine/ListChargeMachinePortCmd.java
  13. 80 0
      service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachineCmd.java
  14. 79 0
      service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachinePortCmd.java
  15. 75 0
      service-common/src/main/java/com/java110/common/cmd/chargeMachine/UpdateChargeMachineCmd.java
  16. 74 0
      service-common/src/main/java/com/java110/common/cmd/chargeMachine/UpdateChargeMachinePortCmd.java
  17. 77 0
      service-common/src/main/java/com/java110/common/dao/IChargeMachinePortV1ServiceDao.java
  18. 77 0
      service-common/src/main/java/com/java110/common/dao/IChargeMachineV1ServiceDao.java
  19. 112 0
      service-common/src/main/java/com/java110/common/dao/impl/ChargeMachinePortV1ServiceDaoImpl.java
  20. 112 0
      service-common/src/main/java/com/java110/common/dao/impl/ChargeMachineV1ServiceDaoImpl.java
  21. 89 0
      service-common/src/main/java/com/java110/common/smo/impl/ChargeMachinePortV1InnerServiceSMOImpl.java
  22. 89 0
      service-common/src/main/java/com/java110/common/smo/impl/ChargeMachineV1InnerServiceSMOImpl.java

+ 97 - 0
java110-bean/src/main/java/com/java110/dto/chargeMachine/ChargeMachineDto.java

@@ -0,0 +1,97 @@
+package com.java110.dto.chargeMachine;
+
+import com.java110.dto.PageDto;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName FloorDto
+ * @Description 充电桩数据层封装
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class ChargeMachineDto extends PageDto implements Serializable {
+
+    private String heartbeatTime;
+private String implBean;
+private String machineId;
+private String machineCode;
+private String energyPrice;
+private String durationPrice;
+private String communityId;
+private String machineName;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getHeartbeatTime() {
+        return heartbeatTime;
+    }
+public void setHeartbeatTime(String heartbeatTime) {
+        this.heartbeatTime = heartbeatTime;
+    }
+public String getImplBean() {
+        return implBean;
+    }
+public void setImplBean(String implBean) {
+        this.implBean = implBean;
+    }
+public String getMachineId() {
+        return machineId;
+    }
+public void setMachineId(String machineId) {
+        this.machineId = machineId;
+    }
+public String getMachineCode() {
+        return machineCode;
+    }
+public void setMachineCode(String machineCode) {
+        this.machineCode = machineCode;
+    }
+public String getEnergyPrice() {
+        return energyPrice;
+    }
+public void setEnergyPrice(String energyPrice) {
+        this.energyPrice = energyPrice;
+    }
+public String getDurationPrice() {
+        return durationPrice;
+    }
+public void setDurationPrice(String durationPrice) {
+        this.durationPrice = durationPrice;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getMachineName() {
+        return machineName;
+    }
+public void setMachineName(String machineName) {
+        this.machineName = machineName;
+    }
+
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+}

+ 83 - 0
java110-bean/src/main/java/com/java110/dto/chargeMachinePort/ChargeMachinePortDto.java

@@ -0,0 +1,83 @@
+package com.java110.dto.chargeMachinePort;
+
+import com.java110.dto.PageDto;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName FloorDto
+ * @Description 充电插口数据层封装
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class ChargeMachinePortDto extends PageDto implements Serializable {
+
+    private String machineId;
+private String portName;
+private String state;
+private String portId;
+private String portCode;
+private String communityId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getMachineId() {
+        return machineId;
+    }
+public void setMachineId(String machineId) {
+        this.machineId = machineId;
+    }
+public String getPortName() {
+        return portName;
+    }
+public void setPortName(String portName) {
+        this.portName = portName;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getPortId() {
+        return portId;
+    }
+public void setPortId(String portId) {
+        this.portId = portId;
+    }
+public String getPortCode() {
+        return portCode;
+    }
+public void setPortCode(String portCode) {
+        this.portCode = portCode;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+}

+ 96 - 0
java110-bean/src/main/java/com/java110/po/chargeMachine/ChargeMachinePo.java

@@ -0,0 +1,96 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.po.chargeMachine;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2023-03-02 01:06:23 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public class ChargeMachinePo implements Serializable {
+
+    private String heartbeatTime;
+private String implBean;
+private String machineId;
+private String machineCode;
+private String energyPrice;
+private String durationPrice;
+private String statusCd = "0";
+private String communityId;
+private String machineName;
+public String getHeartbeatTime() {
+        return heartbeatTime;
+    }
+public void setHeartbeatTime(String heartbeatTime) {
+        this.heartbeatTime = heartbeatTime;
+    }
+public String getImplBean() {
+        return implBean;
+    }
+public void setImplBean(String implBean) {
+        this.implBean = implBean;
+    }
+public String getMachineId() {
+        return machineId;
+    }
+public void setMachineId(String machineId) {
+        this.machineId = machineId;
+    }
+public String getMachineCode() {
+        return machineCode;
+    }
+public void setMachineCode(String machineCode) {
+        this.machineCode = machineCode;
+    }
+public String getEnergyPrice() {
+        return energyPrice;
+    }
+public void setEnergyPrice(String energyPrice) {
+        this.energyPrice = energyPrice;
+    }
+public String getDurationPrice() {
+        return durationPrice;
+    }
+public void setDurationPrice(String durationPrice) {
+        this.durationPrice = durationPrice;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getMachineName() {
+        return machineName;
+    }
+public void setMachineName(String machineName) {
+        this.machineName = machineName;
+    }
+
+
+
+}

+ 82 - 0
java110-bean/src/main/java/com/java110/po/chargeMachinePort/ChargeMachinePortPo.java

@@ -0,0 +1,82 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.po.chargeMachinePort;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2023-03-02 01:17:43 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public class ChargeMachinePortPo implements Serializable {
+
+    private String machineId;
+private String statusCd = "0";
+private String portName;
+private String state;
+private String portId;
+private String portCode;
+private String communityId;
+public String getMachineId() {
+        return machineId;
+    }
+public void setMachineId(String machineId) {
+        this.machineId = machineId;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getPortName() {
+        return portName;
+    }
+public void setPortName(String portName) {
+        this.portName = portName;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getPortId() {
+        return portId;
+    }
+public void setPortId(String portId) {
+        this.portId = portId;
+    }
+public String getPortCode() {
+        return portCode;
+    }
+public void setPortCode(String portCode) {
+        this.portCode = portCode;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+
+}

+ 115 - 0
java110-db/src/main/resources/mapper/common/ChargeMachinePortV1ServiceDaoImplMapper.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="chargeMachinePortV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存充电插口信息 add by wuxw 2018-07-03 -->
+    <insert id="saveChargeMachinePortInfo" parameterType="Map">
+        insert into charge_machine_port(
+machine_id,port_name,state,port_id,port_code,community_id
+) values (
+#{machineId},#{portName},#{state},#{portId},#{portCode},#{communityId}
+)
+    </insert>
+
+
+
+    <!-- 查询充电插口信息 add by wuxw 2018-07-03 -->
+    <select id="getChargeMachinePortInfo" parameterType="Map" resultType="Map">
+        select  t.machine_id,t.machine_id machineId,t.status_cd,t.status_cd statusCd,t.port_name,t.port_name portName,t.state,t.port_id,t.port_id portId,t.port_code,t.port_code portCode,t.community_id,t.community_id communityId 
+from charge_machine_port t 
+where 1 =1 
+<if test="machineId !=null and machineId != ''">
+   and t.machine_id= #{machineId}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="portName !=null and portName != ''">
+   and t.port_name= #{portName}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="portId !=null and portId != ''">
+   and t.port_id= #{portId}
+</if> 
+<if test="portCode !=null and portCode != ''">
+   and t.port_code= #{portCode}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+order by t.create_time desc
+<if test="page != -1 and page != null ">
+   limit #{page}, #{row}
+</if> 
+
+    </select>
+
+
+
+
+    <!-- 修改充电插口信息 add by wuxw 2018-07-03 -->
+    <update id="updateChargeMachinePortInfo" parameterType="Map">
+        update  charge_machine_port t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="machineId !=null and machineId != ''">
+, t.machine_id= #{machineId}
+</if> 
+<if test="portName !=null and portName != ''">
+, t.port_name= #{portName}
+</if> 
+<if test="state !=null and state != ''">
+, t.state= #{state}
+</if> 
+<if test="portCode !=null and portCode != ''">
+, t.port_code= #{portCode}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+ where 1=1 <if test="portId !=null and portId != ''">
+and t.port_id= #{portId}
+</if> 
+
+    </update>
+
+    <!-- 查询充电插口数量 add by wuxw 2018-07-03 -->
+     <select id="queryChargeMachinePortsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from charge_machine_port t 
+where 1 =1 
+<if test="machineId !=null and machineId != ''">
+   and t.machine_id= #{machineId}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="portName !=null and portName != ''">
+   and t.port_name= #{portName}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="portId !=null and portId != ''">
+   and t.port_id= #{portId}
+</if> 
+<if test="portCode !=null and portCode != ''">
+   and t.port_code= #{portCode}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 133 - 0
java110-db/src/main/resources/mapper/common/ChargeMachineV1ServiceDaoImplMapper.xml

@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="chargeMachineV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存充电桩信息 add by wuxw 2018-07-03 -->
+    <insert id="saveChargeMachineInfo" parameterType="Map">
+        insert into charge_machine(
+heartbeat_time,impl_bean,machine_id,machine_code,energy_price,duration_price,community_id,machine_name
+) values (
+#{heartbeatTime},#{implBean},#{machineId},#{machineCode},#{energyPrice},#{durationPrice},#{communityId},#{machineName}
+)
+    </insert>
+
+
+
+    <!-- 查询充电桩信息 add by wuxw 2018-07-03 -->
+    <select id="getChargeMachineInfo" parameterType="Map" resultType="Map">
+        select  t.heartbeat_time,t.heartbeat_time heartbeatTime,t.impl_bean,t.impl_bean implBean,t.machine_id,t.machine_id machineId,t.machine_code,t.machine_code machineCode,t.energy_price,t.energy_price energyPrice,t.duration_price,t.duration_price durationPrice,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.machine_name,t.machine_name machineName 
+from charge_machine t 
+where 1 =1 
+<if test="heartbeatTime !=null and heartbeatTime != ''">
+   and t.heartbeat_time= #{heartbeatTime}
+</if> 
+<if test="implBean !=null and implBean != ''">
+   and t.impl_bean= #{implBean}
+</if> 
+<if test="machineId !=null and machineId != ''">
+   and t.machine_id= #{machineId}
+</if> 
+<if test="machineCode !=null and machineCode != ''">
+   and t.machine_code= #{machineCode}
+</if> 
+<if test="energyPrice !=null and energyPrice != ''">
+   and t.energy_price= #{energyPrice}
+</if> 
+<if test="durationPrice !=null and durationPrice != ''">
+   and t.duration_price= #{durationPrice}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="machineName !=null and machineName != ''">
+   and t.machine_name= #{machineName}
+</if> 
+order by t.create_time desc
+<if test="page != -1 and page != null ">
+   limit #{page}, #{row}
+</if> 
+
+    </select>
+
+
+
+
+    <!-- 修改充电桩信息 add by wuxw 2018-07-03 -->
+    <update id="updateChargeMachineInfo" parameterType="Map">
+        update  charge_machine t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="heartbeatTime !=null and heartbeatTime != ''">
+, t.heartbeat_time= #{heartbeatTime}
+</if> 
+<if test="implBean !=null and implBean != ''">
+, t.impl_bean= #{implBean}
+</if> 
+<if test="machineCode !=null and machineCode != ''">
+, t.machine_code= #{machineCode}
+</if> 
+<if test="energyPrice !=null and energyPrice != ''">
+, t.energy_price= #{energyPrice}
+</if> 
+<if test="durationPrice !=null and durationPrice != ''">
+, t.duration_price= #{durationPrice}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+<if test="machineName !=null and machineName != ''">
+, t.machine_name= #{machineName}
+</if> 
+ where 1=1 <if test="machineId !=null and machineId != ''">
+and t.machine_id= #{machineId}
+</if> 
+
+    </update>
+
+    <!-- 查询充电桩数量 add by wuxw 2018-07-03 -->
+     <select id="queryChargeMachinesCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from charge_machine t 
+where 1 =1 
+<if test="heartbeatTime !=null and heartbeatTime != ''">
+   and t.heartbeat_time= #{heartbeatTime}
+</if> 
+<if test="implBean !=null and implBean != ''">
+   and t.impl_bean= #{implBean}
+</if> 
+<if test="machineId !=null and machineId != ''">
+   and t.machine_id= #{machineId}
+</if> 
+<if test="machineCode !=null and machineCode != ''">
+   and t.machine_code= #{machineCode}
+</if> 
+<if test="energyPrice !=null and energyPrice != ''">
+   and t.energy_price= #{energyPrice}
+</if> 
+<if test="durationPrice !=null and durationPrice != ''">
+   and t.duration_price= #{durationPrice}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="machineName !=null and machineName != ''">
+   and t.machine_name= #{machineName}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/common/IChargeMachinePortV1InnerServiceSMO.java

@@ -0,0 +1,68 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.intf.common;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.chargeMachinePort.ChargeMachinePortDto;
+import com.java110.po.chargeMachinePort.ChargeMachinePortPo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2023-03-02 01:17:43 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@FeignClient(name = "common-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/chargeMachinePortV1Api")
+public interface IChargeMachinePortV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveChargeMachinePort", method = RequestMethod.POST)
+    public int saveChargeMachinePort(@RequestBody  ChargeMachinePortPo chargeMachinePortPo);
+
+    @RequestMapping(value = "/updateChargeMachinePort", method = RequestMethod.POST)
+    public int updateChargeMachinePort(@RequestBody  ChargeMachinePortPo chargeMachinePortPo);
+
+    @RequestMapping(value = "/deleteChargeMachinePort", method = RequestMethod.POST)
+    public int deleteChargeMachinePort(@RequestBody  ChargeMachinePortPo chargeMachinePortPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param chargeMachinePortDto 数据对象分享
+     * @return ChargeMachinePortDto 对象数据
+     */
+    @RequestMapping(value = "/queryChargeMachinePorts", method = RequestMethod.POST)
+    List<ChargeMachinePortDto> queryChargeMachinePorts(@RequestBody ChargeMachinePortDto chargeMachinePortDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param chargeMachinePortDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryChargeMachinePortsCount", method = RequestMethod.POST)
+    int queryChargeMachinePortsCount(@RequestBody ChargeMachinePortDto chargeMachinePortDto);
+}

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/common/IChargeMachineV1InnerServiceSMO.java

@@ -0,0 +1,68 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.intf.common;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.chargeMachine.ChargeMachineDto;
+import com.java110.po.chargeMachine.ChargeMachinePo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2023-03-02 01:06:23 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@FeignClient(name = "common-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/chargeMachineV1Api")
+public interface IChargeMachineV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveChargeMachine", method = RequestMethod.POST)
+    public int saveChargeMachine(@RequestBody  ChargeMachinePo chargeMachinePo);
+
+    @RequestMapping(value = "/updateChargeMachine", method = RequestMethod.POST)
+    public int updateChargeMachine(@RequestBody  ChargeMachinePo chargeMachinePo);
+
+    @RequestMapping(value = "/deleteChargeMachine", method = RequestMethod.POST)
+    public int deleteChargeMachine(@RequestBody  ChargeMachinePo chargeMachinePo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param chargeMachineDto 数据对象分享
+     * @return ChargeMachineDto 对象数据
+     */
+    @RequestMapping(value = "/queryChargeMachines", method = RequestMethod.POST)
+    List<ChargeMachineDto> queryChargeMachines(@RequestBody ChargeMachineDto chargeMachineDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param chargeMachineDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryChargeMachinesCount", method = RequestMethod.POST)
+    int queryChargeMachinesCount(@RequestBody ChargeMachineDto chargeMachineDto);
+}

+ 72 - 0
service-common/src/main/java/com/java110/common/cmd/chargeMachine/DeleteChargeMachineCmd.java

@@ -0,0 +1,72 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.chargeMachine;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.common.IChargeMachineV1InnerServiceSMO;
+import com.java110.po.chargeMachine.ChargeMachinePo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 类表述:删除
+ * 服务编码:chargeMachine.deleteChargeMachine
+ * 请求路劲:/app/chargeMachine.DeleteChargeMachine
+ * add by 吴学文 at 2023-03-02 01:06:24 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "chargeMachine.deleteChargeMachine")
+public class DeleteChargeMachineCmd extends Cmd {
+    private static Logger logger = LoggerFactory.getLogger(DeleteChargeMachineCmd.class);
+
+    @Autowired
+    private IChargeMachineV1InnerServiceSMO chargeMachineV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "machineId", "machineId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeMachinePo chargeMachinePo = BeanConvertUtil.covertBean(reqJson, ChargeMachinePo.class);
+        int flag = chargeMachineV1InnerServiceSMOImpl.deleteChargeMachine(chargeMachinePo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 71 - 0
service-common/src/main/java/com/java110/common/cmd/chargeMachine/DeleteChargeMachinePortCmd.java

@@ -0,0 +1,71 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.chargeMachine;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.intf.common.IChargeMachinePortV1InnerServiceSMO;
+import com.java110.po.chargeMachinePort.ChargeMachinePortPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 类表述:删除
+ * 服务编码:chargeMachinePort.deleteChargeMachinePort
+ * 请求路劲:/app/chargeMachinePort.DeleteChargeMachinePort
+ * add by 吴学文 at 2023-03-02 01:17:43 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "chargeMachine.deleteChargeMachinePort")
+public class DeleteChargeMachinePortCmd extends Cmd {
+    private static Logger logger = LoggerFactory.getLogger(DeleteChargeMachinePortCmd.class);
+
+    @Autowired
+    private IChargeMachinePortV1InnerServiceSMO chargeMachinePortV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "portId", "portId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeMachinePortPo chargeMachinePortPo = BeanConvertUtil.covertBean(reqJson, ChargeMachinePortPo.class);
+        int flag = chargeMachinePortV1InnerServiceSMOImpl.deleteChargeMachinePort(chargeMachinePortPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 87 - 0
service-common/src/main/java/com/java110/common/cmd/chargeMachine/ListChargeMachineCmd.java

@@ -0,0 +1,87 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.chargeMachine;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.common.IChargeMachineV1InnerServiceSMO;
+import com.java110.po.chargeMachine.ChargeMachinePo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.java110.dto.chargeMachine.ChargeMachineDto;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:chargeMachine.listChargeMachine
+ * 请求路劲:/app/chargeMachine.ListChargeMachine
+ * add by 吴学文 at 2023-03-02 01:06:24 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "chargeMachine.listChargeMachine")
+public class ListChargeMachineCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(ListChargeMachineCmd.class);
+    @Autowired
+    private IChargeMachineV1InnerServiceSMO chargeMachineV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+        Assert.hasKeyAndValue(reqJson, "communityId", "查询小区ID");
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeMachineDto chargeMachineDto = BeanConvertUtil.covertBean(reqJson, ChargeMachineDto.class);
+
+        int count = chargeMachineV1InnerServiceSMOImpl.queryChargeMachinesCount(chargeMachineDto);
+
+        List<ChargeMachineDto> chargeMachineDtos = null;
+
+        if (count > 0) {
+            chargeMachineDtos = chargeMachineV1InnerServiceSMOImpl.queryChargeMachines(chargeMachineDto);
+        } else {
+            chargeMachineDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, chargeMachineDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 83 - 0
service-common/src/main/java/com/java110/common/cmd/chargeMachine/ListChargeMachinePortCmd.java

@@ -0,0 +1,83 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.chargeMachine;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.intf.common.IChargeMachinePortV1InnerServiceSMO;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.java110.dto.chargeMachinePort.ChargeMachinePortDto;
+import java.util.List;
+import java.util.ArrayList;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:chargeMachinePort.listChargeMachinePort
+ * 请求路劲:/app/chargeMachinePort.ListChargeMachinePort
+ * add by 吴学文 at 2023-03-02 01:17:43 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "chargeMachine.listChargeMachinePort")
+public class ListChargeMachinePortCmd extends Cmd {
+
+  private static Logger logger = LoggerFactory.getLogger(ListChargeMachinePortCmd.class);
+    @Autowired
+    private IChargeMachinePortV1InnerServiceSMO chargeMachinePortV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           ChargeMachinePortDto chargeMachinePortDto = BeanConvertUtil.covertBean(reqJson, ChargeMachinePortDto.class);
+
+           int count = chargeMachinePortV1InnerServiceSMOImpl.queryChargeMachinePortsCount(chargeMachinePortDto);
+
+           List<ChargeMachinePortDto> chargeMachinePortDtos = null;
+
+           if (count > 0) {
+               chargeMachinePortDtos = chargeMachinePortV1InnerServiceSMOImpl.queryChargeMachinePorts(chargeMachinePortDto);
+           } else {
+               chargeMachinePortDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, chargeMachinePortDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 80 - 0
service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachineCmd.java

@@ -0,0 +1,80 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.chargeMachine;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.common.IChargeMachineV1InnerServiceSMO;
+import com.java110.po.chargeMachine.ChargeMachinePo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 类表述:保存
+ * 服务编码:chargeMachine.saveChargeMachine
+ * 请求路劲:/app/chargeMachine.SaveChargeMachine
+ * add by 吴学文 at 2023-03-02 01:06:24 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "chargeMachine.saveChargeMachine")
+public class SaveChargeMachineCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveChargeMachineCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IChargeMachineV1InnerServiceSMO chargeMachineV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "machineName", "请求报文中未包含machineName");
+        Assert.hasKeyAndValue(reqJson, "machineCode", "请求报文中未包含machineCode");
+        Assert.hasKeyAndValue(reqJson, "implBean", "请求报文中未包含implBean");
+        Assert.hasKeyAndValue(reqJson, "durationPrice", "请求报文中未包含durationPrice");
+        Assert.hasKeyAndValue(reqJson, "energyPrice", "请求报文中未包含energyPrice");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeMachinePo chargeMachinePo = BeanConvertUtil.covertBean(reqJson, ChargeMachinePo.class);
+        chargeMachinePo.setMachineId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = chargeMachineV1InnerServiceSMOImpl.saveChargeMachine(chargeMachinePo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 79 - 0
service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachinePortCmd.java

@@ -0,0 +1,79 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.chargeMachine;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.common.IChargeMachinePortV1InnerServiceSMO;
+import com.java110.po.chargeMachinePort.ChargeMachinePortPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 类表述:保存
+ * 服务编码:chargeMachinePort.saveChargeMachinePort
+ * 请求路劲:/app/chargeMachinePort.SaveChargeMachinePort
+ * add by 吴学文 at 2023-03-02 01:17:43 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "chargeMachine.saveChargeMachinePort")
+public class SaveChargeMachinePortCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveChargeMachinePortCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IChargeMachinePortV1InnerServiceSMO chargeMachinePortV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "machineId", "请求报文中未包含machineId");
+        Assert.hasKeyAndValue(reqJson, "portName", "请求报文中未包含portName");
+        Assert.hasKeyAndValue(reqJson, "portCode", "请求报文中未包含portCode");
+        Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeMachinePortPo chargeMachinePortPo = BeanConvertUtil.covertBean(reqJson, ChargeMachinePortPo.class);
+        chargeMachinePortPo.setPortId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = chargeMachinePortV1InnerServiceSMOImpl.saveChargeMachinePort(chargeMachinePortPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-common/src/main/java/com/java110/common/cmd/chargeMachine/UpdateChargeMachineCmd.java

@@ -0,0 +1,75 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.chargeMachine;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.common.IChargeMachineV1InnerServiceSMO;
+import com.java110.po.chargeMachine.ChargeMachinePo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:chargeMachine.updateChargeMachine
+ * 请求路劲:/app/chargeMachine.UpdateChargeMachine
+ * add by 吴学文 at 2023-03-02 01:06:24 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "chargeMachine.updateChargeMachine")
+public class UpdateChargeMachineCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateChargeMachineCmd.class);
+
+
+    @Autowired
+    private IChargeMachineV1InnerServiceSMO chargeMachineV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "machineId", "machineId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeMachinePo chargeMachinePo = BeanConvertUtil.covertBean(reqJson, ChargeMachinePo.class);
+        int flag = chargeMachineV1InnerServiceSMOImpl.updateChargeMachine(chargeMachinePo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 74 - 0
service-common/src/main/java/com/java110/common/cmd/chargeMachine/UpdateChargeMachinePortCmd.java

@@ -0,0 +1,74 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.chargeMachine;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.intf.common.IChargeMachinePortV1InnerServiceSMO;
+import com.java110.po.chargeMachinePort.ChargeMachinePortPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:chargeMachinePort.updateChargeMachinePort
+ * 请求路劲:/app/chargeMachinePort.UpdateChargeMachinePort
+ * add by 吴学文 at 2023-03-02 01:17:43 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "chargeMachine.updateChargeMachinePort")
+public class UpdateChargeMachinePortCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateChargeMachinePortCmd.class);
+
+
+    @Autowired
+    private IChargeMachinePortV1InnerServiceSMO chargeMachinePortV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "portId", "portId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeMachinePortPo chargeMachinePortPo = BeanConvertUtil.covertBean(reqJson, ChargeMachinePortPo.class);
+        int flag = chargeMachinePortV1InnerServiceSMOImpl.updateChargeMachinePort(chargeMachinePortPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-common/src/main/java/com/java110/common/dao/IChargeMachinePortV1ServiceDao.java

@@ -0,0 +1,77 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2023-03-02 01:17:43 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public interface IChargeMachinePortV1ServiceDao {
+
+
+    /**
+     * 保存 充电插口信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveChargeMachinePortInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询充电插口信息(instance过程)
+     * 根据bId 查询充电插口信息
+     * @param info bId 信息
+     * @return 充电插口信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getChargeMachinePortInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改充电插口信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateChargeMachinePortInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询充电插口总数
+     *
+     * @param info 充电插口信息
+     * @return 充电插口数量
+     */
+    int queryChargeMachinePortsCount(Map info);
+
+}

+ 77 - 0
service-common/src/main/java/com/java110/common/dao/IChargeMachineV1ServiceDao.java

@@ -0,0 +1,77 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2023-03-02 01:06:23 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public interface IChargeMachineV1ServiceDao {
+
+
+    /**
+     * 保存 充电桩信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveChargeMachineInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询充电桩信息(instance过程)
+     * 根据bId 查询充电桩信息
+     * @param info bId 信息
+     * @return 充电桩信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getChargeMachineInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改充电桩信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateChargeMachineInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询充电桩总数
+     *
+     * @param info 充电桩信息
+     * @return 充电桩数量
+     */
+    int queryChargeMachinesCount(Map info);
+
+}

+ 112 - 0
service-common/src/main/java/com/java110/common/dao/impl/ChargeMachinePortV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.common.dao.IChargeMachinePortV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2023-03-02 01:17:43 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Service("chargeMachinePortV1ServiceDaoImpl")
+public class ChargeMachinePortV1ServiceDaoImpl extends BaseServiceDao implements IChargeMachinePortV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ChargeMachinePortV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存充电插口信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveChargeMachinePortInfo(Map info) throws DAOException {
+        logger.debug("保存 saveChargeMachinePortInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("chargeMachinePortV1ServiceDaoImpl.saveChargeMachinePortInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询充电插口信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getChargeMachinePortInfo(Map info) throws DAOException {
+        logger.debug("查询 getChargeMachinePortInfo 入参 info : {}",info);
+
+        List<Map> businessChargeMachinePortInfos = sqlSessionTemplate.selectList("chargeMachinePortV1ServiceDaoImpl.getChargeMachinePortInfo",info);
+
+        return businessChargeMachinePortInfos;
+    }
+
+
+    /**
+     * 修改充电插口信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateChargeMachinePortInfo(Map info) throws DAOException {
+        logger.debug("修改 updateChargeMachinePortInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("chargeMachinePortV1ServiceDaoImpl.updateChargeMachinePortInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询充电插口数量
+     * @param info 充电插口信息
+     * @return 充电插口数量
+     */
+    @Override
+    public int queryChargeMachinePortsCount(Map info) {
+        logger.debug("查询 queryChargeMachinePortsCount 入参 info : {}",info);
+
+        List<Map> businessChargeMachinePortInfos = sqlSessionTemplate.selectList("chargeMachinePortV1ServiceDaoImpl.queryChargeMachinePortsCount", info);
+        if (businessChargeMachinePortInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessChargeMachinePortInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 112 - 0
service-common/src/main/java/com/java110/common/dao/impl/ChargeMachineV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.common.dao.IChargeMachineV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2023-03-02 01:06:23 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Service("chargeMachineV1ServiceDaoImpl")
+public class ChargeMachineV1ServiceDaoImpl extends BaseServiceDao implements IChargeMachineV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ChargeMachineV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存充电桩信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveChargeMachineInfo(Map info) throws DAOException {
+        logger.debug("保存 saveChargeMachineInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("chargeMachineV1ServiceDaoImpl.saveChargeMachineInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询充电桩信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getChargeMachineInfo(Map info) throws DAOException {
+        logger.debug("查询 getChargeMachineInfo 入参 info : {}",info);
+
+        List<Map> businessChargeMachineInfos = sqlSessionTemplate.selectList("chargeMachineV1ServiceDaoImpl.getChargeMachineInfo",info);
+
+        return businessChargeMachineInfos;
+    }
+
+
+    /**
+     * 修改充电桩信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateChargeMachineInfo(Map info) throws DAOException {
+        logger.debug("修改 updateChargeMachineInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("chargeMachineV1ServiceDaoImpl.updateChargeMachineInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询充电桩数量
+     * @param info 充电桩信息
+     * @return 充电桩数量
+     */
+    @Override
+    public int queryChargeMachinesCount(Map info) {
+        logger.debug("查询 queryChargeMachinesCount 入参 info : {}",info);
+
+        List<Map> businessChargeMachineInfos = sqlSessionTemplate.selectList("chargeMachineV1ServiceDaoImpl.queryChargeMachinesCount", info);
+        if (businessChargeMachineInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessChargeMachineInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-common/src/main/java/com/java110/common/smo/impl/ChargeMachinePortV1InnerServiceSMOImpl.java

@@ -0,0 +1,89 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.smo.impl;
+
+
+import com.java110.common.dao.IChargeMachinePortV1ServiceDao;
+import com.java110.intf.common.IChargeMachinePortV1InnerServiceSMO;
+import com.java110.dto.chargeMachinePort.ChargeMachinePortDto;
+import com.java110.po.chargeMachinePort.ChargeMachinePortPo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2023-03-02 01:17:43 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@RestController
+public class ChargeMachinePortV1InnerServiceSMOImpl extends BaseServiceSMO implements IChargeMachinePortV1InnerServiceSMO {
+
+    @Autowired
+    private IChargeMachinePortV1ServiceDao chargeMachinePortV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveChargeMachinePort(@RequestBody  ChargeMachinePortPo chargeMachinePortPo) {
+        int saveFlag = chargeMachinePortV1ServiceDaoImpl.saveChargeMachinePortInfo(BeanConvertUtil.beanCovertMap(chargeMachinePortPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateChargeMachinePort(@RequestBody  ChargeMachinePortPo chargeMachinePortPo) {
+        int saveFlag = chargeMachinePortV1ServiceDaoImpl.updateChargeMachinePortInfo(BeanConvertUtil.beanCovertMap(chargeMachinePortPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteChargeMachinePort(@RequestBody  ChargeMachinePortPo chargeMachinePortPo) {
+       chargeMachinePortPo.setStatusCd("1");
+       int saveFlag = chargeMachinePortV1ServiceDaoImpl.updateChargeMachinePortInfo(BeanConvertUtil.beanCovertMap(chargeMachinePortPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<ChargeMachinePortDto> queryChargeMachinePorts(@RequestBody  ChargeMachinePortDto chargeMachinePortDto) {
+
+        //校验是否传了 分页信息
+
+        int page = chargeMachinePortDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            chargeMachinePortDto.setPage((page - 1) * chargeMachinePortDto.getRow());
+        }
+
+        List<ChargeMachinePortDto> chargeMachinePorts = BeanConvertUtil.covertBeanList(chargeMachinePortV1ServiceDaoImpl.getChargeMachinePortInfo(BeanConvertUtil.beanCovertMap(chargeMachinePortDto)), ChargeMachinePortDto.class);
+
+        return chargeMachinePorts;
+    }
+
+
+    @Override
+    public int queryChargeMachinePortsCount(@RequestBody ChargeMachinePortDto chargeMachinePortDto) {
+        return chargeMachinePortV1ServiceDaoImpl.queryChargeMachinePortsCount(BeanConvertUtil.beanCovertMap(chargeMachinePortDto));    }
+
+}

+ 89 - 0
service-common/src/main/java/com/java110/common/smo/impl/ChargeMachineV1InnerServiceSMOImpl.java

@@ -0,0 +1,89 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.smo.impl;
+
+
+import com.java110.common.dao.IChargeMachineV1ServiceDao;
+import com.java110.intf.common.IChargeMachineV1InnerServiceSMO;
+import com.java110.dto.chargeMachine.ChargeMachineDto;
+import com.java110.po.chargeMachine.ChargeMachinePo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2023-03-02 01:06:23 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@RestController
+public class ChargeMachineV1InnerServiceSMOImpl extends BaseServiceSMO implements IChargeMachineV1InnerServiceSMO {
+
+    @Autowired
+    private IChargeMachineV1ServiceDao chargeMachineV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveChargeMachine(@RequestBody  ChargeMachinePo chargeMachinePo) {
+        int saveFlag = chargeMachineV1ServiceDaoImpl.saveChargeMachineInfo(BeanConvertUtil.beanCovertMap(chargeMachinePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateChargeMachine(@RequestBody  ChargeMachinePo chargeMachinePo) {
+        int saveFlag = chargeMachineV1ServiceDaoImpl.updateChargeMachineInfo(BeanConvertUtil.beanCovertMap(chargeMachinePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteChargeMachine(@RequestBody  ChargeMachinePo chargeMachinePo) {
+       chargeMachinePo.setStatusCd("1");
+       int saveFlag = chargeMachineV1ServiceDaoImpl.updateChargeMachineInfo(BeanConvertUtil.beanCovertMap(chargeMachinePo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<ChargeMachineDto> queryChargeMachines(@RequestBody  ChargeMachineDto chargeMachineDto) {
+
+        //校验是否传了 分页信息
+
+        int page = chargeMachineDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            chargeMachineDto.setPage((page - 1) * chargeMachineDto.getRow());
+        }
+
+        List<ChargeMachineDto> chargeMachines = BeanConvertUtil.covertBeanList(chargeMachineV1ServiceDaoImpl.getChargeMachineInfo(BeanConvertUtil.beanCovertMap(chargeMachineDto)), ChargeMachineDto.class);
+
+        return chargeMachines;
+    }
+
+
+    @Override
+    public int queryChargeMachinesCount(@RequestBody ChargeMachineDto chargeMachineDto) {
+        return chargeMachineV1ServiceDaoImpl.queryChargeMachinesCount(BeanConvertUtil.beanCovertMap(chargeMachineDto));    }
+
+}