From ae1471f378f399f76518539ec8992e64a3673436 Mon Sep 17 00:00:00 2001 From: 陶杰 <1378534974@qq.com> Date: 星期三, 08 一月 2025 15:26:06 +0800 Subject: [PATCH] 1.订单提交:订单最小金额配置 --- src/main/java/com/mzl/flower/mapper/member/MemberMapper.java | 32 +++++++++++++++++++++++++++++--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/mzl/flower/mapper/member/MemberMapper.java b/src/main/java/com/mzl/flower/mapper/member/MemberMapper.java index 82051de..e1081ba 100644 --- a/src/main/java/com/mzl/flower/mapper/member/MemberMapper.java +++ b/src/main/java/com/mzl/flower/mapper/member/MemberMapper.java @@ -1,10 +1,15 @@ package com.mzl.flower.mapper.member; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.mzl.flower.dto.request.menber.MemberQueryDTO; +import com.mzl.flower.dto.response.member.MemberVO; import com.mzl.flower.entity.menber.Member; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; + +import java.util.List; /** @@ -18,8 +23,29 @@ @Repository public interface MemberMapper extends BaseMapper<Member> { - @SuppressWarnings("AlibabaAbstractMethodOrInterfaceMethodMustUseJavadoc") - @Select("select * from t_member where level_name = #{levelName} and deleted = '0' limit 1") - Member getMemberByName(@Param("levelName") String levelName); + @Select("select * from t_member where end_point = #{endPoint} and deleted = '0' limit 1") + Member getEndPointByIntegerMaxValue(@Param("endPoint") Integer endPoint); + + @Select("select * from t_member where name = #{name} and deleted = '0' limit 1") + Member getMemberByName(@Param("name") String name); + + @Select("select * from t_member where start_point <= #{growthValue} and end_point > #{growthValue} and deleted = '0' limit 1") + Member getMemberByGrowthValue(@Param("growthValue") Integer growthValue); + + //获取成长值大于当前值的会员 + @Select("select * from t_member where start_point > #{growthValue} and deleted = '0' ") + List<Member> getgtMembersByGrowthValue(@Param("growthValue") Integer growthValue); + + //获取成长值区间最大值小于当前值的会员 + @Select("select * from t_member where end_point < #{growthValue} and deleted = '0' ORDER BY end_point DESC LIMIT 1") + Member getgtMembersByEndPoint(@Param("growthValue") Integer growthValue); + + List<MemberVO> queryPage(@Param("dto") MemberQueryDTO dto, Page page); + + @Select("select * from t_member where deleted = '0'") + List<Member> getAllMember(); + + @Select("select * from t_member where deleted = '0' and id != #{id} ") + List<Member> getOtherAllMember(@Param("id") Long id); } -- Gitblit v1.9.3