魏超 5 年之前
父節點
當前提交
eac26ca568

+ 4
- 3
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java 查看文件

@@ -767,7 +767,8 @@ public class TaRecommendCustomerController extends BaseController {
767 767
                                          @RequestParam(value ="verifyStatus",required = false) String verifyStatus,
768 768
                                          @RequestParam(value = "sex",required = false)Integer sex,
769 769
                                          @RequestParam(value = "customerType") String customerType,
770
-                                         @RequestParam(value = "status",required = false) Integer status) throws IOException { // public 公  private 私
770
+                                         @RequestParam(value = "status",required = false) Integer status,
771
+                                       @RequestParam(value = "sceneType",required = false) String sceneType) throws IOException { // public 公  private 私
771 772
 
772 773
         //        response.setContentType("application/vnd.ms-excel");
773 774
         response.setContentType("application/octet-stream");
@@ -795,7 +796,7 @@ public class TaRecommendCustomerController extends BaseController {
795 796
 //            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
796 797
 //            List<PublicCustomerExport> publicList = null;
797 798
 //            do {
798
-                List<PublicCustomerExport> publicList = taRecommendCustomerMapper.getPublicCustomerExportList(pageCode * pageSize, pageSize, name, tel,  entryType, verifyStatus, sex, orgId,consultTel);
799
+                List<PublicCustomerExport> publicList = taRecommendCustomerMapper.getPublicCustomerExportList(pageCode * pageSize, pageSize, buildingId, name, tel,  entryType, verifyStatus, sex, orgId,consultTel,sceneType);
799 800
                 excelWriter.write(publicList, writeSheet);
800 801
 
801 802
 //                pageCode ++;
@@ -817,7 +818,7 @@ public class TaRecommendCustomerController extends BaseController {
817 818
 //            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
818 819
 //            List<PrivateCustomerExport> privateList = null;
819 820
 //            do {
820
-                List<PrivateCustomerExport> privateList = taRecommendCustomerMapper.getCustomerExportList(pageCode *  pageSize, pageSize, buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId,status,getTaPersonBuildingListByUserId(request));
821
+                List<PrivateCustomerExport> privateList = taRecommendCustomerMapper.getCustomerExportList(pageCode *  pageSize, pageSize, buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId,status,sceneType,getTaPersonBuildingListByUserId(request));
821 822
                 excelWriter.write(privateList, writeSheet);
822 823
 
823 824
 //                pageCode ++;

+ 28
- 0
src/main/java/com/huiju/estateagents/controller/TaSharePersonFromController.java 查看文件

@@ -8,6 +8,7 @@ import com.huiju.estateagents.base.ResponseBean;
8 8
 import com.huiju.estateagents.common.CommConstant;
9 9
 import com.huiju.estateagents.entity.*;
10 10
 import com.huiju.estateagents.service.ITaSharePersonFromService;
11
+import com.huiju.estateagents.service.ITdLiveDictService;
11 12
 import org.apache.commons.lang3.StringUtils;
12 13
 import org.slf4j.Logger;
13 14
 import org.slf4j.LoggerFactory;
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
22 23
 
23 24
 import javax.servlet.http.HttpServletRequest;
24 25
 import java.time.LocalDateTime;
26
+import java.util.List;
25 27
 
26 28
 /**
27 29
  * <p>
@@ -40,6 +42,9 @@ public class TaSharePersonFromController extends BaseController {
40 42
     @Autowired
41 43
     public ITaSharePersonFromService iTaSharePersonFromService;
42 44
 
45
+    @Autowired
46
+    public ITdLiveDictService tdLiveDictService;
47
+
43 48
 
44 49
     /**
45 50
      * 分页查询列表
@@ -202,4 +207,27 @@ public class TaSharePersonFromController extends BaseController {
202 207
         }
203 208
         return responseBean;
204 209
     }
210
+
211
+    /**
212
+     * 查询直播平台列表
213
+     * @param pageNum
214
+     * @param pageSize
215
+     * @param request
216
+     * @return
217
+     */
218
+    @RequestMapping(value="api/admin/livePlatList",method= RequestMethod.GET)
219
+    public ResponseBean taLivePlatList (@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
220
+                                        @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize, HttpServletRequest request){
221
+        ResponseBean responseBean = new ResponseBean();
222
+        try {
223
+            QueryWrapper<TdLiveDict> tdLiveDictQueryWrapper = new QueryWrapper<>();
224
+            tdLiveDictQueryWrapper.eq("status", 1);
225
+            List<TdLiveDict> tdLiveDictList = tdLiveDictService.list(tdLiveDictQueryWrapper);
226
+            responseBean.addSuccess(tdLiveDictList);
227
+        }catch (Exception e){
228
+            e.printStackTrace();
229
+            responseBean.addError(e.getMessage());
230
+        }
231
+        return responseBean;
232
+    }
205 233
 }

+ 2
- 2
src/main/java/com/huiju/estateagents/mapper/TaRecommendCustomerMapper.java 查看文件

@@ -118,7 +118,7 @@ public interface TaRecommendCustomerMapper extends BaseMapper<TaRecommendCustome
118 118
      * @param consultTel
119 119
      * @return
120 120
      */
121
-    List<PublicCustomerExport> getPublicCustomerExportList(@Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("name") String name, @Param("tel") String tel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("consultTel")String consultTel);
121
+    List<PublicCustomerExport> getPublicCustomerExportList(@Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("buildingId")String buildingId, @Param("name") String name, @Param("tel") String tel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("consultTel")String consultTel, @Param("sceneType")String sceneType);
122 122
 
123 123
     /**
124 124
      * 导出数据 私客总数
@@ -152,7 +152,7 @@ public interface TaRecommendCustomerMapper extends BaseMapper<TaRecommendCustome
152 152
      * @param status
153 153
      * @return
154 154
      */
155
-    List<PrivateCustomerExport> getCustomerExportList(@Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("building") String buildingId, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("status")Integer status,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
155
+    List<PrivateCustomerExport> getCustomerExportList(@Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize, @Param("building") String buildingId, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("status")Integer status,@Param("sceneType") String sceneType,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
156 156
     
157 157
     /**
158 158
      * 获取我的客户的人数统计

+ 13
- 1
src/main/resources/mapper/TaRecommendCustomerMapper.xml 查看文件

@@ -537,15 +537,23 @@ FROM
537 537
           if(b.gender = 1, '男', if(b.gender = 2, '女', '未知')) as sex
538 538
         FROM
539 539
         ta_person b
540
+        LEFT JOIN ta_person_from_record r ON b.person_id = r.person_id AND r.is_first_time = 1 and r.org_id = #{orgId}
541
+        left join td_wx_dict d on r.scene_id = d.scene_id
540 542
         <where>
541 543
             b.status > 0
542 544
             AND IFNULL(b.person_type, '') in ('estate agent', 'customer')
543 545
             <if test="name != null and name !=''">
544 546
                 and b.nickname like CONCAT('%',#{name}, '%')
545 547
             </if>
548
+            <if test="buildingId != null and buildingId !=''">
549
+                AND r.building_id = #{buildingId}
550
+            </if>
546 551
             <if test="tel != null and tel!=''">
547 552
                 and b.phone like CONCAT('%',#{tel}, '%')
548 553
             </if>
554
+            <if test="sceneType !=null and sceneType !=''">
555
+                and d.scene_type = #{sceneType}
556
+            </if>
549 557
             <if test="entryType != null and entryType !=''">
550 558
                 and b.entry_type = #{entryType}
551 559
             </if>
@@ -636,8 +644,9 @@ FROM
636 644
         LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
637 645
         LEFT JOIN ta_person c ON a.realty_consultant = c.user_id
638 646
         LEFT JOIN ta_user d on d.user_id = a.realty_consultant
639
-        LEFT JOIN ta_person_from_record p ON a.person_id = p.person_id AND p.is_first_time = 1
647
+        LEFT JOIN ta_person_from_record p ON a.person_id = p.person_id AND p.is_first_time = 1 and p.org_id = #{orgId}
640 648
         left join ta_building t on a.building_id = t.building_id
649
+        LEFT JOIN td_wx_dict w ON p.scene_id = w.scene_id
641 650
         <where>
642 651
             a.status > 0
643 652
             and a.verify_status = 1
@@ -679,6 +688,9 @@ FROM
679 688
                     #{personBuilding.buildingId}
680 689
                 </foreach>
681 690
             </if>
691
+            <if test="sceneType !=null and sceneType !=''">
692
+                and p.scene_type = #{sceneType}
693
+            </if>
682 694
         </where>
683 695
         group by a.customer_id,a.building_id
684 696
         order by a.create_date desc