Sfoglia il codice sorgente

优化 公众号 表结构

java110 4 anni fa
parent
commit
a6d6704c58
23 ha cambiato i file con 1939 aggiunte e 144 eliminazioni
  1. 100 61
      java110-bean/src/main/java/com/java110/dto/smallWeChat/SmallWeChatDto.java
  2. 124 0
      java110-bean/src/main/java/com/java110/po/smallWechat/SmallWechatPo.java
  3. 31 16
      java110-bean/src/main/java/com/java110/po/smallWechatAttr/SmallWechatAttrPo.java
  4. 106 0
      java110-db/src/main/resources/mapper/store/SmallWechatAttrV1ServiceDaoImplMapper.xml
  5. 168 0
      java110-db/src/main/resources/mapper/store/SmallWechatV1ServiceDaoImplMapper.xml
  6. 68 0
      java110-interface/src/main/java/com/java110/intf/store/ISmallWechatAttrV1InnerServiceSMO.java
  7. 68 0
      java110-interface/src/main/java/com/java110/intf/store/ISmallWechatV1InnerServiceSMO.java
  8. 71 0
      service-store/src/main/java/com/java110/store/cmd/smallWechat/DeleteSmallWechatCmd.java
  9. 84 0
      service-store/src/main/java/com/java110/store/cmd/smallWechat/ListSmallWechatCmd.java
  10. 153 65
      service-api/src/main/java/com/java110/api/listener/smallWeChat/SaveSmallWeChatListener.java
  11. 75 0
      service-store/src/main/java/com/java110/store/cmd/smallWechat/UpdateSmallWechatCmd.java
  12. 71 0
      service-store/src/main/java/com/java110/store/cmd/smallWechatAttr/DeleteSmallWechatAttrCmd.java
  13. 84 0
      service-store/src/main/java/com/java110/store/cmd/smallWechatAttr/ListSmallWechatAttrCmd.java
  14. 80 0
      service-store/src/main/java/com/java110/store/cmd/smallWechatAttr/SaveSmallWechatAttrCmd.java
  15. 75 0
      service-store/src/main/java/com/java110/store/cmd/smallWechatAttr/UpdateSmallWechatAttrCmd.java
  16. 77 0
      service-store/src/main/java/com/java110/store/dao/ISmallWechatAttrV1ServiceDao.java
  17. 77 0
      service-store/src/main/java/com/java110/store/dao/ISmallWechatV1ServiceDao.java
  18. 112 0
      service-store/src/main/java/com/java110/store/dao/impl/SmallWechatAttrV1ServiceDaoImpl.java
  19. 112 0
      service-store/src/main/java/com/java110/store/dao/impl/SmallWechatV1ServiceDaoImpl.java
  20. 89 0
      service-store/src/main/java/com/java110/store/smo/impl/SmallWechatAttrV1InnerServiceSMOImpl.java
  21. 90 0
      service-store/src/main/java/com/java110/store/smo/impl/SmallWechatV1InnerServiceSMOImpl.java
  22. 22 1
      service-user/src/main/java/com/java110/user/api/StaffApi.java
  23. 2 1
      service-user/src/main/java/com/java110/user/dao/impl/MenuCatalogV1ServiceDaoImpl.java

+ 100 - 61
java110-bean/src/main/java/com/java110/dto/smallWeChat/SmallWeChatDto.java

