yujian
2020-05-23 28cf328a098334b51a3e9d2d56f983fb8c862211
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/SystemCouponMapper.java
@@ -1,34 +1,41 @@
package com.yeshi.fanli.dao.mybatis;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.system.SystemCoupon;
public interface SystemCouponMapper extends BaseMapper<SystemCoupon> {
   /**
    * 批量删除
    * @param list
    * @return
    */
   int deleteBatchByPrimaryKey(List<Long> list);
   /**
    *   根据类型查询且启用券
    * @param list
    * @return
    */
   List<SystemCoupon> getCouponListByType(@Param("list")List<String> list);
   /**
    * 根据类型查询
    * @param type
    * @return
    */
   SystemCoupon getCouponByType(@Param("type") String type);
}
package com.yeshi.fanli.dao.mybatis;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.system.SystemCoupon;
public interface SystemCouponMapper extends BaseMapper<SystemCoupon> {
   /**
    * 批量删除
    * @param list
    * @return
    */
   int deleteBatchByPrimaryKey(List<Long> list);
   /**
    *   根据类型查询且启用券
    * @param list
    * @return
    */
   List<SystemCoupon> getCouponListByType(@Param("list")List<String> list);
   /**
    * 根据类型查询
    * @param type
    * @return
    */
   SystemCoupon getCouponByType(@Param("type") String type);
   /**
    * 根据类型/比例查询
    * @param type
    * @return
    */
   SystemCoupon getCouponByTypeAndPercent(@Param("type") String type, @Param("percent") BigDecimal percent);
}