幸运24-后台-个人-用户充值等级-查询-sql
This commit is contained in:
@@ -234,6 +234,9 @@ public class Lucky24RecordAdminService {
|
||||
Map<String, Lucky24PersonalStat> statMap = new HashMap<>(dateStrList.size());
|
||||
|
||||
String uRechargeLevel = userRechargeLevelService.getLevelByUid(uid);
|
||||
if (StringUtils.hasText(userRechargeLevel) && !userRechargeLevel.equalsIgnoreCase(uRechargeLevel)){
|
||||
return new Lucky24PersonalStatVo(new PageResult<>(page));
|
||||
}
|
||||
|
||||
CountDownLatch cdl = new CountDownLatch(2);
|
||||
|
||||
|
@@ -56,6 +56,7 @@ public class Lucky24RecordAdminController extends BaseController {
|
||||
@ApiImplicitParam(value = "partitionId", name = "分区ID", required = true),
|
||||
@ApiImplicitParam(value = "erbanNo", name = "用户ID"),
|
||||
@ApiImplicitParam(value = "date", name = "开始日期", required = true),
|
||||
@ApiImplicitParam(value = "userRechargeLevel", name = "用户充值等级", required = false),
|
||||
@ApiImplicitParam(value = "poolType", name = "数组类型", required = true),
|
||||
@ApiImplicitParam(value = "sortCol", name = "排序列", required = true),
|
||||
@ApiImplicitParam(value = "sortOrder", name = "排序方式", required = true),
|
||||
|
@@ -73,7 +73,7 @@
|
||||
from lucky_24_record r force index (lucky_24_record_partition_id_pool_type_create_time_uid_index)
|
||||
<if test="null != userRechargeLevel and '' != userRechargeLevel">
|
||||
inner join users u on r.uid = u.uid
|
||||
inner join user_recharge_level url on u.uid = url.uid and url.level = #{userRechargeLevel}
|
||||
inner join user_recharge_level url on r.uid = url.uid and url.`level` = #{userRechargeLevel}
|
||||
</if>
|
||||
where r.partition_id = #{partitionId}
|
||||
and r.pool_type in <foreach collection="poolTypeList" item="poolType" separator="," open="(" close=")">#{poolType}</foreach>
|
||||
@@ -100,7 +100,7 @@
|
||||
from lucky_24_record r force index (lucky_24_record_partition_id_pool_type_create_time_uid_index)
|
||||
<if test="null != userRechargeLevel and '' != userRechargeLevel">
|
||||
inner join users u on r.uid = u.uid
|
||||
inner join user_recharge_level url on u.uid = url.uid and url.level = #{userRechargeLevel}
|
||||
inner join user_recharge_level url on r.uid = url.uid and url.`level` = #{userRechargeLevel}
|
||||
</if>
|
||||
where r.partition_id = #{partitionId}
|
||||
and r.pool_type in <foreach collection="poolTypeList" item="poolType" separator="," open="(" close=")">#{poolType}</foreach>
|
||||
|
@@ -16,7 +16,7 @@ public interface Lucky24StatMapper {
|
||||
@Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
List<Lucky24PersonalStat> listPersonalStat(@Param("partitionId") Integer partitionId,
|
||||
@Param("uid") Long uid, String userRechargeLevel, @Param("poolType") Integer poolType,
|
||||
@Param("uid") Long uid, @Param("userRechargeLevel") String userRechargeLevel, @Param("poolType") Integer poolType,
|
||||
@Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
}
|
||||
|
@@ -33,6 +33,7 @@
|
||||
|
||||
<select id="listPersonalStat" resultType="com.accompany.sharding.vo.Lucky24PersonalStat">
|
||||
select * from lucky_24_record_personal_stat s
|
||||
inner join user_recharge_level url on s.uid = url.uid
|
||||
where s.date between #{startDate} and #{endDate}
|
||||
and s.partition_id = #{partitionId}
|
||||
<if test="null != uid">
|
||||
@@ -44,6 +45,9 @@
|
||||
<if test="null == poolType">
|
||||
and s.pool_type = 0
|
||||
</if>
|
||||
<if test="null != userRechargeLevel and '' != userRechargeLevel">
|
||||
and url.`level` = #{userRechargeLevel}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user