1.修改返回创建时间为时间戳格式

2.修复排序功能 Bug
This commit is contained in:
2025-06-26 17:39:43 +08:00
parent 85c872ff07
commit c3c722e904
13 changed files with 412 additions and 61 deletions

View File

@@ -317,11 +317,11 @@
order by
<choose>
<!-- 传空和默认的情况下按照时间降序排序 -->
<when test="hostInfoDTO.sortName == '' and hostInfoDTO.sortName == null">
<when test="hostInfoDTO.sortName == '' or hostInfoDTO.sortName == null">
ns.create_time desc
</when>
<!-- sortNmae 有值的情况下排序 -->
<when test="hostInfoDTO.sortName != null and hostInfoDTO.sort != null ">
<when test="hostInfoDTO.sortName != null or hostInfoDTO.sort != null ">
<if test="hostInfoDTO.sortName == 'createTime' and hostInfoDTO.sort != null">
ns.create_time ${hostInfoDTO.sort}
</if>

View File

@@ -30,9 +30,30 @@
region, historic_high_coins, total_gift_coins, host_display_id, owner_id, create_time,
update_time, creator, updater, deleted, tenant_id
</sql>
<select id="selectPageByCondition" resultType="com.yupi.springbootinit.model.vo.bigbrother.ServerBigBrotherVO">
select * from
<resultMap id="BaseResultMapCopy" type="com.yupi.springbootinit.model.vo.bigbrother.ServerBigBrotherVO">
<!--@mbg.generated-->
<!--@Table server_big_brother-->
<result column="display_id" jdbcType="VARCHAR" property="displayId" />
<result column="user_id_str" jdbcType="VARCHAR" property="userIdStr" />
<result column="nickname" jdbcType="VARCHAR" property="nickname" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="hostcoins" jdbcType="INTEGER" property="hostcoins" />
<result column="follower_count" jdbcType="INTEGER" property="followerCount" />
<result column="following_count" jdbcType="INTEGER" property="followingCount" />
<result column="region" jdbcType="VARCHAR" property="region" />
<result column="historic_high_coins" jdbcType="INTEGER" property="historicHighCoins" />
<result column="total_gift_coins" jdbcType="INTEGER" property="totalGiftCoins" />
<result column="host_display_id" jdbcType="VARCHAR" property="hostDisplayId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<select id="selectPageByCondition" resultMap="BaseResultMapCopy">
select sbr.display_id, sbr.user_id_str,sbr.nickname,sbr.level,sbr.hostcoins,
sbr.follower_count, sbr.following_count, sbr.region, sbr.historic_high_coins, sbr.total_gift_coins,
sbr.host_display_id,sbr.create_time from
server_big_brother sbr left join server_country_info ci ON sbr.region = ci.country_name
where sbr.tenant_id=#{dto.tenantId}
<!-- 大哥所属国家筛选 -->
@@ -77,11 +98,11 @@
<if test="dto.levelMin != null and dto.levelMax != null " >
and sbr.level between #{dto.levelMin,jdbcType=INTEGER} and #{dto.levelMax,jdbcType=INTEGER}
</if>
<!-- 排序类型 -->
order by
<!-- 排序类型 -->
<choose>
<!-- 传空和默认的情况下按照时间降序排序 -->
<when test="dto.sortName == '' and dto.sortName == null">
<when test="dto.sortName == '' or dto.sortName == null">
sbr.create_time desc
</when>
<!-- sortNmae 有值的情况下排序 -->