魏熙美 vor 5 Jahren
Ursprung
Commit
0a79641d66

+ 13
- 0
src/main/java/com/huiju/estateagents/entity/TaActivityDynamicEnlist.java Datei anzeigen

@@ -1,6 +1,7 @@
1 1
 package com.huiju.estateagents.entity;
2 2
 
3 3
 import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
4 5
 import com.baomidou.mybatisplus.annotation.TableId;
5 6
 import com.baomidou.mybatisplus.annotation.TableName;
6 7
 import lombok.Data;
@@ -61,4 +62,16 @@ public class TaActivityDynamicEnlist implements Serializable {
61 62
      */
62 63
     private Integer attendNum;
63 64
 
65
+    /**
66
+     * 分享人
67
+     */
68
+    @TableField(exist = false)
69
+    private String sharePersonName;
70
+
71
+    /**
72
+     * 公司名称
73
+     */
74
+    @TableField(exist = false)
75
+    private String orgName;
76
+
64 77
 }

+ 11
- 1
src/main/resources/mapper/TaActivityDynamicEnlistMapper.xml Datei anzeigen

@@ -2,7 +2,17 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.huiju.estateagents.mapper.TaActivityDynamicEnlistMapper">
4 4
         <select id="signList" resultType="com.huiju.estateagents.entity.TaActivityDynamicEnlist">
5
-            select * from ta_activity_dynamic_enlist where dynamic_id = #{dynamicId} and org_id = #{orgId}
5
+             SELECT
6
+                tade.*,
7
+                tp.name as sharePersonName,
8
+                tao.name as orgName
9
+            FROM
10
+                ta_activity_dynamic_enlist tade LEFT JOIN ta_person tp on tade.share_person = tp.person_id
11
+                LEFT JOIN ta_org tao on tade.org_id = tao.org_id
12
+            WHERE
13
+                tade.dynamic_id = #{dynamicId}
14
+                AND tade.org_id = #{orgId}
15
+
6 16
         </select>
7 17
 
8 18
         <select id="selectEnlistCount" resultType="Integer" >

+ 26
- 26
src/main/resources/mapper/TaPersonMapper.xml Datei anzeigen

@@ -473,32 +473,32 @@ FROM
473 473
 
474 474
     <select id="getPersonList" resultType="com.huiju.estateagents.entity.TaPerson">
475 475
         SELECT
476
-	a.*
477
-FROM
478
-	ta_person a
479
-	LEFT JOIN ta_person_building b ON a.person_id = b.person_id
480
-	<where>
481
-        1=1
482
-        <if test="personType != null and personType!= ''">
483
-            and a.person_type = #{personType}
484
-        </if>
485
-        <if test="name != null and name!= ''">
486
-            and a.name like CONCAT('%',#{name}, '%')
487
-        </if>
488
-        <if test="personTags != null and personTags!= ''">
489
-            and a.person_tags like CONCAT('%',#{personTags}, '%')
490
-        </if>
491
-        <if test="phone != null and phone!= ''">
492
-            and a.tel = #{phone}
493
-        </if>
494
-        <if test="buildingId != null and buildingId!= ''">
495
-            and b.building_id = #{buildingId}
496
-        </if>
497
-        <if test="status != null">
498
-            and a.status = #{status}
499
-        </if>
500
-    </where>
501
-	GROUP BY a.person_id
476
+            a.*
477
+        FROM
478
+            ta_person a
479
+            LEFT JOIN ta_person_building b ON a.person_id = b.person_id
480
+            <where>
481
+                1=1
482
+                <if test="personType != null and personType!= ''">
483
+                    and a.person_type = #{personType}
484
+                </if>
485
+                <if test="name != null and name!= ''">
486
+                    and a.name like CONCAT('%',#{name}, '%')
487
+                </if>
488
+                <if test="personTags != null and personTags!= ''">
489
+                    and a.person_tags like CONCAT('%',#{personTags}, '%')
490
+                </if>
491
+                <if test="phone != null and phone!= ''">
492
+                    and a.tel = #{phone}
493
+                </if>
494
+                <if test="buildingId != null and buildingId!= ''">
495
+                    and b.building_id = #{buildingId}
496
+                </if>
497
+                <if test="status != null">
498
+                    and a.status = #{status}
499
+                </if>
500
+            </where>
501
+            GROUP BY a.person_id
502 502
     </select>
503 503
 
504 504
     <select id="channelBrokerList" resultType="com.huiju.estateagents.entity.TaPerson">