101captain
2021-11-23 f82821e697cb59bcdf5a0b77dd8eedfadfbe77ae
房屋租赁相关代码提交
10个文件已修改
82个文件已添加
6618 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/RentingHourseOrderApi.java 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/RentingHoursePreOrderApi.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/RentingHousesApi.java 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/model/vos/LoginRequest.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/RentingHousesContractConfigApi.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/NearbyDTO.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/PageRentingHouseRegisterDTO.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/PageRentingHousesConfigDTO.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/ReleaseOrCancelHouseDTO.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/RentingHouseRegisterDTO.java 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/RentingHousesConfigDTO.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/OrderStatics.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/PayOrderVO.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/PreOrderStatics.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/RentingHourseOrderVO.java 252 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/RentingHoursePreOrderVO.java 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/WxPayNotifyOrderVO.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/WxPayOrderVO.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentingHouses/RentingHouseRegisterVO.java 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentingHouses/RentingHousesConfigVO.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/CommunityBackstageApplication.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/RentingHourseOrderApi.java 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/RentingHoursePreOrderApi.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/RentingHousesApi.java 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/pom.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseFileApi.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseLabelApi.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseOrderApi.java 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHoursePayingOrderApi.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHoursePreOrderApi.java 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseRefundOrderApi.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseRegisterApi.java 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseReturnOrderApi.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHousesContractConfigApi.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/RabbitmqConfig.java 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseContractConfigDao.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseFileDao.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseLabelDao.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseOrderDao.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHoursePayingOrderDao.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHoursePreOrderDao.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseRefundOrderDao.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseRegisterDao.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseReturnOrderDao.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseContractConfig.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseFile.java 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseLabel.java 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseOrder.java 287 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHoursePayingOrder.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHoursePreOrder.java 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseRefundOrder.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseRegister.java 355 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseReturnOrder.java 173 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/message/OrderMessage.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/message/PreOrderMessage.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseContractConfigService.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseFileService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseLabelService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseOrderService.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHoursePayingOrderService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHoursePreOrderService.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseRefundOrderService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseRegisterService.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseReturnOrderService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseContractConfigServiceImpl.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseFileServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseLabelServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseOrderServiceImpl.java 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHoursePayingOrderServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHoursePreOrderServiceImpl.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseRefundOrderServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseRegisterServiceImpl.java 428 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseReturnOrderServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/NearbyUtil.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/WxMaConfiguration.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/WxMaProperties.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseContractConfigMapper.xml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseFileMapper.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseLabelMapper.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseOrderMapper.xml 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHoursePayingOrderMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHoursePreOrderMapper.xml 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseRefundOrderMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseRegisterMapper.xml 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseReturnOrderMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java
@@ -2,9 +2,15 @@
import javax.annotation.Resource;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.applets.config.WxMaConfiguration;
@@ -73,16 +79,40 @@
            }
        }
        log.info("微信登录成功【{}】", JSONObject.toJSONString(sessionInfo));
        log.info("loginRequest参数【{}】", JSONObject.toJSONString(loginRequest));
        String openid = sessionInfo.getOpenid();
        String sessionKey = sessionInfo.getSessionKey();
        String unionid = sessionInfo.getUnionid();
        if (ObjectUtils.isEmpty(unionid)) {
            unionid = "无";
        // 解密用户信息
        WxMaUserInfo wxUserInfo = maService.getUserService().getUserInfo(sessionKey,
                loginRequest.getEncryptedData(), loginRequest.getIv());
        log.info("wxUserInfo信息【{}】", JSONObject.toJSONString(wxUserInfo));
        if (null == wxUserInfo) {
            return R.fail("获取用户信息失败");
        }
        userService.addOrUpdate(openid, sessionKey, unionid);
        String unionId = wxUserInfo.getUnionId();
        if (ObjectUtils.isEmpty(unionId)) {
            unionId = "无";
        }
        userService.addOrUpdate(openid, sessionKey, unionId);
        return tokenService.loginApplets(openid);
    }
    @ApiOperation(value = "H5登录", response = LoginReturnVO.class)
    @PostMapping("loginH5")
    public R loginH5(@RequestBody LoginRequest loginRequest) {
        String unionId = loginRequest.getUnionId();
        if (StringUtils.isBlank(unionId)) {
            return R.fail("缺少基本信息参数");
        }
        //通过unionId去匹配user
        R r1 = userService.getUserInfoByUnionId(unionId);
        if (R.isOk(r1)) {
            LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r1.getData()), LoginUserInfoVO.class);
            return tokenService.loginApplets(loginUserInfoVO.getOpenid());
        }
        return r1;
    }
    @ApiOperation(value = "维护用户基本信息(昵称、性别、头像)")
    @PostMapping("updateUserWeiXinInfo")
    public R updateUserWeiXinInfo(@RequestBody LoginRequest loginRequest) {
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/RentingHourseOrderApi.java
New file
@@ -0,0 +1,114 @@
package com.panzhihua.applets.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayNotifyOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayOrderVO;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * 房屋租赁-房屋订单表(RentingHourseOrder)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:46:57
 */
@RestController
@Slf4j
@Api(tags = {"房屋租赁普通订单相关接口"})
@RequestMapping("rentingHourseOrder")
public class RentingHourseOrderApi extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private CommunityService communityService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询所有数据",response = RentingHourseOrderVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        commonPage.setCommunityId(this.getCommunityId());
        return communityService.selectRentingHourseOrderAll(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "分页查询所有数据")
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return communityService.selectRentingHourseOrderOne(id);
    }
    /**
     * 新增数据
     *
     * @param rentingHourseOrder 实体对象
     * @return 新增结果
     */
    @ApiOperation("创建订单")
    @PostMapping
    public R insert(@RequestBody RentingHourseOrderVO rentingHourseOrder) {
        rentingHourseOrder.setCommunityId(this.getCommunityId());
        return communityService.insertRentingHourseOrder(rentingHourseOrder);
    }
    /**
     * 修改数据
     *
     * @param rentingHourseOrdervo 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody RentingHourseOrderVO rentingHourseOrdervo) {
        return communityService.updateRentingHourseOrder(rentingHourseOrdervo);
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @ApiOperation("删除")
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return communityService.deleteRentingHourseOrder(id);
    }
    /**
     * 支付回调处理订单状态以及房屋状态
     */
    @ApiOperation("支付回调处理订单状态以及房屋状态")
    @PostMapping("/wxNotify")
    public R wxNotify(@RequestBody WxPayNotifyOrderVO wxPayNotifyOrderVO){
        return communityService.wxNotifyRentingHourseOrder(wxPayNotifyOrderVO);
    }
    /**
     * 支付付款
     */
    @ApiOperation("支付付款")
    @PostMapping("/wxPay")
    public R wxPay(@RequestBody WxPayOrderVO wxPayOrderVO){
        return communityService.wxPayRentingHourseOrder(wxPayOrderVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/RentingHoursePreOrderApi.java
New file
@@ -0,0 +1,95 @@
package com.panzhihua.applets.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * 房屋租赁-房屋定金订单表(RentingHoursePreOrder)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:47:54
 */
@RestController
@Slf4j
@Api(tags = {"房屋租赁定金订单相关接口"})
@RequestMapping("rentingHoursePreOrder")
public class RentingHoursePreOrderApi extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private CommunityService communityService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询",response = RentingHoursePreOrderVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        commonPage.setCommunityId(this.getCommunityId());
        return communityService.selectAllRentingHoursePreOrder(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "详情",response = RentingHoursePreOrderVO.class)
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return communityService.selectOneRentingHoursePreOrder(id);
    }
    /**
     * 新增数据
     *
     * @param rentingHoursePreOrderVO 实体对象
     * @return 新增结果
     */
    @ApiOperation(value = "创建定金订单")
    @PostMapping
    public R insert(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO) {
        rentingHoursePreOrderVO.setCommunityId(this.getCommunityId());
        return communityService.insertRentingHoursePreOrder(rentingHoursePreOrderVO);
    }
    /**
     * 修改数据
     *
     * @param rentingHoursePreOrderVO 实体对象
     * @return 修改结果
     */
    @ApiOperation("修改")
    @PostMapping("/update")
    public R update(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO) {
       return communityService.updateRentingHoursePreOrder(rentingHoursePreOrderVO);
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @ApiOperation("删除数据")
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return communityService.deleteRentingHoursePreOrder(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/RentingHousesApi.java
New file
@@ -0,0 +1,205 @@
package com.panzhihua.applets.api;
import java.util.Objects;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.dtos.community.rentingHouses.NearbyDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.ReleaseOrCancelHouseDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHouseRegisterDTO;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO;
import com.panzhihua.common.model.vos.community.rentingHouses.RentingHousesConfigVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.utlis.TencentUtils;
import com.panzhihua.common.validated.AddGroup;
import com.panzhihua.common.validated.PutGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
/**
 * @title: RentingHousesApi
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 房屋租赁相关接口
 * @author: hans
 * @date: 2021/11/24 10:18
 */
@RestController
@Slf4j
@Api(tags = {"房屋租赁相关接口"})
@RequestMapping("/renting/houses")
public class RentingHousesApi extends BaseController {
    private static final int NOT_COMMUNITY_WORKER = 2;
    @Resource
    private CommunityService communityService;
    @Resource
    private UserService userService;
    @ApiOperation("新增房源信息")
    @PostMapping("/register")
    public R registerRentingHouse(@RequestBody @Validated(AddGroup.class) RentingHouseRegisterDTO registerDTO) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        checkIsCommunityWorker(loginUserInfo);
        registerDTO.setUserId(loginUserInfo.getUserId());
        registerDTO.setCommunityId(loginUserInfo.getCommunityId());
        return communityService.registerRentingHouse(registerDTO);
    }
    @ApiOperation("编辑房源信息")
    @PostMapping("/update")
    public R updateRentingHouse(@RequestBody @Validated(PutGroup.class) RentingHouseRegisterDTO registerDTO) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        checkIsCommunityWorker(loginUserInfo);
        registerDTO.setUserId(loginUserInfo.getUserId());
        registerDTO.setCommunityId(loginUserInfo.getCommunityId());
        return communityService.updateRentingHouse(registerDTO);
    }
    @ApiOperation(value = "工作人员-分页获取房源信息", response = RentingHouseRegisterVO.class)
    @PostMapping("/pageAdmin")
    public R pageRentingHouse(@RequestBody @Valid PageRentingHouseRegisterDTO pageRegisterDTO) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        pageRegisterDTO.setCommunityId(loginUserInfo.getCommunityId());
        return communityService.pageRentingHouse(pageRegisterDTO);
    }
    @ApiOperation("发布/取消发布 房源信息")
    @PutMapping("/releaseOrCancel")
    public R releaseOrCancelHouse(@RequestBody @Valid ReleaseOrCancelHouseDTO releaseOrCancelHouseDTO) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        checkIsCommunityWorker(loginUserInfo);
        return communityService.releaseOrCancelHouse(releaseOrCancelHouseDTO);
    }
    @ApiOperation(value = "获取详情-房源信息", response = RentingHouseRegisterVO.class)
    @GetMapping("/get")
    @ApiImplicitParam(name = "registerId", value = "房源登记id", required = true)
    public R getRentingHouse(@RequestParam("registerId") Long registerId) {
        LoginUserInfoVO loginUserInfoSureNoLogin = getLoginUserInfoSureNoLogin();
        Integer isLandlord = 2;
        R rentingHouseR = communityService.getRentingHouse(registerId);
        if (R.isOk(rentingHouseR)) {
            RentingHouseRegisterVO houseRegisterVO = JSONObject.parseObject(JSONObject.toJSONString(rentingHouseR.getData()), RentingHouseRegisterVO.class);
            if (Objects.nonNull(loginUserInfoSureNoLogin)) {
                String userId = loginUserInfoSureNoLogin.getUserId().toString();
                R<LoginUserInfoVO> infoVOR = userService.getUserInfoByUserId(userId);
                if (R.isOk(infoVOR)) {
                    LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(infoVOR.getData()), LoginUserInfoVO.class);
                    if (houseRegisterVO.getHourseIdCard().equals(loginUserInfoVO.getIdCard())) {
                        isLandlord = 1;
                    }
                }
            }
            houseRegisterVO.setIsLandlord(isLandlord);
            return R.ok(houseRegisterVO);
        }
        return rentingHouseR;
    }
    @ApiOperation("房源认证获取eidToken")
    @GetMapping("/getEidToken")
    public R getEidToken(@RequestParam("registerId") Long registerId){
        R r=communityService.getRentingHouse(registerId);
        if(R.isOk(r)){
            RentingHouseRegisterVO registerVO=JSONObject.parseObject(JSONObject.toJSONString(r.getData()),RentingHouseRegisterVO.class);
            String result=TencentUtils.getEidToken(registerVO.getHourseOwnerName(),registerVO.getHourseIdCard());
            return R.ok(result);
        }
        return R.fail();
    }
    @ApiOperation("房源认证")
    @GetMapping("/auth")
    public R authHouse(@RequestParam("registerId") Long registerId,@RequestParam("result")String result){
        R r=communityService.getRentingHouse(registerId);
        if(R.isOk(r)){
            String response=TencentUtils.getEidResult(result);
            JSONObject object = JSON.parseObject(response);
            if (object == null) {
                return R.fail("核验失败");
            }
            JSONObject textObject = object.getJSONObject("Text");
            String code = textObject.getString("ErrCode");
            if (!code.equals("0")) {
                log.error("人脸核验失败,错误原因:" + textObject.toJSONString());
                return R.fail("核验失败");
            }
            RentingHouseRegisterDTO registerDTO=new RentingHouseRegisterDTO();
            registerDTO.setId(registerId);
            registerDTO.setAuthStatus(2);
            registerDTO.setDetailStatus(2);
            return communityService.updateRentingHouse(registerDTO);
        }
        return R.fail();
    }
    /**
     * 附近的房源
     */
    @ApiOperation(value = "附近的房源",response =RentingHouseRegisterVO.class)
    @PostMapping("/nearby")
    public R nearby(@RequestBody NearbyDTO nearbyDTO){
        return communityService.nearby(nearbyDTO);
    }
    /**
     * 小程序分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    @ApiOperation(value = "小程序分页获取房源信息",response =RentingHouseRegisterVO.class)
    @PostMapping("/houseList")
    public R pageRentingHouseApplet(@RequestBody PageRentingHouseRegisterDTO pageRegisterDTO) {
        Integer isMy = pageRegisterDTO.getIsMy();
        if (Objects.nonNull(isMy) && isMy.intValue() == 1) {
            pageRegisterDTO.setCurrentUserId(getUserId());
        }
        return communityService.pageRentingHouseApplet(pageRegisterDTO);
    }
    @ApiOperation(value = "获取房屋租赁配置",response = RentingHousesConfigVO.class)
    @GetMapping("/getConfig")
    @ApiImplicitParam(name = "type", value = "配置类型(1.房屋租赁合同 2.租赁合同变更协议 3.定金协议 4.房屋委托代理合同" +
            "5.平台须知 6.房源标签)", required = true)
    public R getRentingHouseConfig(@RequestParam("type") Integer type) {
        return communityService.getRentingHouseConfig(type);
    }
    @ApiOperation("删除房源信息")
    @DeleteMapping("/delete")
    @ApiImplicitParam(name = "registerId", value = "房源登记id", required = true)
    public R deleteRentingHouse(@RequestParam("registerId") Long registerId) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        checkIsCommunityWorker(loginUserInfo);
        return communityService.deleteRentingHouse(registerId);
    }
    private void checkIsCommunityWorker(LoginUserInfoVO loginUserInfo) {
        if (loginUserInfo.getIsCommunityWorker().intValue() == NOT_COMMUNITY_WORKER) {
            throw new ServiceException("401", "暂无权限");
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java
@@ -6,12 +6,14 @@
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.panzhihua.common.constants.HttpStatus;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.data.redis.core.StringRedisTemplate;
@@ -96,6 +98,10 @@
            Object data = r.getData();
            if (!ObjectUtils.isEmpty(data)) {
                LoginUserInfoVO loginUserInfoVO = (LoginUserInfoVO)data;
                //是否保存unionid
//                if (Objects.isNull(loginUserInfoVO.getUnionid()) || "无".equals(loginUserInfoVO.getUnionid())) {
//                    return R.fail(HttpStatus.UNAUTHORIZED, "token过期");
//                }
                R r1 = communityService.detailHouse(userId);
                if(StringUtils.isNotEmpty(loginUserInfoVO.getIdCard())){
                    //查询实名用户绑定的实有人口地址
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/model/vos/LoginRequest.java
@@ -33,4 +33,7 @@
    @ApiModelProperty(name = "userInfo", value = "用户基本信息")
    WxMaUserInfo userInfo;
    @ApiModelProperty(name = "unionId", value = "用户平台唯一标识")
    String unionId;
}
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/RentingHousesContractConfigApi.java
New file
@@ -0,0 +1,50 @@
package com.panzhihua.applets_backstage.api;
import javax.annotation.Resource;
import javax.validation.Valid;
import com.panzhihua.common.controller.BaseController;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHousesConfigDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHousesConfigDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentingHouses.RentingHousesConfigVO;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.ApiOperation;
/**
 * @title: RentingHousesContractConfigApi
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 房屋租赁配置相关接口
 * @author: hans
 * @date: 2021/11/23 13:32
 */
@RestController
@Api(tags = {"房屋租赁配置"})
@RequestMapping("/rentingHousesConfig")
public class RentingHousesContractConfigApi extends BaseController {
    @Resource
    private CommunityService communityService;
    @PostMapping("/page")
    @ApiOperation(value = "分页查询房屋租赁基础配置", response = RentingHousesConfigVO.class)
    public R pageRentingHousesConfig(@RequestBody @Valid PageRentingHousesConfigDTO pageRentingHousesConfigDTO) {
        return communityService.pageRentingHousesConfig(pageRentingHousesConfigDTO);
    }
    @PutMapping("/update")
    @ApiOperation("更新配置信息")
    public R updateRentingHousesConfig(@RequestBody @Valid RentingHousesConfigDTO rentingHousesConfigDTO) {
        rentingHousesConfigDTO.setUserId(getUserId());
        return communityService.updateRentingHousesConfig(rentingHousesConfigDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/NearbyDTO.java
New file
@@ -0,0 +1,21 @@
package com.panzhihua.common.model.dtos.community.rentingHouses;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel
public class NearbyDTO {
    @ApiModelProperty("经度")
    private String longitude;
    @ApiModelProperty("纬度")
    private String latitude;
    @ApiModelProperty("距离(千米)")
    private Integer distance;
    @ApiModelProperty("关键字")
    private String keyword;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/PageRentingHouseRegisterDTO.java
New file
@@ -0,0 +1,91 @@
package com.panzhihua.common.model.dtos.community.rentingHouses;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
 * @title: PageRentingHouseRegisterDTO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 分页查询房屋租赁信息
 * @author: hans
 * @date: 2021/11/24 16:07
 */
@Data
@ApiModel("分页查询房屋租赁信息请求参数")
public class PageRentingHouseRegisterDTO {
    @ApiModelProperty(value = "关键字")
    private String keyword;
    @ApiModelProperty(value = "户型(室数量)")
    private Integer brn;
    @ApiModelProperty(value = "更多户型(x室以上此值应传入1)")
    private Integer moreBrn;
    @ApiModelProperty(value = "装修情况(1.毛坯房 2.简装 3.精装修)")
    private Integer decoration;
    @ApiModelProperty(value = "朝向(1.东 2.南 3.西 4.北 5.东南 6.东北 7.西南 8.西北 9.南北 10.东西)")
    private Integer orientation;
    @ApiModelProperty(value = "最小面积")
    private BigDecimal minArea;
    @ApiModelProperty(value = "最大面积")
    private BigDecimal maxArea;
    @ApiModelProperty(value = "最低租金")
    private BigDecimal minRentMoney;
    @ApiModelProperty(value = "最高租金")
    private BigDecimal maxRentMoney;
    @ApiModelProperty(value = "房屋状态(1、待发布 2、待出租 3、出租中 4、已退租")
    @NotNull(message = "房屋状态不能为空")
    private Integer status;
    @ApiModelProperty(value = "1、待认证 2、待发布 3、待出租 4、保留中 5、出租中 6、已超时 7、已到期)")
    private Integer detailStatus;
    @ApiModelProperty(value = "到期时间-起")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date expireDateBegin;
    @ApiModelProperty(value = "到期时间-止")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date expireDateEnd;
    @ApiModelProperty(value = "分页-当前页数", example = "1")
    @NotNull(message = "分页参数不能为空")
    private Long pageNum;
    @ApiModelProperty(value = "分页-每页记录数", example = "10")
    @NotNull(message = "分页参数不能为空")
    private Long pageSize;
    @ApiModelProperty(value = "社区id", hidden = true)
    private Long communityId;
    @ApiModelProperty("排序条件 1距离远到近 2 近到远 3 租金高到低 4 租金低到高")
    private Integer sort;
    @ApiModelProperty(value = "房屋的经度")
    private String longitude;
    @ApiModelProperty(value = "房屋的纬度")
    private String latitude;
    @ApiModelProperty("我的房源时传入1")
    private Integer isMy;
    @ApiModelProperty(value = "当前用户id", hidden = true)
    private Long currentUserId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/PageRentingHousesConfigDTO.java
New file
@@ -0,0 +1,27 @@
package com.panzhihua.common.model.dtos.community.rentingHouses;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: PageRentingHousesConfigDTO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description:
 * @author: hans
 * @date: 2021/11/23 13:42
 */
@Data
@ApiModel("分页查询房屋租赁配置请求参数")
public class PageRentingHousesConfigDTO {
    @ApiModelProperty(value = "分页-当前页数", example = "1")
    @NotNull(message = "分页参数不能为空")
    private Long pageNum;
    @ApiModelProperty(value = "分页-每页记录数", example = "10")
    @NotNull(message = "分页参数不能为空")
    private Long pageSize;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/ReleaseOrCancelHouseDTO.java
New file
@@ -0,0 +1,31 @@
package com.panzhihua.common.model.dtos.community.rentingHouses;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: ReleaseOrCancelHouseDTO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 发布/取消发布 房源信息请求参数
 * @author: hans
 * @date: 2021/11/25 11:10
 */
@Data
@ApiModel("发布/取消发布 房源信息请求参数")
public class ReleaseOrCancelHouseDTO {
    @ApiModelProperty(value = "请求类型(1.发布 2.取消)", allowableValues = "1,2", required = true)
    @NotNull(message = "请求类型不能为空")
    @Min(1)
    @Max(2)
    private Integer type;
    @ApiModelProperty(value = "房源登记id", required = true)
    @NotNull(message = "房源登记id不能为空")
    private Long registerId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/RentingHouseRegisterDTO.java
New file
@@ -0,0 +1,169 @@
package com.panzhihua.common.model.dtos.community.rentingHouses;
import java.math.BigDecimal;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import com.panzhihua.common.validated.AddGroup;
import com.panzhihua.common.validated.PutGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: RentingHouseRegisterDTO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 房源登记请求类
 * @author: hans
 * @date: 2021/11/24 10:26
 */
@Data
@ApiModel("房源登记请求类")
public class RentingHouseRegisterDTO {
    @ApiModelProperty("id")
    @NotNull(groups = PutGroup.class, message = "id不能为空")
    private Long id;
    @ApiModelProperty(value = "地址")
    @NotBlank(groups = AddGroup.class, message = "地址不能为空")
    private String address;
    @ApiModelProperty(value = "小区名称")
    @NotBlank(groups = AddGroup.class, message = "小区名称不能为空")
    private String villageName;
    @ApiModelProperty(value = "街/路/巷")
    @NotBlank(groups = AddGroup.class, message = "街/路/巷不能为空")
    private String alley;
    @ApiModelProperty(value = "街/路/巷号")
    @NotBlank(groups = AddGroup.class, message = "街/路/巷号不能为空")
    private String houseNum;
    @ApiModelProperty(value = "楼栋号")
    private String buildingNo;
    @ApiModelProperty(value = "单元号")
    private String unitNo;
    @ApiModelProperty(value = "楼层号")
    private String floor;
    @ApiModelProperty(value = "户室(房间号)")
    private String houseNo;
    @ApiModelProperty(value = "看房电话")
    @Pattern(groups = {AddGroup.class}, message = "看房电话格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$")
    private String seeHourseTelephone;
    @ApiModelProperty(value = "租房标题")
    @NotBlank(groups = AddGroup.class, message = "租房标题不能为空")
    private String title;
    @ApiModelProperty(value = "室数量")
    @NotNull(groups = {AddGroup.class}, message = "室数量不能为空")
    private Integer brn;
    @ApiModelProperty(value = "厅数量")
    @NotNull(groups = {AddGroup.class}, message = "厅数量不能为空")
    private Integer lrn;
    @ApiModelProperty(value = "卫数量")
    @NotNull(groups = {AddGroup.class}, message = "卫数量不能为空")
    private Integer wcn;
    @ApiModelProperty(value = "月租金")
    @NotNull(groups = {AddGroup.class}, message = "月租金不能为空")
    private BigDecimal monthlyRentMoney;
    @ApiModelProperty(value = "保证金")
    @NotNull(groups = {AddGroup.class}, message = "保证金不能为空")
    private BigDecimal depositMoney;
    @ApiModelProperty(value = "服务费")
    @NotNull(groups = {AddGroup.class}, message = "服务费不能为空")
    private BigDecimal serverCharge;
    @ApiModelProperty(value = "定金")
    @NotNull(groups = {AddGroup.class}, message = "定金不能为空")
    private BigDecimal dingMoney;
    @ApiModelProperty(value = "建筑面积")
    private BigDecimal constructArea;
    @ApiModelProperty(value = "总楼层")
    @NotBlank(groups = AddGroup.class, message = "总楼层不能为空")
    private String totalFloor;
    @ApiModelProperty(value = "朝向(1东2南3西4北5东南6东北7西南8西北9南北10东西)")
    private Integer orientation;
    @ApiModelProperty(value = "装修情况(1.毛坯房 2.简装 3.精装修)")
    @NotNull(groups = {AddGroup.class}, message = "装修情况不能为空")
    private Integer decoration;
    @ApiModelProperty(value = "看房时间(1.随时看房 2.提前预约)")
    @NotNull(groups = {AddGroup.class}, message = "看房时间不能为空")
    private Integer seeHourseDate;
    @ApiModelProperty(value = "房源介绍")
    private String hourseDescription;
    @ApiModelProperty(value = "入住要求")
    private String checkInRequirement;
    @ApiModelProperty(value = "房内物品")
    private String hourseItem;
    @ApiModelProperty(value = "房屋标签(多个逗号隔开)")
    private String label;
    @ApiModelProperty(value = "房主姓名")
    @NotBlank(groups = AddGroup.class, message = "房主姓名不能为空")
    private String hourseOwnerName;
    @ApiModelProperty(value = "房主身份证")
    @NotBlank(groups = AddGroup.class, message = "房主身份证不能为空")
    private String hourseIdCard;
    @ApiModelProperty(value = "房主电话")
    @Pattern(groups = {AddGroup.class}, message = "房主电话格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$")
    private String hoursePhone;
    @ApiModelProperty(value = "房屋的经度")
    @NotBlank(groups = AddGroup.class, message = "房屋的经度不能为空")
    private String longitude;
    @ApiModelProperty(value = "房屋的纬度")
    @NotBlank(groups = AddGroup.class, message = "房屋的纬度不能为空")
    private String latitude;
    @ApiModelProperty(value = "房源图片")
    private List<String> housePictures;
    @ApiModelProperty(value = "产权证明")
    @NotEmpty(groups = {AddGroup.class}, message = "产权证明不能为空")
    private List<String> propertyPictures;
    @ApiModelProperty(value = "证件照片")
    @NotEmpty(groups = {AddGroup.class}, message = "证件照片不能为空")
    private List<String> credentialsPictures;
    @ApiModelProperty(value = "当前用户", hidden = true)
    private Long userId;
    @ApiModelProperty(value = "社区id", hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "认证状态(1、未认证2、已认证)", hidden = true)
    private Integer authStatus;
    @ApiModelProperty(value = "1、待认证2、待发布3、待出租4、保留中 5出租中6、已超时7、已到期)", hidden = true)
    private Integer detailStatus;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/rentingHouses/RentingHousesConfigDTO.java
New file
@@ -0,0 +1,32 @@
package com.panzhihua.common.model.dtos.community.rentingHouses;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: RentingHousesConfigDTO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 房屋租赁配置请求参数
 * @author: hans
 * @date: 2021/11/23 13:54
 */
@Data
@ApiModel("房屋租赁配置请求参数")
public class RentingHousesConfigDTO {
    @ApiModelProperty("id")
    @NotNull(message = "id不能为空")
    private Long id;
    @ApiModelProperty("配置内容(标签类型用逗号隔开)")
    @NotBlank(message = "配置内容为空")
    private String value;
    @ApiModelProperty(value = "当前用户", hidden = true)
    private Long userId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/OrderStatics.java
New file
@@ -0,0 +1,28 @@
package com.panzhihua.common.model.vos.community.rentHouse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
 * @author zzj
 */
@Data
@ApiModel
public class OrderStatics {
    @ApiModelProperty("总订单金额")
    private BigDecimal allOrder;
    @ApiModelProperty("租金总金额")
    private BigDecimal allRent;
    @ApiModelProperty("服务费总金额")
    private BigDecimal allService;
    @ApiModelProperty("保证金总金额")
    private BigDecimal allBond;
    @ApiModelProperty("服务费收益")
    private BigDecimal serviceProfit;
    @ApiModelProperty("保证金余额")
    private BigDecimal bondProfit;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/PayOrderVO.java
New file
@@ -0,0 +1,25 @@
package com.panzhihua.common.model.vos.community.rentHouse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel
public class PayOrderVO {
    @ApiModelProperty("订单支付类型 1.定金订单 2.退款订单 3.普通订单")
    private Integer type;
    private String orderNo;
    /**
     * 订单支付类型  1.定金订单 2.退款订单 3.普通订单
     */
    public interface type{
        int dj=1;
        int tk=2;
        int pt=3;
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/PreOrderStatics.java
New file
@@ -0,0 +1,25 @@
package com.panzhihua.common.model.vos.community.rentHouse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
 * @author zzj
 */
@Data
@ApiModel
public class PreOrderStatics {
    @ApiModelProperty("总定金金额")
    private BigDecimal allOrder;
    @ApiModelProperty("定金退款总额")
    private BigDecimal allRefuse;
    @ApiModelProperty("退款数")
    private BigDecimal refuseNum;
    @ApiModelProperty("已结算定金")
    private BigDecimal settledOrder;
    @ApiModelProperty("待抵扣定金")
    private BigDecimal deductOrder;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/RentingHourseOrderVO.java
New file
@@ -0,0 +1,252 @@
package com.panzhihua.common.model.vos.community.rentHouse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
 * @author zzj
 */
@Data
@ApiModel
public class RentingHourseOrderVO {
    private Long id;
    /**
     * 街道ID
     */
    @ApiModelProperty(value = "街道ID")
    private Long streetId;
    /**
     * 小区id
     */
    @ApiModelProperty(value = "小区id")
    private Long villageId;
    /**
     * 社区id
     */
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    /**
     * 小区名称
     */
    @ApiModelProperty(value = "小区名称")
    private String villageName;
    /**
     * 订单类型(1、新订单2、续租订单)
     */
    @ApiModelProperty(value = "订单类型(1、新订单2、续租订单)")
    private Integer orderType;
    /**
     * 续租订单的原订单号
     */
    @ApiModelProperty(value = "续租订单的原订单号")
    private String originOrderSn;
    /**
     * 订单SN号
     */
    @ApiModelProperty(value = "订单SN号")
    private String orderSn;
    /**
     * 交易流水号
     */
    @ApiModelProperty(value = "交易流水号")
    private String paySn;
    /**
     * 租赁月数(多少个月)
     */
    @ApiModelProperty(value = "租赁月数(多少个月)")
    private Integer rentingMonth;
    /**
     * 建筑面积
     */
    @ApiModelProperty(value = "建筑面积")
    private String constructArea;
    /**
     * 房型
     */
    @ApiModelProperty(value = "房型")
    private String roomType;
    /**
     * 月租金
     */
    @ApiModelProperty(value = "月租金")
    private BigDecimal monthlyRentMoney;
    /**
     * 保证金
     */
    @ApiModelProperty(value = "保证金")
    private BigDecimal depositAmount;
    /**
     * 服务费
     */
    @ApiModelProperty(value = "服务费")
    private BigDecimal serverCharge;
    /**
     * 定金
     */
    @ApiModelProperty(value = "定金")
    private BigDecimal dingAmount;
    /**
     * 支付定金的订单号
     */
    @ApiModelProperty(value = "支付定金的订单号")
    private String preOrderSn;
    /**
     * 支付的定金的订单备注
     */
    @ApiModelProperty(value = "支付的定金的订单备注")
    private String preOrderNote;
    /**
     * 订单是否已经平台结算
     */
    @ApiModelProperty(value = "订单是否已经平台结算")
    private String settingFlag;
    /**
     * 结算金额
     */
    @ApiModelProperty(value = "结算金额")
    private BigDecimal settingAmount;
    /**
     * 计算订单号
     */
    @ApiModelProperty(value = "计算订单号")
    private String settingSn;
    /**
     * 平台结算时间
     */
    @ApiModelProperty(value = "平台结算时间")
    private Date settingDate;
    /**
     * 总楼层
     */
    @ApiModelProperty(value = "总楼层")
    private String totalFloor;
    /**
     * 朝向
     */
    @ApiModelProperty(value = "朝向")
    private String orientation;
    /**
     * 装饰
     */
    @ApiModelProperty(value = "装饰")
    private String decoration;
    /**
     * 房内物品
     */
    @ApiModelProperty(value = "房内物品")
    private String hourseItem;
    /**
     * 房主姓名
     */
    @ApiModelProperty(value = "房主姓名")
    private String hourseOwnerName;
    /**
     * 房主身份证
     */
    @ApiModelProperty(value = "房主身份证")
    private String hourseIdCard;
    /**
     * 房主电话
     */
    @ApiModelProperty(value = "房主电话")
    private String hoursePhone;
    /**
     * 租客的用户ID,微信用户类型
     */
    @ApiModelProperty(value = "租客的用户ID,微信用户类型")
    private Long rentingUserId;
    /**
     * 租赁开始时间
     */
    @ApiModelProperty(value = "租赁开始时间")
    private Date startDate;
    /**
     * 租赁结束时间
     */
    @ApiModelProperty(value = "租赁结束时间")
    private Date endDate;
    /**
     * 合同内容
     */
    @ApiModelProperty(value = "合同内容")
    private String contractText;
    /**
     * 已支付定金金额(已经下定金的金额)
     */
    @ApiModelProperty(value = "已支付定金金额(已经下定金的金额)")
    private BigDecimal payedDingMoney;
    /**
     * 订单最终金额
     */
    @ApiModelProperty(value = "订单最终金额")
    private BigDecimal totalAccount;
    /**
     * 1、订单未支付2、订单已支付3、待房东签约4、房东已签约,合同生效5、已退款
     */
    @ApiModelProperty(value = "1、订单未支付2、订单已支付3、待房东签约4、房东已签约,合同生效5、已退款")
    private Integer status;
    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private Long createUser;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    /**
     * 房屋登记ID
     */
    @ApiModelProperty(value = "房屋登记ID")
    private Long registerId;
    /**
     * 图片
     */
    @ApiModelProperty(value = "图片")
    private String url;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/RentingHoursePreOrderVO.java
New file
@@ -0,0 +1,102 @@
package com.panzhihua.common.model.vos.community.rentHouse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
 * @author zzj
 */
@Data
@ApiModel
public class RentingHoursePreOrderVO {
    private Long id;
    /**
     * 订单SN号
     */
    @ApiModelProperty(value = "订单SN号")
    private String orderSn;
    /**
     * 房屋登记ID
     */
    @ApiModelProperty(value = "房屋登记ID")
    private Long registerId;
    /**
     * 定金
     */
    @ApiModelProperty(value = "定金")
    private BigDecimal dingMoney;
    /**
     * 合同内容
     */
    @ApiModelProperty(value = "合同内容")
    private String contractText;
    /**
     * 1 已缴纳定金,待抵扣 2、合同已签订,定金已抵扣 3、房东未按时处理,定金已退款  2、已退还定金 3、未按时去和房东签约订单过期,定金不退,已失效
     */
    @ApiModelProperty(value = "1 已缴纳定金,待抵扣 2、合同已签订,定金已抵扣 3、房东未按时处理,定金已退款  2、已退还定金 3、未按时去和房东签约订单过期,定金不退,已失效")
    private Integer status;
    /**
     * 定金保留时间
     */
    @ApiModelProperty(value = "定金保留时间")
    private Date expireDate;
    /**
     * 房东扫描的时候绑定微信APPID
     */
    @ApiModelProperty(value = "房东扫描的时候绑定微信APPID")
    private String hourseOwnerWeixinAppid;
    /**
     * 房东的用户ID,用户表记录了房东的详细信息
     */
    @ApiModelProperty(value = "房东的用户ID,用户表记录了房东的详细信息")
    private Long hourseOwnerUserId;
    /**
     * 租客的微信APPID
     */
    @ApiModelProperty(value = "租客的微信APPID")
    private String tenantWeixinAppid;
    /**
     * 租客的用户ID,房东的用户ID,用户表记录了租客的详细信息
     */
    @ApiModelProperty(value = "租客的用户ID,房东的用户ID,用户表记录了租客的详细信息")
    private Long tenantUserId;
    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private Long createUser;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    @ApiModelProperty(value = "流水号")
    private String paySn;
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    @ApiModelProperty(value = "房屋名称")
    private String villageName;
    @ApiModelProperty(value = "图片")
    private String url;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/WxPayNotifyOrderVO.java
New file
@@ -0,0 +1,42 @@
package com.panzhihua.common.model.vos.community.rentHouse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
 * @author zzj
 */
@Data
@ApiModel
public class WxPayNotifyOrderVO {
    @ApiModelProperty("订单号")
    private String orderSn;
    /**
     * 支付类型
     */
    @ApiModelProperty(value = "支付类型")
    private String payType;
    /**
     * 支付时间
     */
    @ApiModelProperty(value = "支付时间")
    private Date payDate;
    /**
     * 支付金额
     */
    @ApiModelProperty(value = "支付金额")
    private BigDecimal payAmount;
    /**
     * 支付返回内容
     */
    @ApiModelProperty(value = "支付返回内容")
    private String payReturnText;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentHouse/WxPayOrderVO.java
New file
@@ -0,0 +1,17 @@
package com.panzhihua.common.model.vos.community.rentHouse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel
public class WxPayOrderVO {
    @ApiModelProperty("订单号")
    private String orderSn;
    @ApiModelProperty("openId")
    private String openId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentingHouses/RentingHouseRegisterVO.java
New file
@@ -0,0 +1,157 @@
package com.panzhihua.common.model.vos.community.rentingHouses;
import java.math.BigDecimal;
import java.util.List;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.panzhihua.common.validated.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
/**
 * @title: RentingHousesConfigVO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 房屋租赁配置信息
 * @author: hans
 * @date: 2021/11/23 14:13
 */
@Data
@ApiModel("房屋租赁配置信息")
public class RentingHouseRegisterVO {
    @ApiModelProperty(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @ApiModelProperty(value = "楼层号")
    private String floor;
    @ApiModelProperty(value = "总楼层")
    private String totalFloor;
    @ApiModelProperty(value = "房屋地址")
    private String address;
    @ApiModelProperty(value = "认证状态(1、未认证2、已认证)")
    private Integer authStatus;
    @ApiModelProperty(value = "认证码")
    private String authCode;
    @ApiModelProperty(value = "房屋状态(1、待发布 2、已发布,待出租2、出租中3、已退租")
    private Integer status;
    @ApiModelProperty(value = "1、待认证2、待发布3、待出租4、保留中 5出租中6、已超时7、已到期)")
    private Integer detailStatus;
    @ApiModelProperty(value = "建筑面积")
    private BigDecimal constructArea;
    @ApiModelProperty(value = "租房标题")
    private String title;
    @ApiModelProperty(value = "室数量")
    private Integer brn;
    @ApiModelProperty(value = "厅数量")
    private Integer lrn;
    @ApiModelProperty(value = "卫数量")
    private Integer wcn;
    @ApiModelProperty(value = "月租金")
    private BigDecimal monthlyRentMoney;
    @ApiModelProperty(value = "朝向(1东2南3西4北5东南6东北7西南8西北9南北10东西)")
    private Integer orientation;
    @ApiModelProperty(value = "装修情况(1.毛坯房 2.简装 3.精装修)")
    private Integer decoration;
    @ApiModelProperty(value = "房屋标签")
    private String label;
    @ApiModelProperty(value = "看房时间(1.随时看房 2.提前预约)")
    private Integer seeHourseDate;
    @ApiModelProperty(value = "房屋介绍")
    private String hourseDescription;
    @ApiModelProperty(value = "入住要求")
    private String checkInRequirement;
    @ApiModelProperty(value = "房内物品")
    private String hourseItem;
    @ApiModelProperty(value = "房主姓名")
    private String hourseOwnerName;
    @ApiModelProperty(value = "房主身份证")
    private String hourseIdCard;
    @ApiModelProperty(value = "房主电话")
    private String hoursePhone;
    @ApiModelProperty(value = "保证金")
    private BigDecimal depositMoney;
    @ApiModelProperty(value = "服务费")
    private BigDecimal serverCharge;
    @ApiModelProperty(value = "定金")
    private BigDecimal dingMoney;
    @ApiModelProperty(value = "看房电话")
    private String seeHourseTelephone;
    @ApiModelProperty(value = "房源封面展示图片")
    private String url;
    @ApiModelProperty(value = "房源图片")
    private List<String> housePictures;
    @ApiModelProperty(value = "产权证明")
    private List<String> propertyPictures;
    @ApiModelProperty(value = "证件照片")
    private List<String> credentialsPictures;
    @ApiModelProperty(value = "房屋委托代理合同")
    private String houseAgencyContract;
    @ApiModelProperty(value = "小区名称")
    private String villageName;
    @ApiModelProperty(value = "街/路/巷")
    private String alley;
    @ApiModelProperty(value = "街/路/巷号")
    private String houseNum;
    @ApiModelProperty(value = "楼栋号")
    private String buildingNo;
    @ApiModelProperty(value = "单元号")
    private String unitNo;
    @ApiModelProperty(value = "户室(房间号)")
    private String houseNo;
    @ApiModelProperty(value = "房屋的经度")
    private String longitude;
    @ApiModelProperty(value = "房屋的纬度")
    private String latitude;
    @ApiModelProperty(value = "是否是房东(1.是 2.否)")
    private Integer isLandlord;
    @ApiModelProperty(value = "租客电话")
    private String tenantTelephone;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/rentingHouses/RentingHousesConfigVO.java
New file
@@ -0,0 +1,37 @@
package com.panzhihua.common.model.vos.community.rentingHouses;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: RentingHousesConfigVO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 房屋租赁配置信息
 * @author: hans
 * @date: 2021/11/23 14:13
 */
@Data
@ApiModel("房屋租赁配置信息")
public class RentingHousesConfigVO {
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("配置名称")
    private String name;
    @ApiModelProperty("配置项目")
    private String key;
    @ApiModelProperty("配置内容")
    private String value;
    @ApiModelProperty("上次修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date modifyDate;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -3,6 +3,7 @@
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@@ -152,6 +153,7 @@
import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralRuleDTO;
import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralTradeDTO;
import com.panzhihua.common.model.dtos.community.questnaire.StatisticsSummaryDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.*;
import com.panzhihua.common.model.dtos.community.reserve.AddReserveAdminDTO;
import com.panzhihua.common.model.dtos.community.reserve.CancelReserveRecordDTO;
import com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO;
@@ -310,6 +312,10 @@
import com.panzhihua.common.model.vos.community.questnaire.EditComActQuestnaireVo;
import com.panzhihua.common.model.vos.community.questnaire.QuestnaireVO;
import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerQuestnaireVO;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayNotifyOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayOrderVO;
import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO;
import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseBaseVO;
import com.panzhihua.common.model.vos.community.warehouse.QRCodeVO;
@@ -7281,4 +7287,207 @@
     */
    @GetMapping("/picture/library/get")
    R getPresetPictureLibrary(@RequestParam("type") Integer type, @RequestParam("subtype") Integer subtype);
    /**
     * 分页查询房屋租赁基础配置
     * @param pageRentingHousesConfigDTO
     * @return
     */
    @PostMapping("/rentingHousesConfig/page")
    R pageRentingHousesConfig(@RequestBody PageRentingHousesConfigDTO pageRentingHousesConfigDTO);
    /**
     * 更新配置信息
     * @param rentingHousesConfigDTO
     * @return
     */
    @PutMapping("/rentingHousesConfig/update")
    R updateRentingHousesConfig(@RequestBody RentingHousesConfigDTO rentingHousesConfigDTO);
    /**
     * 新增房源信息
     * @param registerDTO
     * @return
     */
    @PostMapping("/rentingHourseRegister/register")
    R registerRentingHouse(@RequestBody RentingHouseRegisterDTO registerDTO);
    /**
     * 编辑房源信息
     * @param registerDTO
     * @return
     */
    @PostMapping("/rentingHourseRegister/update")
    R updateRentingHouse(@RequestBody RentingHouseRegisterDTO registerDTO);
    /**
     * 分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    @PostMapping("/rentingHourseRegister/page")
    R pageRentingHouse(@RequestBody PageRentingHouseRegisterDTO pageRegisterDTO);
    /**
     * 发布/取消发布 房源信
     * @param releaseOrCancelHouseDTO
     * @return
     */
    @PutMapping("/rentingHourseRegister/releaseOrCancel")
    R releaseOrCancelHouse(@RequestBody ReleaseOrCancelHouseDTO releaseOrCancelHouseDTO);
    /**
     * 删除房源信息
     * @param registerId
     * @return
     */
    @DeleteMapping("/rentingHourseRegister/delete")
    R deleteRentingHouse(@RequestParam("registerId") Long registerId);
    /**
     * 获取详情-房源信息
     * @param registerId
     * @return
     */
    @GetMapping("/rentingHourseRegister/get")
    R getRentingHouse(@RequestParam("registerId") Long registerId);
    /**
     * 附近的房源
     */
    @PostMapping("/rentingHourseRegister/nearby")
    R nearby(@RequestBody NearbyDTO nearbyDTO);
    /**
     * 小程序分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    @PostMapping("/rentingHourseRegister/houseList")
    R pageRentingHouseApplet(@RequestBody PageRentingHouseRegisterDTO pageRegisterDTO);
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("/rentingHourseOrder/queryAll")
    R selectRentingHourseOrderAll(@RequestBody CommonPage commonPage);
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/rentingHourseOrder/{id}")
    R selectRentingHourseOrderOne(@PathVariable("id") Long id);
    /**
     * 新增数据
     *
     * @param rentingHourseOrder 实体对象
     * @return 新增结果
     */
    @PostMapping("/rentingHourseOrder")
    R insertRentingHourseOrder(@RequestBody RentingHourseOrderVO rentingHourseOrder);
    /**
     * 修改数据
     *
     * @param rentingHourseOrdervo 实体对象
     * @return 修改结果
     */
    @PostMapping("/rentingHourseOrder/update")
    R updateRentingHourseOrder(@RequestBody RentingHourseOrderVO rentingHourseOrdervo);
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("/rentingHourseOrder/del")
    R deleteRentingHourseOrder(@RequestParam("id") Long id);
    /**
     * 支付回调处理订单状态以及房屋状态
     */
    @PostMapping("/rentingHourseOrder/wxNotify")
    R wxNotifyRentingHourseOrder(@RequestBody WxPayNotifyOrderVO wxPayNotifyOrderVO);
    /**
     * 支付付款
     */
    @PostMapping("/rentingHourseOrder/wxPay")
    R wxPayRentingHourseOrder(@RequestBody WxPayOrderVO wxPayOrderVO);
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("/rentingHoursePreOrder/queryAll")
    R selectAllRentingHoursePreOrder(@RequestBody CommonPage commonPage);
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/rentingHoursePreOrder/{id}")
    R selectOneRentingHoursePreOrder(@PathVariable("id") Long id);
    /**
     * 新增数据
     *
     * @param rentingHoursePreOrderVO 实体对象
     * @return 新增结果
     */
    @PostMapping("/rentingHoursePreOrder")
    R insertRentingHoursePreOrder(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO);
    /**
     * 修改数据
     *
     * @param rentingHoursePreOrderVO 实体对象
     * @return 修改结果
     */
    @PostMapping("/rentingHoursePreOrder/update")
    R updateRentingHoursePreOrder(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO);
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("/rentingHoursePreOrder/del")
    R deleteRentingHoursePreOrder(@RequestParam("id") Long id);
    /**
     * 普通订单统计
     */
    @PostMapping("/rentingHourseOrder/statics")
    R staticsRentingHourseOrder(@RequestBody RentingHourseOrderVO rentingHourseOrderVO);
    /**
     * 定金订单统计
     */
    @PostMapping("/rentingHoursePreOrder/statics")
    R staticsRentingHoursePreOrder(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO);
    /**
     * 获取房屋租赁配置
     * @return
     * @param type
     */
    @GetMapping("/rentingHousesConfig/getConfig")
    R getRentingHouseConfig(@RequestParam("type") Integer type);
    @GetMapping("/rentingHourseRegister/updateAllHouseUnionAppCode")
    @Async
    void updateAllHouseUnionAppCode();
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -1084,4 +1084,12 @@
     */
    @GetMapping("community/statistics/export")
    R communityStatisticsExport();
    /**
     * 通过UnionId获取用户信息
     * @param unionId
     * @return
     */
    @GetMapping("/getByUnionId")
    R getUserInfoByUnionId(@RequestParam("unionId") String unionId);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/CommunityBackstageApplication.java
@@ -8,6 +8,7 @@
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableCaching
@@ -17,6 +18,7 @@
@EnableEurekaClient
@EnableFeignClients(basePackages = {"com.panzhihua.common.service"})
@ComponentScan({"com.panzhihua.community_backstage", "com.panzhihua.common"})
@EnableAsync
public class CommunityBackstageApplication {
    public static void main(String[] args) {
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/RentingHourseOrderApi.java
New file
@@ -0,0 +1,123 @@
package com.panzhihua.community_backstage.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayNotifyOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayOrderVO;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * 房屋租赁-房屋订单表(RentingHourseOrder)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:46:57
 */
@RestController
@Slf4j
@Api(tags = {"房屋租赁普通订单相关接口"})
@RequestMapping("rentingHourseOrder")
public class RentingHourseOrderApi extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private CommunityService communityService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询所有数据",response = RentingHourseOrderVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        commonPage.setCommunityId(this.getCommunityId());
        return communityService.selectRentingHourseOrderAll(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "分页查询所有数据")
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return communityService.selectRentingHourseOrderOne(id);
    }
    /**
     * 新增数据
     *
     * @param rentingHourseOrder 实体对象
     * @return 新增结果
     */
    @ApiOperation("创建订单")
    @PostMapping
    public R insert(@RequestBody RentingHourseOrderVO rentingHourseOrder) {
        rentingHourseOrder.setCommunityId(this.getCommunityId());
        return communityService.insertRentingHourseOrder(rentingHourseOrder);
    }
    /**
     * 修改数据
     *
     * @param rentingHourseOrdervo 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody RentingHourseOrderVO rentingHourseOrdervo) {
        return communityService.updateRentingHourseOrder(rentingHourseOrdervo);
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @ApiOperation("删除")
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return communityService.deleteRentingHourseOrder(id);
    }
    /**
     * 支付回调处理订单状态以及房屋状态
     */
    @ApiOperation("支付回调处理订单状态以及房屋状态")
    @PostMapping("/wxNotify")
    public R wxNotify(@RequestBody WxPayNotifyOrderVO wxPayNotifyOrderVO){
        return communityService.wxNotifyRentingHourseOrder(wxPayNotifyOrderVO);
    }
    /**
     * 支付付款
     */
    @ApiOperation("支付付款")
    @PostMapping("/wxPay")
    public R wxPay(@RequestBody WxPayOrderVO wxPayOrderVO){
        return communityService.wxPayRentingHourseOrder(wxPayOrderVO);
    }
    /**
     * 普通订单统计
     */
    @ApiOperation("普通订单统计")
    @PostMapping("/statics")
    public R statics(@RequestBody RentingHourseOrderVO rentingHourseOrderVO){
        rentingHourseOrderVO.setCommunityId(this.getCommunityId());
        return communityService.staticsRentingHourseOrder(rentingHourseOrderVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/RentingHoursePreOrderApi.java
New file
@@ -0,0 +1,104 @@
package com.panzhihua.community_backstage.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * 房屋租赁-房屋定金订单表(RentingHoursePreOrder)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:47:54
 */
@RestController
@Slf4j
@Api(tags = {"房屋租赁定金订单相关接口"})
@RequestMapping("rentingHoursePreOrder")
public class RentingHoursePreOrderApi extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private CommunityService communityService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询",response = RentingHoursePreOrderVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        commonPage.setCommunityId(this.getCommunityId());
        return communityService.selectAllRentingHoursePreOrder(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "详情",response = RentingHoursePreOrderVO.class)
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return communityService.selectOneRentingHoursePreOrder(id);
    }
    /**
     * 新增数据
     *
     * @param rentingHoursePreOrderVO 实体对象
     * @return 新增结果
     */
    @ApiOperation(value = "创建定金订单")
    @PostMapping
    public R insert(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO) {
        rentingHoursePreOrderVO.setCommunityId(this.getCommunityId());
        return communityService.insertRentingHoursePreOrder(rentingHoursePreOrderVO);
    }
    /**
     * 修改数据
     *
     * @param rentingHoursePreOrderVO 实体对象
     * @return 修改结果
     */
    @ApiOperation("修改")
    @PostMapping("/update")
    public R update(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO) {
       return communityService.updateRentingHoursePreOrder(rentingHoursePreOrderVO);
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @ApiOperation("删除数据")
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return communityService.deleteRentingHoursePreOrder(id);
    }
    /**
     * 订单统计
     */
    @ApiOperation("定金订单统计")
    @PostMapping("/statics")
    public R statics(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO){
        rentingHoursePreOrderVO.setCommunityId(this.getCommunityId());
        return communityService.staticsRentingHoursePreOrder(rentingHoursePreOrderVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/RentingHousesApi.java
New file
@@ -0,0 +1,100 @@
package com.panzhihua.community_backstage.api;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.ReleaseOrCancelHouseDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHouseRegisterDTO;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.validated.AddGroup;
import com.panzhihua.common.validated.PutGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
/**
 * @title: RentingHousesApi
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 房屋租赁相关接口
 * @author: hans
 * @date: 2021/11/24 10:18
 */
@RestController
@Slf4j
@Api(tags = {"房屋租赁相关接口"})
@RequestMapping("/renting/houses")
public class RentingHousesApi extends BaseController {
    @Resource
    private CommunityService communityService;
    @ApiOperation("新增房源信息")
    @PostMapping("/register")
    public R registerRentingHouse(@RequestBody @Validated(AddGroup.class) RentingHouseRegisterDTO registerDTO) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        registerDTO.setUserId(loginUserInfo.getUserId());
        registerDTO.setCommunityId(loginUserInfo.getCommunityId());
        return communityService.registerRentingHouse(registerDTO);
    }
    @ApiOperation("编辑房源信息")
    @PostMapping("/update")
    public R updateRentingHouse(@RequestBody @Validated(PutGroup.class) RentingHouseRegisterDTO registerDTO) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        registerDTO.setUserId(loginUserInfo.getUserId());
        registerDTO.setCommunityId(loginUserInfo.getCommunityId());
        return communityService.updateRentingHouse(registerDTO);
    }
    @ApiOperation(value = "分页获取房源信息", response = RentingHouseRegisterVO.class)
    @PostMapping("/page")
    public R pageRentingHouse(@RequestBody @Valid PageRentingHouseRegisterDTO pageRegisterDTO) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        pageRegisterDTO.setCommunityId(loginUserInfo.getCommunityId());
        return communityService.pageRentingHouse(pageRegisterDTO);
    }
    @ApiOperation("发布/取消发布 房源信息")
    @PutMapping("/releaseOrCancel")
    public R releaseOrCancelHouse(@RequestBody @Valid ReleaseOrCancelHouseDTO releaseOrCancelHouseDTO) {
        return communityService.releaseOrCancelHouse(releaseOrCancelHouseDTO);
    }
    @ApiOperation("删除房源信息")
    @DeleteMapping("/delete")
    @ApiImplicitParam(name = "registerId", value = "房源登记id", required = true)
    public R deleteRentingHouse(@RequestParam("registerId") Long registerId) {
        return communityService.deleteRentingHouse(registerId);
    }
    @ApiOperation(value = "获取详情-房源信息", response = RentingHouseRegisterVO.class)
    @GetMapping("/get")
    @ApiImplicitParam(name = "registerId", value = "房源登记id", required = true)
    public R getRentingHouse(@RequestParam("registerId") Long registerId) {
        return communityService.getRentingHouse(registerId);
    }
    @ApiOperation(value = "方便开发阶段手动调用批量更新小程序码")
    @GetMapping("/updateAllHouseUnionAppCode")
    public R updateAllHouseUnionAppCode() {
        communityService.updateAllHouseUnionAppCode();
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/pom.xml
@@ -73,6 +73,10 @@
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-amqp</artifactId>
        </dependency>
        <!--添加监控依赖包-->
        <dependency>
            <groupId>io.micrometer</groupId>
@@ -88,6 +92,18 @@
            <artifactId>core</artifactId>
            <version>3.3.3</version>
        </dependency>
        <!-- lbs附近定位 -->
        <dependency>
            <groupId>com.spatial4j</groupId>
            <artifactId>spatial4j</artifactId>
            <version>0.5</version>
        </dependency>
        <!--        微信小程序-->
        <dependency>
            <groupId>com.github.binarywang</groupId>
            <artifactId>weixin-java-miniapp</artifactId>
            <version>3.9.9.B</version>
        </dependency>
        <dependency>
            <groupId>com.google.zxing</groupId>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseFileApi.java
New file
@@ -0,0 +1,86 @@
package com.panzhihua.service_community.api;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.service_community.entity.RentingHourseFile;
import com.panzhihua.service_community.service.RentingHourseFileService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * 房屋租赁-涉及的文件表(RentingHourseFile)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:46:20
 */
@RestController
@RequestMapping("rentingHourseFile")
public class RentingHourseFileApi {
    /**
     * 服务对象
     */
    @Resource
    private RentingHourseFileService rentingHourseFileService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.rentingHourseFileService.pageList(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Serializable id) {
        return R.ok(this.rentingHourseFileService.getById(id));
    }
    /**
     * 新增数据
     *
     * @param rentingHourseFile 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody RentingHourseFile rentingHourseFile) {
        return R.ok(this.rentingHourseFileService.save(rentingHourseFile));
    }
    /**
     * 修改数据
     *
     * @param rentingHourseFile 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody RentingHourseFile rentingHourseFile) {
        return R.ok(this.rentingHourseFileService.updateById(rentingHourseFile));
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return R.ok(this.rentingHourseFileService.removeById(id));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseLabelApi.java
New file
@@ -0,0 +1,86 @@
package com.panzhihua.service_community.api;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.service_community.entity.RentingHourseLabel;
import com.panzhihua.service_community.service.RentingHourseLabelService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * 房屋租赁-房源标签(RentingHourseLabel)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:46:39
 */
@RestController
@RequestMapping("rentingHourseLabel")
public class RentingHourseLabelApi {
    /**
     * 服务对象
     */
    @Resource
    private RentingHourseLabelService rentingHourseLabelService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.rentingHourseLabelService.pageList(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Serializable id) {
        return R.ok(this.rentingHourseLabelService.getById(id));
    }
    /**
     * 新增数据
     *
     * @param rentingHourseLabel 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody RentingHourseLabel rentingHourseLabel) {
        return R.ok(this.rentingHourseLabelService.save(rentingHourseLabel));
    }
    /**
     * 修改数据
     *
     * @param rentingHourseLabel 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody RentingHourseLabel rentingHourseLabel) {
        return R.ok(this.rentingHourseLabelService.updateById(rentingHourseLabel));
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return R.ok(this.rentingHourseLabelService.removeById(id));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseOrderApi.java
New file
@@ -0,0 +1,116 @@
package com.panzhihua.service_community.api;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayNotifyOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayOrderVO;
import com.panzhihua.service_community.entity.RentingHourseOrder;
import com.panzhihua.service_community.service.RentingHourseOrderService;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * 房屋租赁-房屋订单表(RentingHourseOrder)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:46:57
 */
@RestController
@RequestMapping("rentingHourseOrder")
public class RentingHourseOrderApi {
    /**
     * 服务对象
     */
    @Resource
    private RentingHourseOrderService rentingHourseOrderService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.rentingHourseOrderService.pageList(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return R.ok(this.rentingHourseOrderService.getById(id));
    }
    /**
     * 新增数据
     *
     * @param rentingHourseOrder 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody RentingHourseOrderVO rentingHourseOrder) {
        return this.rentingHourseOrderService.createOrder(rentingHourseOrder);
    }
    /**
     * 修改数据
     *
     * @param rentingHourseOrdervo 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody RentingHourseOrderVO rentingHourseOrdervo) {
        RentingHourseOrder rentingHourseOrder=new RentingHourseOrder();
        BeanUtils.copyProperties(rentingHourseOrdervo,rentingHourseOrder);
        return R.ok(this.rentingHourseOrderService.updateById(rentingHourseOrder));
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return R.ok(this.rentingHourseOrderService.removeById(id));
    }
    /**
     * 支付回调处理订单状态以及房屋状态
     */
    @PostMapping("/wxNotify")
    public R wxNotify(@RequestBody WxPayNotifyOrderVO wxPayNotifyOrderVO){
        return this.rentingHourseOrderService.wxPayNotify(wxPayNotifyOrderVO);
    }
    /**
     * 支付付款
     */
    @PostMapping("/wxPay")
    public R wxPay(@RequestBody WxPayOrderVO wxPayOrderVO){
        return this.rentingHourseOrderService.wxPay(wxPayOrderVO);
    }
    /**
     * 订单统计
     */
    @PostMapping("/statics")
    public R statics(@RequestBody RentingHourseOrderVO rentingHourseOrderVO){
        return this.rentingHourseOrderService.statics(rentingHourseOrderVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHoursePayingOrderApi.java
New file
@@ -0,0 +1,86 @@
package com.panzhihua.service_community.api;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.service_community.entity.RentingHoursePayingOrder;
import com.panzhihua.service_community.service.RentingHoursePayingOrderService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * 房屋租赁-支付流水记录表(RentingHoursePayingOrder)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:47:17
 */
@RestController
@RequestMapping("rentingHoursePayingOrder")
public class RentingHoursePayingOrderApi {
    /**
     * 服务对象
     */
    @Resource
    private RentingHoursePayingOrderService rentingHoursePayingOrderService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.rentingHoursePayingOrderService.pageList(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return R.ok(this.rentingHoursePayingOrderService.getById(id));
    }
    /**
     * 新增数据
     *
     * @param rentingHoursePayingOrder 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody RentingHoursePayingOrder rentingHoursePayingOrder) {
        return R.ok(this.rentingHoursePayingOrderService.save(rentingHoursePayingOrder));
    }
    /**
     * 修改数据
     *
     * @param rentingHoursePayingOrder 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody RentingHoursePayingOrder rentingHoursePayingOrder) {
        return R.ok(this.rentingHoursePayingOrderService.updateById(rentingHoursePayingOrder));
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return R.ok(this.rentingHoursePayingOrderService.removeById(id));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHoursePreOrderApi.java
New file
@@ -0,0 +1,99 @@
package com.panzhihua.service_community.api;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO;
import com.panzhihua.service_community.entity.RentingHoursePreOrder;
import com.panzhihua.service_community.service.RentingHoursePreOrderService;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * 房屋租赁-房屋定金订单表(RentingHoursePreOrder)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:47:54
 */
@RestController
@RequestMapping("rentingHoursePreOrder")
public class RentingHoursePreOrderApi {
    /**
     * 服务对象
     */
    @Resource
    private RentingHoursePreOrderService rentingHoursePreOrderService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.rentingHoursePreOrderService.pageList(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return R.ok(this.rentingHoursePreOrderService.getById(id));
    }
    /**
     * 新增数据
     *
     * @param rentingHoursePreOrderVO 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO) {
        return rentingHoursePreOrderService.createOrder(rentingHoursePreOrderVO);
    }
    /**
     * 修改数据
     *
     * @param rentingHoursePreOrderVO 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO) {
        RentingHoursePreOrder rentingHoursePreOrder=new RentingHoursePreOrder();
        BeanUtils.copyProperties(rentingHoursePreOrderVO,rentingHoursePreOrder);
        return R.ok(this.rentingHoursePreOrderService.updateById(rentingHoursePreOrder));
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return R.ok(this.rentingHoursePreOrderService.removeById(id));
    }
    /**
     * 订单统计
     */
    @PostMapping("/statics")
    public R statics(@RequestBody RentingHoursePreOrderVO rentingHoursePreOrderVO){
        return this.rentingHoursePreOrderService.statics(rentingHoursePreOrderVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseRefundOrderApi.java
New file
@@ -0,0 +1,86 @@
package com.panzhihua.service_community.api;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.service_community.entity.RentingHourseRefundOrder;
import com.panzhihua.service_community.service.RentingHourseRefundOrderService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * 房屋租赁-退款流水记录表(RentingHourseRefundOrder)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:48:15
 */
@RestController
@RequestMapping("rentingHourseRefundOrder")
public class RentingHourseRefundOrderApi {
    /**
     * 服务对象
     */
    @Resource
    private RentingHourseRefundOrderService rentingHourseRefundOrderService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.rentingHourseRefundOrderService.pageList(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Serializable id) {
        return R.ok(this.rentingHourseRefundOrderService.getById(id));
    }
    /**
     * 新增数据
     *
     * @param rentingHourseRefundOrder 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody RentingHourseRefundOrder rentingHourseRefundOrder) {
        return R.ok(this.rentingHourseRefundOrderService.save(rentingHourseRefundOrder));
    }
    /**
     * 修改数据
     *
     * @param rentingHourseRefundOrder 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody RentingHourseRefundOrder rentingHourseRefundOrder) {
        return R.ok(this.rentingHourseRefundOrderService.updateById(rentingHourseRefundOrder));
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return R.ok(this.rentingHourseRefundOrderService.removeById(id));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseRegisterApi.java
New file
@@ -0,0 +1,118 @@
package com.panzhihua.service_community.api;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.panzhihua.common.model.dtos.community.rentingHouses.NearbyDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.ReleaseOrCancelHouseDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHouseRegisterDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.RentingHourseRegisterService;
/**
 * 房屋租售-租赁房屋登记(RentingHourseRegister)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:49:08
 */
@RestController
@RequestMapping("/rentingHourseRegister")
public class RentingHourseRegisterApi {
    /**
     * 服务对象
     */
    @Resource
    private RentingHourseRegisterService rentingHourseRegisterService;
    /**
     * 分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    @PostMapping("/page")
    public R pageRentingHouse(@RequestBody PageRentingHouseRegisterDTO pageRegisterDTO) {
        return rentingHourseRegisterService.pageRentingHouse(pageRegisterDTO);
    }
    /**
     * 新增房源信息
     * @param registerDTO
     * @return
     */
    @PostMapping("/register")
    public R registerRentingHouse(@RequestBody RentingHouseRegisterDTO registerDTO) {
        return rentingHourseRegisterService.registerRentingHouse(registerDTO);
    }
    /**
     * 编辑房源信息
     * @param registerDTO
     * @return
     */
    @PostMapping("/update")
    public R updateRentingHouse(@RequestBody RentingHouseRegisterDTO registerDTO) {
        return rentingHourseRegisterService.updateRentingHouse(registerDTO);
    }
    /**
     * 发布/取消发布 房源信
     * @param releaseOrCancelHouseDTO
     * @return
     */
    @PutMapping("/releaseOrCancel")
    public R releaseOrCancelHouse(@RequestBody ReleaseOrCancelHouseDTO releaseOrCancelHouseDTO) {
        return rentingHourseRegisterService.releaseOrCancelHouse(releaseOrCancelHouseDTO);
    }
    /**
     * 删除房源信息
     * @param registerId
     * @return
     */
    @DeleteMapping("/delete")
    public R deleteRentingHouse(@RequestParam("registerId") Long registerId) {
        return rentingHourseRegisterService.deleteRentingHouse(registerId);
    }
    /**
     * 获取详情-房源信息
     * @param registerId
     * @return
     */
    @GetMapping("/get")
    public R getRentingHouse(@RequestParam("registerId") Long registerId) {
        return rentingHourseRegisterService.getRentingHouse(registerId);
    }
    /**
     * 附近的房源
     */
    @PostMapping("/nearby")
    public R nearby(@RequestBody NearbyDTO nearbyDTO){
        return rentingHourseRegisterService.nearby(nearbyDTO);
    }
    /**
     * 小程序分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    @PostMapping("/houseList")
    public R pageRentingHouseApplet(@RequestBody PageRentingHouseRegisterDTO pageRegisterDTO) {
        return rentingHourseRegisterService.pageRentingHouseApplet(pageRegisterDTO);
    }
    @GetMapping("/updateAllHouseUnionAppCode")
    public void updateAllHouseUnionAppCode() {
        rentingHourseRegisterService.updateAllHouseUnionAppCode();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHourseReturnOrderApi.java
New file
@@ -0,0 +1,86 @@
package com.panzhihua.service_community.api;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.service_community.entity.RentingHourseReturnOrder;
import com.panzhihua.service_community.service.RentingHourseReturnOrderService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * 房屋租赁-房屋退租申请表(RentingHourseReturnOrder)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:49:38
 */
@RestController
@RequestMapping("rentingHourseReturnOrder")
public class RentingHourseReturnOrderApi {
    /**
     * 服务对象
     */
    @Resource
    private RentingHourseReturnOrderService rentingHourseReturnOrderService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.rentingHourseReturnOrderService.pageList(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Serializable id) {
        return R.ok(this.rentingHourseReturnOrderService.getById(id));
    }
    /**
     * 新增数据
     *
     * @param rentingHourseReturnOrder 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody RentingHourseReturnOrder rentingHourseReturnOrder) {
        return R.ok(this.rentingHourseReturnOrderService.save(rentingHourseReturnOrder));
    }
    /**
     * 修改数据
     *
     * @param rentingHourseReturnOrder 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody RentingHourseReturnOrder rentingHourseReturnOrder) {
        return R.ok(this.rentingHourseReturnOrderService.updateById(rentingHourseReturnOrder));
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return R.ok(this.rentingHourseReturnOrderService.removeById(id));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/RentingHousesContractConfigApi.java
New file
@@ -0,0 +1,61 @@
package com.panzhihua.service_community.api;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHousesConfigDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHousesConfigDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.RentingHourseContractConfigService;
/**
 * @title: RentingHousesContractConfigApi
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description:
 * @author: hans
 * @date: 2021/11/23 13:32
 */
@RestController
@RequestMapping("/rentingHousesConfig")
public class RentingHousesContractConfigApi {
    @Resource
    private RentingHourseContractConfigService rentingHourseContractConfigService;
    /**
     * 分页查询房屋租赁基础配置
     * @param pageRentingHousesConfigDTO
     * @return
     */
    @PostMapping("/page")
    public R pageRentingHousesConfig(@RequestBody PageRentingHousesConfigDTO pageRentingHousesConfigDTO) {
        return rentingHourseContractConfigService.pageRentingHousesConfig(pageRentingHousesConfigDTO);
    }
    /**
     * 更新配置信息
     * @param rentingHousesConfigDTO
     * @return
     */
    @PutMapping("/update")
    public R updateRentingHousesConfig(@RequestBody RentingHousesConfigDTO rentingHousesConfigDTO) {
        return rentingHourseContractConfigService.updateRentingHousesConfig(rentingHousesConfigDTO);
    }
    /**
     * 获取房屋租赁配置
     * @return
     */
    @GetMapping("/getConfig")
    public R getRentingHouseConfig(@RequestParam("type") Integer type) {
        return rentingHourseContractConfigService.getRentingHouseConfig(type);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/RabbitmqConfig.java
New file
@@ -0,0 +1,121 @@
package com.panzhihua.service_community.config;
import org.springframework.amqp.core.*;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.HashMap;
import java.util.Map;
@Configuration
public class RabbitmqConfig {
    public static final String PreOrder_QUEUE="preOrder.queue";
    public static final String PreOrder_ROUTING_KEY="preOrder.key";
    public static final String PreOrder_EXCHANGE="preOrder.exchange";
    public static final String Order_QUEUE="order.queue";
    public static final String Order_ROUTING_KEY="order.key";
    public static final String Order_EXCHANGE="order.exchange";
    @Bean
    public Queue preOrderQueue(){
        return new Queue(PreOrder_QUEUE,true,false,false,null);
    }
    @Bean
    public Exchange preOrderExchange(){
        Map<String, Object> arguments = new HashMap<>();
        arguments.put("x-delayed-type", ExchangeTypes.DIRECT);
        return new CustomExchange(PreOrder_EXCHANGE,"x-delayed-message",true,false,arguments);
    }
    @Bean
    public Binding preOrderBinding(){
        return BindingBuilder.bind(preOrderQueue()).to(preOrderExchange()).with(PreOrder_ROUTING_KEY).noargs();
    }
    @Bean
    public Queue orderQueue(){
        return new Queue(Order_QUEUE,true,false,false,null);
    }
    @Bean
    public Exchange orderExchange(){
        Map<String, Object> arguments = new HashMap<>();
        arguments.put("x-delayed-type", ExchangeTypes.DIRECT);
        return new CustomExchange(Order_EXCHANGE,"x-delayed-message",true,false,arguments);
    }
    @Bean
    public Binding orderBinding(){
        return BindingBuilder.bind(orderQueue()).to(orderExchange()).with(Order_ROUTING_KEY).noargs();
    }
    public Queue directQueue() {
        // durable:是否持久化,默认是false,持久化队列:会被存储在磁盘上,当消息代理重启时仍然存在,暂存队列:当前连接有效
        // exclusive:默认也是false,只能被当前创建的连接使用,而且当连接关闭后队列即被删除。此参考优先级高于durable
        // autoDelete:是否自动删除,当没有生产者或者消费者使用此队列,该队列会自动删除。
        //   return new Queue("TestDirectQueue",true,true,false);
        //一般设置一下队列的持久化就好,其余两个就是默认false
        return new Queue("directQueue",true);
    }
    //Direct交换机 起名:TestDirectExchange
    @Bean
    DirectExchange directExchange() {
        //  return new DirectExchange("TestDirectExchange",true,true);
        return new DirectExchange("directExchange",true,false);
    }
    //绑定  将队列和交换机绑定, 并设置用于匹配键:TestDirectRouting
    @Bean
    Binding bindingDirect() {
        return BindingBuilder.bind(directQueue()).to(directExchange()).with("directRouting");
    }
    public Queue pushQueue() {
        // durable:是否持久化,默认是false,持久化队列:会被存储在磁盘上,当消息代理重启时仍然存在,暂存队列:当前连接有效
        // exclusive:默认也是false,只能被当前创建的连接使用,而且当连接关闭后队列即被删除。此参考优先级高于durable
        // autoDelete:是否自动删除,当没有生产者或者消费者使用此队列,该队列会自动删除。
        //   return new Queue("TestDirectQueue",true,true,false);
        //一般设置一下队列的持久化就好,其余两个就是默认false
        return new Queue("pushQueue",true);
    }
    //Direct交换机 起名:TestDirectExchange
    @Bean
    DirectExchange pushExchange() {
        //  return new DirectExchange("TestDirectExchange",true,true);
        return new DirectExchange("PUSH_Exchange",true,false);
    }
    //绑定  将队列和交换机绑定, 并设置用于匹配键:TestDirectRouting
    @Bean
    Binding bindingPush() {
        return BindingBuilder.bind(directQueue()).to(directExchange()).with("PUSH_ROUTING");
    }
    @Bean
    DirectExchange lonelyDirectExchange() {
        return new DirectExchange("lonelyDirectExchange");
    }
    @Bean
    public MessageConverter messageConverter(){
        return new Jackson2JsonMessageConverter();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseContractConfigDao.java
New file
@@ -0,0 +1,29 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHousesConfigDTO;
import com.panzhihua.common.model.vos.community.rentingHouses.RentingHousesConfigVO;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panzhihua.service_community.entity.RentingHourseContractConfig;
import org.apache.ibatis.annotations.Param;
/**
 * 房屋租赁-配置项表(RentingHourseContractConfig)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-23 10:46:19
 */
@Mapper
public interface RentingHourseContractConfigDao extends BaseMapper<RentingHourseContractConfig> {
    /**
     * 分页查询房屋租赁基础配置
     * @param pageRentingHousesConfigDTO
     * @return
     */
    IPage<RentingHousesConfigVO> pageRentingHousesConfig(@Param("page") Page page,
                                                         @Param("pageRentingHousesConfigDTO") PageRentingHousesConfigDTO pageRentingHousesConfigDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseFileDao.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.RentingHourseFile;
/**
 * 房屋租赁-涉及的文件表(RentingHourseFile)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-23 10:46:19
 */
@Mapper
public interface RentingHourseFileDao extends BaseMapper<RentingHourseFile> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseLabelDao.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.RentingHourseLabel;
/**
 * 房屋租赁-房源标签(RentingHourseLabel)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-23 10:46:38
 */
@Mapper
public interface RentingHourseLabelDao extends BaseMapper<RentingHourseLabel> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseOrderDao.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.community.rentHouse.OrderStatics;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.RentingHourseOrder;
import org.apache.ibatis.annotations.Param;
/**
 * 房屋租赁-房屋订单表(RentingHourseOrder)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-23 10:46:55
 */
@Mapper
public interface RentingHourseOrderDao extends BaseMapper<RentingHourseOrder> {
    /**
     * 分页查询
     * @param page
     * @param commonPage
     * @return
     */
    IPage<RentingHourseOrderVO> pageList(Page page,@Param("commonPage")CommonPage commonPage);
    /**
     * 订单统计
     * @param rentingHourseOrderVO
     * @return
     */
    OrderStatics orderStatics(RentingHourseOrderVO rentingHourseOrderVO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHoursePayingOrderDao.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.RentingHoursePayingOrder;
/**
 * 房屋租赁-支付流水记录表(RentingHoursePayingOrder)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-23 10:47:16
 */
@Mapper
public interface RentingHoursePayingOrderDao extends BaseMapper<RentingHoursePayingOrder> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHoursePreOrderDao.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.community.rentHouse.PreOrderStatics;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.RentingHoursePreOrder;
import org.apache.ibatis.annotations.Param;
/**
 * 房屋租赁-房屋定金订单表(RentingHoursePreOrder)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-23 10:47:53
 */
@Mapper
public interface RentingHoursePreOrderDao extends BaseMapper<RentingHoursePreOrder> {
    /**
     * 分页查询
     * @param page
     * @param commonPage
     * @return
     */
    IPage<RentingHoursePreOrderVO> pageList(Page page, @Param("commonPage")CommonPage commonPage);
    /**
     * 定金统计
     * @param rentingHoursePreOrderVO
     * @return
     */
    PreOrderStatics statics(RentingHoursePreOrderVO rentingHoursePreOrderVO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseRefundOrderDao.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.RentingHourseRefundOrder;
/**
 * 房屋租赁-退款流水记录表(RentingHourseRefundOrder)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-23 10:48:14
 */
@Mapper
public interface RentingHourseRefundOrderDao extends BaseMapper<RentingHourseRefundOrder> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseRegisterDao.java
New file
@@ -0,0 +1,49 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO;
import com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.RentingHourseRegister;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * 房屋租售-租赁房屋登记(RentingHourseRegister)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-23 10:49:08
 */
@Mapper
public interface RentingHourseRegisterDao extends BaseMapper<RentingHourseRegister> {
    /**
     * 分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    IPage<RentingHouseRegisterVO> pageRentingHouse(@Param("page") Page page,
                                                   @Param("pageRegisterDTO") PageRentingHouseRegisterDTO pageRegisterDTO);
    /**
     * 正方形查找附近的房屋
     * @param minX
     * @param maxX
     * @param minY
     * @param maxY
     * @param keyword
     * @return
     */
    List<RentingHouseRegisterVO> nearby(@Param("minX") Double minX,@Param("maxX") Double maxX,@Param("minY")Double minY,@Param("maxY")Double maxY,@Param("keyword")String keyword);
    /**
     * 分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    IPage<RentingHouseRegisterVO> pageRentingHouseApplet(@Param("page") Page page,
                                                   @Param("pageRegisterDTO") PageRentingHouseRegisterDTO pageRegisterDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseReturnOrderDao.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.RentingHourseReturnOrder;
/**
 * 房屋租赁-房屋退租申请表(RentingHourseReturnOrder)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-23 10:49:37
 */
@Mapper
public interface RentingHourseReturnOrderDao extends BaseMapper<RentingHourseReturnOrder> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseContractConfig.java
New file
@@ -0,0 +1,90 @@
package com.panzhihua.service_community.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
 * 房屋租赁-配置项表(RentingHourseContractConfig)表实体类
 *
 * @author makejava
 * @since 2021-11-23 10:46:18
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("房屋租赁-配置项表")
public class RentingHourseContractConfig implements Serializable {
    private static final long serialVersionUID = 744873176398268704L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 配置名称
     */
    @ApiModelProperty(value = "配置名称")
    @TableField("`name`")
    private String name;
    /**
     * 配置项目
     */
    @ApiModelProperty(value = "配置项目")
    @TableField("`key`")
    private String key;
    /**
     * 配置内容
     */
    @ApiModelProperty(value = "配置内容")
    @TableField("`value`")
    private String value;
    /**
     * 如果是合同项,填写合同内容模板
     */
    @ApiModelProperty(value = "如果是合同项,填写合同内容模板")
    private String textTemplate;
    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private Long createUser;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    /**
     * 修改者
     */
    @ApiModelProperty(value = "修改者")
    private Long modifyUser;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "修改时间")
    private Date modifyDate;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseFile.java
New file
@@ -0,0 +1,117 @@
package com.panzhihua.service_community.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * 房屋租赁-涉及的文件表(RentingHourseFile)表实体类
 *
 * @author makejava
 * @since 2021-11-23 10:46:18
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("房屋租赁-涉及的文件表")
public class RentingHourseFile implements Serializable {
    private static final long serialVersionUID = -23971845137069675L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.INPUT)
    private Long id;
    /**
     * 分类(1、房源图片 2、产权证明图片 3、证件照片)
     */
    @ApiModelProperty(value = "分类(1、房源图片 2、产权证明图片 3、证件照片)")
    private Integer classification;
    /**
     * 租售登记表ID
     */
    @ApiModelProperty(value = "租售登记表ID")
    private Long refId;
    /**
     * 事件上传的资源类型(1是图片2是音频3是视频)
     */
    @ApiModelProperty(value = "事件上传的资源类型(1是图片2是音频3是视频)")
    private Integer type;
    /**
     * 资源名称
     */
    @ApiModelProperty(value = "资源名称")
    private String resourceName;
    /**
     * 资源大小
     */
    @ApiModelProperty(value = "资源大小")
    private String resourceSize;
    /**
     * 视频或音频时长
     */
    @ApiModelProperty(value = "视频或音频时长")
    private Integer resourceTime;
    /**
     * 事件上传的资源URL地址
     */
    @ApiModelProperty(value = "事件上传的资源URL地址")
    private String url;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private Long createBy;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createAt;
    /**
     * 上传标识
     */
    @ApiModelProperty(value = "上传标识")
    private Integer upload;
    /**
     * 分类(1、房源图片 2、产权证明图片 3、证件照片)
     */
    public interface Classification {
        int fytp = 1;
        int cqtp = 2;
        int zjzq = 3;
    }
    /**
     * 事件上传的资源类型(1是图片2是音频3是视频)
     */
    public interface Type {
        int picture = 1;
        int audio = 2;
        int video = 3;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseLabel.java
New file
@@ -0,0 +1,100 @@
package com.panzhihua.service_community.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * 房屋租赁-房源标签(RentingHourseLabel)表实体类
 *
 * @author makejava
 * @since 2021-11-23 10:46:37
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("房屋租赁-房源标签")
public class RentingHourseLabel implements Serializable {
    private static final long serialVersionUID = -84202933369353026L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.INPUT)
    private Long id;
    /**
     * 标签名
     */
    @ApiModelProperty(value = "标签名")
    private String name;
    /**
     * 助记码
     */
    @ApiModelProperty(value = "助记码")
    private String mnemonicCode;
    /**
     * 启用状态(0:停用,1:启用)
     */
    @ApiModelProperty(value = "启用状态(0:停用,1:启用)")
    private Integer enabled;
    /**
     * 排序号
     */
    @ApiModelProperty(value = "排序号")
    private Integer sort;
    /**
     * 备注说明
     */
    @ApiModelProperty(value = "备注说明")
    private String remarks;
    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private Long createUser;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    /**
     * 修改者
     */
    @ApiModelProperty(value = "修改者")
    private Long modifyUser;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Date modifyDate;
    /**
     * 删除标识(0:未删除,1:已删除)
     */
    @ApiModelProperty(value = "删除标识(0:未删除,1:已删除)")
    private Integer deleteFlag;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseOrder.java
New file
@@ -0,0 +1,287 @@
package com.panzhihua.service_community.entity;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * 房屋租赁-房屋订单表(RentingHourseOrder)表实体类
 *
 * @author makejava
 * @since 2021-11-23 10:46:55
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("房屋租赁-房屋订单表")
public class RentingHourseOrder implements Serializable {
    private static final long serialVersionUID = -89476181595393122L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 街道ID
     */
    @ApiModelProperty(value = "街道ID")
    private Long streetId;
    /**
     * 小区id
     */
    @ApiModelProperty(value = "小区id")
    private Long villageId;
    /**
     * 社区id
     */
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    /**
     * 小区名称
     */
    @ApiModelProperty(value = "小区名称")
    private String villageName;
    /**
     * 订单类型(1、新订单2、续租订单)
     */
    @ApiModelProperty(value = "订单类型(1、新订单2、续租订单)")
    private Integer orderType;
    /**
     * 续租订单的原订单号
     */
    @ApiModelProperty(value = "续租订单的原订单号")
    private String originOrderSn;
    /**
     * 订单SN号
     */
    @ApiModelProperty(value = "订单SN号")
    private String orderSn;
    /**
     * 交易流水号
     */
    @ApiModelProperty(value = "交易流水号")
    private Long paySn;
    /**
     * 租赁月数(多少个月)
     */
    @ApiModelProperty(value = "租赁月数(多少个月)")
    private Integer rentingMonth;
    /**
     * 建筑面积
     */
    @ApiModelProperty(value = "建筑面积")
    private String constructArea;
    /**
     * 房型
     */
    @ApiModelProperty(value = "房型")
    private String roomType;
    /**
     * 月租金
     */
    @ApiModelProperty(value = "月租金")
    private BigDecimal monthlyRentMoney;
    /**
     * 保证金
     */
    @ApiModelProperty(value = "保证金")
    private BigDecimal depositAmount;
    /**
     * 服务费
     */
    @ApiModelProperty(value = "服务费")
    private BigDecimal serverCharge;
    /**
     * 定金
     */
    @ApiModelProperty(value = "定金")
    private BigDecimal dingAmount;
    /**
     * 支付定金的订单号
     */
    @ApiModelProperty(value = "支付定金的订单号")
    private String preOrderSn;
    /**
     * 支付的定金的订单备注
     */
    @ApiModelProperty(value = "支付的定金的订单备注")
    private String preOrderNote;
    /**
     * 订单是否已经平台结算
     */
    @ApiModelProperty(value = "订单是否已经平台结算")
    private String settingFlag;
    /**
     * 结算金额
     */
    @ApiModelProperty(value = "结算金额")
    private BigDecimal settingAmount;
    /**
     * 计算订单号
     */
    @ApiModelProperty(value = "计算订单号")
    private String settingSn;
    /**
     * 平台结算时间
     */
    @ApiModelProperty(value = "平台结算时间")
    private Date settingDate;
    /**
     * 总楼层
     */
    @ApiModelProperty(value = "总楼层")
    private String totalFloor;
    /**
     * 朝向
     */
    @ApiModelProperty(value = "朝向")
    private String orientation;
    /**
     * 装饰
     */
    @ApiModelProperty(value = "装饰")
    private String decoration;
    /**
     * 房内物品
     */
    @ApiModelProperty(value = "房内物品")
    private String hourseItem;
    /**
     * 房主姓名
     */
    @ApiModelProperty(value = "房主姓名")
    private String hourseOwnerName;
    /**
     * 房主身份证
     */
    @ApiModelProperty(value = "房主身份证")
    private String hourseIdCard;
    /**
     * 房主电话
     */
    @ApiModelProperty(value = "房主电话")
    private String hoursePhone;
    /**
     * 租客的用户ID,微信用户类型
     */
    @ApiModelProperty(value = "租客的用户ID,微信用户类型")
    private Long rentingUserId;
    /**
     * 租赁开始时间
     */
    @ApiModelProperty(value = "租赁开始时间")
    private Date startDate;
    /**
     * 租赁结束时间
     */
    @ApiModelProperty(value = "租赁结束时间")
    private Date endDate;
    /**
     * 合同内容
     */
    @ApiModelProperty(value = "合同内容")
    private String contractText;
    /**
     * 已支付定金金额(已经下定金的金额)
     */
    @ApiModelProperty(value = "已支付定金金额(已经下定金的金额)")
    private BigDecimal payedDingMoney;
    /**
     * 订单最终金额
     */
    @ApiModelProperty(value = "订单最终金额")
    private BigDecimal totalAccount;
    /**
     * 1、订单未支付2、订单已支付,待房东签约3、房东已签约,合同生效4、已退款
     */
    @ApiModelProperty(value = "1、订单未支付2、订单已支付,待房东签约3、房东已签约,合同生效4、已退款")
    private Integer status;
    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private Long createUser;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    /**
     * 房屋登记ID
     */
    @ApiModelProperty(value = "房屋登记ID")
    private Long registerId;
    /**
     * 订单类型 1普通新订单 2续租订单
     */
    public interface orderType{
        int pt=1;
        int xz=2;
    }
    /**
     * 1、订单未支付2、订单已支付,待房东签约3、房东已签约,合同生效4、已退款
     */
    public interface status{
        int wzf=1;
        int yzf=2;
        int ysx=3;
        int ytk=4;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHoursePayingOrder.java
New file
@@ -0,0 +1,65 @@
package com.panzhihua.service_community.entity;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * 房屋租赁-支付流水记录表(RentingHoursePayingOrder)表实体类
 *
 * @author makejava
 * @since 2021-11-23 10:47:15
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("房屋租赁-支付流水记录表")
public class RentingHoursePayingOrder implements Serializable {
    private static final long serialVersionUID = 549655745079867000L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 支付类型
     */
    @ApiModelProperty(value = "支付类型")
    private String payType;
    /**
     * 支付时间
     */
    @ApiModelProperty(value = "支付时间")
    private Date payDate;
    /**
     * 支付金额
     */
    @ApiModelProperty(value = "支付金额")
    private BigDecimal payAmount;
    /**
     * 支付返回内容
     */
    @ApiModelProperty(value = "支付返回内容")
    private String payReturnText;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHoursePreOrder.java
New file
@@ -0,0 +1,136 @@
package com.panzhihua.service_community.entity;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * 房屋租赁-房屋定金订单表(RentingHoursePreOrder)表实体类
 *
 * @author makejava
 * @since 2021-11-23 10:47:52
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("房屋租赁-房屋定金订单表")
public class RentingHoursePreOrder implements Serializable {
    private static final long serialVersionUID = -60478773417437988L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 订单SN号
     */
    @ApiModelProperty(value = "订单SN号")
    private String orderSn;
    /**
     * 房屋登记ID
     */
    @ApiModelProperty(value = "房屋登记ID")
    private Long registerId;
    /**
     * 定金
     */
    @ApiModelProperty(value = "定金")
    private BigDecimal dingMoney;
    /**
     * 合同内容
     */
    @ApiModelProperty(value = "合同内容")
    private String contractText;
    /**
     * 0 待支付 1 已缴纳定金,待抵扣 2、合同已签订,定金已抵扣 3、房东未按时处理,定金已退款  4、已退还定金 5、未按时去和房东签约订单过期,定金不退,已失效
     */
    @ApiModelProperty(value = "0 待支付 1 已缴纳定金,待抵扣 2、合同已签订,定金已抵扣 3、房东未按时处理,定金已退款  4、已退还定金 5、未按时去和房东签约订单过期,定金不退,已失效")
    private Integer status;
    /**
     * 定金保留时间
     */
    @ApiModelProperty(value = "定金保留时间")
    private Date expireDate;
    /**
     * 房东扫描的时候绑定微信APPID
     */
    @ApiModelProperty(value = "房东扫描的时候绑定微信APPID")
    private String hourseOwnerWeixinAppid;
    /**
     * 房东的用户ID,用户表记录了房东的详细信息
     */
    @ApiModelProperty(value = "房东的用户ID,用户表记录了房东的详细信息")
    private Long hourseOwnerUserId;
    /**
     * 租客的微信APPID
     */
    @ApiModelProperty(value = "租客的微信APPID")
    private String tenantWeixinAppid;
    /**
     * 租客的用户ID,房东的用户ID,用户表记录了租客的详细信息
     */
    @ApiModelProperty(value = "租客的用户ID,房东的用户ID,用户表记录了租客的详细信息")
    private Long tenantUserId;
    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private Long createUser;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    /**
     * 流水号
     */
    @ApiModelProperty(value = "流水号")
    private Long paySn;
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    @ApiModelProperty(value = "房屋名称")
    private String villageName;
    /**
     * 0 待支付 1 已缴纳定金,待抵扣 2、合同已签订,定金已抵扣 3、房东未按时处理,定金已退款  4、已退还定金 5、未按时去和房东签约订单过期,定金不退,已失效
     */
    public interface status{
        int dzf=0;
        int yjl=1;
        int yqd=2;
        int ytk=3;
        int yth=4;
        int ysx=5;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseRefundOrder.java
New file
@@ -0,0 +1,65 @@
package com.panzhihua.service_community.entity;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * 房屋租赁-退款流水记录表(RentingHourseRefundOrder)表实体类
 *
 * @author makejava
 * @since 2021-11-23 10:48:14
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("房屋租赁-退款流水记录表")
public class RentingHourseRefundOrder implements Serializable {
    private static final long serialVersionUID = -59941753700164541L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 支付类型
     */
    @ApiModelProperty(value = "支付类型")
    private String refundPayType;
    /**
     * 支付时间
     */
    @ApiModelProperty(value = "支付时间")
    private Date refundPayDate;
    /**
     * 支付金额
     */
    @ApiModelProperty(value = "支付金额")
    private BigDecimal refundAmount;
    /**
     * 支付返回内容
     */
    @ApiModelProperty(value = "支付返回内容")
    private String returnText;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseRegister.java
New file
@@ -0,0 +1,355 @@
package com.panzhihua.service_community.entity;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.panzhihua.common.validated.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
 * 房屋租售-租赁房屋登记(RentingHourseRegister)表实体类
 *
 * @author makejava
 * @since 2021-11-23 10:49:07
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("房屋租售-租赁房屋登记")
public class RentingHourseRegister implements Serializable {
    private static final long serialVersionUID = 687172975256702649L;
    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @TableId(type = IdType.INPUT)
    private Long id;
    /**
     * 街道ID
     */
    @ApiModelProperty(value = "街道ID")
    private Long streetId;
    /**
     * 社区id
     */
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    /**
     * 小区id
     */
    @ApiModelProperty(value = "小区id")
    private Long villageId;
    /**
     * 小区名称
     */
    @ApiModelProperty(value = "小区名称")
    private String villageName;
    /**
     * 街路巷
     */
    @ApiModelProperty(value = "街路巷")
    private String alley;
    /**
     * 门牌号
     */
    @ApiModelProperty(value = "门牌号")
    private String houseNum;
    /**
     * 楼栋号
     */
    @ApiModelProperty(value = "楼栋号")
    private String buildingNo;
    /**
     * 单元号
     */
    @ApiModelProperty(value = "单元号")
    private String unitNo;
    /**
     * 楼排号
     */
    @ApiModelProperty(value = "楼排号")
    private String floor;
    /**
     * 户室(房间号)
     */
    @ApiModelProperty(value = "户室(房间号)")
    private String houseNo;
    /**
     * 房屋编号
     */
    @ApiModelProperty(value = "房屋编号")
    private String code;
    /**
     * 房屋地址
     */
    @ApiModelProperty(value = "房屋地址")
    private String address;
    /**
     * 认证码
     */
    @ApiModelProperty(value = "认证码")
    private String authCode;
    /**
     * 认证状态(1、未认证2、已认证)
     */
    @ApiModelProperty(value = "认证状态(1、未认证2、已认证)")
    private Integer authStatus;
    /**
     * 房屋状态(1、待发布 2、已发布,待出租2、出租中3、已退租
     */
    @ApiModelProperty(value = "房屋状态(1、待发布 2、已发布,待出租2、出租中3、已退租")
    private Integer status;
    /**
     * 1、待认证2、待发布3、待出租4、保留中 5出租中6、已超时7、已到期)
     */
    @ApiModelProperty(value = "1、待认证2、待发布3、待出租4、保留中 5出租中6、已超时7、已到期)")
    private Integer detailStatus;
    @ApiModelProperty(value = "房屋的经度")
    private String longitude;
    @ApiModelProperty(value = "房屋的纬度")
    private String latitude;
    /**
     * 建筑面积
     */
    @ApiModelProperty(value = "建筑面积")
    private BigDecimal constructArea;
    /**
     * 层次递归字段(省>市>区县>街道>社区>小区>详细地址)
     */
    @ApiModelProperty(value = "层次递归字段(省>市>区县>街道>社区>小区>详细地址)")
    private String path;
    /**
     * 看房电话
     */
    @ApiModelProperty(value = "看房电话")
    private String seeHourseTelephone;
    /**
     * 租房标题
     */
    @ApiModelProperty(value = "租房标题")
    private String title;
    /**
     * 室数量
     */
    @ApiModelProperty(value = "室数量")
    private Integer brn;
    /**
     * 厅数量
     */
    @ApiModelProperty(value = "厅数量")
    private Integer lrn;
    /**
     * 卫数量
     */
    @ApiModelProperty(value = "卫数量")
    private Integer wcn;
    /**
     * 房型
     */
    @ApiModelProperty(value = "房型")
    private String roomType;
    /**
     * 月租金
     */
    @ApiModelProperty(value = "月租金")
    private BigDecimal monthlyRentMoney;
    /**
     * 保证金
     */
    @ApiModelProperty(value = "保证金")
    private BigDecimal depositMoney;
    /**
     * 服务费
     */
    @ApiModelProperty(value = "服务费")
    private BigDecimal serverCharge;
    /**
     * 定金
     */
    @ApiModelProperty(value = "定金")
    private BigDecimal dingMoney;
    /**
     * 总楼层
     */
    @ApiModelProperty(value = "总楼层")
    private String totalFloor;
    /**
     * 朝向(1东2南3西4北5东南6东北7西南8西北9南北10东西)
     */
    @ApiModelProperty(value = "朝向(1东2南3西4北5东南6东北7西南8西北9南北10东西)")
    private Integer orientation;
    /**
     * 装修情况(1.毛坯房 2.简装 3.精装修)
     */
    @ApiModelProperty(value = "装修情况(1.毛坯房 2.简装 3.精装修)")
    private Integer decoration;
    /**
     * 看房时间(1.随时看房 2.提前预约)
     */
    @ApiModelProperty(value = "看房时间(1.随时看房 2.提前预约)")
    private Integer seeHourseDate;
    /**
     * 房屋介绍
     */
    @ApiModelProperty(value = "房屋介绍")
    private String hourseDescription;
    /**
     * 入住要求
     */
    @ApiModelProperty(value = "入住要求")
    private String checkInRequirement;
    /**
     * 房内物品
     */
    @ApiModelProperty(value = "房内物品")
    private String hourseItem;
    /**
     * 房屋标签
     */
    @ApiModelProperty(value = "房屋标签")
    private String label;
    /**
     * 房主姓名
     */
    @ApiModelProperty(value = "房主姓名")
    private String hourseOwnerName;
    /**
     * 房主身份证
     */
    @ApiModelProperty(value = "房主身份证")
    private String hourseIdCard;
    /**
     * 房主电话
     */
    @ApiModelProperty(value = "房主电话")
    private String hoursePhone;
    /**
     * 登记状态(1、保存草稿2、完成登记)
     */
    @ApiModelProperty(value = "登记状态(1、保存草稿2、完成登记)")
    private Integer infoStatus;
    /**
     * 房东扫描的时候绑定微信APPID
     */
    @ApiModelProperty(value = "房东扫描的时候绑定微信APPID")
    private String hourseOwnerWeixinAppid;
    /**
     * 房东的用户ID,用户表记录了房东的详细信息
     */
    @ApiModelProperty(value = "房东的用户ID,用户表记录了房东的详细信息")
    private Long hourseOwnerUserId;
    /**
     * 租客的微信APPID
     */
    @ApiModelProperty(value = "租客的微信APPID")
    private String tenantWeixinAppid;
    /**
     * 租客的用户ID,房东的用户ID,用户表记录了租客的详细信息
     */
    @ApiModelProperty(value = "租客的用户ID,房东的用户ID,用户表记录了租客的详细信息")
    private Long tenantUserId;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createAt;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Date updateAt;
    /**
     * 认证状态(1、未认证2、已认证)
     */
    public interface AuthStatus{
        int wrz = 1;
        int yrz = 2;
    }
    /**
     * 房屋状态(1、待发布 2、已发布,待出租 3、出租中 4、已退租
     */
    public interface Status{
        int dfb = 1;
        int dcz = 2;
        int czz = 3;
        int ytz = 4;
    }
    /**
     * 1、待认证2、待发布3、待出租4、保留中 5出租中6、已超时7、已到期)
     */
    public interface DetailStatus{
        int drz = 1;
        int dfb = 2;
        int dcz = 3;
        int blz = 4;
        int czz = 5;
        int ycs = 6;
        int ydq = 7;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/RentingHourseReturnOrder.java
New file
@@ -0,0 +1,173 @@
package com.panzhihua.service_community.entity;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * 房屋租赁-房屋退租申请表(RentingHourseReturnOrder)表实体类
 *
 * @author makejava
 * @since 2021-11-23 10:49:36
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("房屋租赁-房屋退租申请表")
public class RentingHourseReturnOrder implements Serializable {
    private static final long serialVersionUID = -79596119735529836L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 退租订单号(直接使用原订单SN作为退租订单号)
     */
    @ApiModelProperty(value = "退租订单号(直接使用原订单SN作为退租订单号)")
    private String orderSn;
    /**
     * 退租时间
     */
    @ApiModelProperty(value = "退租时间")
    private Date endDate;
    /**
     * 水电气扣费
     */
    @ApiModelProperty(value = "水电气扣费")
    private String waterAndElectricityDeductionFee;
    /**
     * 水电气扣费说明
     */
    @ApiModelProperty(value = "水电气扣费说明")
    private String waterAndElectricityDetail;
    /**
     * 水电气扣费图片
     */
    @ApiModelProperty(value = "水电气扣费图片")
    private String waterAndElectricityDetailImages;
    /**
     * 物品损坏费
     */
    @ApiModelProperty(value = "物品损坏费")
    private String itemDeductionFee;
    /**
     * 物品损坏图片
     */
    @ApiModelProperty(value = "物品损坏图片")
    private String itemDeductionDetailImages;
    /**
     * 物品损坏费详情说明
     */
    @ApiModelProperty(value = "物品损坏费详情说明")
    private String itemDeductionDetail;
    /**
     * 违约金
     */
    @ApiModelProperty(value = "违约金")
    private String penaltyDeductionFee;
    /**
     * 违约金详情说明
     */
    @ApiModelProperty(value = "违约金详情说明")
    private String penaltyDeductionFeeDetail;
    /**
     * 违约金图片
     */
    @ApiModelProperty(value = "违约金图片")
    private String penaltyDeductionDetailImages;
    /**
     * 结算金额
     */
    @ApiModelProperty(value = "结算金额")
    private BigDecimal settlementAmount;
    /**
     * 退租状态(1、提交成功2、房东核算结算3、租客核算结算4、房东完成结算,退租成功)
     */
    @ApiModelProperty(value = "退租状态(1、提交成功2、房东核算结算3、租客核算结算4、房东完成结算,退租成功)")
    private Integer status;
    /**
     * 支付对象(1、房东退费2、租客补交)
     */
    @ApiModelProperty(value = "支付对象(1、房东退费2、租客补交)")
    private BigDecimal payObject;
    /**
     * 支付订单号
     */
    @ApiModelProperty(value = "支付订单号")
    private String payOrderSn;
    /**
     * 支付金额
     */
    @ApiModelProperty(value = "支付金额")
    private BigDecimal payOrderAmount;
    /**
     * 支付时间
     */
    @ApiModelProperty(value = "支付时间")
    private Date payOrderDate;
    /**
     * 备注说明
     */
    @ApiModelProperty(value = "备注说明")
    private String remarks;
    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private Long createUser;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    /**
     * 修改者
     */
    @ApiModelProperty(value = "修改者")
    private Long modifyUser;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Date modifyDate;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/message/OrderMessage.java
New file
@@ -0,0 +1,42 @@
package com.panzhihua.service_community.message;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO;
import com.panzhihua.service_community.dao.RentingHourseOrderDao;
import com.panzhihua.service_community.dao.RentingHoursePreOrderDao;
import com.panzhihua.service_community.dao.RentingHourseRegisterDao;
import com.panzhihua.service_community.entity.RentingHourseOrder;
import com.panzhihua.service_community.entity.RentingHoursePreOrder;
import com.panzhihua.service_community.entity.RentingHourseRegister;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
 * @author zzj
 */
@Component
public class OrderMessage {
    public static final String DELAYED_QUEUE="order.queue";
    @Resource
    private RentingHourseOrderDao rentingHourseOrderDao;
    @Resource
    private RentingHourseRegisterDao rentingHourseRegisterDao;
    @RabbitListener(queues=DELAYED_QUEUE)
    public void cancelProOrder(RentingHourseOrder rentingHourseOrderVO){
        RentingHourseOrder rentingHourseOrder=rentingHourseOrderDao.selectById(rentingHourseOrderVO.getId());
        if(rentingHourseOrder!=null){
            if(rentingHourseOrder.getStatus().equals(rentingHourseOrderVO.getStatus())){
                rentingHourseOrder.setStatus(RentingHourseOrder.status.ytk);
                rentingHourseOrderDao.updateById(rentingHourseOrder);
                //超时修改房屋状态
                RentingHourseRegister rentingHourseRegister=new RentingHourseRegister();
                rentingHourseRegister.setId(rentingHourseOrder.getRegisterId());
                rentingHourseRegister.setDetailStatus(3);
                rentingHourseRegisterDao.updateById(rentingHourseRegister);
                //退款逻辑待开发
            }
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/message/PreOrderMessage.java
New file
@@ -0,0 +1,40 @@
package com.panzhihua.service_community.message;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO;
import com.panzhihua.service_community.dao.RentingHoursePreOrderDao;
import com.panzhihua.service_community.dao.RentingHourseRegisterDao;
import com.panzhihua.service_community.entity.RentingHoursePreOrder;
import com.panzhihua.service_community.entity.RentingHourseRegister;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
 * @author zzj
 */
@Component
public class PreOrderMessage {
    public static final String DELAYED_QUEUE="preOrder.queue";
    @Resource
    private RentingHoursePreOrderDao rentingHoursePreOrderDao;
    @Resource
    private RentingHourseRegisterDao rentingHourseRegisterDao;
    @RabbitListener(queues=DELAYED_QUEUE)
    public void cancelProOrder(RentingHoursePreOrder rentingHoursePreOrderVO){
        if(rentingHoursePreOrderVO!=null){
            RentingHoursePreOrder rentingHoursePreOrder=rentingHoursePreOrderDao.selectById(rentingHoursePreOrderVO.getId());
            if(rentingHoursePreOrder.getStatus().equals(rentingHoursePreOrderVO.getStatus())){
                rentingHoursePreOrder.setStatus(RentingHoursePreOrder.status.ysx);
                rentingHoursePreOrderDao.updateById(rentingHoursePreOrder);
                //超时修改房屋状态
                RentingHourseRegister rentingHourseRegister=new RentingHourseRegister();
                rentingHourseRegister.setId(rentingHoursePreOrderVO.getRegisterId());
                rentingHourseRegister.setDetailStatus(3);
                rentingHourseRegisterDao.updateById(rentingHourseRegister);
            }
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseContractConfigService.java
New file
@@ -0,0 +1,45 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHousesConfigDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHousesConfigDTO;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.RentingHourseContractConfig;
/**
 * 房屋租赁-配置项表(RentingHourseContractConfig)表服务接口
 *
 * @author makejava
 * @since 2021-11-23 10:46:19
 */
public interface RentingHourseContractConfigService extends IService<RentingHourseContractConfig> {
    /**
     * 分页查询
     *
     * @param commonPage
     * @return
     */
    R pageList(CommonPage commonPage);
    /**
     * 分页查询房屋租赁基础配置
     * @param pageRentingHousesConfigDTO
     * @return
     */
    R pageRentingHousesConfig(PageRentingHousesConfigDTO pageRentingHousesConfigDTO);
    /**
     * 更新配置信息
     * @param rentingHousesConfigDTO
     * @return
     */
    R updateRentingHousesConfig(RentingHousesConfigDTO rentingHousesConfigDTO);
    /**
     * 获取房屋租赁配置
     * @return
     * @param type
     */
    R getRentingHouseConfig(Integer type);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseFileService.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.service_community.service;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.RentingHourseFile;
/**
 * 房屋租赁-涉及的文件表(RentingHourseFile)表服务接口
 *
 * @author makejava
 * @since 2021-11-23 10:46:19
 */
public interface RentingHourseFileService extends IService<RentingHourseFile> {
    /**
     * 分页查询
     *
     * @param commonPage
     * @return
     */
    R pageList(CommonPage commonPage);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseLabelService.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.service_community.service;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.RentingHourseLabel;
/**
 * 房屋租赁-房源标签(RentingHourseLabel)表服务接口
 *
 * @author makejava
 * @since 2021-11-23 10:46:38
 */
public interface RentingHourseLabelService extends IService<RentingHourseLabel> {
    /**
     * 分页查询
     *
     * @param commonPage
     * @return
     */
    R pageList(CommonPage commonPage);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseOrderService.java
New file
@@ -0,0 +1,53 @@
package com.panzhihua.service_community.service;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayNotifyOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayOrderVO;
import com.panzhihua.service_community.entity.RentingHourseOrder;
/**
 * 房屋租赁-房屋订单表(RentingHourseOrder)表服务接口
 *
 * @author makejava
 * @since 2021-11-23 10:46:56
 */
public interface RentingHourseOrderService extends IService<RentingHourseOrder> {
    /**
     * 分页查询
     *
     * @param commonPage
     * @return
     */
    R pageList(CommonPage commonPage);
    /**
     * 创建普通订单
     * @param rentingHourseOrderVO
     * @return
     */
    R createOrder(RentingHourseOrderVO rentingHourseOrderVO);
    /**
     * 微信成功支付回调
     * @param wxPayNotifyOrderVO
     * @return
     */
    R wxPayNotify(WxPayNotifyOrderVO wxPayNotifyOrderVO);
    /**
     * 微信支付
     * @param wxPayOrderVO
     * @return
     */
    R wxPay(WxPayOrderVO wxPayOrderVO);
    /**
     * 订单统计
     * @param rentingHourseOrderVO
     * @return
     */
    R statics(RentingHourseOrderVO rentingHourseOrderVO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHoursePayingOrderService.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.service_community.service;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.RentingHoursePayingOrder;
/**
 * 房屋租赁-支付流水记录表(RentingHoursePayingOrder)表服务接口
 *
 * @author makejava
 * @since 2021-11-23 10:47:16
 */
public interface RentingHoursePayingOrderService extends IService<RentingHoursePayingOrder> {
    /**
     * 分页查询
     *
     * @param commonPage
     * @return
     */
    R pageList(CommonPage commonPage);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHoursePreOrderService.java
New file
@@ -0,0 +1,37 @@
package com.panzhihua.service_community.service;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO;
import com.panzhihua.service_community.entity.RentingHoursePreOrder;
/**
 * 房屋租赁-房屋定金订单表(RentingHoursePreOrder)表服务接口
 *
 * @author makejava
 * @since 2021-11-23 10:47:53
 */
public interface RentingHoursePreOrderService extends IService<RentingHoursePreOrder> {
    /**
     * 分页查询
     *
     * @param commonPage
     * @return
     */
    R pageList(CommonPage commonPage);
    /**
     * 创建定金订单
     * @param rentingHoursePreOrderVO
     * @return
     */
    R createOrder(RentingHoursePreOrderVO rentingHoursePreOrderVO);
    /**
     * 定金订单统计
     * @param rentingHoursePreOrderVO
     * @return
     */
    R statics(RentingHoursePreOrderVO rentingHoursePreOrderVO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseRefundOrderService.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.service_community.service;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.RentingHourseRefundOrder;
/**
 * 房屋租赁-退款流水记录表(RentingHourseRefundOrder)表服务接口
 *
 * @author makejava
 * @since 2021-11-23 10:48:14
 */
public interface RentingHourseRefundOrderService extends IService<RentingHourseRefundOrder> {
    /**
     * 分页查询
     *
     * @param commonPage
     * @return
     */
    R pageList(CommonPage commonPage);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseRegisterService.java
New file
@@ -0,0 +1,78 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.community.rentingHouses.NearbyDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.ReleaseOrCancelHouseDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHouseRegisterDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.RentingHourseRegister;
/**
 * 房屋租售-租赁房屋登记(RentingHourseRegister)表服务接口
 *
 * @author makejava
 * @since 2021-11-23 10:49:08
 */
public interface RentingHourseRegisterService extends IService<RentingHourseRegister> {
    /**
     * 新增房源信息
     * @param registerDTO
     * @return
     */
    R registerRentingHouse(RentingHouseRegisterDTO registerDTO);
    /**
     * 编辑房源信息
     * @param registerDTO
     * @return
     */
    R updateRentingHouse(RentingHouseRegisterDTO registerDTO);
    /**
     * 分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    R pageRentingHouse(PageRentingHouseRegisterDTO pageRegisterDTO);
    /**
     * 发布/取消发布 房源信
     * @param releaseOrCancelHouseDTO
     * @return
     */
    R releaseOrCancelHouse(ReleaseOrCancelHouseDTO releaseOrCancelHouseDTO);
    /**
     * 删除房源信息
     * @param registerId
     * @return
     */
    R deleteRentingHouse(Long registerId);
    /**
     * 获取详情-房源信息
     * @param registerId
     * @return
     */
    R getRentingHouse(Long registerId);
    /**
     * 附近的房屋
     * @param nearbyDTO
     * @return
     */
    R nearby(NearbyDTO nearbyDTO);
    /**
     * 小程序分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    R pageRentingHouseApplet(PageRentingHouseRegisterDTO pageRegisterDTO);
    /**
     * 方便手动调用批量更新
     */
    void updateAllHouseUnionAppCode();
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/RentingHourseReturnOrderService.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.service_community.service;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.RentingHourseReturnOrder;
/**
 * 房屋租赁-房屋退租申请表(RentingHourseReturnOrder)表服务接口
 *
 * @author makejava
 * @since 2021-11-23 10:49:37
 */
public interface RentingHourseReturnOrderService extends IService<RentingHourseReturnOrder> {
    /**
     * 分页查询
     *
     * @param commonPage
     * @return
     */
    R pageList(CommonPage commonPage);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseContractConfigServiceImpl.java
New file
@@ -0,0 +1,104 @@
package com.panzhihua.service_community.service.impl;
import static java.util.Objects.nonNull;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHousesConfigDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHousesConfigDTO;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentingHouses.RentingHousesConfigVO;
import com.panzhihua.service_community.dao.RentingHourseContractConfigDao;
import com.panzhihua.service_community.entity.RentingHourseContractConfig;
import com.panzhihua.service_community.service.RentingHourseContractConfigService;
import lombok.extern.slf4j.Slf4j;
/**
 * 房屋租赁-配置项表(RentingHourseContractConfig)表服务实现类
 *
 * @author makejava
 * @since 2021-11-23 10:46:20
 */
@Slf4j
@Service
public class RentingHourseContractConfigServiceImpl extends ServiceImpl<RentingHourseContractConfigDao, RentingHourseContractConfig> implements RentingHourseContractConfigService {
    @Override
    public R pageList(CommonPage commonPage) {
        return null;
    }
    /**
     * 分页查询房屋租赁基础配置
     * @param pageRentingHousesConfigDTO
     * @return
     */
    @Override
    public R pageRentingHousesConfig(PageRentingHousesConfigDTO pageRentingHousesConfigDTO) {
        Page page = new Page<>();
        page.setCurrent(pageRentingHousesConfigDTO.getPageNum());
        page.setSize(pageRentingHousesConfigDTO.getPageSize());
        return R.ok(this.baseMapper.pageRentingHousesConfig(page, pageRentingHousesConfigDTO));
    }
    /**
     * 更新配置信息
     * @param rentingHousesConfigDTO
     * @return
     */
    @Override
    public R updateRentingHousesConfig(RentingHousesConfigDTO rentingHousesConfigDTO) {
        RentingHourseContractConfig config = this.baseMapper.selectById(rentingHousesConfigDTO.getId());
        if (nonNull(config)) {
            config.setValue(rentingHousesConfigDTO.getValue());
            this.baseMapper.updateById(config);
        }
        return R.ok();
    }
    /**
     * 获取房屋租赁配置
     * @return
     * @param type
     */
    @Override
    public R getRentingHouseConfig(Integer type) {
        String configKey = "";
        switch (type) {
            case 1:
                configKey = "houseRentalContract";
                break;
            case 2:
                configKey = "leaseContractModificationAgreement";
                break;
            case 3:
                configKey = "earnestDepositAgreement";
                break;
            case 4:
                configKey = "houseAgencyContract";
                break;
            case 5:
                configKey = "platformInstructions";
                break;
            case 6:
                configKey = "houseLabel";
                break;
            default:
                break;
        }
        RentingHourseContractConfig houseConfig = this.baseMapper.selectOne(new QueryWrapper<RentingHourseContractConfig>()
                .lambda().eq(RentingHourseContractConfig::getKey, configKey));
        if (nonNull(houseConfig)) {
            RentingHousesConfigVO configVO = new RentingHousesConfigVO();
            BeanUtils.copyProperties(houseConfig, configVO);
            return R.ok(configVO);
        }
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseFileServiceImpl.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.RentingHourseFile;
import com.panzhihua.service_community.dao.RentingHourseFileDao;
import com.panzhihua.service_community.service.RentingHourseFileService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
 * 房屋租赁-涉及的文件表(RentingHourseFile)表服务实现类
 *
 * @author makejava
 * @since 2021-11-23 10:46:20
 */
@Slf4j
@Service
public class RentingHourseFileServiceImpl extends ServiceImpl<RentingHourseFileDao, RentingHourseFile> implements RentingHourseFileService {
    @Override
    public R pageList(CommonPage commonPage) {
        return null;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseLabelServiceImpl.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.RentingHourseLabel;
import com.panzhihua.service_community.dao.RentingHourseLabelDao;
import com.panzhihua.service_community.service.RentingHourseLabelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
 * 房屋租赁-房源标签(RentingHourseLabel)表服务实现类
 *
 * @author makejava
 * @since 2021-11-23 10:46:39
 */
@Slf4j
@Service
public class RentingHourseLabelServiceImpl extends ServiceImpl<RentingHourseLabelDao, RentingHourseLabel> implements RentingHourseLabelService {
    @Override
    public R pageList(CommonPage commonPage) {
        return null;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseOrderServiceImpl.java
New file
@@ -0,0 +1,182 @@
package com.panzhihua.service_community.service.impl;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayNotifyOrderVO;
import com.panzhihua.common.model.vos.community.rentHouse.WxPayOrderVO;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.common.utlis.Snowflake;
import com.panzhihua.common.utlis.WxPayUtils;
import com.panzhihua.common.utlis.WxUtil;
import com.panzhihua.service_community.dao.RentingHoursePayingOrderDao;
import com.panzhihua.service_community.dao.RentingHoursePreOrderDao;
import com.panzhihua.service_community.dao.RentingHourseRegisterDao;
import com.panzhihua.service_community.entity.RentingHourseOrder;
import com.panzhihua.service_community.dao.RentingHourseOrderDao;
import com.panzhihua.service_community.entity.RentingHoursePayingOrder;
import com.panzhihua.service_community.entity.RentingHoursePreOrder;
import com.panzhihua.service_community.entity.RentingHourseRegister;
import com.panzhihua.service_community.service.RentingHourseOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * 房屋租赁-房屋订单表(RentingHourseOrder)表服务实现类
 *
 * @author makejava
 * @since 2021-11-23 10:46:57
 */
@Slf4j
@Service
public class RentingHourseOrderServiceImpl extends ServiceImpl<RentingHourseOrderDao, RentingHourseOrder> implements RentingHourseOrderService {
    @Resource
    private RentingHoursePreOrderDao rentingHoursePreOrderDao;
    @Resource
    private RentingHourseOrderDao rentingHourseOrderDao;
    @Resource
    private RentingHoursePayingOrderDao rentingHoursePayingOrderDao;
    @Resource
    private RentingHourseRegisterDao rentingHourseRegisterDao;
    @Resource
    private RabbitTemplate rabbitTemplate;
    @Value("${min.app.isTest}")
    private Boolean isTest;
    @Value("${min.app.appid}")
    private String appid;
    @Value("${min.app.payKey}")
    private String payKey;
    @Value("${min.app.mchId}")
    private String mchId;
    @Value("${min.app.notifyUrl}")
    private String notifyUrl;
    @Override
    public R pageList(CommonPage commonPage) {
        return R.ok(rentingHourseOrderDao.pageList(new Page(commonPage.getPage(), commonPage.getSize()),commonPage));
    }
    @Override
    public R createOrder(RentingHourseOrderVO rentingHourseOrderVO) {
        RentingHourseOrder rentingHourseOrder=new RentingHourseOrder();
        BeanUtils.copyProperties(rentingHourseOrderVO,rentingHourseOrder);
        RentingHourseRegister rentingHourseRegister=rentingHourseRegisterDao.selectById(rentingHourseOrderVO.getRegisterId());
        if(rentingHourseRegister==null){
            return R.fail("未查询到该租房信息");
        }
        if(rentingHourseRegister.getStatus()!=RentingHourseRegister.Status.dcz&&rentingHourseRegister.getDetailStatus()!=3){
            return R.fail("该房屋状态不可出租");
        }
        rentingHourseOrder.setVillageId(rentingHourseRegister.getVillageId());
        rentingHourseOrder.setVillageName(rentingHourseRegister.getVillageName());
        rentingHourseOrder.setStreetId(rentingHourseRegister.getStreetId());
        rentingHourseOrder.setCreateDate(new Date());
        rentingHourseOrder.setId(Snowflake.getId());
        rentingHourseOrder.setOrderSn(DateUtils.getCurrentDateTimeStamp()+"");
        rentingHourseOrder.setStatus(RentingHourseOrder.status.wzf);
        rentingHourseOrder.setOrderType(RentingHourseOrder.orderType.pt);
        if(rentingHourseOrderDao.insert(rentingHourseOrder)>0){
            return R.ok(rentingHourseOrder.getOrderSn());
        }
        return R.fail("添加失败");
    }
    /**
     * 支付回调  判断订单类型并进行相应的逻辑处理
     * @param wxPayNotifyOrderVO
     * @return
     */
    @Override
    public R wxPayNotify(WxPayNotifyOrderVO wxPayNotifyOrderVO) {
        RentingHoursePayingOrder rentingHoursePayingOrder=new RentingHoursePayingOrder();
        BeanUtils.copyProperties(wxPayNotifyOrderVO,rentingHoursePayingOrder);
        rentingHoursePayingOrder.setId(Snowflake.getId());
        rentingHoursePayingOrderDao.insert(rentingHoursePayingOrder);
        RentingHourseOrder rentingHourseOrder=rentingHourseOrderDao.selectOne(new QueryWrapper<RentingHourseOrder>().lambda().eq(RentingHourseOrder::getOrderSn,wxPayNotifyOrderVO.getOrderSn()));
        RentingHoursePreOrder rentingHoursePreOrder=rentingHoursePreOrderDao.selectOne(new QueryWrapper<RentingHoursePreOrder>().lambda().eq(RentingHoursePreOrder::getOrderSn,wxPayNotifyOrderVO.getOrderSn()));
        if(rentingHourseOrder!=null){
            rentingHourseOrder.setStatus(RentingHourseOrder.status.yzf);
            rentingHourseOrder.setPaySn(rentingHoursePayingOrder.getId());
            rentingHourseOrderDao.updateById(rentingHourseOrder);
            RentingHourseRegister rentingHourseRegister=rentingHourseRegisterDao.selectById(rentingHourseOrder.getRegisterId());
            rentingHourseRegister.setStatus(2);
            rentingHourseRegister.setDetailStatus(4);
            rentingHourseRegisterDao.updateById(rentingHourseRegister);
            rabbitTemplate.convertAndSend("order.exchange", "order.key", rentingHourseOrder, message -> {
                message.getMessageProperties().setHeader("x-delay", dateToSecond(DateUtil.endOfDay(DateUtil.date())) * 1000 * 3600);
                return message;
            });
        }
        if(rentingHoursePreOrder!=null){
            rentingHoursePreOrder.setStatus(RentingHoursePreOrder.status.yjl);
            rentingHoursePreOrder.setPaySn(rentingHoursePayingOrder.getId());
            rentingHoursePreOrderDao.updateById(rentingHoursePreOrder);
            RentingHourseRegister rentingHourseRegister=rentingHourseRegisterDao.selectById(rentingHourseOrder.getRegisterId());
            rentingHourseRegister.setStatus(2);
            rentingHourseRegister.setDetailStatus(4);
            rentingHourseRegisterDao.updateById(rentingHourseRegister);
            rabbitTemplate.convertAndSend("preOrder.exchange", "preOrder.key", rentingHoursePreOrder, message -> {
                message.getMessageProperties().setHeader("x-delay", dateToSecond(rentingHoursePreOrder.getExpireDate()) * 1000 * 3600);
                return message;
            });
        }
        return R.ok();
    }
    @Override
    public R wxPay(WxPayOrderVO wxPayOrderVO) {
        RentingHourseOrder rentingHourseOrder=rentingHourseOrderDao.selectOne(new QueryWrapper<RentingHourseOrder>().lambda().eq(RentingHourseOrder::getOrderSn,wxPayOrderVO.getOrderSn()));
        RentingHoursePreOrder rentingHoursePreOrder=rentingHoursePreOrderDao.selectOne(new QueryWrapper<RentingHoursePreOrder>().lambda().eq(RentingHoursePreOrder::getOrderSn,wxPayOrderVO.getOrderSn()));
        if(rentingHourseOrder!=null){
            try {
                BigDecimal money = rentingHourseOrder.getTotalAccount();
                if (isTest) {
                    money = BigDecimal.valueOf(0.01);
                }
                // 调用wx支付
                WxPayUtils.getUnifiedorder(appid, mchId, payKey, notifyUrl, "签订租房合同", wxPayOrderVO.getOpenId(),
                        wxPayOrderVO.getOrderSn(), money);
                return R.ok();
            } catch (Exception e) {
                log.error("调用微信支付异常,异常原因:" + e.getMessage());
            }
        }
        if(rentingHoursePreOrder!=null){
            try {
                BigDecimal money = rentingHoursePreOrder.getDingMoney();
                if (isTest) {
                    money = BigDecimal.valueOf(0.01);
                }
                // 调用wx支付
                WxPayUtils.getUnifiedorder(appid, mchId, payKey, notifyUrl, "定金支付", wxPayOrderVO.getOpenId(),
                        wxPayOrderVO.getOrderSn(), money);
                return R.ok();
            } catch (Exception e) {
                log.error("调用微信支付异常,异常原因:" + e.getMessage());
            }
        }
        return R.fail("订单信息异常");
    }
    @Override
    public R statics(RentingHourseOrderVO rentingHourseOrderVO) {
        return R.ok(this.rentingHourseOrderDao.orderStatics(rentingHourseOrderVO));
    }
    private Long dateToSecond(Date expireTime){
        return DateUtil.between(new Date(),expireTime, DateUnit.MS);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHoursePayingOrderServiceImpl.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.RentingHoursePayingOrder;
import com.panzhihua.service_community.dao.RentingHoursePayingOrderDao;
import com.panzhihua.service_community.service.RentingHoursePayingOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
 * 房屋租赁-支付流水记录表(RentingHoursePayingOrder)表服务实现类
 *
 * @author makejava
 * @since 2021-11-23 10:47:17
 */
@Slf4j
@Service
public class RentingHoursePayingOrderServiceImpl extends ServiceImpl<RentingHoursePayingOrderDao, RentingHoursePayingOrder> implements RentingHoursePayingOrderService {
    @Override
    public R pageList(CommonPage commonPage) {
        return null;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHoursePreOrderServiceImpl.java
New file
@@ -0,0 +1,69 @@
package com.panzhihua.service_community.service.impl;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.common.utlis.Snowflake;
import com.panzhihua.service_community.dao.RentingHourseRegisterDao;
import com.panzhihua.service_community.entity.RentingHoursePreOrder;
import com.panzhihua.service_community.dao.RentingHoursePreOrderDao;
import com.panzhihua.service_community.entity.RentingHourseRegister;
import com.panzhihua.service_community.service.RentingHoursePreOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
/**
 * 房屋租赁-房屋定金订单表(RentingHoursePreOrder)表服务实现类
 *
 * @author makejava
 * @since 2021-11-23 10:47:54
 */
@Slf4j
@Service
public class RentingHoursePreOrderServiceImpl extends ServiceImpl<RentingHoursePreOrderDao, RentingHoursePreOrder> implements RentingHoursePreOrderService {
    @Resource
    private RentingHoursePreOrderDao rentingHoursePreOrderDao;
    @Resource
    private RentingHourseRegisterDao rentingHourseRegisterDao;
    @Override
    public R pageList(CommonPage commonPage) {
        return R.ok(this.rentingHoursePreOrderDao.pageList(new Page(commonPage.getPage(), commonPage.getSize()),commonPage));
    }
    @Override
    public R createOrder(RentingHoursePreOrderVO rentingHoursePreOrderVO) {
        RentingHourseRegister rentingHourseRegister=rentingHourseRegisterDao.selectById(rentingHoursePreOrderVO.getRegisterId());
        if(rentingHourseRegister==null){
            return R.fail("未查询到该租房信息");
        }
        if(rentingHourseRegister.getStatus()!=RentingHourseRegister.Status.dcz&&rentingHourseRegister.getDetailStatus()!=3){
            return R.fail("该房屋状态不可出租");
        }
        RentingHoursePreOrder rentingHoursePreOrder=new RentingHoursePreOrder();
        BeanUtils.copyProperties(rentingHoursePreOrderVO,rentingHoursePreOrder);
        rentingHoursePreOrder.setVillageName(rentingHourseRegister.getVillageName());
        rentingHoursePreOrder.setId(Snowflake.getId());
        rentingHoursePreOrder.setOrderSn(DateUtils.getCurrentDateTimeStamp()+"");
        rentingHoursePreOrder.setStatus(RentingHoursePreOrder.status.dzf);
        if(rentingHoursePreOrderDao.insert(rentingHoursePreOrder)>0){
            return R.ok(rentingHoursePreOrder.getOrderSn());
        }
        return R.fail("创建定金订单失败");
    }
    @Override
    public R statics(RentingHoursePreOrderVO rentingHoursePreOrderVO) {
        return R.ok(this.rentingHoursePreOrderDao.statics(rentingHoursePreOrderVO));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseRefundOrderServiceImpl.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.RentingHourseRefundOrder;
import com.panzhihua.service_community.dao.RentingHourseRefundOrderDao;
import com.panzhihua.service_community.service.RentingHourseRefundOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
 * 房屋租赁-退款流水记录表(RentingHourseRefundOrder)表服务实现类
 *
 * @author makejava
 * @since 2021-11-23 10:48:15
 */
@Slf4j
@Service
public class RentingHourseRefundOrderServiceImpl extends ServiceImpl<RentingHourseRefundOrderDao, RentingHourseRefundOrder> implements RentingHourseRefundOrderService {
    @Override
    public R pageList(CommonPage commonPage) {
        return null;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseRegisterServiceImpl.java
New file
@@ -0,0 +1,428 @@
package com.panzhihua.service_community.service.impl;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.community.rentingHouses.NearbyDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.ReleaseOrCancelHouseDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHouseRegisterDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO;
import com.panzhihua.common.utlis.Snowflake;
import com.panzhihua.service_community.dao.ComActVillageDAO;
import com.panzhihua.service_community.dao.RentingHourseContractConfigDao;
import com.panzhihua.service_community.dao.RentingHourseRegisterDao;
import com.panzhihua.service_community.entity.RentingHourseContractConfig;
import com.panzhihua.service_community.entity.RentingHourseFile;
import com.panzhihua.service_community.entity.RentingHourseRegister;
import com.panzhihua.service_community.model.dos.ComMngVillageDO;
import com.panzhihua.service_community.service.RentingHourseFileService;
import com.panzhihua.service_community.service.RentingHourseRegisterService;
import com.panzhihua.service_community.util.NearbyUtil;
import com.panzhihua.service_community.util.QRCodeUtil;
import com.panzhihua.service_community.util.WxMaConfiguration;
import com.spatial4j.core.shape.Rectangle;
import cn.binarywang.wx.miniapp.api.WxMaQrcodeService;
import cn.hutool.core.codec.Base64;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
/**
 * 房屋租售-租赁房屋登记(RentingHourseRegister)表服务实现类
 *
 * @author makejava
 * @since 2021-11-23 10:49:08
 */
@Slf4j
@Service
public class RentingHourseRegisterServiceImpl extends ServiceImpl<RentingHourseRegisterDao, RentingHourseRegister> implements RentingHourseRegisterService {
    private static final String HOUSE_DETAIL_PAGE = "packageB/pages/house/houseDetails/houseDetails";
    @Resource
    private ComActVillageDAO comActVillageDAO;
    @Resource
    private RentingHourseFileService rentingHourseFileService;
    @Resource
    private RentingHourseContractConfigDao rentingHourseContractConfigDao;
    @Resource
    private WxMaConfiguration wxMaConfiguration;
    /**
     * 新增房源信息
     * @param registerDTO
     * @return
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R registerRentingHouse(RentingHouseRegisterDTO registerDTO) {
        Long communityId = registerDTO.getCommunityId();
        Long userId = registerDTO.getUserId();
        RentingHourseRegister houseRegister = new RentingHourseRegister();
        BeanUtils.copyProperties(registerDTO, houseRegister);
        Date nowDate = new Date();
        houseRegister.setId(Snowflake.getId());
        houseRegister.setAuthStatus(RentingHourseRegister.AuthStatus.wrz);
        houseRegister.setStatus(RentingHourseRegister.Status.dfb);
        houseRegister.setDetailStatus(RentingHourseRegister.DetailStatus.drz);
        houseRegister.setInfoStatus(2);
        houseRegister.setCreateAt(nowDate);
        houseRegister.setUpdateAt(nowDate);
        try {
            WxMaQrcodeService qrCodeService = wxMaConfiguration.getMaService().getQrcodeService();
            byte[] bytes = qrCodeService.createWxaCodeUnlimitBytes("id=" + houseRegister.getId() + "&type=6",
                    HOUSE_DETAIL_PAGE, 30, true, null, false);
            String authCode = String.format("data:image/png;base64,%s", Base64.encode(bytes));
            houseRegister.setAuthCode(authCode);
        } catch (WxErrorException e) {
            log.error("生成房源认证码失败【{}】", e.getMessage());
            return R.fail("生成房源认证码失败,请稍后重试");
        }
        //街道id
        //小区id
        List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda()
                .eq(ComMngVillageDO::getCommunityId, communityId)
                .eq(ComMngVillageDO::getAlley, registerDTO.getAlley())
                .eq(ComMngVillageDO::getHouseNum, registerDTO.getHouseNum()));
        Long streetId = 0L;
        Long villageId = 0L;
        if (!villageList.isEmpty()) {
            ComMngVillageDO village = villageList.stream().sorted(Comparator.comparing(ComMngVillageDO::getCreateAt).reversed()).findFirst().get();
            streetId = village.getStreetId();
            villageId = village.getVillageId();
            houseRegister.setStreetId(streetId);
            houseRegister.setVillageId(villageId);
        }
        //房屋编号 streetId + communityId + villageId + timestamp
        String code = "" + streetId + communityId + villageId + nowDate.toInstant().getEpochSecond();
        houseRegister.setCode(code);
        int result = this.baseMapper.insert(houseRegister);
        if (result > 0) {
            //图片存储
            Long registerId = houseRegister.getId();
            List<RentingHourseFile> files = new ArrayList<>();
            List<String> housePictures = registerDTO.getHousePictures();
            if (!housePictures.isEmpty()) {
                housePictures.forEach(e -> {
                    RentingHourseFile file = new RentingHourseFile();
                    file.setId(Snowflake.getId());
                    file.setClassification(RentingHourseFile.Classification.fytp);
                    file.setRefId(registerId);
                    file.setType(RentingHourseFile.Type.picture);
                    file.setUrl(e);
                    file.setCreateBy(userId);
                    file.setCreateAt(nowDate);
                    files.add(file);
                });
            }
            List<String> propertyPictures = registerDTO.getPropertyPictures();
            if (!propertyPictures.isEmpty()) {
                propertyPictures.forEach(e -> {
                    RentingHourseFile file = new RentingHourseFile();
                    file.setId(Snowflake.getId());
                    file.setClassification(RentingHourseFile.Classification.cqtp);
                    file.setRefId(registerId);
                    file.setType(RentingHourseFile.Type.picture);
                    file.setUrl(e);
                    file.setCreateBy(userId);
                    file.setCreateAt(nowDate);
                    files.add(file);
                });
            }
            List<String> credentialsPictures = registerDTO.getCredentialsPictures();
            if (!credentialsPictures.isEmpty()) {
                credentialsPictures.forEach(e -> {
                    RentingHourseFile file = new RentingHourseFile();
                    file.setId(Snowflake.getId());
                    file.setClassification(RentingHourseFile.Classification.zjzq);
                    file.setRefId(registerId);
                    file.setType(RentingHourseFile.Type.picture);
                    file.setUrl(e);
                    file.setCreateBy(userId);
                    file.setCreateAt(nowDate);
                    files.add(file);
                });
            }
            rentingHourseFileService.saveBatch(files);
            return R.ok();
        }
        return R.fail("新增房源失败");
    }
    /**
     * 编辑房源信息
     * @param registerDTO
     * @return
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R updateRentingHouse(RentingHouseRegisterDTO registerDTO) {
        Long id = registerDTO.getId();
        Long userId = registerDTO.getUserId();
        RentingHourseRegister houseRegister = this.baseMapper.selectById(id);
        if (isNull(houseRegister)) {
            return R.fail("房源不存在");
        }
        if (houseRegister.getStatus().intValue() == RentingHourseRegister.Status.czz ||
                houseRegister.getStatus().intValue() == RentingHourseRegister.Status.ytz) {
            return R.fail("出租中、结算中不可进行编辑操作");
        }
        if (houseRegister.getStatus().intValue() == RentingHourseRegister.Status.dcz) {
            return R.fail("编辑房源请先取消发布");
        }
        Date nowDate = new Date();
        BeanUtils.copyProperties(registerDTO, houseRegister);
        houseRegister.setUpdateAt(nowDate);
        String alley = registerDTO.getAlley();
        String houseNum = registerDTO.getHouseNum();
        boolean isChange = isNotBlank(alley) && isNotBlank(houseNum)
                && (!houseRegister.getAlley().equals(alley) || !houseRegister.getHouseNum().equals(houseNum));
        if (isChange) {
            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda()
                    .eq(ComMngVillageDO::getCommunityId, registerDTO.getCommunityId())
                    .eq(ComMngVillageDO::getAlley, alley)
                    .eq(ComMngVillageDO::getHouseNum, houseNum));
            if (!villageList.isEmpty()) {
                ComMngVillageDO village = villageList.stream().sorted(Comparator.comparing(ComMngVillageDO::getCreateAt).reversed()).findFirst().get();
                houseRegister.setStreetId(village.getStreetId());
                houseRegister.setVillageId(village.getVillageId());
            }
        }
        int result = this.baseMapper.updateById(houseRegister);
        if (result > 0) {
            List<RentingHourseFile> files = new ArrayList<>();
            List<String> housePictures = registerDTO.getHousePictures();
            if (nonNull(housePictures) && !housePictures.isEmpty()) {
                rentingHourseFileService.remove(new QueryWrapper<RentingHourseFile>().lambda()
                        .eq(RentingHourseFile::getRefId, id)
                        .eq(RentingHourseFile::getClassification, RentingHourseFile.Classification.fytp)
                        .eq(RentingHourseFile::getType, RentingHourseFile.Type.picture));
                housePictures.forEach(e -> {
                    RentingHourseFile file = new RentingHourseFile();
                    file.setId(Snowflake.getId());
                    file.setClassification(RentingHourseFile.Classification.fytp);
                    file.setRefId(id);
                    file.setType(RentingHourseFile.Type.picture);
                    file.setUrl(e);
                    file.setCreateBy(userId);
                    file.setCreateAt(nowDate);
                    files.add(file);
                });
            }
            List<String> propertyPictures = registerDTO.getPropertyPictures();
            if (nonNull(propertyPictures) && !propertyPictures.isEmpty()) {
                rentingHourseFileService.remove(new QueryWrapper<RentingHourseFile>().lambda()
                        .eq(RentingHourseFile::getRefId, id)
                        .eq(RentingHourseFile::getClassification, RentingHourseFile.Classification.cqtp)
                        .eq(RentingHourseFile::getType, RentingHourseFile.Type.picture));
                propertyPictures.forEach(e -> {
                    RentingHourseFile file = new RentingHourseFile();
                    file.setId(Snowflake.getId());
                    file.setClassification(RentingHourseFile.Classification.cqtp);
                    file.setRefId(id);
                    file.setType(RentingHourseFile.Type.picture);
                    file.setUrl(e);
                    file.setCreateBy(userId);
                    file.setCreateAt(nowDate);
                    files.add(file);
                });
            }
            List<String> credentialsPictures = registerDTO.getCredentialsPictures();
            if (nonNull(credentialsPictures) && !credentialsPictures.isEmpty()) {
                rentingHourseFileService.remove(new QueryWrapper<RentingHourseFile>().lambda()
                        .eq(RentingHourseFile::getRefId, id)
                        .eq(RentingHourseFile::getClassification, RentingHourseFile.Classification.zjzq)
                        .eq(RentingHourseFile::getType, RentingHourseFile.Type.picture));
                credentialsPictures.forEach(e -> {
                    RentingHourseFile file = new RentingHourseFile();
                    file.setId(Snowflake.getId());
                    file.setClassification(RentingHourseFile.Classification.zjzq);
                    file.setRefId(id);
                    file.setType(RentingHourseFile.Type.picture);
                    file.setUrl(e);
                    file.setCreateBy(userId);
                    file.setCreateAt(nowDate);
                    files.add(file);
                });
            }
            rentingHourseFileService.saveBatch(files);
            return R.ok();
        }
        return R.fail("修改失败");
    }
    /**
     * 分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    @Override
    public R pageRentingHouse(PageRentingHouseRegisterDTO pageRegisterDTO) {
        Page page = new Page<>();
        page.setCurrent(pageRegisterDTO.getPageNum());
        page.setSize(pageRegisterDTO.getPageSize());
        return R.ok(this.baseMapper.pageRentingHouse(page, pageRegisterDTO));
    }
    /**
     * 发布/取消发布 房源信
     * @param releaseOrCancelHouseDTO
     * @return
     */
    @Override
    public R releaseOrCancelHouse(ReleaseOrCancelHouseDTO releaseOrCancelHouseDTO) {
        RentingHourseRegister houseRegister = this.baseMapper.selectById(releaseOrCancelHouseDTO.getRegisterId());
        if (isNull(houseRegister)) {
            return R.fail("房源不存在");
        }
        Integer type = releaseOrCancelHouseDTO.getType();
        Integer status = houseRegister.getStatus();
        Integer authStatus = houseRegister.getAuthStatus();
        if (type.intValue() == 1) {
            //发布
            if (authStatus.intValue() == RentingHourseRegister.AuthStatus.wrz) {
                return R.fail("房源还未认证");
            }
            if (status.intValue() != RentingHourseRegister.Status.dfb) {
                return R.fail("已发布,请勿重复操作");
            }
            houseRegister.setStatus(RentingHourseRegister.Status.dcz);
            houseRegister.setDetailStatus(RentingHourseRegister.DetailStatus.dcz);
        } else {
            if (status.intValue() != RentingHourseRegister.Status.dcz) {
                return R.fail("暂不可取消发布");
            }
            //取消发布
            houseRegister.setStatus(RentingHourseRegister.Status.dfb);
            if (authStatus.intValue() == RentingHourseRegister.AuthStatus.yrz) {
                houseRegister.setDetailStatus(RentingHourseRegister.DetailStatus.dfb);
            } else {
                houseRegister.setDetailStatus(RentingHourseRegister.DetailStatus.drz);
            }
        }
        int result = this.baseMapper.updateById(houseRegister);
        if (result > 0) {
            return R.ok();
        }
        return R.fail("失败,请重试");
    }
    /**
     * 删除房源信息
     * @param registerId
     * @return
     */
    @Override
    public R deleteRentingHouse(Long registerId) {
        RentingHourseRegister houseRegister = this.baseMapper.selectById(registerId);
        if (isNull(houseRegister)) {
            return R.fail("房源不存在");
        }
        Integer status = houseRegister.getStatus();
        if (status.intValue() != RentingHourseRegister.Status.dfb) {
            return R.fail("已发布房源不支持删除");
        }
        int result = this.baseMapper.deleteById(registerId);
        if (result > 0) {
            return R.ok();
        }
        return R.fail("删除失败,请重试");
    }
    /**
     * 获取详情-房源信息
     * @param registerId
     * @return
     */
    @Override
    public R getRentingHouse(Long registerId) {
        RentingHourseRegister houseRegister = this.baseMapper.selectById(registerId);
        if (isNull(houseRegister)) {
            return R.fail("房源不存在");
        }
        RentingHouseRegisterVO registerVO = new RentingHouseRegisterVO();
        BeanUtils.copyProperties(houseRegister, registerVO);
        List<RentingHourseFile> files = rentingHourseFileService.list(new QueryWrapper<RentingHourseFile>().lambda()
                .eq(RentingHourseFile::getRefId, registerId)
                .eq(RentingHourseFile::getType, RentingHourseFile.Type.picture));
        if (!files.isEmpty()) {
            Map<Integer, List<RentingHourseFile>> fileGroupMap = files.stream()
                    .collect(Collectors.groupingBy(RentingHourseFile::getClassification));
            for (Map.Entry<Integer, List<RentingHourseFile>> entry : fileGroupMap.entrySet()) {
                List<String> urls = entry.getValue().stream().map(RentingHourseFile::getUrl).collect(Collectors.toList());
                switch (entry.getKey()) {
                    case RentingHourseFile.Classification.fytp:
                        registerVO.setHousePictures(urls);
                        registerVO.setUrl(urls.get(0));
                        break;
                    case RentingHourseFile.Classification.cqtp:
                        registerVO.setPropertyPictures(urls);
                        break;
                    case RentingHourseFile.Classification.zjzq:
                        registerVO.setCredentialsPictures(urls);
                    default:
                        break;
                }
            }
        }
        RentingHourseContractConfig contractConfig = rentingHourseContractConfigDao
                .selectOne(new QueryWrapper<RentingHourseContractConfig>()
                .lambda().eq(RentingHourseContractConfig::getName, "房屋委托代理合同"));
        if (nonNull(contractConfig)) {
            registerVO.setHouseAgencyContract(contractConfig.getValue());
        }
        return R.ok(registerVO);
    }
    @Override
    public R nearby(NearbyDTO nearbyDTO) {
        Rectangle rectangle =new NearbyUtil().getRectangle(nearbyDTO.getDistance(), Double.parseDouble(nearbyDTO.getLongitude()), Double.parseDouble(nearbyDTO.getLatitude()));
        return R.ok(this.baseMapper.nearby(rectangle.getMinX(),rectangle.getMaxX(),rectangle.getMinY(),rectangle.getMaxY(),nearbyDTO.getKeyword()));
    }
    @Override
    public R pageRentingHouseApplet(PageRentingHouseRegisterDTO pageRegisterDTO) {
        Page page = new Page<>();
        page.setCurrent(pageRegisterDTO.getPageNum());
        page.setSize(pageRegisterDTO.getPageSize());
        return R.ok(this.baseMapper.pageRentingHouseApplet(page, pageRegisterDTO));
    }
    @Override
    public void updateAllHouseUnionAppCode() {
        List<RentingHourseRegister> list = this.baseMapper.selectList(null);
        if (!list.isEmpty()) {
            list.stream().forEach(houseRegister -> {
                try {
                    WxMaQrcodeService qrCodeService = wxMaConfiguration.getMaService().getQrcodeService();
                    byte[] bytes = qrCodeService.createWxaCodeUnlimitBytes("id=" + houseRegister.getId() + "&type=6",
                            HOUSE_DETAIL_PAGE, 30, true, null, false);
                    String authCode = String.format("data:image/png;base64,%s", Base64.encode(bytes));
                    houseRegister.setAuthCode(authCode);
                } catch (WxErrorException e) {
                    log.error("生成房源认证码失败【{}】", e.getMessage());
                }
            });
            this.updateBatchById(list);
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseReturnOrderServiceImpl.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.RentingHourseReturnOrder;
import com.panzhihua.service_community.dao.RentingHourseReturnOrderDao;
import com.panzhihua.service_community.service.RentingHourseReturnOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
 * 房屋租赁-房屋退租申请表(RentingHourseReturnOrder)表服务实现类
 *
 * @author makejava
 * @since 2021-11-23 10:49:37
 */
@Slf4j
@Service
public class RentingHourseReturnOrderServiceImpl extends ServiceImpl<RentingHourseReturnOrderDao, RentingHourseReturnOrder> implements RentingHourseReturnOrderService {
    @Override
    public R pageList(CommonPage commonPage) {
        return null;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/NearbyUtil.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.util;
import com.spatial4j.core.context.SpatialContext;
import com.spatial4j.core.distance.DistanceUtils;
import com.spatial4j.core.shape.Rectangle;
/**
 * @author zzj
 */
public class NearbyUtil {
    private SpatialContext spatialContext = SpatialContext.GEO;
    public  Rectangle getRectangle(double distance, double userLng, double userLat) {
        return spatialContext.getDistCalc()
                .calcBoxByDistFromPt(spatialContext.makePoint(userLng, userLat),
                        distance * DistanceUtils.KM_TO_DEG, spatialContext, null);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/WxMaConfiguration.java
New file
@@ -0,0 +1,34 @@
package com.panzhihua.service_community.util;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import lombok.extern.slf4j.Slf4j;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: wexin
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2020-11-23 15:07
 **/
@Slf4j
@Component
public class WxMaConfiguration {
    @Resource
    private WxMaProperties properties;
    public WxMaService getMaService() {
        WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
        config.setAppid(properties.getAppid());
        config.setSecret(properties.getSecret());
        config.setMsgDataFormat(properties.getMsgDataFormat());
        WxMaService wxMaService = new WxMaServiceImpl();
        wxMaService.setWxMaConfig(config);
        return wxMaService;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/WxMaProperties.java
New file
@@ -0,0 +1,58 @@
package com.panzhihua.service_community.util;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import lombok.Data;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 微信配置
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2020-11-23 14:52
 **/
@Data
@Component
@ConfigurationProperties(prefix = "wx.miniapp")
public class WxMaProperties {
    /**
     * 设置微信小程序的appid
     */
    private String appid;
    /**
     * 设置微信小程序的Secret
     */
    private String secret;
    /**
     * 设置微信小程序消息服务器配置的token
     */
    private String token;
    /**
     * 设置微信小程序消息服务器配置的EncodingAESKey
     */
    private String aesKey;
    /**
     * 消息格式,XML或者JSON
     */
    private String msgDataFormat;
    /**
     * 商户号
     */
    private String mchId;
    /**
     * 微信支付密钥
     */
    private String payKey;
    /**
     * 微信支付回调地址
     */
    private String notifyUrl;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseContractConfigMapper.xml
New file
@@ -0,0 +1,22 @@
<?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="com.panzhihua.service_community.dao.RentingHourseContractConfigDao">
    <resultMap type="com.panzhihua.service_community.entity.RentingHourseContractConfig" id="RentingHourseFileBaseResultMap">
        <result property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="key" column="key"/>
        <result property="value" column="value"/>
        <result property="textTemplate" column="text_template"/>
        <result property="createUser" column="create_user"/>
        <result property="createDate" column="create_date"/>
        <result property="modifyUser" column="modify_user"/>
        <result property="modifyDate" column="modify_date"/>
    </resultMap>
    <select id="pageRentingHousesConfig"
            resultType="com.panzhihua.common.model.vos.community.rentingHouses.RentingHousesConfigVO">
        SELECT id, `name`, `key`, modify_date, `value`
        FROM renting_hourse_contract_config
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseFileMapper.xml
New file
@@ -0,0 +1,19 @@
<?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="com.panzhihua.service_community.dao.RentingHourseFileDao">
    <resultMap type="com.panzhihua.service_community.entity.RentingHourseFile" id="RentingHourseFileBaseResultMap">
        <result property="id" column="id"/>
        <result property="classification" column="classification"/>
        <result property="refId" column="ref_id"/>
        <result property="type" column="type"/>
        <result property="resourceName" column="resource_name"/>
        <result property="resourceSize" column="resource_size"/>
        <result property="resourceTime" column="resource_time"/>
        <result property="url" column="url"/>
        <result property="createBy" column="create_by"/>
        <result property="createAt" column="create_at"/>
        <result property="upload" column="upload"/>
    </resultMap>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseLabelMapper.xml
New file
@@ -0,0 +1,19 @@
<?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="com.panzhihua.service_community.dao.RentingHourseLabelDao">
    <resultMap type="com.panzhihua.service_community.entity.RentingHourseLabel" id="RentingHourseLabelBaseResultMap">
        <result property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="mnemonicCode" column="mnemonic_code"/>
        <result property="enabled" column="enabled"/>
        <result property="sort" column="sort"/>
        <result property="remarks" column="remarks"/>
        <result property="createUser" column="create_user"/>
        <result property="createDate" column="create_date"/>
        <result property="modifyUser" column="modify_user"/>
        <result property="modifyDate" column="modify_date"/>
        <result property="deleteFlag" column="delete_flag"/>
    </resultMap>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseOrderMapper.xml
New file
@@ -0,0 +1,73 @@
<?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="com.panzhihua.service_community.dao.RentingHourseOrderDao">
    <resultMap type="com.panzhihua.service_community.entity.RentingHourseOrder" id="RentingHourseOrderBaseResultMap">
        <result property="id" column="id"/>
        <result property="streetId" column="street_id"/>
        <result property="villageId" column="village_id"/>
        <result property="communityId" column="community_id"/>
        <result property="villageName" column="village_name"/>
        <result property="orderType" column="order_type"/>
        <result property="originOrderSn" column="origin_order_sn"/>
        <result property="orderSn" column="order_sn"/>
        <result property="paySn" column="pay_sn"/>
        <result property="rentingMonth" column="renting_month"/>
        <result property="constructArea" column="construct_area"/>
        <result property="roomType" column="room_type"/>
        <result property="monthlyRentMoney" column="monthly_rent_money"/>
        <result property="depositAmount" column="deposit_amount"/>
        <result property="serverCharge" column="server_charge"/>
        <result property="dingAmount" column="ding_amount"/>
        <result property="preOrderSn" column="pre_order_sn"/>
        <result property="preOrderNote" column="pre_order_note"/>
        <result property="settingFlag" column="setting_flag"/>
        <result property="settingAmount" column="setting_amount"/>
        <result property="settingSn" column="setting_sn"/>
        <result property="settingDate" column="setting_date"/>
        <result property="totalFloor" column="total_floor"/>
        <result property="orientation" column="orientation"/>
        <result property="decoration" column="decoration"/>
        <result property="hourseItem" column="hourse_item"/>
        <result property="hourseOwnerName" column="hourse_owner_name"/>
        <result property="hourseIdCard" column="hourse_id_card"/>
        <result property="hoursePhone" column="hourse_phone"/>
        <result property="rentingUserId" column="renting_user_id"/>
        <result property="startDate" column="start_date"/>
        <result property="endDate" column="end_date"/>
        <result property="contractText" column="contract_text"/>
        <result property="payedDingMoney" column="payed_ding_money"/>
        <result property="totalAccount" column="total_account"/>
        <result property="status" column="status"/>
        <result property="createUser" column="create_user"/>
        <result property="createDate" column="create_date"/>
    </resultMap>
    <select id="pageList" resultType="com.panzhihua.common.model.vos.community.rentHouse.RentingHourseOrderVO">
        select t.*,t2.url from renting_hourse_order t left join renting_hourse_file t2 on t.register_id = t2.ref_id
        <where>
            1=1 and t2.type=1 and classification = 1
            <if test="commonPage.communityId!=null and commonPage.communityId!=0">
                and t.community_id = #{commonPage.communityId}
            </if>
            <if test="commonPage.userId!=null">
                and t.create_user=#{commonPage.userId}
            </if>
            <if test="commonPage.keyword!=null and commonPage.keyword !=''">
                and ( t.village_name like concat('%',#{commonPage.keyword},'%') or t.order_sn like concat('%',#{commonPage.keyword},'%') or t.pay_sn like concat('%',#{commonPage.keyword},'%'))
            </if>
        </where>
        group by t.id order by t.create_date desc
    </select>
    <select id="orderStatics" resultType="com.panzhihua.common.model.vos.community.rentHouse.OrderStatics">
        select count(total_account) as allOrder,count(setting_amount) as allRent,count(server_charge) as allService,count(payed_ding_money) from renting_hourse_order
        <where>
            1=1
            <if test="communityId !=null and communityId !=0">
                and community_id = #{communityId}
            </if>
        </where>
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHoursePayingOrderMapper.xml
New file
@@ -0,0 +1,14 @@
<?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="com.panzhihua.service_community.dao.RentingHoursePayingOrderDao">
    <resultMap type="com.panzhihua.service_community.entity.RentingHoursePayingOrder"
               id="RentingHoursePayingOrderBaseResultMap">
        <result property="id" column="id"/>
        <result property="payType" column="pay_type"/>
        <result property="payDate" column="pay_date"/>
        <result property="payAmount" column="pay_amount"/>
        <result property="payReturnText" column="pay_return_text"/>
    </resultMap>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHoursePreOrderMapper.xml
New file
@@ -0,0 +1,48 @@
<?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="com.panzhihua.service_community.dao.RentingHoursePreOrderDao">
    <resultMap type="com.panzhihua.service_community.entity.RentingHoursePreOrder"
               id="RentingHoursePreOrderBaseResultMap">
        <result property="id" column="id"/>
        <result property="orderSn" column="order_sn"/>
        <result property="registerId" column="register_id"/>
        <result property="dingMoney" column="ding_money"/>
        <result property="contractText" column="contract_text"/>
        <result property="status" column="status"/>
        <result property="expireDate" column="expire_date"/>
        <result property="hourseOwnerWeixinAppid" column="hourse_owner_weixin_appid"/>
        <result property="hourseOwnerUserId" column="hourse_owner_user_id"/>
        <result property="tenantWeixinAppid" column="tenant_weixin_appid"/>
        <result property="tenantUserId" column="tenant_user_id"/>
        <result property="createUser" column="create_user"/>
        <result property="createDate" column="create_date"/>
    </resultMap>
    <select id="pageList" resultType="com.panzhihua.common.model.vos.community.rentHouse.RentingHoursePreOrderVO">
        select t.*,t2.url from renting_hourse_pre_order t left join renting_hourse_file t2 on t.register_id = t2.ref_id
        <where>
            1=1 and t2.type=1 and classification = 1
            <if test="commonPage.communityId!=null and commonPage.communityId!=0">
                and t.community_id = #{commonPage.communityId}
            </if>
            <if test="commonPage.userId!=null">
                and t.create_user=#{commonPage.userId}
            </if>
            <if test="commonPage.keyword!=null and commonPage.keyword !=''">
                and ( t.village_name like concat('%',#{commonPage.keyword},'%') or t.order_sn like concat('%',#{commonPage.keyword},'%') or t.pay_sn like concat('%',#{commonPage.keyword},'%'))
            </if>
        </where>
        group by t.id order by t.create_date desc
    </select>
    <select id="statics" resultType="com.panzhihua.common.model.vos.community.rentHouse.PreOrderStatics">
        select * from (
                           (select count(ding_money) as allOrder from  renting_hourse_pre_order where 1=1 <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if> ) allOrder,
                          (select count(ding_money) as allRefuse from  renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if>) allRefuse,
                          (select count(*)  as refuseNum from  renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if>)  refuseNum,
                          (select count(ding_money) as settledOrder from  renting_hourse_pre_order where status = 2 <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if>)  settledOrder,
                          (select count(ding_money) as deductOrder from  renting_hourse_pre_order where status = 1 <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if>) deductOrder )
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseRefundOrderMapper.xml
New file
@@ -0,0 +1,14 @@
<?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="com.panzhihua.service_community.dao.RentingHourseRefundOrderDao">
    <resultMap type="com.panzhihua.service_community.entity.RentingHourseRefundOrder"
               id="RentingHourseRefundOrderBaseResultMap">
        <result property="id" column="id"/>
        <result property="refundPayType" column="refund_pay_type"/>
        <result property="refundPayDate" column="refund_pay_date"/>
        <result property="refundAmount" column="refund_amount"/>
        <result property="returnText" column="return_text"/>
    </resultMap>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseRegisterMapper.xml
New file
@@ -0,0 +1,182 @@
<?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="com.panzhihua.service_community.dao.RentingHourseRegisterDao">
    <resultMap type="com.panzhihua.service_community.entity.RentingHourseRegister"
               id="RentingHourseRegisterBaseResultMap">
        <result property="id" column="id"/>
        <result property="streetId" column="street_id"/>
        <result property="communityId" column="community_id"/>
        <result property="villageId" column="village_id"/>
        <result property="villageName" column="village_name"/>
        <result property="alley" column="alley"/>
        <result property="houseNum" column="house_num"/>
        <result property="unitNo" column="unit_no"/>
        <result property="floor" column="floor"/>
        <result property="houseNo" column="house_no"/>
        <result property="buildingNo" column="building_no"/>
        <result property="code" column="code"/>
        <result property="address" column="address"/>
        <result property="authCode" column="auth_code"/>
        <result property="authStatus" column="auth_status"/>
        <result property="status" column="status"/>
        <result property="detailStatus" column="detail_status"/>
        <result property="longitude" column="longitude"/>
        <result property="latitude" column="latitude"/>
        <result property="constructArea" column="construct_area"/>
        <result property="path" column="path"/>
        <result property="seeHourseTelephone" column="see_hourse_telephone"/>
        <result property="title" column="title"/>
        <result property="brn" column="brn"/>
        <result property="lrn" column="lrn"/>
        <result property="wcn" column="wcn"/>
        <result property="roomType" column="room_type"/>
        <result property="monthlyRentMoney" column="monthly_rent_money"/>
        <result property="depositMoney" column="deposit_money"/>
        <result property="serverCharge" column="server_charge"/>
        <result property="dingMoney" column="ding_money"/>
        <result property="totalFloor" column="total_floor"/>
        <result property="orientation" column="orientation"/>
        <result property="decoration" column="decoration"/>
        <result property="seeHourseDate" column="see_hourse_date"/>
        <result property="hourseDescription" column="hourse_description"/>
        <result property="checkInRequirement" column="check_in_requirement"/>
        <result property="hourseItem" column="hourse_item"/>
        <result property="label" column="label"/>
        <result property="hourseOwnerName" column="hourse_owner_name"/>
        <result property="hourseIdCard" column="hourse_id_card"/>
        <result property="hoursePhone" column="hourse_phone"/>
        <result property="infoStatus" column="info_status"/>
        <result property="hourseOwnerWeixinAppid" column="hourse_owner_weixin_appid"/>
        <result property="hourseOwnerUserId" column="hourse_owner_user_id"/>
        <result property="tenantWeixinAppid" column="tenant_weixin_appid"/>
        <result property="tenantUserId" column="tenant_user_id"/>
        <result property="createAt" column="create_at"/>
        <result property="updateAt" column="update_at"/>
    </resultMap>
    <select id="pageRentingHouse"
            resultType="com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO">
        SELECT t1.id, t1.title, t1.brn, t1.construct_area, t1.floor, t1.orientation, t1.decoration,
        t1.label, t1.address, t1.monthly_rent_money, t1.`status`, t1.detail_status, t1.auth_status, t1.auth_code, t2.url
        FROM renting_hourse_register t1
        LEFT JOIN (SELECT * FROM renting_hourse_file WHERE classification = 1 AND `type` = 1) t2 ON t1.id = t2.ref_id
        WHERE t1.community_id = #{pageRegisterDTO.communityId} AND t1.`status` = #{pageRegisterDTO.status}
        <if test="pageRegisterDTO.brn != null">
            <if test="pageRegisterDTO.moreBrn == null">
                AND t1.brn = #{pageRegisterDTO.brn}
            </if>
            <if test="pageRegisterDTO.moreBrn != null and pageRegisterDTO.moreBrn == 1">
                AND t1.brn &gt; #{pageRegisterDTO.brn}
            </if>
        </if>
        <if test="pageRegisterDTO.decoration != null">
            AND t1.decoration = #{pageRegisterDTO.decoration}
        </if>
        <if test="pageRegisterDTO.orientation != null">
            AND t1.orientation = #{pageRegisterDTO.orientation}
        </if>
        <if test="pageRegisterDTO.detailStatus != null">
            AND t1.detail_status = #{pageRegisterDTO.detailStatus}
        </if>
        <if test="pageRegisterDTO.minArea != null">
            AND t1.construct_area &gt;= #{pageRegisterDTO.minArea}
        </if>
        <if test="pageRegisterDTO.maxArea != null">
            AND t1.construct_area &lt;= #{pageRegisterDTO.minArea}
        </if>
        <if test="pageRegisterDTO.minRentMoney != null">
            AND t1.monthly_rent_money &gt;= #{pageRegisterDTO.minRentMoney}
        </if>
        <if test="pageRegisterDTO.maxRentMoney != null">
            AND t1.monthly_rent_money &lt;= #{pageRegisterDTO.maxRentMoney}
        </if>
        <if test="pageRegisterDTO.keyword != null and pageRegisterDTO.keyword != &quot;&quot;">
            AND (
                t1.village_name LIKE CONCAT('%', #{pageRegisterDTO.keyword}, '%')
                OR t1.address LIKE CONCAT('%', #{pageRegisterDTO.keyword}, '%')
            )
        </if>
        GROUP BY id ORDER BY id DESC
    </select>
    <select id="nearby" resultType="com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO">
        select t.id,title, brn, construct_area, floor, orientation, decoration, label, address, monthly_rent_money,
               `status`, detail_status, auth_status,t1.url from   renting_hourse_register t left join renting_hourse_file t1 on t.id = t1.ref_id
        WHERE 1=1 and t.status=2 and t.detail_status=3
          <if test="keyword !=null and keyword!=''">
              AND (
              village_name LIKE CONCAT('%', #{keyword}, '%')
              OR address LIKE CONCAT('%', #{keyword}, '%')
              )
          </if>
          and (longitude BETWEEN ${minX} AND ${maxX})
          and (latitude BETWEEN ${minY} AND ${maxY}) and t1.type = 1 group by t.id
    </select>
    <select id="pageRentingHouseApplet"
            resultType="com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO">
        SELECT t.id, t.title, t.brn, t.construct_area, t.floor, t.orientation, t.decoration, t.label, t.address, t.monthly_rent_money,
        t.`status`, t.detail_status, t.auth_status,t1.url, t2.phone AS tenantTelephone
        <if test="pageRegisterDTO.longitude !=null and pageRegisterDTO.longitude !=''">,(POWER(MOD(ABS(longitude - #{pageRegisterDTO.longitude}),360),2) + POWER(ABS(latitude - #{latitude}),2)) AS distance</if>
        FROM renting_hourse_register t left join renting_hourse_file t1 on t.id = t1.ref_id
        LEFT JOIN sys_user t2 ON t.tenant_user_id = t2.user_id
        WHERE t.community_id = #{pageRegisterDTO.communityId}
        <if test="pageRegisterDTO.status != null">
            AND t.`status` = #{pageRegisterDTO.status}
        </if>
        <if test="pageRegisterDTO.isMy != null and pageRegisterDTO.isMy == 1">
            AND t.hourse_owner_user_id = #{pageRegisterDTO.currentUserId}
        </if>
        <if test="pageRegisterDTO.brn != null">
            <if test="pageRegisterDTO.moreBrn == null">
                AND t.brn = #{pageRegisterDTO.brn}
            </if>
            <if test="pageRegisterDTO.moreBrn != null and pageRegisterDTO.moreBrn == 1">
                AND t.brn &gt; #{pageRegisterDTO.brn}
            </if>
        </if>
        <if test="pageRegisterDTO.decoration != null">
            AND t.decoration = #{pageRegisterDTO.decoration}
        </if>
        <if test="pageRegisterDTO.orientation != null">
            AND t.orientation = #{pageRegisterDTO.orientation}
        </if>
        <if test="pageRegisterDTO.detailStatus != null">
            AND t.detail_status = #{pageRegisterDTO.detailStatus}
        </if>
        <if test="pageRegisterDTO.minArea != null">
            AND t.construct_area &gt;= #{pageRegisterDTO.minArea}
        </if>
        <if test="pageRegisterDTO.maxArea != null">
            AND t.construct_area &lt;= #{pageRegisterDTO.minArea}
        </if>
        <if test="pageRegisterDTO.minRentMoney != null">
            AND t.monthly_rent_money &gt;= #{pageRegisterDTO.minRentMoney}
        </if>
        <if test="pageRegisterDTO.maxRentMoney != null">
            AND t.monthly_rent_money &lt;= #{pageRegisterDTO.maxRentMoney}
        </if>
        <if test="pageRegisterDTO.keyword != null and pageRegisterDTO.keyword != &quot;&quot;">
            AND (
            t.village_name LIKE CONCAT('%', #{pageRegisterDTO.keyword}, '%')
            OR t.address LIKE CONCAT('%', #{pageRegisterDTO.keyword}, '%')
            )
        </if>
        group by t.id
        <if test="pageRegisterDTO.sort !=null and pageRegisterDTO.longitude !=null">
            <if test="pageRegisterDTO.sort==1">
                order by distance asc
            </if>
            <if test="pageRegisterDTO.sort==2">
                order by distance desc
            </if>
            <if test="pageRegisterDTO.sort==3">
                order by monthly_rent_money asc
            </if>
            <if test="pageRegisterDTO.sort==4">
                order by monthly_rent_money desc
            </if>
        </if>
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseReturnOrderMapper.xml
New file
@@ -0,0 +1,32 @@
<?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="com.panzhihua.service_community.dao.RentingHourseReturnOrderDao">
    <resultMap type="com.panzhihua.service_community.entity.RentingHourseReturnOrder"
               id="RentingHourseReturnOrderBaseResultMap">
        <result property="id" column="id"/>
        <result property="orderSn" column="order_sn"/>
        <result property="endDate" column="end_date"/>
        <result property="waterAndElectricityDeductionFee" column="water_and_electricity_deduction_fee"/>
        <result property="waterAndElectricityDetail" column="water_and_electricity_detail"/>
        <result property="waterAndElectricityDetailImages" column="water_and_electricity_detail_images"/>
        <result property="itemDeductionFee" column="item_deduction_fee"/>
        <result property="itemDeductionDetailImages" column="item_deduction_detail_images"/>
        <result property="itemDeductionDetail" column="item_deduction_detail"/>
        <result property="penaltyDeductionFee" column="penalty_deduction_fee"/>
        <result property="penaltyDeductionFeeDetail" column="penalty_deduction_fee_detail"/>
        <result property="penaltyDeductionDetailImages" column="penalty_deduction_detail_images"/>
        <result property="settlementAmount" column="settlement_amount"/>
        <result property="status" column="status"/>
        <result property="payObject" column="pay_object"/>
        <result property="payOrderSn" column="pay_order_sn"/>
        <result property="payOrderAmount" column="pay_order_amount"/>
        <result property="payOrderDate" column="pay_order_date"/>
        <result property="remarks" column="remarks"/>
        <result property="createUser" column="create_user"/>
        <result property="createDate" column="create_date"/>
        <result property="modifyUser" column="modify_user"/>
        <result property="modifyDate" column="modify_date"/>
    </resultMap>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -1226,4 +1226,14 @@
    public R communityStatisticsExport() {
        return userService.communityStatisticsExport();
    }
    /**
     * 通过UnionId获取用户信息
     * @param unionId
     * @return
     */
    @GetMapping("/getByUnionId")
    public R getUserInfoByUnionId(@RequestParam("unionId") String unionId) {
        return userService.getUserInfoByUnionId(unionId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -749,4 +749,11 @@
    R communityStatistics();
    R communityStatisticsExport();
    /**
     * 通过UnionId获取用户信息
     * @param unionId
     * @return
     */
    R getUserInfoByUnionId(String unionId);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -14,11 +14,6 @@
import javax.annotation.Resource;
import cn.hutool.core.util.IdcardUtil;
import com.panzhihua.common.model.dtos.DataKanBansDto;
import com.panzhihua.common.model.vos.community.*;
import com.panzhihua.service_user.dao.*;
import com.panzhihua.service_user.model.dos.*;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.lang.time.DateUtils;
import org.springframework.beans.BeanUtils;
@@ -37,6 +32,7 @@
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.constants.UserConstants;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.dtos.DataKanBansDto;
import com.panzhihua.common.model.dtos.PageDTO;
import com.panzhihua.common.model.dtos.community.ExportUserDTO;
import com.panzhihua.common.model.dtos.community.NoticeReadDTO;
@@ -59,6 +55,11 @@
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.SystemmanagementConfigVO;
import com.panzhihua.common.model.vos.community.ComActVO;
import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO;
import com.panzhihua.common.model.vos.community.IndexUserCommunityVo;
import com.panzhihua.common.model.vos.community.IndexUserStatisticsVo;
import com.panzhihua.common.model.vos.community.IndexUserStreetVo;
import com.panzhihua.common.model.vos.grid.GridMemberVO;
import com.panzhihua.common.model.vos.grid.admin.GridMemberBuildingVO;
import com.panzhihua.common.model.vos.partybuilding.ActivityManagerVO;
@@ -84,10 +85,41 @@
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.common.utlis.WxUtil;
import com.panzhihua.common.utlis.WxXCXTempSend;
import com.panzhihua.service_user.dao.ComActFourMemberDao;
import com.panzhihua.service_user.dao.ComMngFamilyInfoDAO;
import com.panzhihua.service_user.dao.ComMngUserTagDAO;
import com.panzhihua.service_user.dao.EventGridMemberBuildingRelationMapper;
import com.panzhihua.service_user.dao.LcCompareMemberCodeMapper;
import com.panzhihua.service_user.dao.RoleDAO;
import com.panzhihua.service_user.dao.SysMenuDAO;
import com.panzhihua.service_user.dao.SysOperLogDAO;
import com.panzhihua.service_user.dao.SysRoleMenuDAO;
import com.panzhihua.service_user.dao.SysUserAgreementDAO;
import com.panzhihua.service_user.dao.SysUserFeedbackDAO;
import com.panzhihua.service_user.dao.SysUserInputDAO;
import com.panzhihua.service_user.dao.SysUserNoticeDAO;
import com.panzhihua.service_user.dao.SysUserRoleDAO;
import com.panzhihua.service_user.dao.UserDao;
import com.panzhihua.service_user.model.dos.ComActFourMember;
import com.panzhihua.service_user.model.dos.ComMngFamilyInfoDO;
import com.panzhihua.service_user.model.dos.ComMngUserTagDO;
import com.panzhihua.service_user.model.dos.EventGridMemberBuildingRelationDO;
import com.panzhihua.service_user.model.dos.LcCompareCodeMemberDO;
import com.panzhihua.service_user.model.dos.SysMenuDO;
import com.panzhihua.service_user.model.dos.SysOperLogDO;
import com.panzhihua.service_user.model.dos.SysRoleDO;
import com.panzhihua.service_user.model.dos.SysRoleMenuDO;
import com.panzhihua.service_user.model.dos.SysUserAgreementDO;
import com.panzhihua.service_user.model.dos.SysUserDO;
import com.panzhihua.service_user.model.dos.SysUserFeedbackDO;
import com.panzhihua.service_user.model.dos.SysUserInputDO;
import com.panzhihua.service_user.model.dos.SysUserNoticeDO;
import com.panzhihua.service_user.model.dos.SysUserRoleDO;
import com.panzhihua.service_user.model.dtos.DataKanbanDTO;
import com.panzhihua.service_user.service.EventGridMemberBuildingRelationService;
import com.panzhihua.service_user.service.UserService;
import cn.hutool.core.util.IdcardUtil;
import lombok.extern.slf4j.Slf4j;
// import com.panzhihua.common.service.grid.GridService;
@@ -2751,4 +2783,20 @@
    public R communityStatisticsExport(){
        return R.ok(userDao.getUserCommunityExcelExport());
    }
    /**
     * 通过UnionId获取用户信息
     * @param unionId
     * @return
     */
    @Override
    public R getUserInfoByUnionId(String unionId) {
        SysUserDO sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getUnionid, unionId));
        if (isNull(sysUserDO)) {
            return R.fail("用户不存在");
        }
        LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO();
        BeanUtils.copyProperties(sysUserDO, loginUserInfoVO);
        return R.ok(loginUserInfoVO);
    }
}