1.修改返回创建时间为时间戳格式
2.修复排序功能 Bug
This commit is contained in:
@@ -0,0 +1 @@
|
||||
com.yupi.springbootinit.config.YudaoJacksonAutoConfiguration
|
||||
@@ -25,7 +25,12 @@ spring:
|
||||
username: root
|
||||
password: 123asd
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
# date-format: yyyy-MM-dd HH:mm:ss
|
||||
serialization:
|
||||
write-dates-as-timestamps: true # 设置 Date 的格式,使用时间戳
|
||||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
||||
servlet:
|
||||
multipart:
|
||||
# 大小限制
|
||||
@@ -50,7 +55,8 @@ mybatis-plus:
|
||||
logic-delete-field: isDelete # 全局逻辑删除的实体字段名
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
# 微信相关
|
||||
# 微信相关·
|
||||
# Jackson 配置项
|
||||
wx:
|
||||
# 微信公众平台
|
||||
# todo 需替换配置
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 有值的情况下排序 -->
|
||||
|
||||
Reference in New Issue
Block a user