소스 검색

缺陷修改

guanglong 3 년 전
부모
커밋
c7795f0c44

+ 11 - 11
mp-service/src/main/java/com/qs/mp/channel/domain/param/ChannelParam.java

@@ -39,17 +39,17 @@ public class ChannelParam {
 	@ApiModelProperty(value = "区ID",required=true)
 	private Long areaId;
 
-	@NotNull(message = "省不能为空")
-	@ApiModelProperty(value = "省",required=true)
-	private String province;
-
-	@NotNull(message = "城市不能为空")
-	@ApiModelProperty(value = "城市",required=true)
-	private String city;
-
-	@NotNull(message = "区不能为空")
-	@ApiModelProperty(value = "区",required=true)
-	private String area;
+//	@NotNull(message = "省不能为空")
+//	@ApiModelProperty(value = "省",required=true)
+//	private String province;
+//
+//	@NotNull(message = "城市不能为空")
+//	@ApiModelProperty(value = "城市",required=true)
+//	private String city;
+//
+//	@NotNull(message = "区不能为空")
+//	@ApiModelProperty(value = "区",required=true)
+//	private String area;
 
 	@NotNull(message = "分佣百分比不能为空")
 	@ApiModelProperty(value = "分佣百分比",required=true)

+ 2 - 2
mp-service/src/main/resources/mapper/channel/ChannelCommissionMapper.xml

@@ -27,7 +27,7 @@
 		select IFNULL(SUM(t1.comm_amt),0) as commAmt
 		from mp_channel_commission t1
 		left join mp_channel t2 on t1.channel_id = t2.channel_id
-		where t2.channel_no like concat(#{channelNo},'.%')
+		where (t2.channel_no like concat(#{channelNo},'.%') or t2.channel_no = #{channelNo})
 		AND t1.created_time between DATE_ADD(CURDATE(),INTERVAL #{days} DAY) and NOW()
 	</select>
     
@@ -39,7 +39,7 @@
 			select t1.ticket_id, MIN(t1.sale_amt)
 			from mp_channel_commission t1
 			left join mp_channel t2 on t1.channel_id = t2.channel_id
-			where t2.channel_no like concat(#{channelNo},'.%')
+			where (t2.channel_no like concat(#{channelNo},'.%') or t2.channel_no = #{channelNo})
 			AND t1.created_time between DATE_ADD(CURDATE(),INTERVAL #{days} DAY) and NOW()
 			GROUP BY t1.ticket_id
 		) t3

+ 1 - 1
mp-service/src/main/resources/mapper/channel/ChannelMapper.xml

@@ -52,7 +52,7 @@
 		from mp_channel t1
 		left join mp_channel t2 on t1.parent_id = t2.channel_id
 		where t1.`level`= 0
-		and t2.channel_no like concat(#{channelNo}, '.%')
+		and (t2.channel_no like concat(#{channelNo}, '.%') or t2.channel_no = #{channelNo})
     </select>
 
 </mapper>

+ 2 - 2
mp-service/src/main/resources/mapper/channel/ChannelUserRelMapper.xml

@@ -21,7 +21,7 @@
         select count(t1.user_id) as userCnt 
 		from mp_channel_user_rel t1
 		left join mp_channel t2 on t1.channel_id = t2.channel_id
-		where t2.channel_no like concat(#{channelNo}, '.%')
+		where (t2.channel_no like concat(#{channelNo}, '.%') or t2.channel_no = #{channelNo})
     </select>
     
     <!-- 根据渠道No查询渠道指定时间内新增的用户数量 -->
@@ -29,7 +29,7 @@
         select count(t1.user_id) as userCnt 
 		from mp_channel_user_rel t1
 		left join mp_channel t2 on t1.channel_id = t2.channel_id
-		where t2.channel_no like concat(#{channelNo}, '.%')
+		where (t2.channel_no like concat(#{channelNo}, '.%') or t2.channel_no = #{channelNo})
 		<if test="days != null and days != ''">
 			<!-- AND date_format(t1.created_time,'%Y-%m-%d') between date_format(DATE_ADD(CURDATE(),INTERVAL #{days} DAY),'%Y-%m-%d') and date_format(CURDATE(),'%Y-%m-%d') -->
 			AND t1.created_time between DATE_ADD(CURDATE(),INTERVAL #{days} DAY) and NOW()