zoujiajian пре 2 година
родитељ
комит
2dacbacf0e

+ 3 - 3
netflix-dao/src/main/java/com/cyksj/mapper/UserDistributeRankStatisticsRecordMapper.java

@@ -15,9 +15,9 @@ import java.util.List;
  * 创建时间:2024/7/23 16:37
  */
 public interface UserDistributeRankStatisticsRecordMapper extends BaseMapper<UserDistributeRankStatisticsRecord> {
-	Page<DistributeUserRankView> selectDistributeRanks(@Param("type") Integer type, @Param("filed") String filed, @Param("statisticsTime") String statisticsTime, @Param("page") Page<DistributeUserRankView> objectPage);
+	Page<DistributeUserRankView> selectDistributeRanks(@Param("filed") String filed, @Param("statisticsTime") String statisticsTime, @Param("page") Page<DistributeUserRankView> objectPage);
 
-	DistributeUserRankView getSelfRank(@Param("type") Integer type, @Param("filed") String filed, @Param("userId") long userId, @Param("statisticsTime") String statisticsTime);
+	DistributeUserRankView getSelfRank( @Param("filed") String filed, @Param("userId") long userId, @Param("statisticsTime") String statisticsTime);
 
-	List<DistributeUserRankView> getPreviousWinners(@Param("type") Integer type, @Param("filed") String filed, @Param("lastTime") String lastTime);
+	List<DistributeUserRankView> getPreviousWinners(@Param("filed") String filed, @Param("lastTime") String lastTime);
 }

+ 0 - 6
netflix-dao/src/main/java/com/cyksj/model/views/DistributeUserRankView.java

@@ -21,12 +21,6 @@ import java.math.BigDecimal;
 		where = "udsr.is_present is true")
 public class DistributeUserRankView {
 
-	/**
-	 * 排行类型 0金额,1单数
-	 */
-	@DbField("udsr.type")
-	private Integer type;
-
 	@DbIgnore
 	private Integer rankId;
 

+ 1 - 4
netflix-dao/src/main/resources/mapper/UserDistributeRankStatisticsRecordMapper.xml

@@ -14,7 +14,6 @@
         from user_distribute_rank_statistics_record udsr
                  left join user u on u.id = udsr.user_id
         where udsr.is_present is true
-        and type = #{type}
         and statistics_start_time = #{statisticsTime}
     </select>
 
@@ -29,7 +28,6 @@
         from user_distribute_rank_statistics_record udsr
                  left join user u on u.id = udsr.user_id
         where udsr.user_id = #{userId}
-          and type = #{type}
           and udsr.is_present is true
           and statistics_start_time = #{statisticsTime}
     </select>
@@ -44,8 +42,7 @@
                udsr.orders
         from user_distribute_rank_statistics_record udsr
                  left join user u on u.id = udsr.user_id
-        where type = #{type}
-          and statistics_start_time = #{lastTime}
+        where statistics_start_time = #{lastTime}
           and udsr.is_present is false
     </select>
 </mapper>

+ 3 - 3
netflix-web/src/main/java/com/cyksj/web/controller/distribute/DistributeRankController.java

@@ -94,11 +94,11 @@ public class DistributeRankController {
 			statisticsTime = monday.toString();
 		}
 
-		DistributeUserRankView self = userDistributeRankStatisticsRecordMapper.getSelfRank(type, orderByField, userId, statisticsTime);
+		DistributeUserRankView self = userDistributeRankStatisticsRecordMapper.getSelfRank(orderByField, userId, statisticsTime);
 		distributeUserRankPersonalView.setSelf(self);
 
 
-		Page<DistributeUserRankView> ranks = userDistributeRankStatisticsRecordMapper.selectDistributeRanks(type, orderByField, statisticsTime, new Page<>(start, limit));
+		Page<DistributeUserRankView> ranks = userDistributeRankStatisticsRecordMapper.selectDistributeRanks(orderByField, statisticsTime, new Page<>(start, limit));
 		distributeUserRankPersonalView.setRanks(ranks);
 		return GatewayResponse.SUCCESS.newBuilder().toResult(distributeUserRankPersonalView);
 	}
@@ -121,7 +121,7 @@ public class DistributeRankController {
 		if (type == 1) {
 			orderByField = "orders";
 		}
-		List<DistributeUserRankView> ranks = userDistributeRankStatisticsRecordMapper.getPreviousWinners(type, orderByField, lastTime);
+		List<DistributeUserRankView> ranks = userDistributeRankStatisticsRecordMapper.getPreviousWinners(orderByField, lastTime);
 		return GatewayResponse.SUCCESS.newBuilder().toResult(ranks);
 	}