AccountUpdatePasswordRecordMapper.xml 778 B

123456789101112131415161718
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.cyksj.mapper.AccountUpdatePasswordRecordMapper">
  4. <select id="selectPasswordNotChangedThePastMonthAccountId" resultType="java.lang.Long">
  5. select a.id
  6. from `account` a
  7. where not EXISTS(select *
  8. from `account_update_password_record` ar
  9. where ar.account_id = a.id
  10. and ar.created_time >= #{pastMonth} limit 1)
  11. and (select count(ur.id)
  12. from user_ticket_cleared_record ur
  13. where ur.account_id = a.id and deleted is true and source = 'self') > 0
  14. </select>
  15. </mapper>