| | |
| | | </where> |
| | | ORDER BY tcs.create_time DESC |
| | | </select> |
| | | <select id="listExport" resultType="com.ruoyi.system.export.TCrmSalespersonExport"> |
| | | select |
| | | tcs.id, tcs.user_id, tcs.salesperson_name, tcs.phone, tcs.branch_id, tcs.money_commission, tcs.points_commission, tcs.user_points, |
| | | tcs.status, tcs.create_time, tcs.update_time, tcs.create_by, tcs.update_by, tcs.disabled, tcb.branch_name |
| | | from t_crm_salesperson tcs |
| | | left join t_crm_branch tcb on tcs.branch_id = tcb.id |
| | | <where> |
| | | <if test="query.salespersonName != null and query.salespersonName != ''"> |
| | | and tcs.salesperson_name like concat('%',#{query.salespersonName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tcs.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.branchId != null and query.branchId != ''"> |
| | | and tcs.branch_id = #{query.branchId} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and tcs.status = #{query.status} |
| | | </if> |
| | | AND tcs.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tcs.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |