| | |
| | | <sql id="Base_Column_List"> |
| | | id, orderNumber, userId, insertTime, goodsId, count, state, express, expressNumber, expressTime, integral |
| | | </sql> |
| | | <select id="listAll" resultType="com.ruoyi.management.vo.TOrderVO"> |
| | | select t1.*,t2.`name` as userName,t2.phone as phone,t3.name as name |
| | | from t_order t1 |
| | | left join t_goods t3 on t1.goodsId = t3.id |
| | | left join t_user t2 on t1.userId = t2.id |
| | | where 1=1 |
| | | <if test="null != req.state"> |
| | | and t1.state = #{req.state} |
| | | </if> |
| | | <if test="null != req.orderNumber and '' != req.orderNumber"> |
| | | and t1.orderNumber like CONCAT('%', #{req.orderNumber}, '%') |
| | | </if> |
| | | <if test="null != req.userName and '' != req.userName"> |
| | | and t2.`name` like CONCAT('%', #{req.userName}, '%') |
| | | </if> |
| | | <if test="null != req.phone and '' != req.phone"> |
| | | and t2.phone like CONCAT('%', #{req.phone}, '%') |
| | | </if> |
| | | <if test="null != req.startTime"> |
| | | and t1.insertTime between #{req.startTime1} and #{req.endTime1} |
| | | </if> |
| | | order by t1.insertTime desc |
| | | </select> |
| | | |
| | | |
| | | </mapper> |