主播 7 日数据接口废弃

This commit is contained in:
2025-06-17 18:26:59 +08:00
parent 047ceaea21
commit 7ca3394fd9
2 changed files with 31 additions and 31 deletions

View File

@@ -35,11 +35,11 @@ public class HostInfoController {
return ResultUtils.success(conditionHosts);
}
@PostMapping("7days_data")
public BaseResponse<List<SevenDaysData>> sevenDaysData(@RequestBody HistoryDataDTO historyDataDTO){
Object loginId = StpUtil.getLoginId();
historyDataDTO.setUserId(Long.valueOf(loginId.toString()));
List<SevenDaysData> data = hostInfoService.getSevenDaysData(historyDataDTO);
return ResultUtils.success(data);
}
// @PostMapping("7days_data")
// public BaseResponse<List<SevenDaysData>> sevenDaysData(@RequestBody HistoryDataDTO historyDataDTO){
// Object loginId = StpUtil.getLoginId();
// historyDataDTO.setUserId(Long.valueOf(loginId.toString()));
// List<SevenDaysData> data = hostInfoService.getSevenDaysData(historyDataDTO);
// return ResultUtils.success(data);
// }
}

View File

@@ -347,28 +347,28 @@
</choose>
</select>
<select id="selectSevenDaysData" resultType="com.yupi.springbootinit.model.vo.hosts.SevenDaysData">
select create_time as createTime,
<choose>
<when test="historyDataName != null and historyDataName != ''">
<if test="historyDataName == 'fans' ">
fans dataContent
</if>
<if test="historyDataName == 'hostsCoins' ">
hosts_coins as dataContent
</if>
<if test="historyDataName == 'fllowernum'">
fllowernum as dataContent
</if>
<if test="historyDataName == 'onlineFans'">
online_fans as dataContent
</if>
</when>
</choose>
from server_new_hosts
where hosts_id =#{hostsId,jdbcType=VARCHAR}
and creator =#{userId,jdbcType=BIGINT}
and tenant_id =#{tenantId,jdbcType=BIGINT}
ORDER BY create_time DESC LIMIT 7
</select>
<!-- <select id="selectSevenDaysData" resultType="com.yupi.springbootinit.model.vo.hosts.SevenDaysData">-->
<!-- select create_time as createTime,-->
<!-- <choose>-->
<!-- <when test="historyDataName != null and historyDataName != ''">-->
<!-- <if test="historyDataName == 'fans' ">-->
<!-- fans dataContent-->
<!-- </if>-->
<!-- <if test="historyDataName == 'hostsCoins' ">-->
<!-- hosts_coins as dataContent-->
<!-- </if>-->
<!-- <if test="historyDataName == 'fllowernum'">-->
<!-- fllowernum as dataContent-->
<!-- </if>-->
<!-- <if test="historyDataName == 'onlineFans'">-->
<!-- online_fans as dataContent-->
<!-- </if>-->
<!-- </when>-->
<!-- </choose>-->
<!-- from server_new_hosts-->
<!-- where hosts_id =#{hostsId,jdbcType=VARCHAR}-->
<!-- and creator =#{userId,jdbcType=BIGINT}-->
<!-- and tenant_id =#{tenantId,jdbcType=BIGINT}-->
<!-- ORDER BY create_time DESC LIMIT 7-->
<!-- </select>-->
</mapper>