java110 преди 3 години
родител
ревизия
87f2580597
променени са 15 файла, в които са добавени 548 реда и са изтрити 420 реда
  1. 10 0
      java110-bean/src/main/java/com/java110/po/applicationKey/ApplicationKeyPo.java
  2. 187 0
      java110-db/src/main/resources/mapper/common/ApplicationKeyV1ServiceDaoImplMapper.xml
  3. 3 3
      java110-db/src/main/resources/mapper/store/ContractChangePlanServiceDaoImplMapper.xml
  4. 67 0
      java110-interface/src/main/java/com/java110/intf/common/IApplicationKeyV1InnerServiceSMO.java
  5. 0 49
      service-api/src/main/java/com/java110/api/listener/account/DeleteAccountDetailListener.java
  6. 0 82
      service-api/src/main/java/com/java110/api/listener/account/ListAccountDetailsListener.java
  7. 0 82
      service-api/src/main/java/com/java110/api/listener/account/ListAccountsListener.java
  8. 0 50
      service-api/src/main/java/com/java110/api/listener/account/SaveAccountDetailListener.java
  9. 0 50
      service-api/src/main/java/com/java110/api/listener/account/SaveAccountListener.java
  10. 0 51
      service-api/src/main/java/com/java110/api/listener/account/UpdateAccountDetailListener.java
  11. 0 51
      service-api/src/main/java/com/java110/api/listener/account/UpdateAccountListener.java
  12. 77 0
      service-common/src/main/java/com/java110/common/dao/IApplicationKeyV1ServiceDao.java
  13. 112 0
      service-common/src/main/java/com/java110/common/dao/impl/ApplicationKeyV1ServiceDaoImpl.java
  14. 88 0
      service-common/src/main/java/com/java110/common/smo/impl/ApplicationKeyV1InnerServiceSMOImpl.java
  15. 4 2
      service-community/src/main/java/com/java110/community/cmd/communitys/QueryStoreCommunitysCmd.java

+ 10 - 0
java110-bean/src/main/java/com/java110/po/applicationKey/ApplicationKeyPo.java

