Преглед изворни кода

物联网同步 功能修改为cmd 模式

java110 пре 3 година
родитељ
комит
325584d2d8
17 измењених фајлова са 1032 додато и 168 уклоњено
  1. 9 0
      java110-bean/src/main/java/com/java110/po/machine/MachineTranslatePo.java
  2. 9 0
      java110-bean/src/main/java/com/java110/po/message/MsgReadPo.java
  3. 168 0
      java110-db/src/main/resources/mapper/common/MachineTranslateV1ServiceDaoImplMapper.xml
  4. 97 0
      java110-db/src/main/resources/mapper/common/MsgReadV1ServiceDaoImplMapper.xml
  5. 1 0
      java110-db/src/main/resources/mapper/common/MsgServiceDaoImplMapper.xml
  6. 68 0
      java110-interface/src/main/java/com/java110/intf/common/IMachineTranslateV1InnerServiceSMO.java
  7. 68 0
      java110-interface/src/main/java/com/java110/intf/common/IMsgReadV1InnerServiceSMO.java
  8. 0 67
      service-api/src/main/java/com/java110/api/listener/junkRequirement/UpdateJunkRequirementListener.java
  9. 0 60
      service-api/src/main/java/com/java110/api/listener/msg/ReadMsgListener.java
  10. 12 41
      service-api/src/main/java/com/java110/api/listener/msg/ListMsgListener.java
  11. 44 0
      service-common/src/main/java/com/java110/common/cmd/msg/ReadMsgCmd.java
  12. 77 0
      service-common/src/main/java/com/java110/common/dao/IMachineTranslateV1ServiceDao.java
  13. 77 0
      service-common/src/main/java/com/java110/common/dao/IMsgReadV1ServiceDao.java
  14. 112 0
      service-common/src/main/java/com/java110/common/dao/impl/MachineTranslateV1ServiceDaoImpl.java
  15. 112 0
      service-common/src/main/java/com/java110/common/dao/impl/MsgReadV1ServiceDaoImpl.java
  16. 89 0
      service-common/src/main/java/com/java110/common/smo/impl/MachineTranslateV1InnerServiceSMOImpl.java
  17. 89 0
      service-common/src/main/java/com/java110/common/smo/impl/MsgReadV1InnerServiceSMOImpl.java

+ 9 - 0
java110-bean/src/main/java/com/java110/po/machine/MachineTranslatePo.java

