瀏覽代碼

统计表修改

anderx 11 月之前
父節點
當前提交
d9f8fc5e8d
共有 1 個文件被更改,包括 9 次插入8 次删除
  1. 9 8
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

+ 9 - 8
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -2329,16 +2329,17 @@ inner join(
 
 
 	<select id="selectNoChannelByaids" resultType="com.goafanti.admin.bo.AdminCustomerBo">
-		select aid,sum(if( share_type=0 and channel=0,1,0))userCount,
-		sum(if(share_type=3 and channel=1,1,0))channelCount, sum(if( share_type=2 ,1,0))signCount,
-		sum(if(share_type=0 and source =1 and channel=0,1,0))newCount,
-		sum(if(share_type=0 and source =3 and channel=0,1,0))transferCount,
-		sum(if(share_type=0 and source =1 and channel=1,1,0))channelNewCount,
-		sum(if(share_type=0 and source =2 and channel=0,1,0))receiveCount,
+		select aid,sum(if( share_type=0 and new_channel=0,1,0))userCount,
+		sum(if(share_type=3 and new_channel=1,1,0))channelCount,
+		sum(if( share_type=2 ,1,0))signCount,
+		sum(if(share_type=0 and source =1 and new_channel=0,1,0))newCount,
+		sum(if(share_type=0 and source =3 and new_channel=0,1,0))transferCount,
+		sum(if(share_type=0 and source =1 and new_channel=1,1,0))channelNewCount,
+		sum(if(share_type=0 and source =2 and new_channel=0,1,0))receiveCount,
 		sum(if(share_type=0 and `level` =0,1,0))generalCount,
 		sum(if(share_type=0 and `level` =1,1,0))intentionCount,
 		sum(if(share_type=0 and `level` =2,1,0))keynoteCount
-		from `user` where `type` =1 and new_channel=0   and source in(1,2,3)
+		from `user` where `type` =1  and source in(1,2,3)
 		<if test="startTime != null and endTime != null">
 			and  transfer_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
 		</if>
@@ -2352,7 +2353,7 @@ inner join(
 	</select>
 
 	<select id="selectChannelByaids" resultType="com.goafanti.admin.bo.AdminCustomerBo">
-		select a.aid,sum(if(c.channel=0,1,0))completeCount, sum(if(c.channel=1,1,0))channelCompleteCount
+		select a.aid,sum(if(c.new_channel=0,1,0))completeCount, sum(if(c.new_channel=1,1,0))channelCompleteCount
 		from public_release a left join public_release_details b on a.id=b.prid left join `user` c on b.uid=c.id
 		where b.clock_in =1
 		<if test="startTime != null and endTime != null">