Browse Source

Merge branch 'v3' of http://git.ycjcjy.com/zhiyuxing/estateagents into v3

胡轶钦 5 years ago
parent
commit
78aa96e0f1

+ 3
- 2
src/main/java/com/huiju/estateagents/controller/TaChannelController.java View File

@@ -143,11 +143,12 @@ public class TaChannelController extends BaseController {
143 143
      * @param channel 实体对象
144 144
      * @return
145 145
      */
146
-    @RequestMapping(value="/channel/{id}",method= RequestMethod.PUT)
146
+    @RequestMapping(value="/admin/channel/{id}",method= RequestMethod.PUT)
147 147
     public ResponseBean channelUpdate(@PathVariable Integer id,
148 148
                                         @RequestBody TaChannel channel){
149 149
         ResponseBean responseBean = new ResponseBean();
150 150
         try {
151
+            channel.setChannelId(id);
151 152
             if (taChannelService.updateById(channel)){
152 153
                 responseBean.addSuccess(channel);
153 154
             }else {
@@ -165,7 +166,7 @@ public class TaChannelController extends BaseController {
165 166
      * 根据id查询对象
166 167
      * @param id  实体ID
167 168
      */
168
-    @RequestMapping(value="/channel/{id}",method= RequestMethod.GET)
169
+    @RequestMapping(value="/admin/channel/{id}",method= RequestMethod.GET)
169 170
     public ResponseBean channelGet(@PathVariable Integer id){
170 171
         ResponseBean responseBean = new ResponseBean();
171 172
         try {

+ 6
- 1
src/main/java/com/huiju/estateagents/entity/TaChannel.java View File

@@ -1,5 +1,6 @@
1 1
 package com.huiju.estateagents.entity;
2 2
 
3
+import com.baomidou.mybatisplus.annotation.TableField;
3 4
 import com.baomidou.mybatisplus.annotation.TableName;
4 5
 import com.baomidou.mybatisplus.annotation.IdType;
5 6
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -81,5 +82,9 @@ public class TaChannel implements Serializable {
81 82
      */
82 83
     private String buildingId;
83 84
 
84
-
85
+    /**
86
+     * 说明描述
87
+     */
88
+    @TableField(value = "`explain`")
89
+    private String explain;
85 90
 }

+ 1
- 1
src/main/resources/mapper/TaChannelMapper.xml View File

@@ -24,6 +24,6 @@
24 24
     </select>
25 25
     
26 26
     <select id="selectChannelList" resultType="com.huiju.estateagents.entity.TaChannel">
27
-        select * from ta_channel ;
27
+        select * from ta_channel
28 28
     </select>
29 29
 </mapper>

+ 5
- 4
src/main/resources/mapper/TaPersonMapper.xml View File

@@ -493,20 +493,21 @@ FROM
493 493
     <select id="channelBrokerList" resultType="com.huiju.estateagents.entity.TaPerson">
494 494
         select
495 495
         p.avatarurl,
496
-        p.name,
497 496
         p.tel,
498 497
         p.sex,
498
+        rc.`name`,
499
+        rc.phone,
499 500
         COUNT(rc.person_id) as recommendCount
500 501
         from ta_person p
501 502
         LEFT JOIN ta_recommend_customer rc ON p.person_id = rc.person_id and rc.report_recommend_status = 1
502 503
         <where>
503 504
         <if test="name !=null and name !=''">
504
-            and name = #{name}
505
+            and rc.`name` = #{name}
505 506
         </if>
506 507
         <if test="phone !=null and phone !=''">
507
-            and tel = #{phone}
508
+            and rc.phone = #{phone}
508 509
         </if>
509
-        and person_type = 'estate agent'
510
+            and p.person_type = 'estate agent'
510 511
         </where>
511 512
         GROUP BY p.person_id
512 513
     </select>