Merge branch 'master' of http://192.168.31.244:3000/byx/oilSystem
This commit is contained in:
commit
c6771e52af
@ -568,7 +568,7 @@ export default {
|
||||
status: [{ required: true, message: "请选择会员状态", trigger: "blur" }],
|
||||
mobile: [
|
||||
{ required: true, message: "请输入手机号", trigger: "blur" },
|
||||
{ min: 8, max: 11, message: '请输入正确的手机号', trigger: 'blur' }
|
||||
{ min: 11, max: 11, message: '请输入正确的手机号', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
};
|
||||
|
@ -32,6 +32,7 @@ import com.fuint.business.marketingActivity.cardFuleOrders.service.CardFuleOrder
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper;
|
||||
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.service.CardValueOrdersService;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
@ -111,6 +112,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
private ILJStoreService storeService;
|
||||
@Resource
|
||||
private StaffCommissionService staffCommissionService;
|
||||
@Resource
|
||||
private CardValueOrdersService cardValueOrdersService;
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
@ -266,6 +269,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
if ("CASH".equals(cardFuelRecordDTO.getPaymentType())) {
|
||||
AllOrderInfo allOrderInfo = getAllOrderInfo(cardFuelRecordDTO);
|
||||
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
||||
cardValueOrdersService.updateBalances(orderNo,"paid");
|
||||
}
|
||||
|
||||
double theAmountToBePaid = 0.0;
|
||||
|
@ -120,5 +120,11 @@ public class CardValueOrdersController extends BaseController {
|
||||
String orderNo = map.get("orderNo");
|
||||
cardValueOrdersService.getOneByOrderNo(orderNo);
|
||||
}
|
||||
|
||||
@PostMapping("getOneByOrderNos")
|
||||
public ResponseObject getOneByOrderNos(@RequestBody Map<String,String> map){
|
||||
String orderNo = map.get("orderNo");
|
||||
return getSuccessResult(cardValueOrdersService.getOneByOrderNos(orderNo));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
|
||||
/**
|
||||
* 储值卡订单表(CardValueOrders)表服务接口
|
||||
@ -19,6 +20,7 @@ public interface CardValueOrdersService extends IService<CardValueOrders> {
|
||||
* @return
|
||||
*/
|
||||
CardValueOrders getOneByOrderNo(String orderNo);
|
||||
AllOrderInfo getOneByOrderNos(String orderNo);
|
||||
/**
|
||||
* 根据用户id分页查询储值卡订单信息
|
||||
* @param page
|
||||
@ -35,5 +37,6 @@ public interface CardValueOrdersService extends IService<CardValueOrders> {
|
||||
void updateOrderStatus(String orderNo,String status);
|
||||
|
||||
void updateBalance(String orderNo,String status);
|
||||
void updateBalances(String orderNo,String status);
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.mapper.CardValueOrdersMapper;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.service.CardValueOrdersService;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||
import com.fuint.business.order.service.AllOrderInfoService;
|
||||
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||
import com.fuint.business.userManager.entity.UserBalance;
|
||||
import com.fuint.business.userManager.service.UserBalanceService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
@ -29,6 +33,9 @@ public class CardValueOrdersServiceImpl extends ServiceImpl<CardValueOrdersMappe
|
||||
|
||||
@Resource
|
||||
private UserBalanceService userBalanceService;
|
||||
|
||||
@Resource
|
||||
private AllOrderInfoService allOrderInfoService;
|
||||
/**
|
||||
* 根据订单编号返回订单信息
|
||||
* @param orderNo
|
||||
@ -39,6 +46,12 @@ public class CardValueOrdersServiceImpl extends ServiceImpl<CardValueOrdersMappe
|
||||
|
||||
return cardValueOrdersMapper.getOneByOrderNo(orderNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllOrderInfo getOneByOrderNos(String orderNo) {
|
||||
return allOrderInfoService.getOneByOrderNos(orderNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CardValueOrders> selectCardValueOrders(Page page, CardValueOrders order) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
@ -75,5 +88,23 @@ public class CardValueOrdersServiceImpl extends ServiceImpl<CardValueOrdersMappe
|
||||
baseMapper.updateById(oneByOrderNo);
|
||||
}
|
||||
}
|
||||
@Resource
|
||||
AllOrderInfoMapper allOrderInfoMapper;
|
||||
@Override
|
||||
public void updateBalances(String orderNo, String status) {
|
||||
AllOrderInfoVo oneByOrderNo = allOrderInfoService.getOneByOrderNo(orderNo);
|
||||
if (ObjectUtil.isNotEmpty(oneByOrderNo)){
|
||||
|
||||
if ("paid".equals(status)){
|
||||
UserBalance userBalance = userBalanceService.selectUserBalanceByStorId(oneByOrderNo.getUserId(),oneByOrderNo.getStoreId());
|
||||
Double cardBalance = 0.0;
|
||||
cardBalance = userBalance.getCardBalance() + oneByOrderNo.getPayMoney();
|
||||
userBalance.setCardBalance(cardBalance);
|
||||
userBalanceService.updateUserBalance(userBalance);
|
||||
}
|
||||
oneByOrderNo.setStatus(status);
|
||||
allOrderInfoMapper.updateById(oneByOrderNo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.order.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
@ -49,4 +50,6 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
||||
AllOrderInfoVo getIndexData4Pos(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||
|
||||
AllOrderInfoVo getHandOverList(HandoverRecord record);
|
||||
|
||||
AllOrderInfoVo getOneByOrderNo(String orderNo);
|
||||
}
|
||||
|
@ -395,6 +395,13 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getOneByOrderNo" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
|
||||
SELECT
|
||||
*
|
||||
from all_order_info
|
||||
where order_no = #{orderNo}
|
||||
</select>
|
||||
<!-- WHERE-->
|
||||
<!-- DATE(pay_time) = CURDATE();-->
|
||||
<!-- <if test="startTime != null "><!– 开始时间检索 –>-->
|
||||
@ -411,4 +418,4 @@
|
||||
<!-- <if test="endTime1 != null and endTime1 != ''">-->
|
||||
<!-- AND pay_time <= #{endTime} -- 结束时间检索-->
|
||||
<!-- </if>-->
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
@ -2,6 +2,7 @@ package com.fuint.business.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
@ -92,4 +93,7 @@ public interface AllOrderInfoService {
|
||||
AllOrderInfoVo getIndexData4Pos();
|
||||
AllOrderInfoVo getOperatingDataPos(AllOrderInfoDto allOrderInfo);
|
||||
|
||||
AllOrderInfoVo getOneByOrderNo(String orderNo);
|
||||
|
||||
AllOrderInfo getOneByOrderNos(String orderNo);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import com.fuint.business.convenienceSore.dto.LJGoodsDto;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.StockTrackService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||
import com.fuint.business.order.entity.*;
|
||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||
@ -955,6 +956,15 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllOrderInfoVo getOneByOrderNo(String orderNo) {
|
||||
return allOrderInfoMapper.getOneByOrderNo(orderNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllOrderInfo getOneByOrderNos(String orderNo) {
|
||||
return allOrderInfoMapper.getOneByOrderNo(orderNo);
|
||||
}
|
||||
|
||||
|
||||
private long dayCount(String beginTimeStr, String endTimeStr ) {
|
||||
|
@ -1325,6 +1325,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
res.put("error", "储值卡余额不足!");
|
||||
}
|
||||
}
|
||||
res.put("orderNo", orderNo);
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1410,7 +1411,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
addGrowthVal = addVal;
|
||||
growthAfter = growth + addVal;
|
||||
// 如果会员成长值达到会员等级成长值,则修改会员的会员等级信息
|
||||
for (int i = 0; i < records.size(); i++) {
|
||||
for (int i = 1; i < records.size(); i++) {
|
||||
if (growthAfter < records.get(i).getGrowthValue()) {
|
||||
balance.setGradeId(records.get(i - 1).getId());
|
||||
break;
|
||||
@ -1953,7 +1954,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
addGrowthVal = addVal;
|
||||
growthAfter = growth + addVal;
|
||||
// 如果会员成长值达到会员等级成长值,则修改会员的会员等级信息
|
||||
for (int i = 0; i < records.size(); i++) {
|
||||
for (int i = 1; i < records.size(); i++) {
|
||||
if (growthAfter < records.get(i).getGrowthValue()) {
|
||||
balance.setGradeId(records.get(i - 1).getId());
|
||||
break;
|
||||
|
@ -228,8 +228,8 @@
|
||||
},
|
||||
methods: {
|
||||
// 确定备注
|
||||
submitRemark(){
|
||||
this.show = false
|
||||
submitRemark() {
|
||||
this.show = false
|
||||
this.oilOrder.remark = this.value1
|
||||
},
|
||||
close() {
|
||||
@ -376,7 +376,8 @@
|
||||
// icon: "success"
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url: "/pagesHome/PaymentResults/PaymentResults"
|
||||
url: "/pagesHome/PaymentResults/PaymentResults?orderNo=" +
|
||||
resp.data.orderNo
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
@ -451,11 +452,11 @@
|
||||
this.oilOrder.oilPrice = this.oilPrice
|
||||
this.oilOrder.oilCardAmount1 = this.oilCardAmount
|
||||
this.oilOrder.oilGunNum = this.oilGunNum
|
||||
if (this.userInfo){
|
||||
if (this.userInfo) {
|
||||
this.oilOrder.userId = this.userInfo.id
|
||||
this.oilOrder.payUser = this.userInfo.mobile
|
||||
}
|
||||
|
||||
|
||||
request({
|
||||
url: "business/oilOrder/addOrderPos",
|
||||
method: 'post',
|
||||
@ -470,7 +471,7 @@
|
||||
// })
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/pagesHome/PaymentResults/PaymentResults?orderNo="+this.orderNo
|
||||
url: "/pagesHome/PaymentResults/PaymentResults?orderNo=" + this.orderNo
|
||||
})
|
||||
} else if (res.data.code == 2) {
|
||||
uni.showToast({
|
||||
|
@ -190,10 +190,10 @@
|
||||
}).then((res) => {
|
||||
this.numList = res.data.records
|
||||
|
||||
this.order.amount = this.numList.rechargeBalance
|
||||
this.order.rechargeBalance = this.numList.rechargeBalance
|
||||
this.order.points = this.numList.points
|
||||
this.realyPayBills = this.numList.rechargeBalance
|
||||
this.order.amount = this.numList[0].rechargeBalance
|
||||
this.order.rechargeBalance = this.numList[0].rechargeBalance
|
||||
this.order.points = this.numList[0].points
|
||||
this.realyPayBills = this.numList[0].rechargeBalance
|
||||
})
|
||||
},
|
||||
getmemberId(num, payType) {
|
||||
@ -280,7 +280,8 @@
|
||||
data: this.order
|
||||
}).then((res) => {
|
||||
uni.navigateTo({
|
||||
url: '/pagesHome/PaymentResults/PaymentResults?type=1&orderNo=' + res.data.orderNo
|
||||
url: '/pagesHome/PaymentResults/PaymentResults?type=1&orderNo=' + res.data
|
||||
.paymentNo
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="container" v-if="oilOrder">
|
||||
<view class="container" v-if="oilOrder && type!=1">
|
||||
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
|
||||
<view class="top_">
|
||||
<image src="../../static/imgs/zfcg.png" mode=""></image>
|
||||
@ -35,32 +35,28 @@
|
||||
<view class="h-size" v-if="oilOrder.payType=='APPLET_CODE'">小程序码支付</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="container" v-if="balanceOrder">
|
||||
<view class="container" v-if="balanceOrder && type==1">
|
||||
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
|
||||
<view class="top_">
|
||||
<image src="../../static/imgs/zfcg.png" mode=""></image>
|
||||
</view>
|
||||
<view class="title_">支付成功</view>
|
||||
<!-- <view class="top_" v-if="oilOrder.orderStatus!='paid'">
|
||||
<image src="../../static/imgs/zfsb.png" mode=""></image>
|
||||
</view>
|
||||
<view class="title_" v-if="oilOrder.orderStatus!='paid'">支付失败</view> -->
|
||||
<view class="b-bs">
|
||||
<view class="h-size">应收金额</view>
|
||||
<view class="red-size">¥{{balanceOrder.orderAmount}}</view>
|
||||
<view class="red-size">¥{{balanceOrder.payAmount}}</view>
|
||||
</view>
|
||||
<view class="b-bs">
|
||||
<view class="h-size">优惠金额</view>
|
||||
<view class="red-size">¥{{balanceOrder.discountAmount}}</view>
|
||||
<view class="red-size">¥{{balanceOrder.discount}}</view>
|
||||
</view>
|
||||
<view class="b-bs">
|
||||
<view class="h-size">实收金额</view>
|
||||
<view class="red-size">¥{{balanceOrder.payAmount}}</view>
|
||||
</view>
|
||||
<view class="b-bs">
|
||||
<!-- <view class="b-bs">
|
||||
<view class="h-size">储值卡消费金额</view>
|
||||
<view class="red-size">¥{{balanceOrder.balanceAmount}}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="b-bs">
|
||||
<view class="h-size">支付方式</view>
|
||||
<view class="h-size" v-if="balanceOrder.payType=='ALIPAY'">支付宝支付</view>
|
||||
@ -89,10 +85,12 @@
|
||||
orderNo: "",
|
||||
oilOrder: {},
|
||||
balanceOrder: {},
|
||||
type: "",
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.type && e.type == 1) {
|
||||
this.type = e.type
|
||||
this.orderNo = e.orderNo
|
||||
this.getBalanceOrder()
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user