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.
 
 
 
 
 

31 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.epmet.modules.group.dao.ResiGroupAchievementConfigDao">
<select id="selectMoreThanOneByValue" resultType="com.epmet.modules.group.entity.ResiGroupAchievementConfigEntity">
SELECT
id, customer_id, achievement_name, pre_value, target_value, achievement_type
FROM resi_group_achievement_config
WHERE
ACHIEVEMENT_TYPE = #{achievementType}
AND DEL_FLAG = '0'
order by TARGET_VALUE
LIMIT #{offset},#{pageSize}
</select>
<select id="getLastOne" resultType="com.epmet.modules.group.entity.ResiGroupAchievementConfigEntity">
SELECT
id, customer_id, achievement_name, pre_value, target_value, achievement_type
FROM resi_group_achievement_config
WHERE
ACHIEVEMENT_TYPE = #{achievementType}
AND DEL_FLAG = '0'
order by TARGET_VALUE DESC
LIMIT 1
</select>
</mapper>