mybatisplus 自定义sql查询

 

 

public void reconciliationForConfirmOne(Integer Id, Integer payoffType) {
    List frList = financeReconciliationService.selectList(
            new EntityWrapper()
                    .eq("payoff_id", Id)
                    .eq("payoff_type", payoffType)
                    .where("(reconciliation_status <> 1 OR reconciliation_status IS NULL)")
    );
    for (FinanceReconciliationEntity fr : frList) {
        fr.setReconciliationStatus(1);
    }
    if (frList != null && frList.size() > 0) {
        financeReconciliationService.updateBatchById(frList);
    }
}

你可能感兴趣的:(mybatis-plus)