| | |
| | | <select id="getMyPushCompanyList" resultType="com.ruoyi.system.vo.MyPushCompanyListVo"> |
| | | select * from ( |
| | | select t1.id,t1.company_name,t1.create_time,t1.sale_money ,t2.id orderId, |
| | | COALESCE(t2.status, 1) AS status |
| | | case |
| | | when t1.status=2 then 6 |
| | | else |
| | | COALESCE(t2.status, 1) END AS status |
| | | from tb_company t1 |
| | | left join tb_order t2 on t1.id = t2.company_id |
| | | where t1.user_id = #{userId} and t2.status >0 |
| | | where t1.user_id = #{userId} and t1.is_delete =0 |
| | | ) as t3 where 1= 1 |
| | | <if test="query.status!=null"> |
| | | and t3.status = #{query.status} |
| | |
| | | |
| | | |
| | | </select> |
| | | <select id="getMyPushCompanyListNum" resultType="com.ruoyi.system.vo.MyPushCompanyListVo" |
| | | parameterType="java.lang.Long"> |
| | | select * from ( |
| | | select t1.id,t1.company_name,t1.create_time,t1.sale_money ,t2.id orderId, |
| | | case when t1.status=2 then 6 |
| | | else |
| | | COALESCE(t2.status, 1) END AS status |
| | | from tb_company t1 |
| | | left join tb_order t2 on t1.id = t2.company_id |
| | | where t1.user_id = #{userId} and t1.is_delete =0 |
| | | ) as t3 where 1= 1 |
| | | order by t3.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |