bug
This commit is contained in:
parent
3c6defd2c6
commit
1ff31e1338
@ -268,12 +268,12 @@ public class OilOrderController extends BaseController {
|
||||
|
||||
/**
|
||||
* 根据订单id查询油品订单信息(小程序)
|
||||
* @param id
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("oilOrderId/{id}")
|
||||
public ResponseObject getOilOrderInfo(@PathVariable Integer id){
|
||||
return getSuccessResult(orderService.selectOilOrderDescByOrderId(id));
|
||||
@GetMapping("oilOrderId/{orderNo}")
|
||||
public ResponseObject getOilOrderInfo(@PathVariable String orderNo){
|
||||
return getSuccessResult(orderService.selectOilOrderDescByOrderId(orderNo));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,10 +119,10 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
|
||||
|
||||
/**
|
||||
* 根据订单id查询订单详情信息
|
||||
* @param orderId
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
OilOrderVo selectOilOrderDescByOrderId(@Param("orderId") Integer orderId);
|
||||
OilOrderVo selectOilOrderDescByOrderId(@Param("orderNo") String orderNo);
|
||||
|
||||
OilOrderVo getInfoByTime(@Param("time") Date time,@Param("list") List<OilGun> tankIds);
|
||||
}
|
||||
|
@ -534,13 +534,15 @@
|
||||
</select>
|
||||
<select id="selectOilOrderDescByOrderId" resultType="com.fuint.business.order.vo.OilOrderVo"
|
||||
parameterType="java.lang.Integer">
|
||||
select od.*,ona.oil_name,og.gun_name,sta.real_name,sto.name storeName,sto.description from oil_order od
|
||||
left join oil_name ona on od.oils = ona.id
|
||||
left join oil_gun og on od.oil_gun_num = og.id
|
||||
left join mt_staff sta on od.staff_id = sta.id
|
||||
left join mt_store sto on od.store_id = sto.id
|
||||
select od.*,ona.oil_name,og.gun_name,sta.real_name,sto.name storeName,sto.description,cfr.card_favorable_id
|
||||
from oil_order od
|
||||
left join oil_name ona on od.oils = ona.id
|
||||
left join oil_gun og on od.oil_gun_num = og.id
|
||||
left join mt_staff sta on od.staff_id = sta.id
|
||||
left join mt_store sto on od.store_id = sto.id
|
||||
left join card_favorable_record cfr on cfr.id = od.coupon_id
|
||||
<where>
|
||||
od.id = #{orderId}
|
||||
od.order_no = #{orderNo}
|
||||
</where>
|
||||
</select>
|
||||
<select id="getInfoByTime" resultType="com.fuint.business.order.vo.OilOrderVo">
|
||||
|
@ -168,10 +168,10 @@ public interface OilOrderService extends IService<OilOrder> {
|
||||
|
||||
/**
|
||||
* 根据订单id查询订单详情信息
|
||||
* @param orderId
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
OilOrderVo selectOilOrderDescByOrderId(Integer orderId);
|
||||
OilOrderVo selectOilOrderDescByOrderId(String orderNo);
|
||||
|
||||
/**
|
||||
* 小程序添加订单评论信息
|
||||
|
@ -1227,7 +1227,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
row = baseMapper.updateById(oilOrder);
|
||||
}
|
||||
return 0;
|
||||
return row;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@ -1697,8 +1697,8 @@ return stringDoubleMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OilOrderVo selectOilOrderDescByOrderId(Integer orderId) {
|
||||
return baseMapper.selectOilOrderDescByOrderId(orderId);
|
||||
public OilOrderVo selectOilOrderDescByOrderId(String orderNo) {
|
||||
return baseMapper.selectOilOrderDescByOrderId(orderNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,4 +13,6 @@ public class OilOrderVo extends OilOrder {
|
||||
private String oilName;
|
||||
private String gunName;
|
||||
private String realName;
|
||||
// 优惠券id
|
||||
private Integer cardFavorableId;
|
||||
}
|
||||
|
@ -40,6 +40,10 @@
|
||||
<view class="hui-size">加油金额</view>
|
||||
<view class="">{{oilOrder.orderAmount}}元</view>
|
||||
</view>
|
||||
<view class="dis-fx">
|
||||
<view class="hui-size">加油数量</view>
|
||||
<view class="">{{oilOrder.oilNum}}升</view>
|
||||
</view>
|
||||
<view class="dis-fx">
|
||||
<view class="hui-size">实付金额</view>
|
||||
<view class="">{{oilOrder.payAmount}}元</view>
|
||||
@ -53,15 +57,23 @@
|
||||
<view class="">{{ oilOrder.oilCardAmount }}元</view>
|
||||
</view>
|
||||
<view class="box-title">优惠信息</view>
|
||||
<view class="dis-fx" v-if="oilOrder.activeId && oilOrder.activeType=='1'">
|
||||
<view class="hui-size">满减活动优惠</view>
|
||||
<view class="">{{fullOrDiscount.deductionAmount || oilOrder.discountAmount}}元</view>
|
||||
</view>
|
||||
<view class="dis-fx" v-if="oilOrder.activeId && oilOrder.activeType=='2'">
|
||||
<view class="hui-size">折扣活动优惠</view>
|
||||
<view class="">{{fullOrDiscount.deductionAmount || oilOrder.discountAmount}}元</view>
|
||||
</view>
|
||||
<view class="dis-fx" v-if="oilOrder.cardFavorableId">
|
||||
<view class="hui-size">优惠券优惠</view>
|
||||
<view class="">{{cardFavorable.discountAmount || oilOrder.discountAmount}}元</view>
|
||||
</view>
|
||||
|
||||
<view class="dis-fx" v-if="oilOrder.discountAmount>0">
|
||||
<view class="hui-size">优惠合计金额</view>
|
||||
<view class="">{{oilOrder.discountAmount}}元</view>
|
||||
</view>
|
||||
<view class="dis-fx">
|
||||
<view class="hui-size">加油数量</view>
|
||||
<view class="">{{oilOrder.oilNum}}升</view>
|
||||
</view>
|
||||
<view class="dis-fx" v-if="oilOrder.payTime">
|
||||
<view class="hui-size">交易时间</view>
|
||||
<view class="">{{oilOrder.payTime}}</view>
|
||||
@ -83,7 +95,7 @@
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
orderId:"",
|
||||
orderNo:"",
|
||||
oilOrder:{},
|
||||
oilPrice:"",
|
||||
// 优惠券信息
|
||||
@ -93,7 +105,7 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.orderId = e.orderId
|
||||
this.orderNo = e.orderNo
|
||||
this.getOilOrder()
|
||||
},
|
||||
components: {
|
||||
@ -103,15 +115,64 @@
|
||||
// 获取油品订单
|
||||
getOilOrder() {
|
||||
request({
|
||||
url: "business/oilOrder/oilOrderId/" + this.orderId,
|
||||
url: "business/oilOrder/oilOrderId/" + this.orderNo,
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
if(res.data){
|
||||
this.oilOrder = res.data
|
||||
this.getOilNumber(res.data.storeId)
|
||||
this.getCardFavorable(res.data.cardFavorableId)
|
||||
if ( res.data.activeId && res.data.activeType){
|
||||
if (res.data.activeType == "1"){
|
||||
this.getFullFavorable(res.data.activeId)
|
||||
}
|
||||
if (res.data.activeType == "2"){
|
||||
this.getDiscountFavorable(res.data.activeId)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getCardFavorable(id){
|
||||
if (id){
|
||||
request({
|
||||
url: "business/marketingActivity/cardFavorable/" + id,
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
this.cardFavorable = res.data
|
||||
})
|
||||
}
|
||||
},
|
||||
getFullFavorable(id){
|
||||
request({
|
||||
url: "business/marketingActivity/activeFullminus/" + id,
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
let list = res.data.activeDiscountChildList.sort((a,b) => a.amount - b.amount);
|
||||
list.forEach(item => {
|
||||
if (item.amount <= this.oilOrder.orderAmount){
|
||||
this.fullOrDiscount = item
|
||||
return;
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
getDiscountFavorable(id){
|
||||
request({
|
||||
url: "business/marketingActivity/activeDiscount/" + id,
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
let list = res.data.activeDiscountChildList.sort((a,b) => a.amount - b.amount);
|
||||
list.forEach(item => {
|
||||
if (item.amount <= this.oilOrder.orderAmount){
|
||||
this.fullOrDiscount = item
|
||||
this.fullOrDiscount.deductionAmount = this.oilOrder.orderAmount - (this.oilOrder.orderAmount*item.discount)
|
||||
return;
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取当前店铺油号信息
|
||||
getOilNumber(storeId) {
|
||||
let _this = this;
|
||||
@ -126,16 +187,6 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
getCardFavorable(id){
|
||||
if (id){
|
||||
request({
|
||||
url: "business/marketingActivity/cardFavorable/" + id,
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
gocomment() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesMy/comment/comment?orderId=' + this.orderId
|
||||
|
@ -28,7 +28,7 @@
|
||||
@scrolltolower="scrolltolower">
|
||||
<!-- 油品订单列表 -->
|
||||
<view class="box-order" v-for="(item,index) in list" :key="index">
|
||||
<view class="or-box-top" @click="goOrderInfo(item.id)">
|
||||
<view class="or-box-top" @click="goOrderInfo(item.orderNo)">
|
||||
<view class="">{{getStoreName(storeList,item.storeId)}}</view>
|
||||
<!-- <view class="chengg">{{getPayName(payList,item.orderStatus)}}</view> -->
|
||||
<view class="chengg" v-if="item.orderStatus=='paid'">已支付</view>
|
||||
@ -42,15 +42,15 @@
|
||||
<view class="huis">订单类型</view>
|
||||
<view class="">油品订单</view>
|
||||
</view> -->
|
||||
<view class="but-box" @click="goOrderInfo(item.id)">
|
||||
<view class="but-box" @click="goOrderInfo(item.orderNo)">
|
||||
<view class="huis">订单金额</view>
|
||||
<view class="">¥{{item.orderAmount}}</view>
|
||||
</view>
|
||||
<view class="but-box" @click="goOrderInfo(item.id)">
|
||||
<view class="but-box" @click="goOrderInfo(item.orderNo)">
|
||||
<view class="huis">优惠合计</view>
|
||||
<view class="reds">¥{{item.discountAmount}}</view>
|
||||
</view>
|
||||
<view class="but-box" @click="goOrderInfo(item.id)">
|
||||
<view class="but-box" @click="goOrderInfo(item.orderNo)">
|
||||
<view class="huis">订单时间</view>
|
||||
<view class="" v-if="item.orderStatus=='paid'">{{item.payTime}}</view>
|
||||
<view class="" v-else>{{item.createTime}}</view>
|
||||
@ -419,9 +419,9 @@
|
||||
url: '/pagesRefuel/orderDetail/index?orderNo=' + orderNo,
|
||||
})
|
||||
},
|
||||
goOrderInfo(orderId){
|
||||
goOrderInfo(orderNo){
|
||||
uni.navigateTo({
|
||||
url: '/pagesMy/details/details?orderId=' + orderId,
|
||||
url: '/pagesMy/details/details?orderNo=' + orderNo,
|
||||
})
|
||||
},
|
||||
goComment(orderId) {
|
||||
|
Loading…
Reference in New Issue
Block a user