@@ -21,6 +21,7 @@ public class MachineTranslatePo implements Serializable {
     private String state;
     private String updateTime;
     private String remark;
+    private String statusCd = "0";
 
 
     public String getMachineTranslateId() {
@@ -102,4 +103,12 @@ public class MachineTranslatePo implements Serializable {
     public void setRemark(String remark) {
         this.remark = remark;
     }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
 }

+ 9 - 0
java110-bean/src/main/java/com/java110/po/message/MsgReadPo.java

@@ -16,6 +16,7 @@ public class MsgReadPo implements Serializable {
     private String msgId;
     private String userId;
     private String userName;
+    private String statusCd="0";
 
     public String getMsgReadId() {
         return msgReadId;
@@ -48,4 +49,12 @@ public class MsgReadPo implements Serializable {
     public void setUserName(String userName) {
         this.userName = userName;
     }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
 }

+ 168 - 0
java110-db/src/main/resources/mapper/common/MachineTranslateV1ServiceDaoImplMapper.xml

@@ -0,0 +1,168 @@
+<?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="machineTranslateV1ServiceDaoImpl">
+
+
+    <!-- 保存物联网同步信息 add by wuxw 2018-07-03 -->
+    <insert id="saveMachineTranslateInfo" parameterType="Map">
+        insert into machine_translate(
+        machine_code,obj_b_id,update_time,machine_cmd,remark,obj_name,machine_id,type_cd,machine_translate_id,obj_id,state,community_id
+        ) values (
+        #{machineCode},#{objBId},#{updateTime},#{machineCmd},#{remark},#{objName},#{machineId},#{typeCd},#{machineTranslateId},#{objId},#{state},#{communityId}
+        )
+    </insert>
+
+
+    <!-- 查询物联网同步信息 add by wuxw 2018-07-03 -->
+    <select id="getMachineTranslateInfo" parameterType="Map" resultType="Map">
+        select t.machine_code,t.machine_code machineCode,t.obj_b_id,t.obj_b_id objBId,t.status_cd,t.status_cd
+        statusCd,t.update_time,t.update_time updateTime,t.machine_cmd,t.machine_cmd
+        machineCmd,t.remark,t.obj_name,t.obj_name objName,t.machine_id,t.machine_id machineId,t.type_cd,t.type_cd
+        typeCd,t.machine_translate_id,t.machine_translate_id machineTranslateId,t.obj_id,t.obj_id
+        objId,t.state,t.community_id,t.community_id communityId
+        from machine_translate t
+        where 1 =1
+        <if test="machineCode !=null and machineCode != ''">
+            and t.machine_code= #{machineCode}
+        </if>
+        <if test="objBId !=null and objBId != ''">
+            and t.obj_b_id= #{objBId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="updateTime !=null and updateTime != ''">
+            and t.update_time= #{updateTime}
+        </if>
+        <if test="machineCmd !=null and machineCmd != ''">
+            and t.machine_cmd= #{machineCmd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="objName !=null and objName != ''">
+            and t.obj_name= #{objName}
+        </if>
+        <if test="machineId !=null and machineId != ''">
+            and t.machine_id= #{machineId}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="machineTranslateId !=null and machineTranslateId != ''">
+            and t.machine_translate_id= #{machineTranslateId}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </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="updateMachineTranslateInfo" parameterType="Map">
+        update machine_translate t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="machineCode !=null and machineCode != ''">
+            , t.machine_code= #{machineCode}
+        </if>
+        <if test="objBId !=null and objBId != ''">
+            , t.obj_b_id= #{objBId}
+        </if>
+        <if test="updateTime !=null and updateTime != ''">
+            , t.update_time= #{updateTime}
+        </if>
+        <if test="machineCmd !=null and machineCmd != ''">
+            , t.machine_cmd= #{machineCmd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="objName !=null and objName != ''">
+            , t.obj_name= #{objName}
+        </if>
+        <if test="machineId !=null and machineId != ''">
+            , t.machine_id= #{machineId}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            , t.type_cd= #{typeCd}
+        </if>
+        <if test="objId !=null and objId != ''">
+            , t.obj_id= #{objId}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        where 1=1
+        <if test="machineTranslateId !=null and machineTranslateId != ''">
+            and t.machine_translate_id= #{machineTranslateId}
+        </if>
+
+    </update>
+
+    <!-- 查询物联网同步数量 add by wuxw 2018-07-03 -->
+    <select id="queryMachineTranslatesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from machine_translate t
+        where 1 =1
+        <if test="machineCode !=null and machineCode != ''">
+            and t.machine_code= #{machineCode}
+        </if>
+        <if test="objBId !=null and objBId != ''">
+            and t.obj_b_id= #{objBId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="updateTime !=null and updateTime != ''">
+            and t.update_time= #{updateTime}
+        </if>
+        <if test="machineCmd !=null and machineCmd != ''">
+            and t.machine_cmd= #{machineCmd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="objName !=null and objName != ''">
+            and t.obj_name= #{objName}
+        </if>
+        <if test="machineId !=null and machineId != ''">
+            and t.machine_id= #{machineId}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="machineTranslateId !=null and machineTranslateId != ''">
+            and t.machine_translate_id= #{machineTranslateId}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 97 - 0
java110-db/src/main/resources/mapper/common/MsgReadV1ServiceDaoImplMapper.xml

@@ -0,0 +1,97 @@
+<?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="msgReadV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存已读消息信息 add by wuxw 2018-07-03 -->
+    <insert id="saveMsgReadInfo" parameterType="Map">
+        insert into msg_read(
+msg_read_id,msg_id,user_name,user_id
+) values (
+#{msgReadId},#{msgId},#{userName},#{userId}
+)
+    </insert>
+
+
+
+    <!-- 查询已读消息信息 add by wuxw 2018-07-03 -->
+    <select id="getMsgReadInfo" parameterType="Map" resultType="Map">
+        select  t.msg_read_id,t.msg_read_id msgReadId,t.msg_id,t.msg_id msgId,t.status_cd,t.status_cd statusCd,t.user_name,t.user_name userName,t.user_id,t.user_id userId 
+from msg_read t 
+where 1 =1 
+<if test="msgReadId !=null and msgReadId != ''">
+   and t.msg_read_id= #{msgReadId}
+</if> 
+<if test="msgId !=null and msgId != ''">
+   and t.msg_id= #{msgId}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="userName !=null and userName != ''">
+   and t.user_name= #{userName}
+</if> 
+<if test="userId !=null and userId != ''">
+   and t.user_id= #{userId}
+</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="updateMsgReadInfo" parameterType="Map">
+        update  msg_read t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="msgId !=null and msgId != ''">
+, t.msg_id= #{msgId}
+</if> 
+<if test="userName !=null and userName != ''">
+, t.user_name= #{userName}
+</if> 
+<if test="userId !=null and userId != ''">
+, t.user_id= #{userId}
+</if> 
+ where 1=1 <if test="msgReadId !=null and msgReadId != ''">
+and t.msg_read_id= #{msgReadId}
+</if> 
+
+    </update>
+
+    <!-- 查询已读消息数量 add by wuxw 2018-07-03 -->
+     <select id="queryMsgReadsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from msg_read t 
+where 1 =1 
+<if test="msgReadId !=null and msgReadId != ''">
+   and t.msg_read_id= #{msgReadId}
+</if> 
+<if test="msgId !=null and msgId != ''">
+   and t.msg_id= #{msgId}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="userName !=null and userName != ''">
+   and t.user_name= #{userName}
+</if> 
+<if test="userId !=null and userId != ''">
+   and t.user_id= #{userId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 1 - 0
java110-db/src/main/resources/mapper/common/MsgServiceDaoImplMapper.xml

@@ -84,6 +84,7 @@ msg_type,operate,msg_id,view_obj_id,title,view_type_cd,b_id,url
         select t.msg_type,t.msg_type msgType,t.msg_id,t.msg_id msgId,t.view_obj_id,t.view_obj_id
         viewObjId,t.status_cd,t.status_cd statusCd,t.title,t.view_type_cd,t.view_type_cd viewTypeCd,t.b_id,t.b_id
         bId,t.url
+        from msg t
         <if test="userId != null and userId != ''">
             LEFT JOIN msg_read mr ON t.`msg_id` = mr.`msg_id`
         </if>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/common/IMachineTranslateV1InnerServiceSMO.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.machine.MachineTranslateDto;
+import com.java110.po.machine.MachineTranslatePo;
+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 2022-08-08 09:30:58 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("/machineTranslateV1Api")
+public interface IMachineTranslateV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveMachineTranslate", method = RequestMethod.POST)
+    public int saveMachineTranslate(@RequestBody MachineTranslatePo machineTranslatePo);
+
+    @RequestMapping(value = "/updateMachineTranslate", method = RequestMethod.POST)
+    public int updateMachineTranslate(@RequestBody  MachineTranslatePo machineTranslatePo);
+
+    @RequestMapping(value = "/deleteMachineTranslate", method = RequestMethod.POST)
+    public int deleteMachineTranslate(@RequestBody  MachineTranslatePo machineTranslatePo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param machineTranslateDto 数据对象分享
+     * @return MachineTranslateDto 对象数据
+     */
+    @RequestMapping(value = "/queryMachineTranslates", method = RequestMethod.POST)
+    List<MachineTranslateDto> queryMachineTranslates(@RequestBody MachineTranslateDto machineTranslateDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param machineTranslateDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryMachineTranslatesCount", method = RequestMethod.POST)
+    int queryMachineTranslatesCount(@RequestBody MachineTranslateDto machineTranslateDto);
+}

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/common/IMsgReadV1InnerServiceSMO.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.msg.MsgReadDto;
+import com.java110.po.message.MsgReadPo;
+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 2022-08-08 09:22:37 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("/msgReadV1Api")
+public interface IMsgReadV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveMsgRead", method = RequestMethod.POST)
+    public int saveMsgRead(@RequestBody MsgReadPo msgReadPo);
+
+    @RequestMapping(value = "/updateMsgRead", method = RequestMethod.POST)
+    public int updateMsgRead(@RequestBody  MsgReadPo msgReadPo);
+
+    @RequestMapping(value = "/deleteMsgRead", method = RequestMethod.POST)
+    public int deleteMsgRead(@RequestBody  MsgReadPo msgReadPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param msgReadDto 数据对象分享
+     * @return MsgReadDto 对象数据
+     */
+    @RequestMapping(value = "/queryMsgReads", method = RequestMethod.POST)
+    List<MsgReadDto> queryMsgReads(@RequestBody MsgReadDto msgReadDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param msgReadDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryMsgReadsCount", method = RequestMethod.POST)
+    int queryMsgReadsCount(@RequestBody MsgReadDto msgReadDto);
+}

+ 0 - 67
service-api/src/main/java/com/java110/api/listener/junkRequirement/UpdateJunkRequirementListener.java

@@ -1,67 +0,0 @@
-package com.java110.api.listener.junkRequirement;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.junkRequirement.IJunkRequirementBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeJunkRequirementConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-
-/**
- * 保存旧货市场侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("updateJunkRequirementListener")
-public class UpdateJunkRequirementListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private IJunkRequirementBMO junkRequirementBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-
-        Assert.hasKeyAndValue(reqJson, "junkRequirementId", "junkRequirementId不能为空");
-//        Assert.hasKeyAndValue(reqJson, "typeCd", "请求报文中未包含typeCd");
-//        Assert.hasKeyAndValue(reqJson, "classification", "请求报文中未包含classification");
-//        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
-//        Assert.hasKeyAndValue(reqJson, "context", "请求报文中未包含context");
-//        Assert.hasKeyAndValue(reqJson, "referencePrice", "请求报文中未包含referencePrice");
-//        Assert.hasKeyAndValue(reqJson, "publishUserId", "请求报文中未包含publishUserId");
-//        Assert.hasKeyAndValue(reqJson, "publishUserName", "请求报文中未包含publishUserName");
-//        Assert.hasKeyAndValue(reqJson, "publishUserLink", "请求报文中未包含publishUserLink");
-        Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-
-        JSONObject paramObj = new JSONObject();
-        paramObj.put("junkRequirementId",reqJson.getString("junkRequirementId"));
-//        paramObj.put("communityId",reqJson.getString("communityId"));
-        paramObj.put("state",reqJson.getString("state"));
-
-        junkRequirementBMOImpl.updateJunkRequirement(paramObj, context);
-
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeJunkRequirementConstant.UPDATE_JUNKREQUIREMENT;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-    @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-}

+ 0 - 60
service-api/src/main/java/com/java110/api/listener/msg/ReadMsgListener.java

@@ -1,60 +0,0 @@
-package com.java110.api.listener.msg;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.msg.IMsgBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-
-/**
- * 查询小区侦听类
- */
-@Java110Listener("readMsgListener")
-public class ReadMsgListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private IMsgBMO msgBMOImpl;
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeConstant.SERVICE_CODE_READ_MSGS;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-
-    @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-
-        //super.validatePageInfo(reqJson);
-
-        Assert.hasKeyAndValue(reqJson, "userName", "必填,请填写员工名称");
-        Assert.hasKeyAndValue(reqJson, "userId", "必填,请填写员工ID");
-        Assert.hasKeyAndValue(reqJson, "msgId", "必填,请填写消息ID");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-
-        msgBMOImpl.addReadMsg(reqJson, context);
-
-
-    }
-}

+ 12 - 41
service-api/src/main/java/com/java110/api/listener/msg/ListMsgListener.java

@@ -1,66 +1,38 @@
-package com.java110.api.listener.msg;
+package com.java110.common.cmd.msg;
 
 import com.alibaba.fastjson.JSONObject;
-import com.java110.api.listener.AbstractServiceApiListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.intf.common.IMsgInnerServiceSMO;
+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.dto.msg.MsgDto;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeConstant;
+import com.java110.intf.common.IMsgInnerServiceSMO;
+import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.vo.api.msg.ApiMsgDataVo;
 import com.java110.vo.api.msg.ApiMsgVo;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.List;
 
-
-/**
- * 查询小区侦听类
- */
-@Java110Listener("listMsgListener")
-public class ListMsgListener extends AbstractServiceApiListener {
+@Java110Cmd(serviceCode = "msg.listMsg")
+public class ListMsgCmd extends Cmd {
 
     @Autowired
     private IMsgInnerServiceSMO msgInnerServiceSMOImpl;
 
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeConstant.SERVICE_CODE_LIST_MSGS;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.GET;
-    }
-
 
     @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-
-    public IMsgInnerServiceSMO getMsgInnerServiceSMOImpl() {
-        return msgInnerServiceSMOImpl;
-    }
-
-    public void setMsgInnerServiceSMOImpl(IMsgInnerServiceSMO msgInnerServiceSMOImpl) {
-        this.msgInnerServiceSMOImpl = msgInnerServiceSMOImpl;
-    }
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
         super.validatePageInfo(reqJson);
     }
 
     @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
         MsgDto msgDto = BeanConvertUtil.covertBean(reqJson, MsgDto.class);
         String[] viewObjIds = new String[]{"9999", reqJson.getString("communityId"), reqJson.getString("storeId"), reqJson.getString("userId")};
         msgDto.setViewObjIds(viewObjIds);
@@ -83,6 +55,5 @@ public class ListMsgListener extends AbstractServiceApiListener {
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiMsgVo), HttpStatus.OK);
 
         context.setResponseEntity(responseEntity);
-
     }
 }

+ 44 - 0
service-common/src/main/java/com/java110/common/cmd/msg/ReadMsgCmd.java

@@ -0,0 +1,44 @@
+package com.java110.common.cmd.msg;
+
+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.core.factory.GenerateCodeFactory;
+import com.java110.intf.common.IMsgReadV1InnerServiceSMO;
+import com.java110.po.message.MsgReadPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.text.ParseException;
+
+@Java110Cmd(serviceCode = "msg.readMsg")
+public class ReadMsgCmd extends Cmd {
+
+    @Autowired
+    private IMsgReadV1InnerServiceSMO msgReadV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
+        Assert.hasKeyAndValue(reqJson, "userName", "必填,请填写员工名称");
+        Assert.hasKeyAndValue(reqJson, "userId", "必填,请填写员工ID");
+        Assert.hasKeyAndValue(reqJson, "msgId", "必填,请填写消息ID");
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        JSONObject businessMsgRead = new JSONObject();
+        businessMsgRead.put("msgReadId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_msgReadId));
+        businessMsgRead.putAll(reqJson);
+        MsgReadPo msgReadPo = BeanConvertUtil.covertBean(businessMsgRead, MsgReadPo.class);
+
+        int flag = msgReadV1InnerServiceSMOImpl.saveMsgRead(msgReadPo);
+
+        if (flag < 1) {
+            throw new CmdException("已读消息失败");
+        }
+    }
+}

+ 77 - 0
service-common/src/main/java/com/java110/common/dao/IMachineTranslateV1ServiceDao.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 2022-08-08 09:30:58 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 IMachineTranslateV1ServiceDao {
+
+
+    /**
+     * 保存 物联网同步信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveMachineTranslateInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询物联网同步信息(instance过程)
+     * 根据bId 查询物联网同步信息
+     * @param info bId 信息
+     * @return 物联网同步信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getMachineTranslateInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改物联网同步信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateMachineTranslateInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询物联网同步总数
+     *
+     * @param info 物联网同步信息
+     * @return 物联网同步数量
+     */
+    int queryMachineTranslatesCount(Map info);
+
+}

+ 77 - 0
service-common/src/main/java/com/java110/common/dao/IMsgReadV1ServiceDao.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 2022-08-08 09:22:37 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 IMsgReadV1ServiceDao {
+
+
+    /**
+     * 保存 已读消息信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveMsgReadInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询已读消息信息(instance过程)
+     * 根据bId 查询已读消息信息
+     * @param info bId 信息
+     * @return 已读消息信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getMsgReadInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改已读消息信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateMsgReadInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询已读消息总数
+     *
+     * @param info 已读消息信息
+     * @return 已读消息数量
+     */
+    int queryMsgReadsCount(Map info);
+
+}

+ 112 - 0
service-common/src/main/java/com/java110/common/dao/impl/MachineTranslateV1ServiceDaoImpl.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.IMachineTranslateV1ServiceDao;
+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 2022-08-08 09:30:58 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("machineTranslateV1ServiceDaoImpl")
+public class MachineTranslateV1ServiceDaoImpl extends BaseServiceDao implements IMachineTranslateV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(MachineTranslateV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存物联网同步信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveMachineTranslateInfo(Map info) throws DAOException {
+        logger.debug("保存 saveMachineTranslateInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("machineTranslateV1ServiceDaoImpl.saveMachineTranslateInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询物联网同步信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getMachineTranslateInfo(Map info) throws DAOException {
+        logger.debug("查询 getMachineTranslateInfo 入参 info : {}",info);
+
+        List<Map> businessMachineTranslateInfos = sqlSessionTemplate.selectList("machineTranslateV1ServiceDaoImpl.getMachineTranslateInfo",info);
+
+        return businessMachineTranslateInfos;
+    }
+
+
+    /**
+     * 修改物联网同步信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateMachineTranslateInfo(Map info) throws DAOException {
+        logger.debug("修改 updateMachineTranslateInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("machineTranslateV1ServiceDaoImpl.updateMachineTranslateInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询物联网同步数量
+     * @param info 物联网同步信息
+     * @return 物联网同步数量
+     */
+    @Override
+    public int queryMachineTranslatesCount(Map info) {
+        logger.debug("查询 queryMachineTranslatesCount 入参 info : {}",info);
+
+        List<Map> businessMachineTranslateInfos = sqlSessionTemplate.selectList("machineTranslateV1ServiceDaoImpl.queryMachineTranslatesCount", info);
+        if (businessMachineTranslateInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessMachineTranslateInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 112 - 0
service-common/src/main/java/com/java110/common/dao/impl/MsgReadV1ServiceDaoImpl.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.IMsgReadV1ServiceDao;
+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 2022-08-08 09:22:37 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("msgReadV1ServiceDaoImpl")
+public class MsgReadV1ServiceDaoImpl extends BaseServiceDao implements IMsgReadV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(MsgReadV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存已读消息信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveMsgReadInfo(Map info) throws DAOException {
+        logger.debug("保存 saveMsgReadInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("msgReadV1ServiceDaoImpl.saveMsgReadInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询已读消息信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getMsgReadInfo(Map info) throws DAOException {
+        logger.debug("查询 getMsgReadInfo 入参 info : {}",info);
+
+        List<Map> businessMsgReadInfos = sqlSessionTemplate.selectList("msgReadV1ServiceDaoImpl.getMsgReadInfo",info);
+
+        return businessMsgReadInfos;
+    }
+
+
+    /**
+     * 修改已读消息信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateMsgReadInfo(Map info) throws DAOException {
+        logger.debug("修改 updateMsgReadInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("msgReadV1ServiceDaoImpl.updateMsgReadInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询已读消息数量
+     * @param info 已读消息信息
+     * @return 已读消息数量
+     */
+    @Override
+    public int queryMsgReadsCount(Map info) {
+        logger.debug("查询 queryMsgReadsCount 入参 info : {}",info);
+
+        List<Map> businessMsgReadInfos = sqlSessionTemplate.selectList("msgReadV1ServiceDaoImpl.queryMsgReadsCount", info);
+        if (businessMsgReadInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessMsgReadInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-common/src/main/java/com/java110/common/smo/impl/MachineTranslateV1InnerServiceSMOImpl.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.IMachineTranslateV1ServiceDao;
+import com.java110.dto.machine.MachineTranslateDto;
+import com.java110.intf.common.IMachineTranslateV1InnerServiceSMO;
+import com.java110.po.machine.MachineTranslatePo;
+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 2022-08-08 09:30:58 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 MachineTranslateV1InnerServiceSMOImpl extends BaseServiceSMO implements IMachineTranslateV1InnerServiceSMO {
+
+    @Autowired
+    private IMachineTranslateV1ServiceDao machineTranslateV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveMachineTranslate(@RequestBody MachineTranslatePo machineTranslatePo) {
+        int saveFlag = machineTranslateV1ServiceDaoImpl.saveMachineTranslateInfo(BeanConvertUtil.beanCovertMap(machineTranslatePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateMachineTranslate(@RequestBody  MachineTranslatePo machineTranslatePo) {
+        int saveFlag = machineTranslateV1ServiceDaoImpl.updateMachineTranslateInfo(BeanConvertUtil.beanCovertMap(machineTranslatePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteMachineTranslate(@RequestBody  MachineTranslatePo machineTranslatePo) {
+       machineTranslatePo.setStatusCd("1");
+       int saveFlag = machineTranslateV1ServiceDaoImpl.updateMachineTranslateInfo(BeanConvertUtil.beanCovertMap(machineTranslatePo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<MachineTranslateDto> queryMachineTranslates(@RequestBody  MachineTranslateDto machineTranslateDto) {
+
+        //校验是否传了 分页信息
+
+        int page = machineTranslateDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            machineTranslateDto.setPage((page - 1) * machineTranslateDto.getRow());
+        }
+
+        List<MachineTranslateDto> machineTranslates = BeanConvertUtil.covertBeanList(machineTranslateV1ServiceDaoImpl.getMachineTranslateInfo(BeanConvertUtil.beanCovertMap(machineTranslateDto)), MachineTranslateDto.class);
+
+        return machineTranslates;
+    }
+
+
+    @Override
+    public int queryMachineTranslatesCount(@RequestBody MachineTranslateDto machineTranslateDto) {
+        return machineTranslateV1ServiceDaoImpl.queryMachineTranslatesCount(BeanConvertUtil.beanCovertMap(machineTranslateDto));    }
+
+}

+ 89 - 0
service-common/src/main/java/com/java110/common/smo/impl/MsgReadV1InnerServiceSMOImpl.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.IMsgReadV1ServiceDao;
+import com.java110.dto.msg.MsgReadDto;
+import com.java110.intf.common.IMsgReadV1InnerServiceSMO;
+import com.java110.po.message.MsgReadPo;
+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 2022-08-08 09:22:37 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 MsgReadV1InnerServiceSMOImpl extends BaseServiceSMO implements IMsgReadV1InnerServiceSMO {
+
+    @Autowired
+    private IMsgReadV1ServiceDao msgReadV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveMsgRead(@RequestBody MsgReadPo msgReadPo) {
+        int saveFlag = msgReadV1ServiceDaoImpl.saveMsgReadInfo(BeanConvertUtil.beanCovertMap(msgReadPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateMsgRead(@RequestBody  MsgReadPo msgReadPo) {
+        int saveFlag = msgReadV1ServiceDaoImpl.updateMsgReadInfo(BeanConvertUtil.beanCovertMap(msgReadPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteMsgRead(@RequestBody  MsgReadPo msgReadPo) {
+       msgReadPo.setStatusCd("1");
+       int saveFlag = msgReadV1ServiceDaoImpl.updateMsgReadInfo(BeanConvertUtil.beanCovertMap(msgReadPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<MsgReadDto> queryMsgReads(@RequestBody  MsgReadDto msgReadDto) {
+
+        //校验是否传了 分页信息
+
+        int page = msgReadDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            msgReadDto.setPage((page - 1) * msgReadDto.getRow());
+        }
+
+        List<MsgReadDto> msgReads = BeanConvertUtil.covertBeanList(msgReadV1ServiceDaoImpl.getMsgReadInfo(BeanConvertUtil.beanCovertMap(msgReadDto)), MsgReadDto.class);
+
+        return msgReads;
+    }
+
+
+    @Override
+    public int queryMsgReadsCount(@RequestBody MsgReadDto msgReadDto) {
+        return msgReadV1ServiceDaoImpl.queryMsgReadsCount(BeanConvertUtil.beanCovertMap(msgReadDto));    }
+
+}