AppleAutoRegisterDataMapper.java 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. package com.cyksj.mapper;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.cyksj.model.entity.AppleAutoRegisterData;
  4. import org.apache.ibatis.annotations.Param;
  5. import org.apache.ibatis.annotations.Select;
  6. import java.util.Date;
  7. import java.util.List;
  8. /*
  9. *项目名: netflix
  10. *文件名: AppleAutoRegisterDataMapper
  11. *创建者: JavaZou
  12. *创建时间:2022/11/22 16:15
  13. */
  14. public interface AppleAutoRegisterDataMapper extends BaseMapper<AppleAutoRegisterData> {
  15. @Select("select count(*)" +
  16. " from apple_auto_register_data" +
  17. " where status is false and country_or_area = #{countryOrArea}")
  18. Integer selectAreaDataView(AppleAutoRegisterData.CountryOrArea countryOrArea);
  19. @Select("select ad.id from apple_auto_register_data ad left join register_order_don rd on rd.id = ad.order_id" +
  20. " where ad.user_id = #{userId} and ad.status = true" +
  21. " and ad.country_or_area = #{countryOrArea}" +
  22. " and rd.status = 'noPayment'")
  23. Integer checkNoPayOrder(@Param("userId") long userId, @Param("countryOrArea") AppleAutoRegisterData.CountryOrArea countryOrArea);
  24. @Select("select id from register_order_don where status = 'noPayment' and created_time <= #{newDate}")
  25. List<Long> getAllNoPayOrders(Date newDate);
  26. }