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 <= {silentEndTime} or ims_card_info.silent_end_time is null)", cardSearchDTO.getSilentEndTime() != null)
.append("and ims_card_apn.apn_status = {apnStatus}", cardSearchDTO.getApnStatus() != null)
.append("order by ims_card_info.id asc", true)
.append("limit 2000", true);
MagicDBUtils.get(jdbcTemplate).selectList(sql.toString(), cardSearchDTO, CardInfoDTO.class);
1
Configuration 1 天前
点进来之前看标题就知道是推广
|
2
WilliamColton 1 天前
@Livid 站长我看见这人发这种帖子好几次了,不知所云,到处灌水
|
3
root71370 12 小时 36 分钟前
你这个 append 函数的第二个位置 bool 值是判断是否把第一个值追加进去?,那为何不在内部实现,还要用户手动填写,罗里吧嗦
|
4
hdfg159 8 小时 48 分钟前 via iPhone
推广能不能别发了
|
5
1wlinesperday 6 小时 16 分钟前
就这还不丑陋 说实话你小子一点技术审美都没有
|
6
rancc 1 小时 40 分钟前
真丑
|