| | |
| | | FROM t_order |
| | | WHERE del_flag = 0 AND shop_id = #{param.shopId} |
| | | <if test="param.memberUserId != null and param.memberUserId != ''"> |
| | | AND toc.user_id = #{param.memberUserId} |
| | | AND user_id = #{param.memberUserId} |
| | | </if> |
| | | <if test="param.type != null and param.type ==1 "> |
| | | AND (toc.order_status = 2 OR toc.order_status = 3) |
| | | AND (order_status = 2 OR order_status = 3) |
| | | </if> |
| | | <if test="param.type != null and param.type ==2 "> |
| | | AND toc.order_status = 2 |
| | | AND order_status = 2 |
| | | </if> |
| | | <if test="param.type != null and param.type ==3 "> |
| | | AND toc.order_status = 3 |
| | | AND order_status = 3 |
| | | </if> |
| | | <if test="param.orderFrom != null and param.orderFrom != '' "> |
| | | AND toc.order_from = #{param.orderFrom} |
| | | AND order_from = #{param.orderFrom} |
| | | </if> |
| | | <if test="param.startOrderDate != null and param.startOrderDate != '' "> |
| | | AND Date(toc.create_time) >= #{param.startOrderDate} |
| | | AND Date(create_time) >= #{param.startOrderDate} |
| | | </if> |
| | | <if test="param.endOrderDate != null and param.endOrderDate != '' "> |
| | | AND Date(toc.create_time) <= #{param.endOrderDate} |
| | | AND Date(create_time) <= #{param.endOrderDate} |
| | | </if> |
| | | <if test="param.keyword != null and param.keyword != ''"> |
| | | AND (toc.order_no LIKE CONCAT('%',#{param.keyword},'%') OR tog.goods_name LIKE CONCAT('%',#{param.keyword},'%')) |
| | | AND order_no LIKE CONCAT('%',#{param.keyword},'%') |
| | | </if> |
| | | </select> |
| | | |