张延森 4 jaren geleden
bovenliggende
commit
040391c13a

+ 3
- 3
pom.xml Bestand weergeven

@@ -9,9 +9,9 @@
9 9
 		<relativePath/> <!-- lookup parent from repository -->
10 10
 	</parent>
11 11
 	<groupId>com.huiju</groupId>
12
-	<artifactId>zcloud</artifactId>
13
-	<version>1.0.0</version>
14
-	<name>香颂</name>
12
+	<artifactId>xiangsong</artifactId>
13
+	<version>1.0.1</version>
14
+	<name>xiangsong</name>
15 15
 	<description>香颂</description>
16 16
 
17 17
 	<properties>

+ 21
- 0
src/main/java/com/huiju/estateagents/controller/TaPersonController.java Bestand weergeven

@@ -798,4 +798,25 @@ public class TaPersonController extends BaseController {
798 798
         }
799 799
         return taPersonService.updateUserPhoto(imgUrl, openId);
800 800
     }
801
+
802
+    @GetMapping("/admin/person-list")
803
+    public ResponseBean getPersonList(@RequestParam(defaultValue = "1") int pageNumber,
804
+                                      @RequestParam(defaultValue = "10") int pageSize,
805
+                                      @RequestParam(value = "name", required = false) String name,
806
+                                      @RequestParam(value = "phone", required = false) String phone,
807
+                                      HttpServletRequest request) {
808
+        Integer orgId = getOrgId(request);
809
+
810
+        QueryWrapper<TaPerson> queryWrapper = new QueryWrapper<>();
811
+        queryWrapper.eq("org_id", orgId);
812
+        queryWrapper.like(!StringUtils.isEmpty(name),"nickname", "%"+name+"%");
813
+        queryWrapper.eq(!StringUtils.isEmpty(phone),"phone", phone);
814
+        queryWrapper.isNotNull("avatarurl");
815
+        queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
816
+
817
+        IPage<TaPerson> page = new Page<>(pageNumber, pageSize);
818
+
819
+        return ResponseBean.success(taPersonService.page(page, queryWrapper));
820
+    }
821
+
801 822
 }

+ 33
- 30
src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java Bestand weergeven

@@ -944,39 +944,42 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
944 944
         }
945 945
         updateById(person);
946 946
 
947
-        // 关联推荐客户
948
-        fixCustomerPersonId(person);
947
+        // 发放积分
948
+        applicationContext.publishEvent(new EventBus(person, EventBus.EventType.SignUpAgent, orgId));
949 949
 
950
-        // 客户来源
951
-        customerFrom.setPersonId(person.getPersonId());
952
-        customerFrom.setPersonName(StringUtils.ifNull(person.getName(), person.getNickname()));
953
-        customerFrom.setCreateDate(now);
950
+//        // 关联推荐客户
951
+//        fixCustomerPersonId(person);
952
+//
953
+//        // 客户来源
954
+//        customerFrom.setPersonId(person.getPersonId());
955
+//        customerFrom.setPersonName(StringUtils.ifNull(person.getName(), person.getNickname()));
956
+//        customerFrom.setCreateDate(now);
954 957
 
955 958
         // 推广人
956
-        TaPerson recPerson = StringUtils.isEmpty(promoter) ? null : taPersonMapper.getById(promoter);
957
-        // 推荐楼盘
958
-        TaBuilding building = StringUtils.isEmpty(buildingId) ? null : taBuildingMapper.selectById(buildingId);
959
-        // 置业顾问
960
-        boolean isConsultant = null != recPerson && CommConstant.PERSON_REALTY_CONSULTANT.equals(recPerson.getPersonType());
961
-        TaPerson consultant = null != consultantPersonId ? getById(consultantPersonId) : (isConsultant ? recPerson : null);
962
-
963
-        try {
964
-            List<TaRecommendCustomer> customerList = iTaRecommendCustomerService.newCustomer(orgId, person, recPerson, consultant, building, customerFrom);
965
-            if (customerList.size() > 0) {
966
-                // 发放积分
967
-                applicationContext.publishEvent(new EventBus(person, EventBus.EventType.SignUpAgent, orgId));
968
-
969
-                //授权手机给推广人加积分
970
-                String sharePersonId = getSharePersonFrom(person);
971
-                // 2020年5月29日 不清楚加场景限制的原因, 与芳芳讨论 先取消这个限制
972
-//                if (validateSceneId(customerFrom.getSceneId()) && !StringUtils.isEmpty(sharePersonId)){
973
-                if (!StringUtils.isEmpty(promoter) || !StringUtils.isEmpty(sharePersonId)){
974
-                    applicationContext.publishEvent(new EventBus(promoter != null ? promoter : sharePersonId, EventBus.EventType.SharePosterAll, orgId));
975
-                }
976
-            }
977
-        } catch (Exception e) {
978
-            throw e;
979
-        }
959
+//        TaPerson recPerson = StringUtils.isEmpty(promoter) ? null : taPersonMapper.getById(promoter);
960
+//        // 推荐楼盘
961
+//        TaBuilding building = StringUtils.isEmpty(buildingId) ? null : taBuildingMapper.selectById(buildingId);
962
+//        // 置业顾问
963
+//        boolean isConsultant = null != recPerson && CommConstant.PERSON_REALTY_CONSULTANT.equals(recPerson.getPersonType());
964
+//        TaPerson consultant = null != consultantPersonId ? getById(consultantPersonId) : (isConsultant ? recPerson : null);
965
+//
966
+//        try {
967
+//            List<TaRecommendCustomer> customerList = iTaRecommendCustomerService.newCustomer(orgId, person, recPerson, consultant, building, customerFrom);
968
+//            if (customerList.size() > 0) {
969
+//                // 发放积分
970
+//                applicationContext.publishEvent(new EventBus(person, EventBus.EventType.SignUpAgent, orgId));
971
+//
972
+//                //授权手机给推广人加积分
973
+//                String sharePersonId = getSharePersonFrom(person);
974
+//                // 2020年5月29日 不清楚加场景限制的原因, 与芳芳讨论 先取消这个限制
975
+////                if (validateSceneId(customerFrom.getSceneId()) && !StringUtils.isEmpty(sharePersonId)){
976
+//                if (!StringUtils.isEmpty(promoter) || !StringUtils.isEmpty(sharePersonId)){
977
+//                    applicationContext.publishEvent(new EventBus(promoter != null ? promoter : sharePersonId, EventBus.EventType.SharePosterAll, orgId));
978
+//                }
979
+//            }
980
+//        } catch (Exception e) {
981
+//            throw e;
982
+//        }
980 983
     }
981 984
 
982 985
     private TaRecommendCustomer newOrFixCustomerBy(TaPerson person, String promoter, String buildingId) {

+ 1
- 1
src/main/resources/application-prod.yml Bestand weergeven

@@ -1,5 +1,5 @@
1 1
 server:
2
-  port: 80
2
+  port: 8090
3 3
 spring:
4 4
   application:
5 5
     name: zhiyun