bug
This commit is contained in:
parent
4087dbc978
commit
c9d31d47d3
@ -36,6 +36,14 @@ export function getFuelRecordList(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询优惠券信息列表
|
||||
export function listCardOilRecord(query) {
|
||||
return request({
|
||||
url: '/business/oilBalanceChange',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 积分记录
|
||||
export function getIntegralDetailList(query) {
|
||||
|
@ -42,27 +42,31 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-table ref="tables2" key="2" v-loading="loading" :data="fuelList">
|
||||
<el-table-column align="center" label="所属油站" prop="storeName"/>
|
||||
<el-table-column align="center" label="油品" >
|
||||
<el-table-column align="center" label="所属油站" prop="storeName">
|
||||
<template slot-scope="scope">
|
||||
<span>{{store.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="油品类型" >
|
||||
<template slot-scope="scope">
|
||||
<span> {{scope.row.type?scope.row.type:' -- '}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.changeType === '0'">消费</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.changeType === '0'">消费</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.changeType === '1' ">充值</el-tag>
|
||||
<el-tag type="success" v-else>--</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动升数" align="center" prop="balance">
|
||||
<el-table-column label="变动升数" align="center" prop="oilBalance">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.balance?scope.row.balance:"--"}}</span>
|
||||
<span>{{scope.row.oilBalance?scope.row.oilBalance:"--"}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动之后升数" align="center" prop="balance">
|
||||
<el-table-column label="变动之后升数" align="center" prop="afterOilChange">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.afterTheChange?scope.row.afterTheChange:"--"}}</span>
|
||||
<span>{{scope.row.afterOilChange?scope.row.afterOilChange:"--"}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo"/>
|
||||
@ -81,7 +85,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCardRecordList, getFuelRecordList } from "@/api/userInfoOrder.js";
|
||||
import {getCardRecordList, getFuelRecordList, listCardOilRecord} from "@/api/userInfoOrder.js";
|
||||
import {ljStoreInfo} from "@/api/staff/store";
|
||||
|
||||
export default {
|
||||
props:["pUserId"],
|
||||
@ -102,7 +107,8 @@ export default {
|
||||
queryFuelParams:{
|
||||
page:1,
|
||||
pageSize:10,
|
||||
}
|
||||
},
|
||||
store:{}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -111,8 +117,15 @@ export default {
|
||||
|
||||
this.getCardList()
|
||||
this.getFuelList()
|
||||
this.getStoreInfo()
|
||||
},
|
||||
methods:{
|
||||
// 获取店铺信息
|
||||
getStoreInfo(){
|
||||
ljStoreInfo().then(res => {
|
||||
this.store = res.data
|
||||
})
|
||||
},
|
||||
getCardList() {
|
||||
this.loading = true
|
||||
this.queryCardParams.userId = this.userId
|
||||
@ -128,13 +141,20 @@ export default {
|
||||
getFuelList() {
|
||||
this.loading = true
|
||||
this.queryFuelParams.userId = this.userId
|
||||
getFuelRecordList(this.queryFuelParams).then(res=>{
|
||||
listCardOilRecord(this.queryFuelParams).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.fuelList = res.data.records
|
||||
this.fuelTotal = res.data.total
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
// getFuelRecordList(this.queryFuelParams).then(res=>{
|
||||
// if (res.code == 200) {
|
||||
// this.fuelList = res.data.records
|
||||
// this.fuelTotal = res.data.total
|
||||
// this.loading = false
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ public class Const {
|
||||
public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB";
|
||||
|
||||
//异步通知(回调地址)
|
||||
public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
|
||||
//下单
|
||||
public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate";
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.integral.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.fuint.repository.model.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
@ -11,8 +12,7 @@ import lombok.Data;
|
||||
* @since 2023-11-10 17:52:33
|
||||
*/
|
||||
@Data
|
||||
public class IntegralDetail extends BaseEntity {
|
||||
private static final long serialVersionUID = 263718830208700746L;
|
||||
public class IntegralDetail extends BaseEntity implements Serializable {
|
||||
/**
|
||||
* 积分明细ID
|
||||
*/
|
||||
|
@ -599,9 +599,11 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
for (JSONObject jsonObject : jsonObjectList) {
|
||||
if (cardFuleOrders.getOilType().equals(jsonObject.getString("oilType"))) {
|
||||
double incomeLitres = jsonObject.getDouble("refuelMoney");
|
||||
|
||||
BigDecimal add = BigDecimal.valueOf(cardFuleOrders.getIncomeLitres()).add(BigDecimal.valueOf(incomeLitres));
|
||||
incomeLitres = add.doubleValue();
|
||||
jsonObject.put("refuelMoney", incomeLitres);
|
||||
oilBalanceChange.setAfterOilChange(incomeLitres);
|
||||
String userBnlancce = jsonObjectList.toString();
|
||||
userBalance.setRefuelMoney(userBnlancce);
|
||||
break;
|
||||
@ -612,6 +614,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
jsonObject1.put("type", cardFuleOrders.getType()+" "+cardFuleOrders.getOilName());
|
||||
jsonObject1.put("oilType", cardFuleOrders.getOilType());
|
||||
jsonObject1.put("refuelMoney", cardFuleOrders.getIncomeLitres());
|
||||
oilBalanceChange.setAfterOilChange(cardFuleOrders.getIncomeLitres());
|
||||
jsonObjectList.add(jsonObject1);
|
||||
String userBnlancce = jsonObjectList.toString();
|
||||
userBalance.setRefuelMoney(userBnlancce);
|
||||
@ -622,6 +625,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
jsonObject.put("type", cardFuleOrders.getType()+" "+cardFuleOrders.getOilName());
|
||||
jsonObject.put("oilType", cardFuleOrders.getOilType());
|
||||
jsonObject.put("refuelMoney", cardFuleOrders.getIncomeLitres());
|
||||
oilBalanceChange.setAfterOilChange(cardFuleOrders.getIncomeLitres());
|
||||
jsonObjects.add(jsonObject);
|
||||
userBalance.setRefuelMoney(jsonObjects.toString());
|
||||
}
|
||||
|
@ -1003,14 +1003,14 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
//积分表变动
|
||||
if (ObjectUtils.isNotEmpty(userBalance) && ObjectUtils.isNotEmpty(userBalance.getPoints()) && ObjectUtils.isNotEmpty(cardValueOrders.getPoints())) {
|
||||
IntegralDetail integralDetail = new IntegralDetail();
|
||||
integralDetail.setStoreId(cardValueRecord.getStoreId());
|
||||
integralDetail.setChainStoreId(cardValueRecord.getChainStoreId());
|
||||
integralDetail.setCreateBy(cardValueRecord.getMtStaffId().toString());
|
||||
integralDetail.setStoreId(cardValueOrders.getStoreId());
|
||||
integralDetail.setChainStoreId(cardValueOrders.getChainStoreId());
|
||||
integralDetail.setPointsChange(Double.valueOf(cardValueOrders.getPoints()));
|
||||
integralDetail.setCurrentPoints(userBalance.getPoints() + cardValueOrders.getPoints());
|
||||
integralDetail.setChangeType("1");
|
||||
integralDetail.setChangeReason("储值卡充值");
|
||||
integralDetailService.insert2(integralDetail);
|
||||
integralDetail.setUserId(cardValueOrders.getMtUserId());
|
||||
IntegralDetail integralDetail1 = integralDetailService.insert2(integralDetail);
|
||||
}
|
||||
//生成充值记录
|
||||
cardValueRecord.setMtUserId(cardValueOrders.getMtUserId());
|
||||
|
@ -62,6 +62,9 @@ public class OilBalanceChangeController extends BaseController {
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getOrderNo())){
|
||||
queryWrapper.like(OilBalanceChange::getOrderNo,oilBalanceChange.getOrderNo());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getUserId())){
|
||||
queryWrapper.like(OilBalanceChange::getUserId,oilBalanceChange.getUserId());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getParams()) && oilBalanceChange.getParams().size()==2){
|
||||
String beginTime = oilBalanceChange.getParams().get("beginTime").toString();
|
||||
String endTime = oilBalanceChange.getParams().get("endTime").toString();
|
||||
|
@ -239,7 +239,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="oilType" label="油品类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.type}}{{ getOilName(oilNameList,scope.row.oilType) }}</span>
|
||||
<span>{{scope.row.type}}</span>
|
||||
<!-- <span>{{scope.row.type}}{{ getOilName(oilNameList,scope.row.oilType) }}</span>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="changeType" label="类型" align="center">
|
||||
@ -249,8 +250,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="详细信息" align="center">
|
||||
<el-table-column prop="oilBalance" label="变动金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="afterOilChange" label="变动后余额" align="center" > </el-table-column>
|
||||
<el-table-column prop="oilBalance" label="变动升数" align="center"> </el-table-column>
|
||||
<el-table-column prop="afterOilChange" label="变动后升数" align="center" > </el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNo" label="订单号" width="230" align="center"> </el-table-column>
|
||||
<el-table-column prop="fromType" label="消费来源" width="230" align="center" > </el-table-column>
|
||||
|
@ -42,27 +42,31 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-table ref="tables2" key="2" v-loading="loading" :data="fuelList">
|
||||
<el-table-column align="center" label="所属油站" prop="storeName"/>
|
||||
<el-table-column align="center" label="油品" >
|
||||
<el-table-column align="center" label="所属油站" prop="storeName">
|
||||
<template slot-scope="scope">
|
||||
<span>{{store.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="油品类型" >
|
||||
<template slot-scope="scope">
|
||||
<span> {{scope.row.type?scope.row.type:' -- '}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.changeType === '0'">消费</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.changeType === '0'">消费</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.changeType === '1' ">充值</el-tag>
|
||||
<el-tag type="success" v-else>--</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动升数" align="center" prop="balance">
|
||||
<el-table-column label="变动升数" align="center" prop="oilBalance">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.balance?scope.row.balance:"--"}}</span>
|
||||
<span>{{scope.row.oilBalance?scope.row.oilBalance:"--"}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动之后升数" align="center" prop="balance">
|
||||
<el-table-column label="变动之后升数" align="center" prop="afterOilChange">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.afterTheChange?scope.row.afterTheChange:"--"}}</span>
|
||||
<span>{{scope.row.afterOilChange?scope.row.afterOilChange:"--"}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo"/>
|
||||
@ -83,7 +87,8 @@
|
||||
<script>
|
||||
|
||||
import {getCardRecordList, getFuelRecordList} from "@/api/cashier/userInfoOrder";
|
||||
import {listCardBalanceRecord} from "@/api/cashier/balancecardrecord";
|
||||
import {listCardBalanceRecord, listCardOilRecord} from "@/api/cashier/balancecardrecord";
|
||||
import {ljStoreInfo} from "@/api/cashier/user/store";
|
||||
|
||||
export default {
|
||||
props:["pUserId"],
|
||||
@ -104,7 +109,8 @@ export default {
|
||||
queryFuelParams:{
|
||||
page:1,
|
||||
pageSize:10,
|
||||
}
|
||||
},
|
||||
store:{}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -113,8 +119,15 @@ export default {
|
||||
|
||||
this.getCardList()
|
||||
this.getFuelList()
|
||||
this.getStoreInfo()
|
||||
},
|
||||
methods:{
|
||||
// 获取店铺信息
|
||||
getStoreInfo(){
|
||||
ljStoreInfo().then(res => {
|
||||
this.store = res.data
|
||||
})
|
||||
},
|
||||
changeCard(val){
|
||||
console.log(val,this.tabPosition)
|
||||
},
|
||||
@ -133,7 +146,7 @@ export default {
|
||||
getFuelList() {
|
||||
this.loading = true
|
||||
this.queryFuelParams.userId = this.userId
|
||||
listCardBalanceRecord(this.queryFuelParams).then(res=>{
|
||||
listCardOilRecord(this.queryFuelParams).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.fuelList = res.data.records
|
||||
this.fuelTotal = res.data.total
|
||||
|
Loading…
Reference in New Issue
Block a user