You've already forked mine_clearance
项目上传
This commit is contained in:
19
basics/src/main/resources/mapper/ClearanceLogMapper.xml
Normal file
19
basics/src/main/resources/mapper/ClearanceLogMapper.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.lightyears.basics.mapper.ClearanceLogMapper">
|
||||
<select id="getPlayerClearanceLogs" resultType="com.lightyears.common.domain.dto.ClearanceRankDto">
|
||||
SELECT
|
||||
p.user_id as playerId,
|
||||
ifnull( max( l.layers_num ), 0 ) AS layersNum
|
||||
FROM
|
||||
sl_player p
|
||||
left join sl_clearance_log l on l.player_id = p.user_id
|
||||
<where>
|
||||
<if test="userId != null and userId > 0">
|
||||
and p.user_id = ${userId}
|
||||
</if>
|
||||
</where>
|
||||
group by p.user_id
|
||||
ORDER BY layersNum desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user