<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.yami.trading.dao.loan.LoanOrderMapper">
|
|
<select id="adminPagedQuery" resultType="java.util.HashMap">
|
SELECT
|
lo.uuid uuid,
|
lo.order_no orderNo,
|
lo.user_id userId,
|
lo.symbol symbol,
|
lo.quota quota,
|
lo.term term,
|
lo.daily_rate dailyRate,
|
lo.total_interest totalInterest,
|
lo.repay_cycle repayCycle,
|
lo.repayment repayment,
|
lo.lending_institution lendingInstitution,
|
lo.lending_name lendingName,
|
lo.state state,
|
lo.reason reason,
|
lo.id_front_img idFrontImg,
|
lo.id_back_img idBackImg,
|
lo.handheld_img handheldImg,
|
lo.create_time createTime,
|
lo.approve_time approveTime,
|
lo.due_time dueTime,
|
lo.repaid_time repaidTime,
|
u.user_name userName,
|
u.user_code userCode,
|
u.role_name rolename
|
FROM t_loan_order lo
|
LEFT JOIN tz_user u ON lo.user_id = u.user_id
|
WHERE 1 = 1
|
<if test="status != null and status != ''">
|
AND lo.state = #{status}
|
</if>
|
<if test="userName != null and userName != ''">
|
AND (u.user_name LIKE CONCAT('%', #{userName}, '%') OR u.user_code LIKE CONCAT('%', #{userName}, '%'))
|
</if>
|
<if test="orderNo != null and orderNo != ''">
|
AND lo.order_no LIKE CONCAT('%', #{orderNo}, '%')
|
</if>
|
<if test="rolename != null and rolename != ''">
|
AND u.role_name = #{rolename}
|
</if>
|
<if test="children != null and children.size() > 0">
|
AND lo.user_id IN
|
<foreach collection="children" item="item" open="(" close=")" separator=",">
|
#{item}
|
</foreach>
|
</if>
|
ORDER BY lo.create_time DESC
|
</select>
|
|
</mapper>
|