Kaynağa Gözat

优化充电桩 根据功率设置单价

Your Name 3 yıl önce
ebeveyn
işleme
dfd914983c
22 değiştirilmiş dosya ile 1843 ekleme ve 0 silme
  1. 69 0
      java110-bean/src/main/java/com/java110/dto/chargeRule/ChargeRuleDto.java
  2. 90 0
      java110-bean/src/main/java/com/java110/dto/chargeRuleFee/ChargeRuleFeeDto.java
  3. 68 0
      java110-bean/src/main/java/com/java110/po/chargeRule/ChargeRulePo.java
  4. 89 0
      java110-bean/src/main/java/com/java110/po/chargeRuleFee/ChargeRuleFeePo.java
  5. 126 0
      java110-db/src/main/resources/mapper/common/ChargeRuleFeeV1ServiceDaoImplMapper.xml
  6. 93 0
      java110-db/src/main/resources/mapper/common/ChargeRuleV1ServiceDaoImplMapper.xml
  7. 68 0
      java110-interface/src/main/java/com/java110/intf/common/IChargeRuleFeeV1InnerServiceSMO.java
  8. 68 0
      java110-interface/src/main/java/com/java110/intf/common/IChargeRuleV1InnerServiceSMO.java
  9. 72 0
      service-common/src/main/java/com/java110/common/cmd/chargeRule/DeleteChargeRuleCmd.java
  10. 71 0
      service-common/src/main/java/com/java110/common/cmd/chargeRule/DeleteChargeRuleFeeCmd.java
  11. 86 0
      service-common/src/main/java/com/java110/common/cmd/chargeRule/ListChargeRuleCmd.java
  12. 83 0
      service-common/src/main/java/com/java110/common/cmd/chargeRule/ListChargeRuleFeeCmd.java
  13. 76 0
      service-common/src/main/java/com/java110/common/cmd/chargeRule/SaveChargeRuleCmd.java
  14. 79 0
      service-common/src/main/java/com/java110/common/cmd/chargeRule/SaveChargeRuleFeeCmd.java
  15. 75 0
      service-common/src/main/java/com/java110/common/cmd/chargeRule/UpdateChargeRuleCmd.java
  16. 74 0
      service-common/src/main/java/com/java110/common/cmd/chargeRule/UpdateChargeRuleFeeCmd.java
  17. 77 0
      service-common/src/main/java/com/java110/common/dao/IChargeRuleFeeV1ServiceDao.java
  18. 77 0
      service-common/src/main/java/com/java110/common/dao/IChargeRuleV1ServiceDao.java
  19. 112 0
      service-common/src/main/java/com/java110/common/dao/impl/ChargeRuleFeeV1ServiceDaoImpl.java
  20. 112 0
      service-common/src/main/java/com/java110/common/dao/impl/ChargeRuleV1ServiceDaoImpl.java
  21. 89 0
      service-common/src/main/java/com/java110/common/smo/impl/ChargeRuleFeeV1InnerServiceSMOImpl.java
  22. 89 0
      service-common/src/main/java/com/java110/common/smo/impl/ChargeRuleV1InnerServiceSMOImpl.java

+ 69 - 0
java110-bean/src/main/java/com/java110/dto/chargeRule/ChargeRuleDto.java

@@ -0,0 +1,69 @@
+package com.java110.dto.chargeRule;
+
+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 ChargeRuleDto extends PageDto implements Serializable {
+
+    private String ruleName;
+private String remark;
+private String ruleId;
+private String communityId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getRuleName() {
+        return ruleName;
+    }
+public void setRuleName(String ruleName) {
+        this.ruleName = ruleName;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getRuleId() {
+        return ruleId;
+    }
+public void setRuleId(String ruleId) {
+        this.ruleId = ruleId;
+    }
+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;
+    }
+}

+ 90 - 0
java110-bean/src/main/java/com/java110/dto/chargeRuleFee/ChargeRuleFeeDto.java

@@ -0,0 +1,90 @@
+package com.java110.dto.chargeRuleFee;
+
+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 ChargeRuleFeeDto extends PageDto implements Serializable {
+
+    private String maxEnergyPrice;
+private String durationPrice;
+private String crfId;
+private String remark;
+private String ruleId;
+private String minEnergyPrice;
+private String communityId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getMaxEnergyPrice() {
+        return maxEnergyPrice;
+    }
+public void setMaxEnergyPrice(String maxEnergyPrice) {
+        this.maxEnergyPrice = maxEnergyPrice;
+    }
+public String getDurationPrice() {
+        return durationPrice;
+    }
+public void setDurationPrice(String durationPrice) {
+        this.durationPrice = durationPrice;
+    }
+public String getCrfId() {
+        return crfId;
+    }
+public void setCrfId(String crfId) {
+        this.crfId = crfId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getRuleId() {
+        return ruleId;
+    }
+public void setRuleId(String ruleId) {
+        this.ruleId = ruleId;
+    }
+public String getMinEnergyPrice() {
+        return minEnergyPrice;
+    }
+public void setMinEnergyPrice(String minEnergyPrice) {
+        this.minEnergyPrice = minEnergyPrice;
+    }
+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;
+    }
+}

+ 68 - 0
java110-bean/src/main/java/com/java110/po/chargeRule/ChargeRulePo.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.po.chargeRule;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2023-03-18 22:22:48 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 ChargeRulePo implements Serializable {
+
+    private String ruleName;
+private String remark;
+private String statusCd = "0";
+private String ruleId;
+private String communityId;
+public String getRuleName() {
+        return ruleName;
+    }
+public void setRuleName(String ruleName) {
+        this.ruleName = ruleName;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getRuleId() {
+        return ruleId;
+    }
+public void setRuleId(String ruleId) {
+        this.ruleId = ruleId;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+
+}

+ 89 - 0
java110-bean/src/main/java/com/java110/po/chargeRuleFee/ChargeRuleFeePo.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.po.chargeRuleFee;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2023-03-18 22:25:35 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 ChargeRuleFeePo implements Serializable {
+
+    private String maxEnergyPrice;
+private String durationPrice;
+private String crfId;
+private String remark;
+private String statusCd = "0";
+private String ruleId;
+private String minEnergyPrice;
+private String communityId;
+public String getMaxEnergyPrice() {
+        return maxEnergyPrice;
+    }
+public void setMaxEnergyPrice(String maxEnergyPrice) {
+        this.maxEnergyPrice = maxEnergyPrice;
+    }
+public String getDurationPrice() {
+        return durationPrice;
+    }
+public void setDurationPrice(String durationPrice) {
+        this.durationPrice = durationPrice;
+    }
+public String getCrfId() {
+        return crfId;
+    }
+public void setCrfId(String crfId) {
+        this.crfId = crfId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getRuleId() {
+        return ruleId;
+    }
+public void setRuleId(String ruleId) {
+        this.ruleId = ruleId;
+    }
+public String getMinEnergyPrice() {
+        return minEnergyPrice;
+    }
+public void setMinEnergyPrice(String minEnergyPrice) {
+        this.minEnergyPrice = minEnergyPrice;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+
+}

+ 126 - 0
java110-db/src/main/resources/mapper/common/ChargeRuleFeeV1ServiceDaoImplMapper.xml

@@ -0,0 +1,126 @@
+<?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="chargeRuleFeeV1ServiceDaoImpl">
+
+
+    <!-- 保存充电价格信息 add by wuxw 2018-07-03 -->
+    <insert id="saveChargeRuleFeeInfo" parameterType="Map">
+        insert into charge_rule_fee(
+        max_energy_price,duration_price,crf_id,remark,rule_id,min_energy_price,community_id
+        ) values (
+        #{maxEnergyPrice},#{durationPrice},#{crfId},#{remark},#{ruleId},#{minEnergyPrice},#{communityId}
+        )
+    </insert>
+
+
+    <!-- 查询充电价格信息 add by wuxw 2018-07-03 -->
+    <select id="getChargeRuleFeeInfo" parameterType="Map" resultType="Map">
+        select t.max_energy_price,t.max_energy_price maxEnergyPrice,t.duration_price,t.duration_price
+        durationPrice,t.crf_id,t.crf_id crfId,t.remark,t.status_cd,t.status_cd statusCd,t.rule_id,t.rule_id
+        ruleId,t.min_energy_price,t.min_energy_price minEnergyPrice,t.community_id,t.community_id communityId
+        from charge_rule_fee t
+        where 1 =1
+        <if test="maxEnergyPrice !=null and maxEnergyPrice != ''">
+            and t.max_energy_price= #{maxEnergyPrice}
+        </if>
+        <if test="durationPrice !=null and durationPrice != ''">
+            and t.duration_price= #{durationPrice}
+        </if>
+        <if test="crfId !=null and crfId != ''">
+            and t.crf_id= #{crfId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="ruleId !=null and ruleId != ''">
+            and t.rule_id= #{ruleId}
+        </if>
+        <if test="minEnergyPrice !=null and minEnergyPrice != ''">
+            and t.min_energy_price= #{minEnergyPrice}
+        </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="updateChargeRuleFeeInfo" parameterType="Map">
+        update charge_rule_fee t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+
+        <if test="maxEnergyPrice !=null and maxEnergyPrice != ''">
+            , t.max_energy_price= #{maxEnergyPrice}
+        </if>
+        <if test="durationPrice !=null and durationPrice != ''">
+            , t.duration_price= #{durationPrice}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="ruleId !=null and ruleId != ''">
+            , t.rule_id= #{ruleId}
+        </if>
+        <if test="minEnergyPrice !=null and minEnergyPrice != ''">
+            , t.min_energy_price= #{minEnergyPrice}
+        </if>
+        <if test='minEnergyPrice !=null and minEnergyPrice == "0"'>
+            , t.min_energy_price= #{minEnergyPrice}
+        </if>
+
+        where 1=1
+        <if test="crfId !=null and crfId != ''">
+            and t.crf_id= #{crfId}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+
+    </update>
+
+    <!-- 查询充电价格数量 add by wuxw 2018-07-03 -->
+    <select id="queryChargeRuleFeesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from charge_rule_fee t
+        where 1 =1
+        <if test="maxEnergyPrice !=null and maxEnergyPrice != ''">
+            and t.max_energy_price= #{maxEnergyPrice}
+        </if>
+        <if test="durationPrice !=null and durationPrice != ''">
+            and t.duration_price= #{durationPrice}
+        </if>
+        <if test="crfId !=null and crfId != ''">
+            and t.crf_id= #{crfId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="ruleId !=null and ruleId != ''">
+            and t.rule_id= #{ruleId}
+        </if>
+        <if test="minEnergyPrice !=null and minEnergyPrice != ''">
+            and t.min_energy_price= #{minEnergyPrice}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 93 - 0
java110-db/src/main/resources/mapper/common/ChargeRuleV1ServiceDaoImplMapper.xml

@@ -0,0 +1,93 @@
+<?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="chargeRuleV1ServiceDaoImpl">
+
+
+    <!-- 保存充电规则信息 add by wuxw 2018-07-03 -->
+    <insert id="saveChargeRuleInfo" parameterType="Map">
+        insert into charge_rule(
+        rule_name,remark,rule_id,community_id
+        ) values (
+        #{ruleName},#{remark},#{ruleId},#{communityId}
+        )
+    </insert>
+
+
+    <!-- 查询充电规则信息 add by wuxw 2018-07-03 -->
+    <select id="getChargeRuleInfo" parameterType="Map" resultType="Map">
+        select t.rule_name,t.rule_name ruleName,t.remark,t.status_cd,t.status_cd statusCd,t.rule_id,t.rule_id
+        ruleId,t.community_id,t.community_id communityId
+        from charge_rule t
+        where 1 =1
+        <if test="ruleName !=null and ruleName != ''">
+            and t.rule_name= #{ruleName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="ruleId !=null and ruleId != ''">
+            and t.rule_id= #{ruleId}
+        </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="updateChargeRuleInfo" parameterType="Map">
+        update charge_rule t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="ruleName !=null and ruleName != ''">
+            , t.rule_name= #{ruleName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        where 1=1
+        <if test="ruleId !=null and ruleId != ''">
+            and t.rule_id= #{ruleId}
+        </if>
+
+    </update>
+
+    <!-- 查询充电规则数量 add by wuxw 2018-07-03 -->
+    <select id="queryChargeRulesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from charge_rule t
+        where 1 =1
+        <if test="ruleName !=null and ruleName != ''">
+            and t.rule_name= #{ruleName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="ruleId !=null and ruleId != ''">
+            and t.rule_id= #{ruleId}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/common/IChargeRuleFeeV1InnerServiceSMO.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.chargeRuleFee.ChargeRuleFeeDto;
+import com.java110.po.chargeRuleFee.ChargeRuleFeePo;
+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-18 22:25:35 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("/chargeRuleFeeV1Api")
+public interface IChargeRuleFeeV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveChargeRuleFee", method = RequestMethod.POST)
+    public int saveChargeRuleFee(@RequestBody  ChargeRuleFeePo chargeRuleFeePo);
+
+    @RequestMapping(value = "/updateChargeRuleFee", method = RequestMethod.POST)
+    public int updateChargeRuleFee(@RequestBody  ChargeRuleFeePo chargeRuleFeePo);
+
+    @RequestMapping(value = "/deleteChargeRuleFee", method = RequestMethod.POST)
+    public int deleteChargeRuleFee(@RequestBody  ChargeRuleFeePo chargeRuleFeePo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param chargeRuleFeeDto 数据对象分享
+     * @return ChargeRuleFeeDto 对象数据
+     */
+    @RequestMapping(value = "/queryChargeRuleFees", method = RequestMethod.POST)
+    List<ChargeRuleFeeDto> queryChargeRuleFees(@RequestBody ChargeRuleFeeDto chargeRuleFeeDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param chargeRuleFeeDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryChargeRuleFeesCount", method = RequestMethod.POST)
+    int queryChargeRuleFeesCount(@RequestBody ChargeRuleFeeDto chargeRuleFeeDto);
+}

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/common/IChargeRuleV1InnerServiceSMO.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.chargeRule.ChargeRuleDto;
+import com.java110.po.chargeRule.ChargeRulePo;
+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-18 22:22:48 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("/chargeRuleV1Api")
+public interface IChargeRuleV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveChargeRule", method = RequestMethod.POST)
+    public int saveChargeRule(@RequestBody  ChargeRulePo chargeRulePo);
+
+    @RequestMapping(value = "/updateChargeRule", method = RequestMethod.POST)
+    public int updateChargeRule(@RequestBody  ChargeRulePo chargeRulePo);
+
+    @RequestMapping(value = "/deleteChargeRule", method = RequestMethod.POST)
+    public int deleteChargeRule(@RequestBody  ChargeRulePo chargeRulePo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param chargeRuleDto 数据对象分享
+     * @return ChargeRuleDto 对象数据
+     */
+    @RequestMapping(value = "/queryChargeRules", method = RequestMethod.POST)
+    List<ChargeRuleDto> queryChargeRules(@RequestBody ChargeRuleDto chargeRuleDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param chargeRuleDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryChargeRulesCount", method = RequestMethod.POST)
+    int queryChargeRulesCount(@RequestBody ChargeRuleDto chargeRuleDto);
+}

+ 72 - 0
service-common/src/main/java/com/java110/common/cmd/chargeRule/DeleteChargeRuleCmd.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.chargeRule;
+
+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.IChargeRuleV1InnerServiceSMO;
+import com.java110.po.chargeRule.ChargeRulePo;
+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;
+
+/**
+ * 类表述:删除
+ * 服务编码:chargeRule.deleteChargeRule
+ * 请求路劲:/app/chargeRule.DeleteChargeRule
+ * add by 吴学文 at 2023-03-18 22:22:48 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 = "chargeRule.deleteChargeRule")
+public class DeleteChargeRuleCmd extends Cmd {
+    private static Logger logger = LoggerFactory.getLogger(DeleteChargeRuleCmd.class);
+
+    @Autowired
+    private IChargeRuleV1InnerServiceSMO chargeRuleV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "ruleId", "ruleId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeRulePo chargeRulePo = BeanConvertUtil.covertBean(reqJson, ChargeRulePo.class);
+        int flag = chargeRuleV1InnerServiceSMOImpl.deleteChargeRule(chargeRulePo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 71 - 0
service-common/src/main/java/com/java110/common/cmd/chargeRule/DeleteChargeRuleFeeCmd.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.chargeRule;
+
+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.IChargeRuleFeeV1InnerServiceSMO;
+import com.java110.po.chargeRuleFee.ChargeRuleFeePo;
+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;
+
+/**
+ * 类表述:删除
+ * 服务编码:chargeRuleFee.deleteChargeRuleFee
+ * 请求路劲:/app/chargeRuleFee.DeleteChargeRuleFee
+ * add by 吴学文 at 2023-03-18 22:25:35 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 = "chargeRule.deleteChargeRuleFee")
+public class DeleteChargeRuleFeeCmd extends Cmd {
+    private static Logger logger = LoggerFactory.getLogger(DeleteChargeRuleFeeCmd.class);
+
+    @Autowired
+    private IChargeRuleFeeV1InnerServiceSMO chargeRuleFeeV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "crfId", "crfId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeRuleFeePo chargeRuleFeePo = BeanConvertUtil.covertBean(reqJson, ChargeRuleFeePo.class);
+        int flag = chargeRuleFeeV1InnerServiceSMOImpl.deleteChargeRuleFee(chargeRuleFeePo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 86 - 0
service-common/src/main/java/com/java110/common/cmd/chargeRule/ListChargeRuleCmd.java

@@ -0,0 +1,86 @@
+/*
+ * 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.chargeRule;
+
+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.IChargeRuleV1InnerServiceSMO;
+import com.java110.po.chargeRule.ChargeRulePo;
+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.chargeRule.ChargeRuleDto;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:chargeRule.listChargeRule
+ * 请求路劲:/app/chargeRule.ListChargeRule
+ * add by 吴学文 at 2023-03-18 22:22:48 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 = "chargeRule.listChargeRule")
+public class ListChargeRuleCmd extends Cmd {
+
+  private static Logger logger = LoggerFactory.getLogger(ListChargeRuleCmd.class);
+    @Autowired
+    private IChargeRuleV1InnerServiceSMO chargeRuleV1InnerServiceSMOImpl;
+
+    @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 {
+
+           ChargeRuleDto chargeRuleDto = BeanConvertUtil.covertBean(reqJson, ChargeRuleDto.class);
+
+           int count = chargeRuleV1InnerServiceSMOImpl.queryChargeRulesCount(chargeRuleDto);
+
+           List<ChargeRuleDto> chargeRuleDtos = null;
+
+           if (count > 0) {
+               chargeRuleDtos = chargeRuleV1InnerServiceSMOImpl.queryChargeRules(chargeRuleDto);
+           } else {
+               chargeRuleDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, chargeRuleDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 83 - 0
service-common/src/main/java/com/java110/common/cmd/chargeRule/ListChargeRuleFeeCmd.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.chargeRule;
+
+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.IChargeRuleFeeV1InnerServiceSMO;
+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.chargeRuleFee.ChargeRuleFeeDto;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:chargeRuleFee.listChargeRuleFee
+ * 请求路劲:/app/chargeRuleFee.ListChargeRuleFee
+ * add by 吴学文 at 2023-03-18 22:25:35 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 = "chargeRule.listChargeRuleFee")
+public class ListChargeRuleFeeCmd extends Cmd {
+
+  private static Logger logger = LoggerFactory.getLogger(ListChargeRuleFeeCmd.class);
+    @Autowired
+    private IChargeRuleFeeV1InnerServiceSMO chargeRuleFeeV1InnerServiceSMOImpl;
+
+    @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 {
+
+           ChargeRuleFeeDto chargeRuleFeeDto = BeanConvertUtil.covertBean(reqJson, ChargeRuleFeeDto.class);
+
+           int count = chargeRuleFeeV1InnerServiceSMOImpl.queryChargeRuleFeesCount(chargeRuleFeeDto);
+
+           List<ChargeRuleFeeDto> chargeRuleFeeDtos = null;
+
+           if (count > 0) {
+               chargeRuleFeeDtos = chargeRuleFeeV1InnerServiceSMOImpl.queryChargeRuleFees(chargeRuleFeeDto);
+           } else {
+               chargeRuleFeeDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, chargeRuleFeeDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 76 - 0
service-common/src/main/java/com/java110/common/cmd/chargeRule/SaveChargeRuleCmd.java

@@ -0,0 +1,76 @@
+/*
+ * 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.chargeRule;
+
+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.IChargeRuleV1InnerServiceSMO;
+import com.java110.po.chargeRule.ChargeRulePo;
+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;
+
+/**
+ * 类表述:保存
+ * 服务编码:chargeRule.saveChargeRule
+ * 请求路劲:/app/chargeRule.SaveChargeRule
+ * add by 吴学文 at 2023-03-18 22:22:48 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 = "chargeRule.saveChargeRule")
+public class SaveChargeRuleCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveChargeRuleCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IChargeRuleV1InnerServiceSMO chargeRuleV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "ruleName", "请求报文中未包含ruleName");
+Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       ChargeRulePo chargeRulePo = BeanConvertUtil.covertBean(reqJson, ChargeRulePo.class);
+        chargeRulePo.setRuleId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = chargeRuleV1InnerServiceSMOImpl.saveChargeRule(chargeRulePo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 79 - 0
service-common/src/main/java/com/java110/common/cmd/chargeRule/SaveChargeRuleFeeCmd.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.chargeRule;
+
+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.IChargeRuleFeeV1InnerServiceSMO;
+import com.java110.po.chargeRuleFee.ChargeRuleFeePo;
+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;
+
+/**
+ * 类表述:保存
+ * 服务编码:chargeRuleFee.saveChargeRuleFee
+ * 请求路劲:/app/chargeRuleFee.SaveChargeRuleFee
+ * add by 吴学文 at 2023-03-18 22:25:35 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 = "chargeRule.saveChargeRuleFee")
+public class SaveChargeRuleFeeCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveChargeRuleFeeCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IChargeRuleFeeV1InnerServiceSMO chargeRuleFeeV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "ruleId", "请求报文中未包含ruleId");
+        Assert.hasKeyAndValue(reqJson, "minEnergyPrice", "请求报文中未包含minEnergyPrice");
+        Assert.hasKeyAndValue(reqJson, "maxEnergyPrice", "请求报文中未包含maxEnergyPrice");
+        Assert.hasKeyAndValue(reqJson, "durationPrice", "请求报文中未包含durationPrice");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeRuleFeePo chargeRuleFeePo = BeanConvertUtil.covertBean(reqJson, ChargeRuleFeePo.class);
+        chargeRuleFeePo.setCrfId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = chargeRuleFeeV1InnerServiceSMOImpl.saveChargeRuleFee(chargeRuleFeePo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-common/src/main/java/com/java110/common/cmd/chargeRule/UpdateChargeRuleCmd.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.chargeRule;
+
+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.IChargeRuleV1InnerServiceSMO;
+import com.java110.po.chargeRule.ChargeRulePo;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:chargeRule.updateChargeRule
+ * 请求路劲:/app/chargeRule.UpdateChargeRule
+ * add by 吴学文 at 2023-03-18 22:22:48 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 = "chargeRule.updateChargeRule")
+public class UpdateChargeRuleCmd extends Cmd {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateChargeRuleCmd.class);
+
+
+    @Autowired
+    private IChargeRuleV1InnerServiceSMO chargeRuleV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "ruleId", "ruleId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       ChargeRulePo chargeRulePo = BeanConvertUtil.covertBean(reqJson, ChargeRulePo.class);
+        int flag = chargeRuleV1InnerServiceSMOImpl.updateChargeRule(chargeRulePo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 74 - 0
service-common/src/main/java/com/java110/common/cmd/chargeRule/UpdateChargeRuleFeeCmd.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.chargeRule;
+
+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.IChargeRuleFeeV1InnerServiceSMO;
+import com.java110.po.chargeRuleFee.ChargeRuleFeePo;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:chargeRuleFee.updateChargeRuleFee
+ * 请求路劲:/app/chargeRuleFee.UpdateChargeRuleFee
+ * add by 吴学文 at 2023-03-18 22:25:35 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 = "chargeRule.updateChargeRuleFee")
+public class UpdateChargeRuleFeeCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateChargeRuleFeeCmd.class);
+
+
+    @Autowired
+    private IChargeRuleFeeV1InnerServiceSMO chargeRuleFeeV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "crfId", "crfId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ChargeRuleFeePo chargeRuleFeePo = BeanConvertUtil.covertBean(reqJson, ChargeRuleFeePo.class);
+        int flag = chargeRuleFeeV1InnerServiceSMOImpl.updateChargeRuleFee(chargeRuleFeePo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-common/src/main/java/com/java110/common/dao/IChargeRuleFeeV1ServiceDao.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-18 22:25:35 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 IChargeRuleFeeV1ServiceDao {
+
+
+    /**
+     * 保存 充电价格信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveChargeRuleFeeInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询充电价格信息(instance过程)
+     * 根据bId 查询充电价格信息
+     * @param info bId 信息
+     * @return 充电价格信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getChargeRuleFeeInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改充电价格信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateChargeRuleFeeInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询充电价格总数
+     *
+     * @param info 充电价格信息
+     * @return 充电价格数量
+     */
+    int queryChargeRuleFeesCount(Map info);
+
+}

+ 77 - 0
service-common/src/main/java/com/java110/common/dao/IChargeRuleV1ServiceDao.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-18 22:22:48 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 IChargeRuleV1ServiceDao {
+
+
+    /**
+     * 保存 充电规则信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveChargeRuleInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询充电规则信息(instance过程)
+     * 根据bId 查询充电规则信息
+     * @param info bId 信息
+     * @return 充电规则信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getChargeRuleInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改充电规则信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateChargeRuleInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询充电规则总数
+     *
+     * @param info 充电规则信息
+     * @return 充电规则数量
+     */
+    int queryChargeRulesCount(Map info);
+
+}

+ 112 - 0
service-common/src/main/java/com/java110/common/dao/impl/ChargeRuleFeeV1ServiceDaoImpl.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.IChargeRuleFeeV1ServiceDao;
+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-18 22:25:35 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("chargeRuleFeeV1ServiceDaoImpl")
+public class ChargeRuleFeeV1ServiceDaoImpl extends BaseServiceDao implements IChargeRuleFeeV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ChargeRuleFeeV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存充电价格信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveChargeRuleFeeInfo(Map info) throws DAOException {
+        logger.debug("保存 saveChargeRuleFeeInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("chargeRuleFeeV1ServiceDaoImpl.saveChargeRuleFeeInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询充电价格信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getChargeRuleFeeInfo(Map info) throws DAOException {
+        logger.debug("查询 getChargeRuleFeeInfo 入参 info : {}",info);
+
+        List<Map> businessChargeRuleFeeInfos = sqlSessionTemplate.selectList("chargeRuleFeeV1ServiceDaoImpl.getChargeRuleFeeInfo",info);
+
+        return businessChargeRuleFeeInfos;
+    }
+
+
+    /**
+     * 修改充电价格信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateChargeRuleFeeInfo(Map info) throws DAOException {
+        logger.debug("修改 updateChargeRuleFeeInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("chargeRuleFeeV1ServiceDaoImpl.updateChargeRuleFeeInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询充电价格数量
+     * @param info 充电价格信息
+     * @return 充电价格数量
+     */
+    @Override
+    public int queryChargeRuleFeesCount(Map info) {
+        logger.debug("查询 queryChargeRuleFeesCount 入参 info : {}",info);
+
+        List<Map> businessChargeRuleFeeInfos = sqlSessionTemplate.selectList("chargeRuleFeeV1ServiceDaoImpl.queryChargeRuleFeesCount", info);
+        if (businessChargeRuleFeeInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessChargeRuleFeeInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 112 - 0
service-common/src/main/java/com/java110/common/dao/impl/ChargeRuleV1ServiceDaoImpl.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.IChargeRuleV1ServiceDao;
+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-18 22:22:48 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("chargeRuleV1ServiceDaoImpl")
+public class ChargeRuleV1ServiceDaoImpl extends BaseServiceDao implements IChargeRuleV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ChargeRuleV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存充电规则信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveChargeRuleInfo(Map info) throws DAOException {
+        logger.debug("保存 saveChargeRuleInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("chargeRuleV1ServiceDaoImpl.saveChargeRuleInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询充电规则信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getChargeRuleInfo(Map info) throws DAOException {
+        logger.debug("查询 getChargeRuleInfo 入参 info : {}",info);
+
+        List<Map> businessChargeRuleInfos = sqlSessionTemplate.selectList("chargeRuleV1ServiceDaoImpl.getChargeRuleInfo",info);
+
+        return businessChargeRuleInfos;
+    }
+
+
+    /**
+     * 修改充电规则信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateChargeRuleInfo(Map info) throws DAOException {
+        logger.debug("修改 updateChargeRuleInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("chargeRuleV1ServiceDaoImpl.updateChargeRuleInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询充电规则数量
+     * @param info 充电规则信息
+     * @return 充电规则数量
+     */
+    @Override
+    public int queryChargeRulesCount(Map info) {
+        logger.debug("查询 queryChargeRulesCount 入参 info : {}",info);
+
+        List<Map> businessChargeRuleInfos = sqlSessionTemplate.selectList("chargeRuleV1ServiceDaoImpl.queryChargeRulesCount", info);
+        if (businessChargeRuleInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessChargeRuleInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-common/src/main/java/com/java110/common/smo/impl/ChargeRuleFeeV1InnerServiceSMOImpl.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.IChargeRuleFeeV1ServiceDao;
+import com.java110.intf.common.IChargeRuleFeeV1InnerServiceSMO;
+import com.java110.dto.chargeRuleFee.ChargeRuleFeeDto;
+import com.java110.po.chargeRuleFee.ChargeRuleFeePo;
+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-18 22:25:35 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 ChargeRuleFeeV1InnerServiceSMOImpl extends BaseServiceSMO implements IChargeRuleFeeV1InnerServiceSMO {
+
+    @Autowired
+    private IChargeRuleFeeV1ServiceDao chargeRuleFeeV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveChargeRuleFee(@RequestBody  ChargeRuleFeePo chargeRuleFeePo) {
+        int saveFlag = chargeRuleFeeV1ServiceDaoImpl.saveChargeRuleFeeInfo(BeanConvertUtil.beanCovertMap(chargeRuleFeePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateChargeRuleFee(@RequestBody  ChargeRuleFeePo chargeRuleFeePo) {
+        int saveFlag = chargeRuleFeeV1ServiceDaoImpl.updateChargeRuleFeeInfo(BeanConvertUtil.beanCovertMap(chargeRuleFeePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteChargeRuleFee(@RequestBody  ChargeRuleFeePo chargeRuleFeePo) {
+       chargeRuleFeePo.setStatusCd("1");
+       int saveFlag = chargeRuleFeeV1ServiceDaoImpl.updateChargeRuleFeeInfo(BeanConvertUtil.beanCovertMap(chargeRuleFeePo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<ChargeRuleFeeDto> queryChargeRuleFees(@RequestBody  ChargeRuleFeeDto chargeRuleFeeDto) {
+
+        //校验是否传了 分页信息
+
+        int page = chargeRuleFeeDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            chargeRuleFeeDto.setPage((page - 1) * chargeRuleFeeDto.getRow());
+        }
+
+        List<ChargeRuleFeeDto> chargeRuleFees = BeanConvertUtil.covertBeanList(chargeRuleFeeV1ServiceDaoImpl.getChargeRuleFeeInfo(BeanConvertUtil.beanCovertMap(chargeRuleFeeDto)), ChargeRuleFeeDto.class);
+
+        return chargeRuleFees;
+    }
+
+
+    @Override
+    public int queryChargeRuleFeesCount(@RequestBody ChargeRuleFeeDto chargeRuleFeeDto) {
+        return chargeRuleFeeV1ServiceDaoImpl.queryChargeRuleFeesCount(BeanConvertUtil.beanCovertMap(chargeRuleFeeDto));    }
+
+}

+ 89 - 0
service-common/src/main/java/com/java110/common/smo/impl/ChargeRuleV1InnerServiceSMOImpl.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.IChargeRuleV1ServiceDao;
+import com.java110.intf.common.IChargeRuleV1InnerServiceSMO;
+import com.java110.dto.chargeRule.ChargeRuleDto;
+import com.java110.po.chargeRule.ChargeRulePo;
+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-18 22:22:48 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 ChargeRuleV1InnerServiceSMOImpl extends BaseServiceSMO implements IChargeRuleV1InnerServiceSMO {
+
+    @Autowired
+    private IChargeRuleV1ServiceDao chargeRuleV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveChargeRule(@RequestBody  ChargeRulePo chargeRulePo) {
+        int saveFlag = chargeRuleV1ServiceDaoImpl.saveChargeRuleInfo(BeanConvertUtil.beanCovertMap(chargeRulePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateChargeRule(@RequestBody  ChargeRulePo chargeRulePo) {
+        int saveFlag = chargeRuleV1ServiceDaoImpl.updateChargeRuleInfo(BeanConvertUtil.beanCovertMap(chargeRulePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteChargeRule(@RequestBody  ChargeRulePo chargeRulePo) {
+       chargeRulePo.setStatusCd("1");
+       int saveFlag = chargeRuleV1ServiceDaoImpl.updateChargeRuleInfo(BeanConvertUtil.beanCovertMap(chargeRulePo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<ChargeRuleDto> queryChargeRules(@RequestBody  ChargeRuleDto chargeRuleDto) {
+
+        //校验是否传了 分页信息
+
+        int page = chargeRuleDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            chargeRuleDto.setPage((page - 1) * chargeRuleDto.getRow());
+        }
+
+        List<ChargeRuleDto> chargeRules = BeanConvertUtil.covertBeanList(chargeRuleV1ServiceDaoImpl.getChargeRuleInfo(BeanConvertUtil.beanCovertMap(chargeRuleDto)), ChargeRuleDto.class);
+
+        return chargeRules;
+    }
+
+
+    @Override
+    public int queryChargeRulesCount(@RequestBody ChargeRuleDto chargeRuleDto) {
+        return chargeRuleV1ServiceDaoImpl.queryChargeRulesCount(BeanConvertUtil.beanCovertMap(chargeRuleDto));    }
+
+}