张延森 2 lat temu
rodzic
commit
f5959b3979

+ 1
- 1
src/main/java/com/yunzhi/marketing/broker/controller/BkFirstScreenController.java Wyświetl plik

@@ -134,7 +134,7 @@ public class BkFirstScreenController extends BaseController {
134 134
      * 根据id查询对象
135 135
      * @param id  实体ID
136 136
      */
137
-    @RequestMapping(value="/admin/bkFirstScreen/{id}",method= RequestMethod.GET)
137
+    @RequestMapping(value="/{client}/bkFirstScreen/{id}",method= RequestMethod.GET)
138 138
     @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
139 139
     public ResponseBean bkFirstScreenGet(@ApiParam("对象ID") @PathVariable String id) throws Exception{
140 140
         return ResponseBean.success(iBkFirstScreenService.getById(id));

+ 15
- 0
src/main/java/com/yunzhi/marketing/broker/controller/BrokerController.java Wyświetl plik

@@ -19,6 +19,8 @@ import org.springframework.beans.factory.annotation.Autowired;
19 19
 import org.springframework.web.bind.annotation.*;
20 20
 
21 21
 import javax.servlet.http.HttpServletRequest;
22
+import java.util.HashMap;
23
+import java.util.Map;
22 24
 
23 25
 
24 26
 @Api(tags = "全民经纪人(新联康)")
@@ -73,6 +75,19 @@ public class BrokerController extends BaseController {
73 75
         return ResponseBean.success(result);
74 76
     }
75 77
 
78
+    @RequestMapping(value="/wx/broker/mine",method= RequestMethod.GET)
79
+    @ApiOperation(value="我的经纪人信息", notes = "我的经纪人信息", httpMethod = "GET", response = ResponseBean.class)
80
+    public ResponseBean getWxBrokerOfMine(HttpServletRequest request) throws Exception {
81
+        String personId = getPersonId(request);
82
+
83
+        Integer customerNum = iTaPersonService.getCustNumOf(personId);
84
+
85
+        Map<String, Object> result = new HashMap<>();
86
+        result.put("customerNum", customerNum);
87
+
88
+        return ResponseBean.success(result);
89
+    }
90
+
76 91
 
77 92
     @RequestMapping(value="/wx/bindBroker",method= RequestMethod.PUT)
78 93
     @ApiOperation(value="成为经纪人", notes = "成为经纪人", httpMethod = "PUT", response = ResponseBean.class)

+ 2
- 0
src/main/java/com/yunzhi/marketing/mapper/TaPersonMapper.java Wyświetl plik

@@ -280,4 +280,6 @@ public interface TaPersonMapper extends BaseMapper<TaPerson> {
280 280
                                          @Param("recommendAgent") String recommendAgent);
281 281
 
282 282
     IPage<BrokerSummery> getWxBrokerRankPage(IPage<BrokerSummery> page, @Param("personType") String personBroker, @Param("rankType") String rankType);
283
+
284
+    Integer getCustNumOf(@Param("personId") String personId);
283 285
 }

+ 2
- 0
src/main/java/com/yunzhi/marketing/service/ITaPersonService.java Wyświetl plik

@@ -138,4 +138,6 @@ public interface ITaPersonService extends IService<TaPerson> {
138 138
     IPage<BrokerSummery> getWxBrokerPage(IPage<BrokerSummery> page, String personId);
139 139
 
140 140
     IPage<BrokerSummery> getWxBrokerRankPage(IPage<BrokerSummery> page, String rankType);
141
+
142
+    Integer getCustNumOf(String personId);
141 143
 }

+ 5
- 0
src/main/java/com/yunzhi/marketing/service/impl/TaPersonServiceImpl.java Wyświetl plik

@@ -1361,4 +1361,9 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
1361 1361
     public IPage<BrokerSummery> getWxBrokerRankPage(IPage<BrokerSummery> page, String rankType) {
1362 1362
         return baseMapper.getWxBrokerRankPage(page, CommConstant.PERSON_BROKER, rankType);
1363 1363
     }
1364
+
1365
+    @Override
1366
+    public Integer getCustNumOf(String personId) {
1367
+        return baseMapper.getCustNumOf(personId);
1368
+    }
1364 1369
 }

+ 9
- 0
src/main/resources/mapper/TaPersonMapper.xml Wyświetl plik

@@ -772,6 +772,15 @@ FROM
772 772
             t.total_commission DESC
773 773
         </if>
774 774
     </select>
775
+    <select id="getCustNumOf" resultType="java.lang.Integer">
776
+        SELECT
777
+            count( 1 )
778
+        FROM
779
+            xlk_channel_customer a
780
+        WHERE
781
+            a.recommend_person = #{personId}
782
+          AND a.`status` = 2
783
+    </select>
775 784
 
776 785
     <insert id="savePersonPosition" parameterType="com.yunzhi.marketing.entity.TaPersonPositon">
777 786
         insert into ta_person_position