魏超 5 년 전
부모
커밋
484e2fa258
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 2
    2
      src/main/resources/mapper/TaPersonIntentionRecordMapper.xml
  2. 4
    4
      src/main/resources/mapper/statistic/TaActivityStaticMapper.xml

+ 2
- 2
src/main/resources/mapper/TaPersonIntentionRecordMapper.xml 파일 보기

@@ -16,7 +16,7 @@
16 16
 
17 17
     <select id="selectIntentionUser" resultType="map">
18 18
         SELECT
19
-            tpir.person_name as  personName,
19
+            tp.nickname as  personName,
20 20
             tp.phone as phone,
21 21
             tpir.building_name as buildingName,
22 22
             SUM(tpir.intention) as intention
@@ -47,7 +47,7 @@
47 47
         From (
48 48
 
49 49
         SELECT
50
-        tpir.person_name as person_name,
50
+        tp.nickname as person_name,
51 51
         if(tp.gender = '1' , '男', if(tp.gender = '2', '女', '未知')) as gender,
52 52
         tp.phone as phone,
53 53
         tp.province,

+ 4
- 4
src/main/resources/mapper/statistic/TaActivityStaticMapper.xml 파일 보기

@@ -1519,7 +1519,7 @@
1519 1519
         ) as person
1520 1520
 
1521 1521
         left join (
1522
-            select count(*) as shareNum, temp.person_id from (
1522
+            select count(*) as shareNum, temp.person_id, temp.create_date from (
1523 1523
                 SELECT t.person_id, t.create_date
1524 1524
                 FROM ta_share_count t
1525 1525
                 LEFT JOIN ta_help_activity a ON t.be_share = a.help_activity_id
@@ -1585,7 +1585,7 @@
1585 1585
         ) as visitPersonNum on visitPersonNum.person_id = person.person_id
1586 1586
         group by person.person_id
1587 1587
         <if test="colKey == null or colKey == ''">
1588
-            order by person.create_date desc
1588
+            order by shareNum.create_date desc
1589 1589
         </if>
1590 1590
         <if test="colKey != null and colKey != ''">
1591 1591
             ORDER BY ${colKey} ${sort}
@@ -1680,7 +1680,7 @@
1680 1680
         ) as person
1681 1681
 
1682 1682
         left join (
1683
-        select count(*) as shareNum, temp.person_id from (
1683
+        select count(*) as shareNum, temp.person_id, temp.create_date from (
1684 1684
         SELECT t.person_id, t.create_date
1685 1685
         FROM ta_share_count t
1686 1686
         LEFT JOIN ta_help_activity a ON t.be_share = a.help_activity_id
@@ -1746,7 +1746,7 @@
1746 1746
         ) as visitPersonNum on visitPersonNum.person_id = person.person_id
1747 1747
         group by person.person_id
1748 1748
         <if test="colKey == null or colKey == ''">
1749
-            order by person.create_date desc
1749
+            order by shareNum.create_date desc
1750 1750
         </if>
1751 1751
         <if test="colKey != null and colKey != ''">
1752 1752
             ORDER BY ${colKey} ${sort}