소스 검색

渠道管理

dingxin 5 년 전
부모
커밋
055b0005fd

+ 3
- 2
src/main/java/com/huiju/estateagents/controller/TaChannelController.java 파일 보기

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 파일 보기

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 파일 보기

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 파일 보기

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