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/config.js b/gasStation-uni/config.js index 10fe779c4..d30e6dafc 100644 --- a/gasStation-uni/config.js +++ b/gasStation-uni/config.js @@ -1,5 +1,6 @@ // 应用全局配置 module.exports = { + // baseUrl: 'https://vue.ruoyi.vip/prod-api', // baseUrl: 'http://192.168.0.196:8081/', baseUrl: 'http://192.168.1.6:8008/', diff --git a/gasStation-uni/pagesHome/PointsMing/PointsMing.vue b/gasStation-uni/pagesHome/PointsMing/PointsMing.vue index 00aeb14e5..4ff716deb 100644 --- a/gasStation-uni/pagesHome/PointsMing/PointsMing.vue +++ b/gasStation-uni/pagesHome/PointsMing/PointsMing.vue @@ -11,7 +11,6 @@ {{item.changeReason}} 积分支出 - {{item.createTime}} +{{item.pointsChange}} @@ -20,7 +19,6 @@ - @@ -86,7 +84,6 @@ } }).then((res) => { if (res.code == 200) { - if (this.pageNo != 1) { this.detailList = this.detailList.concat(res.data.records) } else { @@ -174,4 +171,4 @@ font-weight: 500; color: #F52D22; } - \ No newline at end of file + diff --git a/gasStation-uni/pagesMy/Recharge/Recharge.vue b/gasStation-uni/pagesMy/Recharge/Recharge.vue index 26c0ba5cd..4f361d8af 100644 --- a/gasStation-uni/pagesMy/Recharge/Recharge.vue +++ b/gasStation-uni/pagesMy/Recharge/Recharge.vue @@ -14,10 +14,32 @@ - - + + + 储值卡 + 充值成功 + + + + 充值金额 + ¥123 + + + 优惠合计 + ¥999 + + + 订单时间 + 20230304 + + + + + + @@ -28,7 +50,7 @@ return { title: '', tindex: 0, - list: [], + list: ["1"], tapList: [{ text: "全部" }, @@ -123,4 +145,64 @@ .lan { background: #0000ff; } + + .box-order { + width: 95%; + border-radius: 8px; + background: #ffffff; + box-sizing: border-box; + padding: 10px; + margin: 10px auto; + } + + .or-box-top { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + box-sizing: border-box; + padding: 5px 0px; + border-bottom: 1px solid #e5e5e5; + + } + + .chengg { + color: #1678ff; + } + + .but-box { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + font-size: 14px; + margin: 5px 0px; + } + + .reds { + color: red; + } + + .huis { + color: #666666; + } + + .end-box { + width: 100%; + display: flex; + align-items: center; + justify-content: flex-end; + } + + .anniu { + width: 70px; + height: 25px; + background-color: #1678ff; + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + border-radius: 15px; + } \ No newline at end of file diff --git a/gasStation-uni/pagesMy/myorder/myorder.vue b/gasStation-uni/pagesMy/myorder/myorder.vue index 79f4d7e1b..90cb97895 100644 --- a/gasStation-uni/pagesMy/myorder/myorder.vue +++ b/gasStation-uni/pagesMy/myorder/myorder.vue @@ -2,7 +2,7 @@ - + 我的订单 @@ -10,41 +10,51 @@ - + - 搜索 + 搜索 + :key="index" @click="getTapIndex(index)"> {{item.text}} - - - 加油站名称 - 支付成功 - - - 订单金额 - ¥999999 - - - 优惠合计 - ¥999999 - - - 订单时间 - 2023.3.4 - - - - 评价有礼 + + + + + + {{getStoreName(storeList,item.storeId)}} + {{getPayName(payList,item.orderStatus)}} + + + + 订单金额 + ¥{{item.orderAmount}} + + + 优惠合计 + ¥{{item.discountAmount}} + + + 订单时间 + {{parseTime(item.payTime)}} + {{item.createTime}} + + + + 评价有礼 + + - + + + @@ -52,6 +62,7 @@