SqlBuilder sql = SqlBuilder.builder()
.init("""
SELECT
ims_card_info.id,
ims_card_info.iccid,
ims_card_info.msisdn,
ims_card_info.imei,
ims_card_info.imsi,
ims_card_info.`status`,
ims_card_info.operator_account_id,
ims_card_info.first_active_time,
ims_card_info.account_open_time,
ims_card_info.silent_end_time,
ims_card_apn.apn_status
FROM
ims_card_info
LEFT JOIN ims_card_apn ON ims_card_apn.iccid = ims_card_info.iccid
WHERE 1=1
""")
.append("and ims_card_info.id > {id}", cardSearchDTO.getId() != null)
.append("and ims_card_info.operator_account_id = {operatorAccountId}", cardSearchDTO.getOperatorAccountId() != null)
.append("and ims_card_info.status = {status}", cardSearchDTO.getStatus() != null && cardSearchDTO.getStatus().compareTo(-1) > 0)
.append("and (ims_card_info.silent_end_time
https://magician-io.com