@@ -26,6 +26,8 @@ public class ApplicationKeyPo implements Serializable {
     private String endTime;
     private String typeFlag;
     private String pwd;
+    private String statusCd;
+
 
 
     public String getApplicationKeyId() {
@@ -139,4 +141,12 @@ public class ApplicationKeyPo implements Serializable {
     public void setPwd(String pwd) {
         this.pwd = pwd;
     }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
 }

+ 187 - 0
java110-db/src/main/resources/mapper/common/ApplicationKeyV1ServiceDaoImplMapper.xml

@@ -0,0 +1,187 @@
+<?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="applicationKeyV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存申请钥匙信息 add by wuxw 2018-07-03 -->
+    <insert id="saveApplicationKeyInfo" parameterType="Map">
+        insert into application_key(
+application_key_id,id_card,sex,type_flag,machine_id,type_cd,name,tel,start_time,state,end_time,community_id,pwd,age
+) values (
+#{applicationKeyId},#{idCard},#{sex},#{typeFlag},#{machineId},#{typeCd},#{name},#{tel},#{startTime},#{state},#{endTime},#{communityId},#{pwd},#{age}
+)
+    </insert>
+
+
+
+    <!-- 查询申请钥匙信息 add by wuxw 2018-07-03 -->
+    <select id="getApplicationKeyInfo" parameterType="Map" resultType="Map">
+        select  t.application_key_id,t.application_key_id applicationKeyId,t.id_card,t.id_card idCard,t.sex,t.status_cd,t.status_cd statusCd,t.type_flag,t.type_flag typeFlag,t.machine_id,t.machine_id machineId,t.type_cd,t.type_cd typeCd,t.name,t.tel,t.start_time,t.start_time startTime,t.state,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.pwd,t.age 
+from application_key t 
+where 1 =1 
+<if test="applicationKeyId !=null and applicationKeyId != ''">
+   and t.application_key_id= #{applicationKeyId}
+</if> 
+<if test="idCard !=null and idCard != ''">
+   and t.id_card= #{idCard}
+</if> 
+<if test="sex !=null and sex != ''">
+   and t.sex= #{sex}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="typeFlag !=null and typeFlag != ''">
+   and t.type_flag= #{typeFlag}
+</if> 
+<if test="machineId !=null and machineId != ''">
+   and t.machine_id= #{machineId}
+</if> 
+<if test="typeCd !=null and typeCd != ''">
+   and t.type_cd= #{typeCd}
+</if> 
+<if test="name !=null and name != ''">
+   and t.name= #{name}
+</if> 
+<if test="tel !=null and tel != ''">
+   and t.tel= #{tel}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="pwd !=null and pwd != ''">
+   and t.pwd= #{pwd}
+</if> 
+<if test="age !=null and age != ''">
+   and t.age= #{age}
+</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="updateApplicationKeyInfo" parameterType="Map">
+        update  application_key t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="idCard !=null and idCard != ''">
+, t.id_card= #{idCard}
+</if> 
+<if test="sex !=null and sex != ''">
+, t.sex= #{sex}
+</if> 
+<if test="typeFlag !=null and typeFlag != ''">
+, t.type_flag= #{typeFlag}
+</if> 
+<if test="machineId !=null and machineId != ''">
+, t.machine_id= #{machineId}
+</if> 
+<if test="typeCd !=null and typeCd != ''">
+, t.type_cd= #{typeCd}
+</if> 
+<if test="name !=null and name != ''">
+, t.name= #{name}
+</if> 
+<if test="tel !=null and tel != ''">
+, t.tel= #{tel}
+</if> 
+<if test="startTime !=null and startTime != ''">
+, t.start_time= #{startTime}
+</if> 
+<if test="state !=null and state != ''">
+, t.state= #{state}
+</if> 
+<if test="endTime !=null and endTime != ''">
+, t.end_time= #{endTime}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+<if test="pwd !=null and pwd != ''">
+, t.pwd= #{pwd}
+</if> 
+<if test="age !=null and age != ''">
+, t.age= #{age}
+</if> 
+ where 1=1 <if test="applicationKeyId !=null and applicationKeyId != ''">
+and t.application_key_id= #{applicationKeyId}
+</if> 
+
+    </update>
+
+    <!-- 查询申请钥匙数量 add by wuxw 2018-07-03 -->
+     <select id="queryApplicationKeysCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from application_key t 
+where 1 =1 
+<if test="applicationKeyId !=null and applicationKeyId != ''">
+   and t.application_key_id= #{applicationKeyId}
+</if> 
+<if test="idCard !=null and idCard != ''">
+   and t.id_card= #{idCard}
+</if> 
+<if test="sex !=null and sex != ''">
+   and t.sex= #{sex}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="typeFlag !=null and typeFlag != ''">
+   and t.type_flag= #{typeFlag}
+</if> 
+<if test="machineId !=null and machineId != ''">
+   and t.machine_id= #{machineId}
+</if> 
+<if test="typeCd !=null and typeCd != ''">
+   and t.type_cd= #{typeCd}
+</if> 
+<if test="name !=null and name != ''">
+   and t.name= #{name}
+</if> 
+<if test="tel !=null and tel != ''">
+   and t.tel= #{tel}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="pwd !=null and pwd != ''">
+   and t.pwd= #{pwd}
+</if> 
+<if test="age !=null and age != ''">
+   and t.age= #{age}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 3 - 3
java110-db/src/main/resources/mapper/store/ContractChangePlanServiceDaoImplMapper.xml

@@ -41,13 +41,13 @@
             and t.contract_id= #{contractId}
         </if>
         <if test="contractName !=null and contractName != ''">
-            and ct.contract_name= #{contractName}
+            and c.contract_name= #{contractName}
         </if>
         <if test="contractCode !=null and contractCode != ''">
-            and ct.contract_code= #{contractCode}
+            and c.contract_code= #{contractCode}
         </if>
         <if test="contractType !=null and contractType != ''">
-            and ct.contract_type= #{contractType}
+            and c.contract_type= #{contractType}
         </if>
         <if test="planId !=null and planId != ''">
             and t.plan_id= #{planId}

+ 67 - 0
java110-interface/src/main/java/com/java110/intf/common/IApplicationKeyV1InnerServiceSMO.java

@@ -0,0 +1,67 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.intf.common;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.machine.ApplicationKeyDto;
+import com.java110.po.applicationKey.ApplicationKeyPo;
+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-07-15 19:37:20 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@FeignClient(name = "common-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/applicationKeyV1Api")
+public interface IApplicationKeyV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveApplicationKey", method = RequestMethod.POST)
+    public int saveApplicationKey(@RequestBody ApplicationKeyPo applicationKeyPo);
+
+    @RequestMapping(value = "/updateApplicationKey", method = RequestMethod.POST)
+    public int updateApplicationKey(@RequestBody ApplicationKeyPo applicationKeyPo);
+
+    @RequestMapping(value = "/deleteApplicationKey", method = RequestMethod.POST)
+    public int deleteApplicationKey(@RequestBody ApplicationKeyPo applicationKeyPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     * @param applicationKeyDto 数据对象分享
+     * @return ApplicationKeyDto 对象数据
+     */
+    @RequestMapping(value = "/queryApplicationKeys", method = RequestMethod.POST)
+    List<ApplicationKeyDto> queryApplicationKeys(@RequestBody ApplicationKeyDto applicationKeyDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param applicationKeyDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryApplicationKeysCount", method = RequestMethod.POST)
+    int queryApplicationKeysCount(@RequestBody ApplicationKeyDto applicationKeyDto);
+}

+ 0 - 49
service-api/src/main/java/com/java110/api/listener/account/DeleteAccountDetailListener.java

@@ -1,49 +0,0 @@
-package com.java110.api.listener.account;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.account.IAccountDetailBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeAccountDetailConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-
-/**
- * 保存小区侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("deleteAccountDetailListener")
-public class DeleteAccountDetailListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private IAccountDetailBMO accountDetailBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
-
-        Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        accountDetailBMOImpl.deleteAccountDetail(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeAccountDetailConstant.DELETE_ACCOUNTDETAIL;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-}

+ 0 - 82
service-api/src/main/java/com/java110/api/listener/account/ListAccountDetailsListener.java

@@ -1,82 +0,0 @@
-package com.java110.api.listener.account;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.listener.AbstractServiceApiListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.dto.accountDetail.AccountDetailDto;
-import com.java110.intf.acct.IAccountDetailInnerServiceSMO;
-import com.java110.utils.constant.ServiceCodeAccountDetailConstant;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 查询小区侦听类
- */
-@Java110Listener("listAccountDetailsListener")
-public class ListAccountDetailsListener extends AbstractServiceApiListener {
-
-    @Autowired
-    private IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl;
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeAccountDetailConstant.LIST_ACCOUNTDETAILS;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.GET;
-    }
-
-
-    @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-
-
-    public IAccountDetailInnerServiceSMO getAccountDetailInnerServiceSMOImpl() {
-        return accountDetailInnerServiceSMOImpl;
-    }
-
-    public void setAccountDetailInnerServiceSMOImpl(IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl) {
-        this.accountDetailInnerServiceSMOImpl = accountDetailInnerServiceSMOImpl;
-    }
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        AccountDetailDto accountDetailDto = BeanConvertUtil.covertBean(reqJson, AccountDetailDto.class);
-
-        int count = accountDetailInnerServiceSMOImpl.queryAccountDetailsCount(accountDetailDto);
-
-        List<AccountDetailDto> accountDetailDtos = null;
-
-        if (count > 0) {
-            accountDetailDtos = accountDetailInnerServiceSMOImpl.queryAccountDetails(accountDetailDto);
-        } else {
-            accountDetailDtos = new ArrayList<>();
-        }
-
-        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, accountDetailDtos);
-
-        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-        context.setResponseEntity(responseEntity);
-
-    }
-}

