Jelajahi Sumber

APP 端来访管理 可通过人员名称查询

zhulu 1 tahun lalu
induk
melakukan
fc12d90869

+ 3 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/letter/dto/CoreIntroduceLetterRequestDto.java

@@ -41,4 +41,7 @@ public class CoreIntroduceLetterRequestDto extends BaseEntity {
 
     @ApiModelProperty(value = "请求来源")
     private Boolean requestFromWeb;
+
+    @ApiModelProperty(value = "APP端查询关键字")
+    private String keyWords;
 }

+ 1 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/letter/vo/CoreIntroduceLetterVo.java

@@ -113,6 +113,7 @@ public class CoreIntroduceLetterVo {
     private String approveRemark;
     private Date approveTime;
 
+    private  String letterUserNames;
 
 
 }

+ 12 - 4
soc-modules/soc-modules-core/src/main/resources/mapper/letter/CoreIntroduceLetterMapper.xml

@@ -76,10 +76,13 @@
     </select>
     <select id="selectPageListForApp"
             resultType="com.xunmei.common.core.domain.letter.vo.CoreIntroduceLetterVo">
+        select * from (
         select
-        a.*
+        a.*,
+        group_concat(u.user_name) as letterUserNames
         from core_introduce_letter a
         INNER JOIN core_introduce_letter_to_org o ON a.id =o.letter_id
+        INNER JOIN core_introduce_letter_user u ON a.id = u.letter_id
         where a.deleted=0 ANd a.status!=0
         <if test="coreIntroduceLetter.orgId != null ">
             and o.org_id = #{coreIntroduceLetter.orgId}
@@ -87,13 +90,18 @@
         <if test="coreIntroduceLetter.letterNo !=null  and coreIntroduceLetter.letterNo !=''">
             and a.letter_no like concat('%', #{coreIntroduceLetter.letterNo}, '%')
         </if>
-        <if test="coreIntroduceLetter.reasons !=null  and coreIntroduceLetter.reasons !=''">
-            and a.reasons like concat('%', #{coreIntroduceLetter.reasons}, '%')
-        </if>
         <if test="coreIntroduceLetter.type !=null  and coreIntroduceLetter.type !=''">
             and a.type = #{coreIntroduceLetter.type}
         </if>
+        GROUP BY a.id
         order by a.create_time DESC
+        ) as c
+        <where>
+            <if test="coreIntroduceLetter.keyWords !=null  and coreIntroduceLetter.reasons !=''">
+                and c.reasons like concat('%', #{coreIntroduceLetter.keyWords}, '%')
+                or c.letterUserNames like concat('%', #{coreIntroduceLetter.keyWords}, '%')
+            </if>
+        </where>
     </select>