Ver código fonte

深时数量

lyhzzz 2 anos atrás
pai
commit
416fe46efa

+ 6 - 2
src/main/resources/mapper/manage/ScenePlusMapper.xml

@@ -8,13 +8,17 @@
             left join t_scene_plus_ext e
         </if>
         WHERE  p.rec_status = 'A'
-        and p.scene_source in (1,2,3,12,13,14)
+
         and  p.user_id in
         <foreach item="userId" collection="userIdList" open="(" separator="," close=")">
             #{userId}
         </foreach>
+        <if test="isObj != null and isObj = 0">
+            and p.scene_source in (1,2,3,12,13,14)
+        </if>
         <if test="isObj != null and isObj = 1">
-            e.is_obj = 1
+            and e.is_obj = 1
+            and p.scene_source = 4
         </if>
         GROUP BY p.user_id
     </select>

+ 5 - 2
src/main/resources/mapper/manage/SceneProMapper.xml

@@ -4,13 +4,16 @@
 
     <select id="getCountGroupByUserId" resultType="com.fdkankan.manage.vo.response.GroupByCount" >
         SELECT user_id as id, count(id) as count FROM t_scene_pro  WHERE  rec_status = 'A' and is_upgrade = 0
-        and scene_source in (1,2,3,12,13,14)
         and  user_id in
          <foreach item="userId" collection="userIdList" open="(" separator="," close=")">
             #{userId}
         </foreach>
+        <if test="isObj !=null and isObj = 0">
+            and scene_source in (1,2,3,12,13,14)
+        </if>
         <if test="isObj !=null and isObj = 1">
-            is_obj = 1
+           and  is_obj = 1
+            and scene_source  = 4
         </if>
         GROUP BY user_id
     </select>