+ 0 - 82
service-api/src/main/java/com/java110/api/listener/account/ListAccountsListener.java

@@ -1,82 +0,0 @@
-package com.java110.api.listener.account;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.listener.AbstractServiceApiListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.dto.account.AccountDto;
-import com.java110.intf.acct.IAccountInnerServiceSMO;
-import com.java110.utils.constant.ServiceCodeAccountConstant;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 查询小区侦听类
- */
-@Java110Listener("listAccountsListener")
-public class ListAccountsListener extends AbstractServiceApiListener {
-
-    @Autowired
-    private IAccountInnerServiceSMO accountInnerServiceSMOImpl;
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeAccountConstant.LIST_ACCOUNTS;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.GET;
-    }
-
-
-    @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-
-
-    public IAccountInnerServiceSMO getAccountInnerServiceSMOImpl() {
-        return accountInnerServiceSMOImpl;
-    }
-
-    public void setAccountInnerServiceSMOImpl(IAccountInnerServiceSMO accountInnerServiceSMOImpl) {
-        this.accountInnerServiceSMOImpl = accountInnerServiceSMOImpl;
-    }
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        AccountDto accountDto = BeanConvertUtil.covertBean(reqJson, AccountDto.class);
-
-        int count = accountInnerServiceSMOImpl.queryAccountsCount(accountDto);
-
-        List<AccountDto> accountDtos = null;
-
-        if (count > 0) {
-            accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto);
-        } else {
-            accountDtos = new ArrayList<>();
-        }
-
-        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, accountDtos);
-
-        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-        context.setResponseEntity(responseEntity);
-
-    }
-}

+ 0 - 50
service-api/src/main/java/com/java110/api/listener/account/SaveAccountDetailListener.java

@@ -1,50 +0,0 @@
-package com.java110.api.listener.account;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.account.IAccountDetailBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeAccountDetailConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-/**
- * 保存商户侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("saveAccountDetailListener")
-public class SaveAccountDetailListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private IAccountDetailBMO accountDetailBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
-
-        Assert.hasKeyAndValue(reqJson, "acctId", "请求报文中未包含acctId");
-        Assert.hasKeyAndValue(reqJson, "detailType", "请求报文中未包含detailType");
-        Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount");
-        Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-        accountDetailBMOImpl.addAccountDetail(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeAccountDetailConstant.ADD_ACCOUNTDETAIL;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-}

+ 0 - 50
service-api/src/main/java/com/java110/api/listener/account/SaveAccountListener.java

@@ -1,50 +0,0 @@
-package com.java110.api.listener.account;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.account.IAccountBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeAccountConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-/**
- * 保存商户侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("saveAccountListener")
-public class SaveAccountListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private IAccountBMO accountBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
-
-        Assert.hasKeyAndValue(reqJson, "acctName", "请求报文中未包含acctName");
-        Assert.hasKeyAndValue(reqJson, "acctType", "请求报文中未包含acctType");
-        Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount");
-        Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-        accountBMOImpl.addAccount(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeAccountConstant.ADD_ACCOUNT;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-}

+ 0 - 51
service-api/src/main/java/com/java110/api/listener/account/UpdateAccountDetailListener.java

@@ -1,51 +0,0 @@
-package com.java110.api.listener.account;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.account.IAccountDetailBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeAccountDetailConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-/**
- * 保存账户交易侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("updateAccountDetailListener")
-public class UpdateAccountDetailListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private IAccountDetailBMO accountDetailBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-
-        Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空");
-        Assert.hasKeyAndValue(reqJson, "acctId", "请求报文中未包含acctId");
-        Assert.hasKeyAndValue(reqJson, "detailType", "请求报文中未包含detailType");
-        Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount");
-        Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        accountDetailBMOImpl.updateAccountDetail(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeAccountDetailConstant.UPDATE_ACCOUNTDETAIL;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-}

+ 0 - 51
service-api/src/main/java/com/java110/api/listener/account/UpdateAccountListener.java

@@ -1,51 +0,0 @@
-package com.java110.api.listener.account;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.account.IAccountBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeAccountConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-/**
- * 保存账户侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("updateAccountListener")
-public class UpdateAccountListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private IAccountBMO accountBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-
-        Assert.hasKeyAndValue(reqJson, "acctId", "acctId不能为空");
-        Assert.hasKeyAndValue(reqJson, "acctName", "请求报文中未包含acctName");
-        Assert.hasKeyAndValue(reqJson, "acctType", "请求报文中未包含acctType");
-        Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount");
-        Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        accountBMOImpl.updateAccount(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeAccountConstant.UPDATE_ACCOUNT;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-}

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

@@ -0,0 +1,77 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2022-07-15 19:37:19 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 IApplicationKeyV1ServiceDao {
+
+
+    /**
+     * 保存 申请钥匙信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveApplicationKeyInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询申请钥匙信息(instance过程)
+     * 根据bId 查询申请钥匙信息
+     * @param info bId 信息
+     * @return 申请钥匙信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getApplicationKeyInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改申请钥匙信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateApplicationKeyInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询申请钥匙总数
+     *
+     * @param info 申请钥匙信息
+     * @return 申请钥匙数量
+     */
+    int queryApplicationKeysCount(Map info);
+
+}

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

