java110-bean/src/main/java/com/java110/po/applicationKey/ApplicationKeyPo.java
@@ -26,6 +26,8 @@ private String endTime; private String typeFlag; private String pwd; private String statusCd; public String getApplicationKeyId() { @@ -139,4 +141,12 @@ public void setPwd(String pwd) { this.pwd = pwd; } public String getStatusCd() { return statusCd; } public void setStatusCd(String statusCd) { this.statusCd = statusCd; } } java110-db/src/main/resources/mapper/common/ApplicationKeyV1ServiceDaoImplMapper.xml
New file @@ -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> 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} java110-interface/src/main/java/com/java110/intf/common/IApplicationKeyV1InnerServiceSMO.java
New file @@ -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); } service-api/src/main/java/com/java110/api/listener/account/DeleteAccountDetailListener.java
File was deleted service-api/src/main/java/com/java110/api/listener/account/ListAccountDetailsListener.java
File was deleted service-api/src/main/java/com/java110/api/listener/account/ListAccountsListener.java
File was deleted service-api/src/main/java/com/java110/api/listener/account/SaveAccountDetailListener.java
File was deleted service-api/src/main/java/com/java110/api/listener/account/SaveAccountListener.java
File was deleted service-api/src/main/java/com/java110/api/listener/account/UpdateAccountDetailListener.java
File was deleted service-api/src/main/java/com/java110/api/listener/account/UpdateAccountListener.java
File was deleted service-common/src/main/java/com/java110/common/dao/IApplicationKeyV1ServiceDao.java
New file @@ -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); } service-common/src/main/java/com/java110/common/dao/impl/ApplicationKeyV1ServiceDaoImpl.java
New file @@ -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()); } } service-common/src/main/java/com/java110/common/smo/impl/ApplicationKeyV1InnerServiceSMOImpl.java
New file @@ -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)); } } service-community/src/main/java/com/java110/community/cmd/communitys/QueryStoreCommunitysCmd.java
@@ -15,6 +15,7 @@ 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 @@ @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);