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

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

1
 package com.huiju.estateagents.entity;
1
 package com.huiju.estateagents.entity;
2
 
2
 
3
+import com.baomidou.mybatisplus.annotation.TableField;
3
 import com.baomidou.mybatisplus.annotation.TableName;
4
 import com.baomidou.mybatisplus.annotation.TableName;
4
 import com.baomidou.mybatisplus.annotation.IdType;
5
 import com.baomidou.mybatisplus.annotation.IdType;
5
 import com.baomidou.mybatisplus.annotation.TableId;
6
 import com.baomidou.mybatisplus.annotation.TableId;
81
      */
82
      */
82
     private String buildingId;
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
     </select>
24
     </select>
25
     
25
     
26
     <select id="selectChannelList" resultType="com.huiju.estateagents.entity.TaChannel">
26
     <select id="selectChannelList" resultType="com.huiju.estateagents.entity.TaChannel">
27
-        select * from ta_channel ;
27
+        select * from ta_channel
28
     </select>
28
     </select>
29
 </mapper>
29
 </mapper>

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

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