@@ -0,0 +1,112 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.common.dao.IApplicationKeyV1ServiceDao;
+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-07-15 19:37:19 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("applicationKeyV1ServiceDaoImpl")
+public class ApplicationKeyV1ServiceDaoImpl extends BaseServiceDao implements IApplicationKeyV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ApplicationKeyV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存申请钥匙信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveApplicationKeyInfo(Map info) throws DAOException {
+        logger.debug("保存 saveApplicationKeyInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("applicationKeyV1ServiceDaoImpl.saveApplicationKeyInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询申请钥匙信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getApplicationKeyInfo(Map info) throws DAOException {
+        logger.debug("查询 getApplicationKeyInfo 入参 info : {}",info);
+
+        List<Map> businessApplicationKeyInfos = sqlSessionTemplate.selectList("applicationKeyV1ServiceDaoImpl.getApplicationKeyInfo",info);
+
+        return businessApplicationKeyInfos;
+    }
+
+
+    /**
+     * 修改申请钥匙信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateApplicationKeyInfo(Map info) throws DAOException {
+        logger.debug("修改 updateApplicationKeyInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("applicationKeyV1ServiceDaoImpl.updateApplicationKeyInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询申请钥匙数量
+     * @param info 申请钥匙信息
+     * @return 申请钥匙数量
+     */
+    @Override
+    public int queryApplicationKeysCount(Map info) {
+        logger.debug("查询 queryApplicationKeysCount 入参 info : {}",info);
+
+        List<Map> businessApplicationKeyInfos = sqlSessionTemplate.selectList("applicationKeyV1ServiceDaoImpl.queryApplicationKeysCount", info);
+        if (businessApplicationKeyInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessApplicationKeyInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 88 - 0
service-common/src/main/java/com/java110/common/smo/impl/ApplicationKeyV1InnerServiceSMOImpl.java

@@ -0,0 +1,88 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.smo.impl;
+
+
+import com.java110.common.dao.IApplicationKeyV1ServiceDao;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.PageDto;
+import com.java110.dto.machine.ApplicationKeyDto;
+import com.java110.intf.common.IApplicationKeyV1InnerServiceSMO;
+import com.java110.po.applicationKey.ApplicationKeyPo;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2022-07-15 19:37:20 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 ApplicationKeyV1InnerServiceSMOImpl extends BaseServiceSMO implements IApplicationKeyV1InnerServiceSMO {
+
+    @Autowired
+    private IApplicationKeyV1ServiceDao applicationKeyV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveApplicationKey(@RequestBody ApplicationKeyPo applicationKeyPo) {
+        int saveFlag = applicationKeyV1ServiceDaoImpl.saveApplicationKeyInfo(BeanConvertUtil.beanCovertMap(applicationKeyPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int updateApplicationKey(@RequestBody ApplicationKeyPo applicationKeyPo) {
+        int saveFlag = applicationKeyV1ServiceDaoImpl.updateApplicationKeyInfo(BeanConvertUtil.beanCovertMap(applicationKeyPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int deleteApplicationKey(@RequestBody ApplicationKeyPo applicationKeyPo) {
+        applicationKeyPo.setStatusCd("1");
+        int saveFlag = applicationKeyV1ServiceDaoImpl.updateApplicationKeyInfo(BeanConvertUtil.beanCovertMap(applicationKeyPo));
+        return saveFlag;
+    }
+
+    @Override
+    public List<ApplicationKeyDto> queryApplicationKeys(@RequestBody ApplicationKeyDto applicationKeyDto) {
+
+        //校验是否传了 分页信息
+
+        int page = applicationKeyDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            applicationKeyDto.setPage((page - 1) * applicationKeyDto.getRow());
+        }
+
+        List<ApplicationKeyDto> applicationKeys = BeanConvertUtil.covertBeanList(applicationKeyV1ServiceDaoImpl.getApplicationKeyInfo(BeanConvertUtil.beanCovertMap(applicationKeyDto)), ApplicationKeyDto.class);
+
+        return applicationKeys;
+    }
+
+
+    @Override
+    public int queryApplicationKeysCount(@RequestBody ApplicationKeyDto applicationKeyDto) {
+        return applicationKeyV1ServiceDaoImpl.queryApplicationKeysCount(BeanConvertUtil.beanCovertMap(applicationKeyDto));
+    }
+
+}

+ 4 - 2
service-community/src/main/java/com/java110/community/cmd/communitys/QueryStoreCommunitysCmd.java

@@ -15,6 +15,7 @@ import com.java110.utils.constant.MappingConstant;
 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 com.java110.core.log.LoggerFactory;
@@ -38,15 +39,16 @@ public class QueryStoreCommunitysCmd extends Cmd {
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
 
-        String storeId = cmdDataFlowContext.getReqHeaders().get("store-id");
 
-        Assert.hasLength(storeId, "未包含商户");
     }
 
     @Override
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         String storeId = cmdDataFlowContext.getReqHeaders().get("store-id");
 
+        if(StringUtil.isEmpty(storeId)){
+            storeId = reqJson.getString("memberId");
+        }
         StoreDto storeDto = new StoreDto();
         storeDto.setStoreId(storeId);
         storeDto.setPage(1);