pet/com.datang.pet.mapper/target/classes/mapperExtend/LabelMapperExtend.xml

15 lines
635 B
XML

<?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.datang.pet.mapperExtend.LabelMapperExtend">
<resultMap id="BaseResultMap" type="com.datang.pet.vo.GetLabelListResponse">
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="hotvalue" jdbcType="VARCHAR" property="hotValue" />
</resultMap>
<select id="getLabelList" resultMap="BaseResultMap">
SELECT *,COUNT(*) AS hotvalue FROM label GROUP BY content ORDER BY hotvalue DESC LIMIT 0,3
</select>
</mapper>