| | |
| | | c.*, |
| | | p.name as partnerName, |
| | | u.nick_name, |
| | | u.tel |
| | | u.tel, |
| | | (select count(o.id) from t_order o where o.create_by = c.user_id and o.deleted=0 and o.status_backend not in ('PENDING','CANCEL','REFUND')) as orderNum |
| | | FROM |
| | | t_customer_info c |
| | | LEFT JOIN t_user u ON c.user_id = u.id left join t_partner_info p on c.partner_id = p.id where c.deleted = 0 |
| | |
| | | <if test="dto.partnerUserId != null and dto.partnerUserId != ''"> |
| | | and c.partner_user_id = #{dto.partnerUserId} |
| | | </if> |
| | | <if test="dto.isEnabled!=null"> |
| | | AND c.is_enabled = #{dto.isEnabled} |
| | | </if> |
| | | order by c.create_time desc |
| | | </select> |
| | | <select id="getCurrentCustomer" resultType="com.mzl.flower.dto.response.customer.CustomerDTO" |