package com.clx.performance.sqlProvider;

import com.clx.performance.param.pc.PageOwnerBindCardRecordListParam;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.jdbc.SQL;

public class OwnerBindCardRecordSqlProvider {

    public String ownerBindCardPageList(@Param("param") PageOwnerBindCardRecordListParam param) {
        String sql = new SQL() {{
            SELECT("a.id, a.owner_user_no," +
                    " a.owner_user_name, a.owner_bank, " +
                    " a.bank_card_number,a.open_account_bank, a.account_bank_name,a.create_by,date_format(a.create_time, '%Y-%m-%d %H:%i:%s') as create_time,a.create_item");
            FROM("owner_bind_card_record a");
            WHERE("a.owner_user_no = #{param.ownerUserNo}");

            ORDER_BY("a.create_time desc");
        }}.toString();
        return sql;
    }

}