@@ -9,7 +9,7 @@ import java.util.List;
 
 /**
  * @ClassName FloorDto
- * @Description 小程序管理数据层封装
+ * @Description 微信配置表数据层封装
  * @Author wuxw
  * @Date 2019/4/24 8:52
  * @Version 1.0
@@ -17,74 +17,104 @@ import java.util.List;
  **/
 public class SmallWeChatDto extends PageDto implements Serializable {
 
-    public static final String WECHAT_TYPE_PUBLIC = "1100"; // 公众号
+    public static final String OBJ_TYPE_COMMUNITY ="1000";
+    public static final String WECHAT_TYPE_PUBLIC ="1100";
 
-    public static final String OBJ_TYPE_COMMUNITY = "1000";// 当前小区
-
-    private Date createTime;
+    private String mchId;
+    private String storeId;
+    private String wechatType;
+    private String weChatType;
+    private String certPath;
+    private String appid;
+    private String appsecret;
     private String appId;
-    private String name;
     private String appSecret;
+    private String name;
+    private String objId;
+    private String wechatId;
     private String weChatId;
-    private String storeId;
     private String payPassword;
-    private String remarks;
-    private String statusCd = "0";
-    private String objId;
     private String objType;
-    private String mchId;
-    private String objTypeName;
-    private String weChatType;
+    private String remarks;
 
     private List<SmallWechatAttrDto> smallWechatAttrs;
 
 
-    public Date getCreateTime() {
-        return createTime;
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getMchId() {
+        return mchId;
     }
 
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
+    public void setMchId(String mchId) {
+        this.mchId = mchId;
     }
 
-    public String getAppId() {
-        return appId;
+    public String getStoreId() {
+        return storeId;
     }
 
-    public void setAppId(String appId) {
-        this.appId = appId;
+    public void setStoreId(String storeId) {
+        this.storeId = storeId;
     }
 
-    public String getName() {
-        return name;
+    public String getWechatType() {
+        return wechatType;
     }
 
-    public void setName(String name) {
-        this.name = name;
+    public void setWechatType(String wechatType) {
+        this.wechatType = wechatType;
     }
 
-    public String getAppSecret() {
-        return appSecret;
+    public String getCertPath() {
+        return certPath;
     }
 
-    public void setAppSecret(String appSecret) {
-        this.appSecret = appSecret;
+    public void setCertPath(String certPath) {
+        this.certPath = certPath;
     }
 
-    public String getWeChatId() {
-        return weChatId;
+    public String getAppid() {
+        return appid;
     }
 
-    public void setWeChatId(String weChatId) {
-        this.weChatId = weChatId;
+    public void setAppid(String appid) {
+        this.appid = appid;
     }
 
-    public String getStoreId() {
-        return storeId;
+    public String getAppsecret() {
+        return appsecret;
     }
 
-    public void setStoreId(String storeId) {
-        this.storeId = storeId;
+    public void setAppsecret(String appsecret) {
+        this.appsecret = appsecret;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getObjId() {
+        return objId;
+    }
+
+    public void setObjId(String objId) {
+        this.objId = objId;
+    }
+
+    public String getWechatId() {
+        return wechatId;
+    }
+
+    public void setWechatId(String wechatId) {
+        this.wechatId = wechatId;
     }
 
     public String getPayPassword() {
@@ -95,6 +125,14 @@ public class SmallWeChatDto extends PageDto implements Serializable {
         this.payPassword = payPassword;
     }
 
+    public String getObjType() {
+        return objType;
+    }
+
+    public void setObjType(String objType) {
+        this.objType = objType;
+    }
+
     public String getRemarks() {
         return remarks;
     }
@@ -103,6 +141,15 @@ public class SmallWeChatDto extends PageDto implements Serializable {
         this.remarks = remarks;
     }
 
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
     public String getStatusCd() {
         return statusCd;
     }
@@ -111,36 +158,36 @@ public class SmallWeChatDto extends PageDto implements Serializable {
         this.statusCd = statusCd;
     }
 
-    public String getObjId() {
-        return objId;
+    public String getWeChatId() {
+        return weChatId;
     }
 
-    public void setObjId(String objId) {
-        this.objId = objId;
+    public void setWeChatId(String weChatId) {
+        this.weChatId = weChatId;
     }
 
-    public String getObjType() {
-        return objType;
+    public String getAppId() {
+        return appId;
     }
 
-    public void setObjType(String objType) {
-        this.objType = objType;
+    public void setAppId(String appId) {
+        this.appId = appId;
     }
 
-    public String getMchId() {
-        return mchId;
+    public String getAppSecret() {
+        return appSecret;
     }
 
-    public void setMchId(String mchId) {
-        this.mchId = mchId;
+    public void setAppSecret(String appSecret) {
+        this.appSecret = appSecret;
     }
 
-    public String getObjTypeName() {
-        return objTypeName;
+    public List<SmallWechatAttrDto> getSmallWechatAttrs() {
+        return smallWechatAttrs;
     }
 
-    public void setObjTypeName(String objTypeName) {
-        this.objTypeName = objTypeName;
+    public void setSmallWechatAttrs(List<SmallWechatAttrDto> smallWechatAttrs) {
+        this.smallWechatAttrs = smallWechatAttrs;
     }
 
     public String getWeChatType() {
@@ -150,12 +197,4 @@ public class SmallWeChatDto extends PageDto implements Serializable {
     public void setWeChatType(String weChatType) {
         this.weChatType = weChatType;
     }
-
-    public List<SmallWechatAttrDto> getSmallWechatAttrs() {
-        return smallWechatAttrs;
-    }
-
-    public void setSmallWechatAttrs(List<SmallWechatAttrDto> smallWechatAttrs) {
-        this.smallWechatAttrs = smallWechatAttrs;
-    }
 }

+ 124 - 0
java110-bean/src/main/java/com/java110/po/smallWechat/SmallWechatPo.java

@@ -0,0 +1,124 @@
+/*
+ * 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.smallWechat;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2022-05-25 10:46:07 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 SmallWechatPo implements Serializable {
+
+    private String mchId;
+private String statusCd = "0";
+private String storeId;
+private String wechatType;
+private String certPath;
+private String appid;
+private String appsecret;
+private String name;
+private String objId;
+private String wechatId;
+private String payPassword;
+private String objType;
+private String remarks;
+public String getMchId() {
+        return mchId;
+    }
+public void setMchId(String mchId) {
+        this.mchId = mchId;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getStoreId() {
+        return storeId;
+    }
+public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+public String getWechatType() {
+        return wechatType;
+    }
+public void setWechatType(String wechatType) {
+        this.wechatType = wechatType;
+    }
+public String getCertPath() {
+        return certPath;
+    }
+public void setCertPath(String certPath) {
+        this.certPath = certPath;
+    }
+public String getAppid() {
+        return appid;
+    }
+public void setAppid(String appid) {
+        this.appid = appid;
+    }
+public String getAppsecret() {
+        return appsecret;
+    }
+public void setAppsecret(String appsecret) {
+        this.appsecret = appsecret;
+    }
+public String getName() {
+        return name;
+    }
+public void setName(String name) {
+        this.name = name;
+    }
+public String getObjId() {
+        return objId;
+    }
+public void setObjId(String objId) {
+        this.objId = objId;
+    }
+public String getWechatId() {
+        return wechatId;
+    }
+public void setWechatId(String wechatId) {
+        this.wechatId = wechatId;
+    }
+public String getPayPassword() {
+        return payPassword;
+    }
+public void setPayPassword(String payPassword) {
+        this.payPassword = payPassword;
+    }
+public String getObjType() {
+        return objType;
+    }
+public void setObjType(String objType) {
+        this.objType = objType;
+    }
+public String getRemarks() {
+        return remarks;
+    }
+public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+
+
+}

+ 31 - 16
java110-bean/src/main/java/com/java110/po/smallWechatAttr/SmallWechatAttrPo.java

@@ -1,46 +1,61 @@
 package com.java110.po.smallWechatAttr;
 
 import java.io.Serializable;
-import java.util.Date;
 
 public class SmallWechatAttrPo implements Serializable {
 
     private String attrId;
-private String wechatId;
-private String specCd;
-private String communityId;
-private String value;
-public String getAttrId() {
+    private String wechatId;
+    private String specCd;
+    private String communityId;
+    private String value;
+    private String statusCd;
+
+    public String getAttrId() {
         return attrId;
     }
-public void setAttrId(String attrId) {
+
+    public void setAttrId(String attrId) {
         this.attrId = attrId;
     }
-public String getWechatId() {
+
+    public String getWechatId() {
         return wechatId;
     }
-public void setWechatId(String wechatId) {
+
+    public void setWechatId(String wechatId) {
         this.wechatId = wechatId;
     }
-public String getSpecCd() {
+
+    public String getSpecCd() {
         return specCd;
     }
-public void setSpecCd(String specCd) {
+
+    public void setSpecCd(String specCd) {
         this.specCd = specCd;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
-public String getValue() {
+
+    public String getValue() {
         return value;
     }
-public void setValue(String value) {
+
+    public void setValue(String value) {
         this.value = value;
     }
 
+    public String getStatusCd() {
+        return statusCd;
+    }
 
-
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
 }

+ 106 - 0
java110-db/src/main/resources/mapper/store/SmallWechatAttrV1ServiceDaoImplMapper.xml

@@ -0,0 +1,106 @@
+<?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="smallWechatAttrV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存微信配置表信息 add by wuxw 2018-07-03 -->
+    <insert id="saveSmallWechatAttrInfo" parameterType="Map">
+        insert into small_wechat_attr(
+attr_id,wechat_id,spec_cd,community_id,value
+) values (
+#{attrId},#{wechatId},#{specCd},#{communityId},#{value}
+)
+    </insert>
+
+
+
+    <!-- 查询微信配置表信息 add by wuxw 2018-07-03 -->
+    <select id="getSmallWechatAttrInfo" parameterType="Map" resultType="Map">
+        select  t.attr_id,t.attr_id attrId,t.wechat_id,t.wechat_id wechatId,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.value 
+from small_wechat_attr t 
+where 1 =1 
+<if test="attrId !=null and attrId != ''">
+   and t.attr_id= #{attrId}
+</if> 
+<if test="wechatId !=null and wechatId != ''">
+   and t.wechat_id= #{wechatId}
+</if> 
+<if test="specCd !=null and specCd != ''">
+   and t.spec_cd= #{specCd}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="value !=null and value != ''">
+   and t.value= #{value}
+</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="updateSmallWechatAttrInfo" parameterType="Map">
+        update  small_wechat_attr t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="wechatId !=null and wechatId != ''">
+, t.wechat_id= #{wechatId}
+</if> 
+<if test="specCd !=null and specCd != ''">
+, t.spec_cd= #{specCd}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+<if test="value !=null and value != ''">
+, t.value= #{value}
+</if> 
+ where 1=1 <if test="attrId !=null and attrId != ''">
+and t.attr_id= #{attrId}
+</if> 
+
+    </update>
+
+    <!-- 查询微信配置表数量 add by wuxw 2018-07-03 -->
+     <select id="querySmallWechatAttrsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from small_wechat_attr t 
+where 1 =1 
+<if test="attrId !=null and attrId != ''">
+   and t.attr_id= #{attrId}
+</if> 
+<if test="wechatId !=null and wechatId != ''">
+   and t.wechat_id= #{wechatId}
+</if> 
+<if test="specCd !=null and specCd != ''">
+   and t.spec_cd= #{specCd}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="value !=null and value != ''">
+   and t.value= #{value}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 168 - 0
java110-db/src/main/resources/mapper/store/SmallWechatV1ServiceDaoImplMapper.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="smallWechatV1ServiceDaoImpl">
+
+
+    <!-- 保存微信配置表信息 add by wuxw 2018-07-03 -->
+    <insert id="saveSmallWechatInfo" parameterType="Map">
+        insert into small_wechat(
+        mch_id,store_Id,wechat_type,cert_path,appId,appSecret,name,obj_id,wechat_id,pay_password,obj_type,remarks
+        ) values (
+        #{mchId},#{storeId},#{wechatType},#{certPath},#{appid},#{appsecret},#{name},#{objId},#{wechatId},#{payPassword},#{objType},#{remarks}
+        )
+    </insert>
+
+
+    <!-- 查询微信配置表信息 add by wuxw 2018-07-03 -->
+    <select id="getSmallWechatInfo" parameterType="Map" resultType="Map">
+        select t.mch_id,t.mch_id mchId,t.status_cd,t.status_cd statusCd,t.store_Id,t.store_Id storeId,t.wechat_type,
+        t.wechat_type wechatType,t.cert_path,t.cert_path certPath,t.appId,t.appId appid,t.appSecret,t.appSecret
+        appsecret,
+        t.name,t.obj_id,t.obj_id objId,t.wechat_id,t.wechat_id wechatId,t.pay_password,t.pay_password payPassword,
+        t.obj_type,t.obj_type objType,t.remarks
+        from small_wechat t
+        where 1 =1
+        <if test="mchId !=null and mchId != ''">
+            and t.mch_id= #{mchId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_Id= #{storeId}
+        </if>
+        <if test="wechatType !=null and wechatType != ''">
+            and t.wechat_type= #{wechatType}
+        </if>
+        <if test="certPath !=null and certPath != ''">
+            and t.cert_path= #{certPath}
+        </if>
+        <if test="appid !=null and appid != ''">
+            and t.appId= #{appid}
+        </if>
+        <if test="appsecret !=null and appsecret != ''">
+            and t.appSecret= #{appsecret}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="wechatId !=null and wechatId != ''">
+            and t.wechat_id= #{wechatId}
+        </if>
+        <if test="payPassword !=null and payPassword != ''">
+            and t.pay_password= #{payPassword}
+        </if>
+        <if test="objType !=null and objType != ''">
+            and t.obj_type= #{objType}
+        </if>
+        <if test="remarks !=null and remarks != ''">
+            and t.remarks= #{remarks}
+        </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="updateSmallWechatInfo" parameterType="Map">
+        update small_wechat t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="mchId !=null and mchId != ''">
+            , t.mch_id= #{mchId}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            , t.store_Id= #{storeId}
+        </if>
+        <if test="wechatType !=null and wechatType != ''">
+            , t.wechat_type= #{wechatType}
+        </if>
+        <if test="certPath !=null and certPath != ''">
+            , t.cert_path= #{certPath}
+        </if>
+        <if test="appid !=null and appid != ''">
+            , t.appId= #{appid}
+        </if>
+        <if test="appsecret !=null and appsecret != ''">
+            , t.appSecret= #{appsecret}
+        </if>
+        <if test="name !=null and name != ''">
+            , t.name= #{name}
+        </if>
+        <if test="objId !=null and objId != ''">
+            , t.obj_id= #{objId}
+        </if>
+        <if test="payPassword !=null and payPassword != ''">
+            , t.pay_password= #{payPassword}
+        </if>
+        <if test="objType !=null and objType != ''">
+            , t.obj_type= #{objType}
+        </if>
+        <if test="remarks !=null and remarks != ''">
+            , t.remarks= #{remarks}
+        </if>
+        where 1=1
+        <if test="wechatId !=null and wechatId != ''">
+            and t.wechat_id= #{wechatId}
+        </if>
+
+    </update>
+
+    <!-- 查询微信配置表数量 add by wuxw 2018-07-03 -->
+    <select id="querySmallWechatsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from small_wechat t
+        where 1 =1
+        <if test="mchId !=null and mchId != ''">
+            and t.mch_id= #{mchId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_Id= #{storeId}
+        </if>
+        <if test="wechatType !=null and wechatType != ''">
+            and t.wechat_type= #{wechatType}
+        </if>
+        <if test="certPath !=null and certPath != ''">
+            and t.cert_path= #{certPath}
+        </if>
+        <if test="appid !=null and appid != ''">
+            and t.appId= #{appid}
+        </if>
+        <if test="appsecret !=null and appsecret != ''">
+            and t.appSecret= #{appsecret}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="wechatId !=null and wechatId != ''">
+            and t.wechat_id= #{wechatId}
+        </if>
+        <if test="payPassword !=null and payPassword != ''">
+            and t.pay_password= #{payPassword}
+        </if>
+        <if test="objType !=null and objType != ''">
+            and t.obj_type= #{objType}
+        </if>
+        <if test="remarks !=null and remarks != ''">
+            and t.remarks= #{remarks}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/store/ISmallWechatAttrV1InnerServiceSMO.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.store;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.smallWechatAttr.SmallWechatAttrDto;
+import com.java110.po.smallWechatAttr.SmallWechatAttrPo;
+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-05-25 10:58:13 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 = "store-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/smallWechatAttrV1Api")
+public interface ISmallWechatAttrV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveSmallWechatAttr", method = RequestMethod.POST)
+    public int saveSmallWechatAttr(@RequestBody  SmallWechatAttrPo smallWechatAttrPo);
+
+    @RequestMapping(value = "/updateSmallWechatAttr", method = RequestMethod.POST)
+    public int updateSmallWechatAttr(@RequestBody  SmallWechatAttrPo smallWechatAttrPo);
+
+    @RequestMapping(value = "/deleteSmallWechatAttr", method = RequestMethod.POST)
+    public int deleteSmallWechatAttr(@RequestBody  SmallWechatAttrPo smallWechatAttrPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param smallWechatAttrDto 数据对象分享
+     * @return SmallWechatAttrDto 对象数据
+     */
+    @RequestMapping(value = "/querySmallWechatAttrs", method = RequestMethod.POST)
+    List<SmallWechatAttrDto> querySmallWechatAttrs(@RequestBody SmallWechatAttrDto smallWechatAttrDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param smallWechatAttrDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/querySmallWechatAttrsCount", method = RequestMethod.POST)
+    int querySmallWechatAttrsCount(@RequestBody SmallWechatAttrDto smallWechatAttrDto);
+}

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/store/ISmallWechatV1InnerServiceSMO.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.store;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.smallWeChat.SmallWeChatDto;
+import com.java110.po.smallWechat.SmallWechatPo;
+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-05-25 10:46:07 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 = "store-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/smallWechatV1Api")
+public interface ISmallWechatV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveSmallWechat", method = RequestMethod.POST)
+    public int saveSmallWechat(@RequestBody  SmallWechatPo smallWechatPo);
+
+    @RequestMapping(value = "/updateSmallWechat", method = RequestMethod.POST)
+    public int updateSmallWechat(@RequestBody  SmallWechatPo smallWechatPo);
+
+    @RequestMapping(value = "/deleteSmallWechat", method = RequestMethod.POST)
+    public int deleteSmallWechat(@RequestBody  SmallWechatPo smallWechatPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param smallWechatDto 数据对象分享
+     * @return SmallWechatDto 对象数据
+     */
+    @RequestMapping(value = "/querySmallWechats", method = RequestMethod.POST)
+    List<SmallWeChatDto> querySmallWechats(@RequestBody SmallWeChatDto smallWechatDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param smallWechatDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/querySmallWechatsCount", method = RequestMethod.POST)
+    int querySmallWechatsCount(@RequestBody SmallWeChatDto smallWechatDto);
+}

+ 71 - 0
service-store/src/main/java/com/java110/store/cmd/smallWechat/DeleteSmallWechatCmd.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.store.cmd.smallWechat;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.intf.store.ISmallWechatV1InnerServiceSMO;
+import com.java110.po.smallWechat.SmallWechatPo;
+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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * 类表述:删除
+ * 服务编码:smallWechat.deleteSmallWechat
+ * 请求路劲:/app/smallWechat.DeleteSmallWechat
+ * add by 吴学文 at 2022-05-25 10:46:07 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 = "smallWechat.deleteSmallWechat")
+public class DeleteSmallWechatCmd extends AbstractServiceCmdListener {
+    private static Logger logger = LoggerFactory.getLogger(DeleteSmallWechatCmd.class);
+
+    @Autowired
+    private ISmallWechatV1InnerServiceSMO smallWechatV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "wechatId", "wechatId不能为空");
+        Assert.hasKeyAndValue(reqJson, "objId", "objId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        SmallWechatPo smallWechatPo = BeanConvertUtil.covertBean(reqJson, SmallWechatPo.class);
+        int flag = smallWechatV1InnerServiceSMOImpl.deleteSmallWechat(smallWechatPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 84 - 0
service-store/src/main/java/com/java110/store/cmd/smallWechat/ListSmallWechatCmd.java

@@ -0,0 +1,84 @@
+/*
+ * 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.store.cmd.smallWechat;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.store.ISmallWechatV1InnerServiceSMO;
+import com.java110.po.smallWechat.SmallWechatPo;
+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.smallWeChat.SmallWeChatDto;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:smallWechat.listSmallWechat
+ * 请求路劲:/app/smallWechat.ListSmallWechat
+ * add by 吴学文 at 2022-05-25 10:46:07 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 = "smallWechat.listSmallWechat")
+public class ListSmallWechatCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListSmallWechatCmd.class);
+    @Autowired
+    private ISmallWechatV1InnerServiceSMO smallWechatV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           SmallWeChatDto smallWechatDto = BeanConvertUtil.covertBean(reqJson, SmallWeChatDto.class);
+
+           int count = smallWechatV1InnerServiceSMOImpl.querySmallWechatsCount(smallWechatDto);
+
+           List<SmallWeChatDto> smallWechatDtos = null;
+
+           if (count > 0) {
+               smallWechatDtos = smallWechatV1InnerServiceSMOImpl.querySmallWechats(smallWechatDto);
+           } else {
+               smallWechatDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, smallWechatDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 153 - 65
service-api/src/main/java/com/java110/api/listener/smallWeChat/SaveSmallWeChatListener.java

@@ -1,34 +1,69 @@
-package com.java110.api.listener.smallWeChat;
+/*
+ * 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.store.cmd.smallWechat;
 
 import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.smallWeChat.ISmallWeChatBMO;
-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.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
 import com.java110.core.factory.GenerateCodeFactory;
 import com.java110.dto.app.AppDto;
 import com.java110.dto.smallWeChat.SmallWeChatDto;
 import com.java110.dto.smallWechatAttr.SmallWechatAttrDto;
+import com.java110.intf.store.ISmallWechatAttrV1InnerServiceSMO;
+import com.java110.intf.store.ISmallWechatV1InnerServiceSMO;
+import com.java110.po.smallWechat.SmallWechatPo;
 import com.java110.po.smallWechatAttr.SmallWechatAttrPo;
 import com.java110.utils.constant.BusinessTypeConstant;
-import com.java110.utils.constant.ServiceCodeSmallWeChatConstant;
+import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.StringUtil;
+import com.java110.vo.ResultVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
 
 /**
- * 保存小程序配置
+ * 类表述:保存
+ * 服务编码:smallWechat.saveSmallWechat
+ * 请求路劲:/app/smallWechat.SaveSmallWechat
+ * add by 吴学文 at 2022-05-25 10:46:07 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行
  */
-@Java110Listener("saveSmallWeChatListener")
-public class SaveSmallWeChatListener extends AbstractServiceApiPlusListener {
+@Java110Cmd(serviceCode = "smallWeChat.saveSmallWeChat")
+public class SaveSmallWechatCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveSmallWechatCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private ISmallWechatV1InnerServiceSMO smallWechatV1InnerServiceSMOImpl;
 
     @Autowired
-    private ISmallWeChatBMO smallWeChatBMOImpl;
+    private ISmallWechatAttrV1InnerServiceSMO smallWechatAttrV1InnerServiceSMOImpl;
 
     @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
         Assert.hasKeyAndValue(reqJson, "name", "请求报文中未包含name");
         Assert.hasKeyAndValue(reqJson, "appId", "请求报文中未包含appId");
         Assert.hasKeyAndValue(reqJson, "appSecret", "请求报文中未包含appSecret");
@@ -36,34 +71,45 @@ public class SaveSmallWeChatListener extends AbstractServiceApiPlusListener {
         Assert.hasKeyAndValue(reqJson, "weChatType", "请求报文中未包含weChatType");
         Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId(小区id)");
         Assert.hasKeyAndValue(reqJson, "weChatType", "请求报文中未包含类型");
+
     }
 
     @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-        String appId = event.getDataFlowContext().getRequestHeaders().get("app-id");
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+        String appId = cmdDataFlowContext.getReqHeaders().get("app-id");
         if (StringUtil.isEmpty(appId)) {
-            appId = event.getDataFlowContext().getRequestHeaders().get("app_id");
+            appId = cmdDataFlowContext.getReqHeaders().get("app-id");
         }
 
         String wechatId = GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_weChatId);
         reqJson.put("weChatId", wechatId);
         reqJson.put("objType", SmallWeChatDto.OBJ_TYPE_COMMUNITY);
-        smallWeChatBMOImpl.addSmallWeChat(reqJson, context);
+        SmallWechatPo smallWechatPo = BeanConvertUtil.covertBean(reqJson, SmallWechatPo.class);
+        smallWechatPo.setWechatId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = smallWechatV1InnerServiceSMOImpl.saveSmallWechat(smallWechatPo);
 
-        //判断是否为公众号
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
 
+        //判断是否为公众号
         if (!SmallWeChatDto.WECHAT_TYPE_PUBLIC.equals(reqJson.getString("weChatType"))) {
             return;
         }
+
+
         //添加 微信对接token
         SmallWechatAttrPo smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-1");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_TOKEN);
         smallWechatAttrPo.setValue("java110");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
-
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //商城时 不创建
         if (AppDto.WECHAT_MALL_APP_ID.equals(appId)) {
             return;
@@ -71,171 +117,213 @@ public class SaveSmallWeChatListener extends AbstractServiceApiPlusListener {
 
         //模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-2");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_OWE_FEE_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写物业缴费通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写物业管理通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //业主缴费成功通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_SUCCESS_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写业主缴费成功通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //业主费用到期通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_EXPIRE_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写业主费用到期通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //空置房验房申请流程、审批流程通知--模板ID(资产调拨审批、领用审批、转赠通知-资产管理待办审批通知)
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_PROCESS_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写流程通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //空置房验房状态(通过和不通过)、审批状态(通过和不通过) 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_ROOM_STATE_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写空置房状态通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //报修工单提醒 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_WORK_ORDER_REMIND_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写报修工单通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //报修工单派单和转单提醒给维修师傅 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_DISPATCH_REMIND_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写报修工单派单和转单通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //报修工单派单和抢单提醒给业主,安排师傅维修(进度提醒) 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_SCHEDULE_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写报修工单派单和抢单提醒给业主,安排师傅维修(进度提醒)通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //报修工单维修完成提醒给业主 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_WORK_ORDER_END_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写报修工单维修完成提醒给业主通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //装修申请提醒给业主缴纳装修押金等信息 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_HOUSE_DECORATION_APPLY_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写装修申请提醒给业主进行缴纳装修押金和确认装修信息通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //装修申请提醒给物业人员进行审核操作 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_HOUSE_DECORATION_CHECK_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写装修申请提醒给物业人员进行审核操作通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //装修申请审核结果提醒给业主 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_HOUSE_DECORATION_CHECK_RESULT_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写装修申请审核结果提醒给业主,通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
         //装修验收结果提醒给业主 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_HOUSE_DECORATION_COMPLETED_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写装修验收结果提醒给业主,通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
 
         //报修通知-上门维修现场收费通知业主 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-3");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_REPAIR_CHARGE_SCENE_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写上门维修现场收费,提醒业主缴费,通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
 
         //报修通知-上门维修现场收费通知业主 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-4");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_OA_WORKFLOW_AUDIT_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写流程待审批通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
 
         //报修通知-上门维修现场收费通知业主 通知--模板ID
         smallWechatAttrPo = new SmallWechatAttrPo();
-        smallWechatAttrPo.setAttrId("-5");
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         smallWechatAttrPo.setCommunityId(reqJson.getString("objId"));
         smallWechatAttrPo.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_OA_WORKFLOW_AUDIT_FINISH_TEMPLATE);
         smallWechatAttrPo.setValue("这里请填写流程审批通知模板ID");
         smallWechatAttrPo.setWechatId(wechatId);
-        super.insert(context, smallWechatAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_SMALL_WECHAT_ATTR);
+        flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
 
-    }
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
 
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeSmallWeChatConstant.ADD_SMALL_WE_CHAT;
-    }
 
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
     }
-
-
 }

+ 75 - 0
service-store/src/main/java/com/java110/store/cmd/smallWechat/UpdateSmallWechatCmd.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.store.cmd.smallWechat;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.store.ISmallWechatV1InnerServiceSMO;
+import com.java110.po.smallWechat.SmallWechatPo;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:smallWechat.updateSmallWechat
+ * 请求路劲:/app/smallWechat.UpdateSmallWechat
+ * add by 吴学文 at 2022-05-25 10:46:07 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 = "smallWechat.updateSmallWechat")
+public class UpdateSmallWechatCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateSmallWechatCmd.class);
+
+
+    @Autowired
+    private ISmallWechatV1InnerServiceSMO smallWechatV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "wechatId", "wechatId不能为空");
+Assert.hasKeyAndValue(reqJson, "objId", "objId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       SmallWechatPo smallWechatPo = BeanConvertUtil.covertBean(reqJson, SmallWechatPo.class);
+        int flag = smallWechatV1InnerServiceSMOImpl.updateSmallWechat(smallWechatPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 71 - 0
service-store/src/main/java/com/java110/store/cmd/smallWechatAttr/DeleteSmallWechatAttrCmd.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.store.cmd.smallWechatAttr;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.store.ISmallWechatAttrV1InnerServiceSMO;
+import com.java110.po.smallWechatAttr.SmallWechatAttrPo;
+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;
+/**
+ * 类表述:删除
+ * 服务编码:smallWechatAttr.deleteSmallWechatAttr
+ * 请求路劲:/app/smallWechatAttr.DeleteSmallWechatAttr
+ * add by 吴学文 at 2022-05-25 10:58:13 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 = "smallWechatAttr.deleteSmallWechatAttr")
+public class DeleteSmallWechatAttrCmd extends AbstractServiceCmdListener {
+  private static Logger logger = LoggerFactory.getLogger(DeleteSmallWechatAttrCmd.class);
+
+    @Autowired
+    private ISmallWechatAttrV1InnerServiceSMO smallWechatAttrV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       SmallWechatAttrPo smallWechatAttrPo = BeanConvertUtil.covertBean(reqJson, SmallWechatAttrPo.class);
+        int flag = smallWechatAttrV1InnerServiceSMOImpl.deleteSmallWechatAttr(smallWechatAttrPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 84 - 0
service-store/src/main/java/com/java110/store/cmd/smallWechatAttr/ListSmallWechatAttrCmd.java

@@ -0,0 +1,84 @@
+/*
+ * 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.store.cmd.smallWechatAttr;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.store.ISmallWechatAttrV1InnerServiceSMO;
+import com.java110.po.smallWechatAttr.SmallWechatAttrPo;
+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.smallWechatAttr.SmallWechatAttrDto;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:smallWechatAttr.listSmallWechatAttr
+ * 请求路劲:/app/smallWechatAttr.ListSmallWechatAttr
+ * add by 吴学文 at 2022-05-25 10:58:13 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 = "smallWechatAttr.listSmallWechatAttr")
+public class ListSmallWechatAttrCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListSmallWechatAttrCmd.class);
+    @Autowired
+    private ISmallWechatAttrV1InnerServiceSMO smallWechatAttrV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           SmallWechatAttrDto smallWechatAttrDto = BeanConvertUtil.covertBean(reqJson, SmallWechatAttrDto.class);
+
+           int count = smallWechatAttrV1InnerServiceSMOImpl.querySmallWechatAttrsCount(smallWechatAttrDto);
+
+           List<SmallWechatAttrDto> smallWechatAttrDtos = null;
+
+           if (count > 0) {
+               smallWechatAttrDtos = smallWechatAttrV1InnerServiceSMOImpl.querySmallWechatAttrs(smallWechatAttrDto);
+           } else {
+               smallWechatAttrDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, smallWechatAttrDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 80 - 0
service-store/src/main/java/com/java110/store/cmd/smallWechatAttr/SaveSmallWechatAttrCmd.java

@@ -0,0 +1,80 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.store.cmd.smallWechatAttr;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.store.ISmallWechatAttrV1InnerServiceSMO;
+import com.java110.po.smallWechatAttr.SmallWechatAttrPo;
+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;
+
+/**
+ * 类表述:保存
+ * 服务编码:smallWechatAttr.saveSmallWechatAttr
+ * 请求路劲:/app/smallWechatAttr.SaveSmallWechatAttr
+ * add by 吴学文 at 2022-05-25 10:58:13 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 = "smallWechatAttr.saveSmallWechatAttr")
+public class SaveSmallWechatAttrCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveSmallWechatAttrCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private ISmallWechatAttrV1InnerServiceSMO smallWechatAttrV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "attrId", "请求报文中未包含attrId");
+Assert.hasKeyAndValue(reqJson, "wechatId", "请求报文中未包含wechatId");
+Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
+Assert.hasKeyAndValue(reqJson, "value", "请求报文中未包含value");
+Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
+Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       SmallWechatAttrPo smallWechatAttrPo = BeanConvertUtil.covertBean(reqJson, SmallWechatAttrPo.class);
+        smallWechatAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = smallWechatAttrV1InnerServiceSMOImpl.saveSmallWechatAttr(smallWechatAttrPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-store/src/main/java/com/java110/store/cmd/smallWechatAttr/UpdateSmallWechatAttrCmd.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.store.cmd.smallWechatAttr;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.store.ISmallWechatAttrV1InnerServiceSMO;
+import com.java110.po.smallWechatAttr.SmallWechatAttrPo;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:smallWechatAttr.updateSmallWechatAttr
+ * 请求路劲:/app/smallWechatAttr.UpdateSmallWechatAttr
+ * add by 吴学文 at 2022-05-25 10:58:13 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 = "smallWechatAttr.updateSmallWechatAttr")
+public class UpdateSmallWechatAttrCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateSmallWechatAttrCmd.class);
+
+
+    @Autowired
+    private ISmallWechatAttrV1InnerServiceSMO smallWechatAttrV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       SmallWechatAttrPo smallWechatAttrPo = BeanConvertUtil.covertBean(reqJson, SmallWechatAttrPo.class);
+        int flag = smallWechatAttrV1InnerServiceSMOImpl.updateSmallWechatAttr(smallWechatAttrPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-store/src/main/java/com/java110/store/dao/ISmallWechatAttrV1ServiceDao.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.store.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-05-25 10:58:13 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 ISmallWechatAttrV1ServiceDao {
+
+
+    /**
+     * 保存 微信配置表信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveSmallWechatAttrInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询微信配置表信息(instance过程)
+     * 根据bId 查询微信配置表信息
+     * @param info bId 信息
+     * @return 微信配置表信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getSmallWechatAttrInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改微信配置表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateSmallWechatAttrInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询微信配置表总数
+     *
+     * @param info 微信配置表信息
+     * @return 微信配置表数量
+     */
+    int querySmallWechatAttrsCount(Map info);
+
+}

+ 77 - 0
service-store/src/main/java/com/java110/store/dao/ISmallWechatV1ServiceDao.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.store.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-05-25 10:46:07 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 ISmallWechatV1ServiceDao {
+
+
+    /**
+     * 保存 微信配置表信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveSmallWechatInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询微信配置表信息(instance过程)
+     * 根据bId 查询微信配置表信息
+     * @param info bId 信息
+     * @return 微信配置表信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getSmallWechatInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改微信配置表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateSmallWechatInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询微信配置表总数
+     *
+     * @param info 微信配置表信息
+     * @return 微信配置表数量
+     */
+    int querySmallWechatsCount(Map info);
+
+}

+ 112 - 0
service-store/src/main/java/com/java110/store/dao/impl/SmallWechatAttrV1ServiceDaoImpl.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.store.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.store.dao.ISmallWechatAttrV1ServiceDao;
+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-05-25 10:58:13 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("smallWechatAttrV1ServiceDaoImpl")
+public class SmallWechatAttrV1ServiceDaoImpl extends BaseServiceDao implements ISmallWechatAttrV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(SmallWechatAttrV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存微信配置表信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveSmallWechatAttrInfo(Map info) throws DAOException {
+        logger.debug("保存 saveSmallWechatAttrInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("smallWechatAttrV1ServiceDaoImpl.saveSmallWechatAttrInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询微信配置表信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getSmallWechatAttrInfo(Map info) throws DAOException {
+        logger.debug("查询 getSmallWechatAttrInfo 入参 info : {}",info);
+
+        List<Map> businessSmallWechatAttrInfos = sqlSessionTemplate.selectList("smallWechatAttrV1ServiceDaoImpl.getSmallWechatAttrInfo",info);
+
+        return businessSmallWechatAttrInfos;
+    }
+
+
+    /**
+     * 修改微信配置表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateSmallWechatAttrInfo(Map info) throws DAOException {
+        logger.debug("修改 updateSmallWechatAttrInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("smallWechatAttrV1ServiceDaoImpl.updateSmallWechatAttrInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询微信配置表数量
+     * @param info 微信配置表信息
+     * @return 微信配置表数量
+     */
+    @Override
+    public int querySmallWechatAttrsCount(Map info) {
+        logger.debug("查询 querySmallWechatAttrsCount 入参 info : {}",info);
+
+        List<Map> businessSmallWechatAttrInfos = sqlSessionTemplate.selectList("smallWechatAttrV1ServiceDaoImpl.querySmallWechatAttrsCount", info);
+        if (businessSmallWechatAttrInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessSmallWechatAttrInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 112 - 0
service-store/src/main/java/com/java110/store/dao/impl/SmallWechatV1ServiceDaoImpl.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.store.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.store.dao.ISmallWechatV1ServiceDao;
+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-05-25 10:46:07 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("smallWechatV1ServiceDaoImpl")
+public class SmallWechatV1ServiceDaoImpl extends BaseServiceDao implements ISmallWechatV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(SmallWechatV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存微信配置表信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveSmallWechatInfo(Map info) throws DAOException {
+        logger.debug("保存 saveSmallWechatInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("smallWechatV1ServiceDaoImpl.saveSmallWechatInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询微信配置表信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getSmallWechatInfo(Map info) throws DAOException {
+        logger.debug("查询 getSmallWechatInfo 入参 info : {}",info);
+
+        List<Map> businessSmallWechatInfos = sqlSessionTemplate.selectList("smallWechatV1ServiceDaoImpl.getSmallWechatInfo",info);
+
+        return businessSmallWechatInfos;
+    }
+
+
+    /**
+     * 修改微信配置表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateSmallWechatInfo(Map info) throws DAOException {
+        logger.debug("修改 updateSmallWechatInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("smallWechatV1ServiceDaoImpl.updateSmallWechatInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询微信配置表数量
+     * @param info 微信配置表信息
+     * @return 微信配置表数量
+     */
+    @Override
+    public int querySmallWechatsCount(Map info) {
+        logger.debug("查询 querySmallWechatsCount 入参 info : {}",info);
+
+        List<Map> businessSmallWechatInfos = sqlSessionTemplate.selectList("smallWechatV1ServiceDaoImpl.querySmallWechatsCount", info);
+        if (businessSmallWechatInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessSmallWechatInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-store/src/main/java/com/java110/store/smo/impl/SmallWechatAttrV1InnerServiceSMOImpl.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.store.smo.impl;
+
+
+import com.java110.store.dao.ISmallWechatAttrV1ServiceDao;
+import com.java110.intf.store.ISmallWechatAttrV1InnerServiceSMO;
+import com.java110.dto.smallWechatAttr.SmallWechatAttrDto;
+import com.java110.po.smallWechatAttr.SmallWechatAttrPo;
+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-05-25 10:58:13 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 SmallWechatAttrV1InnerServiceSMOImpl extends BaseServiceSMO implements ISmallWechatAttrV1InnerServiceSMO {
+
+    @Autowired
+    private ISmallWechatAttrV1ServiceDao smallWechatAttrV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveSmallWechatAttr(@RequestBody  SmallWechatAttrPo smallWechatAttrPo) {
+        int saveFlag = smallWechatAttrV1ServiceDaoImpl.saveSmallWechatAttrInfo(BeanConvertUtil.beanCovertMap(smallWechatAttrPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateSmallWechatAttr(@RequestBody  SmallWechatAttrPo smallWechatAttrPo) {
+        int saveFlag = smallWechatAttrV1ServiceDaoImpl.updateSmallWechatAttrInfo(BeanConvertUtil.beanCovertMap(smallWechatAttrPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteSmallWechatAttr(@RequestBody  SmallWechatAttrPo smallWechatAttrPo) {
+       smallWechatAttrPo.setStatusCd("1");
+       int saveFlag = smallWechatAttrV1ServiceDaoImpl.updateSmallWechatAttrInfo(BeanConvertUtil.beanCovertMap(smallWechatAttrPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<SmallWechatAttrDto> querySmallWechatAttrs(@RequestBody  SmallWechatAttrDto smallWechatAttrDto) {
+
+        //校验是否传了 分页信息
+
+        int page = smallWechatAttrDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            smallWechatAttrDto.setPage((page - 1) * smallWechatAttrDto.getRow());
+        }
+
+        List<SmallWechatAttrDto> smallWechatAttrs = BeanConvertUtil.covertBeanList(smallWechatAttrV1ServiceDaoImpl.getSmallWechatAttrInfo(BeanConvertUtil.beanCovertMap(smallWechatAttrDto)), SmallWechatAttrDto.class);
+
+        return smallWechatAttrs;
+    }
+
+
+    @Override
+    public int querySmallWechatAttrsCount(@RequestBody SmallWechatAttrDto smallWechatAttrDto) {
+        return smallWechatAttrV1ServiceDaoImpl.querySmallWechatAttrsCount(BeanConvertUtil.beanCovertMap(smallWechatAttrDto));    }
+
+}

+ 90 - 0
service-store/src/main/java/com/java110/store/smo/impl/SmallWechatV1InnerServiceSMOImpl.java

@@ -0,0 +1,90 @@
+/*
+ * 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.store.smo.impl;
+
+
+import com.java110.dto.smallWeChat.SmallWeChatDto;
+import com.java110.store.dao.ISmallWechatV1ServiceDao;
+import com.java110.intf.store.ISmallWechatV1InnerServiceSMO;
+import com.java110.dto.smallWeChat.SmallWeChatDto;
+import com.java110.po.smallWechat.SmallWechatPo;
+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-05-25 10:46:07 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 SmallWechatV1InnerServiceSMOImpl extends BaseServiceSMO implements ISmallWechatV1InnerServiceSMO {
+
+    @Autowired
+    private ISmallWechatV1ServiceDao smallWechatV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveSmallWechat(@RequestBody  SmallWechatPo smallWechatPo) {
+        int saveFlag = smallWechatV1ServiceDaoImpl.saveSmallWechatInfo(BeanConvertUtil.beanCovertMap(smallWechatPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateSmallWechat(@RequestBody  SmallWechatPo smallWechatPo) {
+        int saveFlag = smallWechatV1ServiceDaoImpl.updateSmallWechatInfo(BeanConvertUtil.beanCovertMap(smallWechatPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteSmallWechat(@RequestBody  SmallWechatPo smallWechatPo) {
+       smallWechatPo.setStatusCd("1");
+       int saveFlag = smallWechatV1ServiceDaoImpl.updateSmallWechatInfo(BeanConvertUtil.beanCovertMap(smallWechatPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<SmallWeChatDto> querySmallWechats(@RequestBody  SmallWeChatDto smallWechatDto) {
+
+        //校验是否传了 分页信息
+
+        int page = smallWechatDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            smallWechatDto.setPage((page - 1) * smallWechatDto.getRow());
+        }
+
+        List<SmallWeChatDto> smallWechats = BeanConvertUtil.covertBeanList(smallWechatV1ServiceDaoImpl.getSmallWechatInfo(BeanConvertUtil.beanCovertMap(smallWechatDto)), SmallWeChatDto.class);
+
+        return smallWechats;
+    }
+
+
+    @Override
+    public int querySmallWechatsCount(@RequestBody SmallWeChatDto smallWechatDto) {
+        return smallWechatV1ServiceDaoImpl.querySmallWechatsCount(BeanConvertUtil.beanCovertMap(smallWechatDto));    }
+
+}

+ 22 - 1
service-user/src/main/java/com/java110/user/api/StaffApi.java

@@ -2,7 +2,9 @@ package com.java110.user.api;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.app.AppDto;
+import com.java110.dto.smallWeChat.SmallWeChatDto;
 import com.java110.dto.staffAppAuth.StaffAppAuthDto;
+import com.java110.intf.store.ISmallWeChatInnerServiceSMO;
 import com.java110.po.staffAppAuth.StaffAppAuthPo;
 import com.java110.user.bmo.staffAppAuth.IDeleteStaffAppAuthBMO;
 import com.java110.user.bmo.staffAppAuth.IGetStaffAppAuthBMO;
@@ -14,7 +16,14 @@ import com.java110.utils.util.BeanConvertUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
 
 
 @RestController
@@ -31,6 +40,9 @@ public class StaffApi {
     @Autowired
     private IGetStaffAppAuthBMO getStaffAppAuthBMOImpl;
 
+    @Autowired
+    private ISmallWeChatInnerServiceSMO smallWeChatInnerServiceSMOImpl;
+
     /**
      * 微信保存消息模板
      *
@@ -125,9 +137,18 @@ public class StaffApi {
                                                   @RequestHeader(value = "user-id") String userId,
                                                   @RequestParam(value = "communityId") String communityId) {
 
+        SmallWeChatDto smallWeChatDto = new SmallWeChatDto();
+        smallWeChatDto.setObjId(communityId);
+        smallWeChatDto.setObjType(SmallWeChatDto.OBJ_TYPE_COMMUNITY);
+        smallWeChatDto.setWechatType(SmallWeChatDto.WECHAT_TYPE_PUBLIC);
+        List<SmallWeChatDto> smallWeChatDtos = smallWeChatInnerServiceSMOImpl.querySmallWeChats(smallWeChatDto);
         String ownerUrl = MappingCache.getValue("OWNER_WECHAT_URL")
                 + "/app/staffAuth?storeId=" + storeId + "&staffId=" + userId
                 + "&communityId=" + communityId + "&appId=" + AppDto.WECHAT_OWNER_APP_ID;
+
+        if (smallWeChatDtos != null && smallWeChatDtos.size() > 0) {
+            ownerUrl += ("&wAppId=" + smallWeChatDtos.get(0).getAppid());
+        }
         return ResultVo.createResponseEntity(ownerUrl);
     }
 }

+ 2 - 1
service-user/src/main/java/com/java110/user/dao/impl/MenuCatalogV1ServiceDaoImpl.java

@@ -16,13 +16,14 @@
 package com.java110.user.dao.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.java110.core.log.LoggerFactory;
 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.user.dao.IMenuCatalogV1ServiceDao;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;