From eba7ff322d676102b70058b26cfcffefdc22b53e Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期二, 30 四月 2024 16:28:42 +0800
Subject: [PATCH] 更新线上bug

---
 guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/HousingDemandServiceImpl.java |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/HousingDemandServiceImpl.java b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/HousingDemandServiceImpl.java
index 404f86f..dcd2bce 100644
--- a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/HousingDemandServiceImpl.java
+++ b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/HousingDemandServiceImpl.java
@@ -101,7 +101,6 @@
             housingDemand.setSaleAmount("0-500");
         }
         if (req.getType()==2){
-
             this.insertOrUpdate(housingDemand);
         }else{
             this.insertOrUpdate(housingDemand);
@@ -118,7 +117,7 @@
                 String url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=" + accessToken;
                 Map<String, Object> param = new HashMap<>();
                 param.put("scene","id="+housingDemand.getId());
-                param.put("page", "pageA/houseDetail");
+                param.put("page", "pageA/housingDetails");
                 param.put("check_path", false);
                 param.put("env_version", "trial");
                 param.put("width", 200); //二维码尺寸
@@ -191,9 +190,9 @@
         if(list.size() > 0){
             housingDemandDistrictService.insertBatch(list);
         }
+
         return ResultUtil.success();
     }
-
 
     /**
      * 搜索求房源列表数据
@@ -423,7 +422,7 @@
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         HousingDemand housingDemand = this.selectById(id);
         HousingDemandInfoRes housingDemandInfoRes = new HousingDemandInfoRes();
-//        AppUser appUser = appUserService.getAppUser();
+        AppUser appUser = appUserService.getAppUser();
         housingDemandInfoRes.setId(id);
         housingDemandInfoRes.setDataType(housingDemand.getDataType());
         housingDemandInfoRes.setQrCode(housingDemand.getQrCode());
@@ -531,15 +530,15 @@
         int collectionTimes = collectionHousingDemandService.selectCount(new EntityWrapper<CollectionHousingDemand>().eq("housing_demand_id", id));
         housingDemandInfoRes.setCollectionTimes(collectionTimes);
         housingDemandInfoRes.setCollection(0);
-//        if(null != appUser){
-//            int collection = collectionHousingDemandService
-//                    .selectCount(new EntityWrapper<CollectionHousingDemand>()
-//                            .eq("housing_demand_id", id)
-//                            .eq("app_user_id", appUser.getId()));
-//            housingDemandInfoRes.setCollection(0 == collection ? 0 : 1);
-//        }
+        if(null != appUser){
+            int collection = collectionHousingDemandService
+                    .selectCount(new EntityWrapper<CollectionHousingDemand>()
+                            .eq("housing_demand_id", id)
+                            .eq("app_user_id", appUser.getId()));
+            housingDemandInfoRes.setCollection(0 == collection ? 0 : 1);
+        }
         //添加访问次数记录
-//        addViewsNumber(housingDemand);
+        addViewsNumber(housingDemand);
         return housingDemandInfoRes;
     }
 

--
Gitblit v1.7.1