diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java index 3451d1d94..37a147b08 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java @@ -37,6 +37,22 @@ public class OilOrderController extends BaseController { return getSuccessResult(list); } + /** + * 根据userId查询会员订单信息 + * @param order + * @param pageNo + * @param pageSize + * @return + */ + @GetMapping("/userOrders") + public ResponseObject oilOrderList(OilOrder order, + @RequestParam(value = "page",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){ + Page page =new Page(pageNo,pageSize); + IPage list = orderService.selectOilOrderByUserId(page,order); + return getSuccessResult(list); + } + /** * 根据id查询油品订单信息 * @param id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java index 1d95b6551..5b6ac6f45 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java @@ -22,6 +22,14 @@ public interface OilOrderMapper extends BaseMapper { */ public IPage selectOilOrderList(Page page, @Param("order") OilOrder order); + /** + * 根据userid查询油品订单信息 + * @param page + * @param order + * @return + */ + public IPage selectOilOrderByUserId(Page page, @Param("order") OilOrder order); + /** * 根据订单号模糊查询油品订单信息 * @param orderNo diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml index e968cca4c..ca9651b80 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml @@ -60,5 +60,20 @@ where store_id = #{storeId} and create_time BETWEEN #{startTime} AND #{endTime}; + \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java index 65f1a6300..29909d116 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java @@ -22,6 +22,14 @@ public interface OilOrderService extends IService { */ public IPage selectOilOrderList(Page page, OilOrder order); + /** + * 根据条件分页查询油品订单信息 + * @param page + * @param order + * @return + */ + public IPage selectOilOrderByUserId(Page page, OilOrder order); + /** * 根据订单号查询油品订单信息 * @param orderNo diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java index dfbff7539..b470312ce 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java @@ -71,6 +71,14 @@ public class OilOrderServiceImpl extends ServiceImpl i return oilOrderIPage; } + @Override + public IPage selectOilOrderByUserId(Page page, OilOrder order) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + order.setUserId(nowAccountInfo.getId()); + IPage iPage = baseMapper.selectOilOrderByUserId(page,order); + return iPage; + } + @Override public OilOrder selectOilOrderByOrderNo(String orderNo) { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -348,6 +356,7 @@ public class OilOrderServiceImpl extends ServiceImpl i oilOrder.setOrderStatus("unpaid"); oilOrder.setOrderType("主订单"); oilOrder.setInvoicing("未开票"); + oilOrder.setRemark("未评价"); oilOrder.setUserId(nowAccountInfo.getId()); LJUserVo userVo = userService.selectUserById(nowAccountInfo.getId()); oilOrder.setPayUser(userVo.getMobile()); diff --git a/gasStation-uni/pagesMy/myorder/myorder.vue b/gasStation-uni/pagesMy/myorder/myorder.vue index 79f4d7e1b..34bdfa80a 100644 --- a/gasStation-uni/pagesMy/myorder/myorder.vue +++ b/gasStation-uni/pagesMy/myorder/myorder.vue @@ -2,7 +2,7 @@ - + 我的订单 @@ -10,19 +10,53 @@ - + - 搜索 + 搜索 + :key="index" @click="getTapIndex(index)"> {{item.text}} - + + + + + + + {{getStoreName(storeList,item.storeId)}} + {{getPayName(payList,item.orderStatus)}} + + + + 订单金额 + ¥{{item.orderAmount}} + + + 优惠合计 + ¥{{item.discountAmount}} + + + 订单时间 + {{parseTime(item.payTime)}} + {{item.createTime}} + + + + 评价有礼 + + + + + + + + +