You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
1.1 KiB

<?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.ccsens.mt.persist.dao.LevelUpDao">
<select id="getByLevelUserIdAndCode" parameterType="java.util.Map" resultType="Long">
SELECT id FROM `t_level_up`
WHERE level_user_id = #{levelUserId}
and compete_code = #{competeCode}
and rec_status = 0
LIMIT 1
</select>
<select id="queryLevelUserInfo" parameterType="java.util.Map" resultType="com.ccsens.mt.bean.vo.LevelVo$QueryLevelUserInfo">
SELECT
us.id as levelUserId,
us.avatar_url as avatarUrl,
us.`name` as name,
us.team_id as teamId
FROM
t_level_up u LEFT JOIN t_level_user us on u.level_user_id = us.id
WHERE
u.compete_code = #{competeCode}
and
u.compete_time_id = #{competeTimeId}
and
us.rec_status = 0
and
u.rec_status = 0
</select>
</mapper>