yanghui
2022-11-10 ec96abc7c3d9ef48b00c321eed85f9d934c699a5
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -57,6 +57,7 @@
      FROM com_sanshuo_event_info
      <where>
         event_process_status !=9
         AND app_id=#{comEvent.appId}
         <if test="comEvent.keyword != null and comEvent.keyword!=''" >
            AND   ( order_sn = #{comEvent.keyword} or request_user_tel =#{comEvent.keyword} or current_org_name=#{comEvent.keyword})
         </if>
@@ -104,6 +105,7 @@
      FROM com_sanshuo_event_info
      <where>
         event_process_status !=9
         AND app_id=#{comEvent.appId}
         <if test="eventIds != null">
            AND id in 
            <foreach collection="eventIds" item="id" separator="," open="(" close=")">
@@ -162,6 +164,7 @@
      from com_sanshuo_event_info
      <where>
         event_process_status not in (9)
         AND app_id=#{comEvent.appId}
      <if test="comEvent.userType == 1">
         AND request_user_id=#{comEvent.requestUserId}
      </if>
@@ -193,7 +196,7 @@
      from com_sanshuo_event_info
      <where>
         event_process_status not in (9)
         AND app_id=#{comEvent.appId}
         <if test="comEvent.userType == 1">
            AND request_user_id=#{comEvent.requestUserId}
         </if>
@@ -224,6 +227,7 @@
        (SELECT count(id) FROM com_sanshuo_event_info
        where event_process_status  in (2,3,5,6)
      AND user_event_status not in(3,4)
      AND app_id='wx0cef797390444b75'
        <if test="dto.type == 2">
         AND current_process_type=1
         <if test="dto.id != null">
@@ -249,6 +253,7 @@
        (SELECT count(id) FROM com_sanshuo_event_info
        where event_process_status = 5
      AND user_event_status not in(3,4)
      AND app_id='wx0cef797390444b75'
      <if test="dto.type == 2">
         AND current_process_type=1
         <if test="dto.id != null">
@@ -273,6 +278,7 @@
        (SELECT count(id) FROM com_sanshuo_event_info
        where event_process_status = 6
      AND user_event_status not in(3)
      AND app_id='wx0cef797390444b75'
      <if test="dto.type == 2">
         AND current_process_type=1
         <if test="dto.id != null">
@@ -300,6 +306,7 @@
        where t.event_process_status in (6,7)
      AND t.user_event_status not in(3,4)
      AND t1.event_status=7
      AND app_id='wx0cef797390444b75'
      <if test="dto.type == 2">
         AND t.current_process_type=1
         <if test="dto.id != null">
@@ -324,6 +331,7 @@
        (select count(id) FROM com_sanshuo_event_info
        where event_result=2
      AND user_event_status not in(3,4)
      AND app_id='wx0cef797390444b75'
      <if test="dto.type == 2">
         AND current_process_type=1
         <if test="dto.id != null">
@@ -348,6 +356,7 @@
        (select count(id) FROM com_sanshuo_event_info
        where event_result=1
      AND user_event_status not in(3,4)
      AND app_id='wx0cef797390444b75'
      <if test="dto.type == 2">
         AND current_process_type=1
         <if test="dto.id != null">
@@ -372,6 +381,7 @@
      (select count(id) from com_sanshuo_event_info WHERE
      create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
      AND event_process_status not in (8)
      AND app_id='wx0cef797390444b75'
      <if test="dto.type == 2">
         AND current_process_type=1
         <if test="dto.id != null">
@@ -397,6 +407,7 @@
      create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
      AND event_process_status not in (8)
      AND event_process_status = 6
      AND app_id='wx0cef797390444b75'
      <if test="dto.type == 2">
         AND current_process_type=1
         <if test="dto.id != null">
@@ -424,6 +435,7 @@
        SELECT COUNT(id) FROM com_sanshuo_event_info
        WHERE create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
      AND event_process_status not in (9)
      AND app_id='wx0cef797390444b75'
      <if test="dto.type == 2">
         AND current_process_type=1
         <if test="dto.id != null">
@@ -450,6 +462,7 @@
      SELECT COUNT(id) FROM com_sanshuo_event_info
        WHERE create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
        AND event_process_status=6
      AND app_id='wx0cef797390444b75'
      <if test="dto.type == 2">
         AND current_process_type=1
         <if test="dto.id != null">
@@ -475,17 +488,19 @@
   <select id="eventRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO">
      select count(id) as count,current_process_type from com_sanshuo_event_info
      where event_process_status not in(7,8,9)
      AND app_id='wx0cef797390444b75'
      group by current_process_type
      having current_process_type &lt;>5
   </select>
   <select id="expertRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO">
      select count(id) as count,level as type  from com_sanshuo_expert
      select count(id) as count,level as type  from com_sanshuo_expert where app_id='wx0cef797390444b75'
      group by level
   </select>
   <select id="mediateTypeRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO">
      select count(t.id) as count,t1.name from com_sanshuo_event_info t
      left join com_mediate_type t1 on t.event_category=t1.id
      where t.event_process_status not in(7,8,9)
      AND t.app_id='wx0cef797390444b75'
      group by t.event_category
   </select>