根据userId获取vip详细信息
This commit is contained in:
parent
878e111867
commit
4f60a1a043
|
@ -6,4 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
|
||||
@Mapper
|
||||
public interface VipDetailsDao extends BaseMapper<VipDetails> {
|
||||
|
||||
VipDetails getVipDetailByUser(Long userId);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?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.sqx.modules.app.dao.VipDetailsDao">
|
||||
|
||||
<select id="getVipDetailByUser" resultType="com.sqx.modules.app.entity.VipDetails">
|
||||
SELECT a.id,
|
||||
a.vip_name_type,
|
||||
a.money,
|
||||
a.vip_name,
|
||||
a.rate,
|
||||
a.award,
|
||||
a.vip_type,
|
||||
b.user_id
|
||||
FROM vip_details a
|
||||
JOIN user_vip b ON a.vip_name_type = b.vip_name_type
|
||||
WHERE b.user_id = #{userId}
|
||||
AND a.vip_type = 0
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue