Commit a8e3bd0b by 吕明尚

修改房间查看订单功能

parent 476634a2
......@@ -3,7 +3,6 @@ package share.web.controller.system;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import share.common.annotation.Log;
import share.common.core.controller.BaseController;
......@@ -15,7 +14,6 @@ import share.common.vo.TableDataInfoVo;
import share.system.domain.SOrder;
import share.system.domain.vo.SOrderDto;
import share.system.request.AdminRefundRequest;
import share.system.request.OrderRefundRequest;
import share.system.service.ISOrderService;
import javax.servlet.http.HttpServletResponse;
......@@ -44,6 +42,13 @@ public class SOrderController extends BaseController
return sOrderService.pageList(sOrder);
}
@GetMapping("/queryList")
public TableDataInfo queryOrderList(SOrder sOrder) {
startPage();
List<SOrder> list = sOrderService.queryOrderList(sOrder);
return getDataTable(list);
}
/**
* 查询退款订单列表
*/
......
package share.system.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.SOrder;
import java.util.List;
/**
* 订单Mapper接口
*
......@@ -62,4 +62,6 @@ public interface SOrderMapper extends BaseMapper<SOrder>
public int deleteSOrderByIds(Long[] ids);
SOrder selectSOrderByNo(String orderNo);
List<SOrder> queryList(Long roomId);
}
......@@ -200,4 +200,6 @@ public interface ISOrderService extends IService<SOrder>
* @return
*/
int refundOp(AdminRefundRequest request);
List<SOrder> queryOrderList(SOrder sOrder);
}
......@@ -146,14 +146,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
*/
@Override
public List<SOrder> selectSOrderList(SOrder sOrder) {
if (ObjectUtil.isNotEmpty(sOrder.getStatus()) && sOrder.getStatus().equals(OrderStatusEnum.UNUSED_AND_INUSE.getCode())) {
LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SOrder::getRoomId, sOrder.getRoomId());
queryWrapper.eq(SOrder::getPayStatus, YesNoEnum.yes.getIndex());
queryWrapper.in(SOrder::getStatus, OrderStatusEnum.getUnfinishOrderStatus());
queryWrapper.orderByDesc(SOrder::getCreateTime);
return baseMapper.selectList(queryWrapper);
}
List<SOrder> orders = baseMapper.selectSOrderList(sOrder);
return orders;
}
......@@ -495,6 +487,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
return orderRefundArtificialService.insertOrderRefundArtificial(artificial);
}
@Override
public List<SOrder> queryOrderList(SOrder sOrder) {
return baseMapper.queryList(sOrder.getRoomId());
}
/**
* 新增订单
*
......
......@@ -139,6 +139,12 @@
<include refid="selectSOrderVo"/>
where order_no=#{orderNo}
</select>
<select id="queryList" resultType="share.system.domain.SOrder">
<include refid="selectSOrderVo"/>
WHERE is_delete = 0
AND (room_id = #{roomId} AND pay_status = 1 AND status IN (0, 1))
ORDER BY status DESC , pre_start_date
</select>
<insert id="insertSOrder" parameterType="SOrder" useGeneratedKeys="true" keyProperty="id">
insert into s_order
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment