bug
This commit is contained in:
parent
686a0d2e03
commit
3892bd0e21
@ -61,3 +61,11 @@ export function oilOrderList(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据订单号模糊查询油品订单信息
|
||||
export function getOilOrderAllAmount(id) {
|
||||
return request({
|
||||
url: '/business/oilOrder/getAllAmount/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
@ -37,7 +37,7 @@
|
||||
<dict-tag :options="dict.type.zhzt" :value="form.status"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="加油次数">{{ form.consumeNum }}</el-descriptions-item>
|
||||
<el-descriptions-item label="加油总金额">{{ form.refuelMoney ? form.refuelMoney : "--" }}
|
||||
<el-descriptions-item label="加油总金额">{{ allAmount || 0 }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="所属油站">{{ store.name }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="注册时间">{{ form.createTime }}</el-descriptions-item>
|
||||
@ -105,7 +105,7 @@
|
||||
<el-statistic
|
||||
group-separator=","
|
||||
:precision="2"
|
||||
:value="form.refuelMoney"
|
||||
:value="refuelMoney"
|
||||
title="囤油卡余额"
|
||||
>
|
||||
<!-- <span></span>-->
|
||||
@ -797,6 +797,7 @@ import {
|
||||
editCardValueChild,
|
||||
listCardValueChild, listCardValueChildOrder
|
||||
} from "@/api/staff/user/cardvaluechild";
|
||||
import {getOilOrderAllAmount} from "@/api/order/oilorder";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -925,7 +926,10 @@ export default {
|
||||
id: '',
|
||||
// 会员信息
|
||||
form: {},
|
||||
refuelMoney:0,
|
||||
form1: {},
|
||||
// 加油总金额
|
||||
allAmount:0,
|
||||
// 店铺信息
|
||||
store: '',
|
||||
// 会员等级信息
|
||||
@ -975,6 +979,7 @@ export default {
|
||||
this.getStore();
|
||||
this.getCardList()
|
||||
this.getOrderList()
|
||||
this.getAllAmount()
|
||||
},
|
||||
methods: {
|
||||
handleQuery(){
|
||||
@ -1054,7 +1059,6 @@ export default {
|
||||
allFixingLevel().then(res => {
|
||||
if (res.code == 200) {
|
||||
this.fixingLevelList = res.data
|
||||
console.log(res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -1107,9 +1111,9 @@ export default {
|
||||
await getCardValueListApi(quy).then(res => {
|
||||
this.cardValueList = res.data.records;
|
||||
this.cardValueList.sort((a, b) => a.rechargeBalance - b.rechargeBalance);
|
||||
console.log("this.grade.name",this.grade)
|
||||
// console.log("this.grade.name",this.grade)
|
||||
})
|
||||
console.log("this.cardValueList", this.grade)
|
||||
// console.log("this.cardValueList", this.grade)
|
||||
|
||||
if (this.cardValueList.length > 0) {
|
||||
// 过滤
|
||||
@ -1130,7 +1134,7 @@ export default {
|
||||
// this.cardValueForm.amount = null
|
||||
this.$set(this.cardValueForm, 'amount', data);
|
||||
|
||||
console.log("data17.16", this.cardValueForm.amount)
|
||||
// console.log("data17.16", this.cardValueForm.amount)
|
||||
if (!data) {
|
||||
this.cardValueForm.amount = ''
|
||||
|
||||
@ -1241,7 +1245,7 @@ export default {
|
||||
},
|
||||
// 根据油品过滤查询存油卡
|
||||
async tabOilTypeClick(data) {
|
||||
console.log("aaaaaaaaaaaaaa",data)
|
||||
// console.log("aaaaaaaaaaaaaa",data)
|
||||
await this.getCardFuelDieselList()
|
||||
|
||||
this.cardFuelDieselList = this.sourceCardFuelDieselList.filter(item => {
|
||||
@ -1253,7 +1257,7 @@ export default {
|
||||
},
|
||||
selectOilType(status, oilType) {
|
||||
this.tabOilType = oilType;
|
||||
console.log("453",oilType)
|
||||
// console.log("453",oilType)
|
||||
this.tabOilTypeClick(oilType);
|
||||
},
|
||||
// 查询员工
|
||||
@ -1334,10 +1338,18 @@ export default {
|
||||
// 获取会员详情
|
||||
getUser(this.id).then(response => {
|
||||
this.form = response.data;
|
||||
console.log(response.data)
|
||||
if (response.data.refuelMoney){
|
||||
let refuelMoney = JSON.parse(response.data.refuelMoney)
|
||||
_this.refuelMoney = parseFloat(refuelMoney[0].refuelMoney)
|
||||
}
|
||||
this.getGrade(response.data.gradeId);
|
||||
});
|
||||
},
|
||||
getAllAmount(){
|
||||
getOilOrderAllAmount(this.id).then(res => {
|
||||
this.allAmount = res.data
|
||||
})
|
||||
},
|
||||
// 获取会员等级详情
|
||||
getGrade(id) {
|
||||
getUserGradeInfo(id).then(response => {
|
||||
@ -1352,7 +1364,7 @@ export default {
|
||||
},
|
||||
// 选择余额充值金额
|
||||
rechargeCard(index, item) {
|
||||
console.log("index", index)
|
||||
// console.log("index", index)
|
||||
// this.cardValueForm.amount = null,
|
||||
this.cardValueForm.rechargeType = 0
|
||||
|
||||
@ -1406,7 +1418,7 @@ export default {
|
||||
let file = {}
|
||||
// 拿到金额
|
||||
file = this.cardFuelDieselList[index]
|
||||
console.log("file",file)
|
||||
// console.log("file",file)
|
||||
this.cardFuelDieselForm.points = file.points
|
||||
this.cardFuelDieselForm.rechargeBalance = file.rechargeBalance
|
||||
this.cardFuelDieselForm.oilType = file.oilType
|
||||
@ -1488,12 +1500,12 @@ export default {
|
||||
this.$message.error('请先扫码');
|
||||
return
|
||||
}
|
||||
console.log("cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
// console.log("cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
this.cardFuelDieselForm.mtUserId = userForm.id
|
||||
this.cardFuelDieselForm.name = userForm.name
|
||||
this.cardFuelDieselForm.mobile = userForm.mobile
|
||||
this.cardFuelDieselForm.authCode = this.authCode
|
||||
console.log("this.cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
// console.log("this.cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
|
||||
|
||||
let id;
|
||||
|
@ -54,3 +54,12 @@ export function merchantInfo(id) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id删除商户配置信息
|
||||
export function deleteMerchant(id) {
|
||||
return request({
|
||||
url: '/api/merchantConfig/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -38,9 +38,11 @@
|
||||
<el-tag v-else effect="dark" type="success" style="float: right">当前使用中</el-tag>
|
||||
</div>
|
||||
<div>商户编号: {{ item.mchntCd }}</div>
|
||||
<div style="margin-top: 5px">
|
||||
备注: <span style="color: #00afff;margin-left: 3px" @click="editRemark(item.id)">{{ item.remark ? item.remark : "--" }}</span>
|
||||
<span style="margin-left: 150px">
|
||||
<div style="margin-top: 5px;display: flex;justify-content: space-between">
|
||||
<span>
|
||||
备注: <span style="color: #00afff;margin-left: 3px" @click="editRemark(item.id)">{{ item.remark ? item.remark : "--" }}</span>
|
||||
</span>
|
||||
<span>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -217,7 +219,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
addMerchantApi,
|
||||
addMerchantApi, deleteMerchant,
|
||||
editMerchant,
|
||||
editMerchantRemark,
|
||||
listMerchant,
|
||||
@ -292,7 +294,14 @@ export default {
|
||||
})
|
||||
},
|
||||
handleDelete(data){
|
||||
|
||||
let name = data.remark ? data.merchantName + "(" + data.remark + ")" : data.merchantName
|
||||
this.$modal.confirm('是否确认删除"' + name + '"的支付配置信息?').then(function () {
|
||||
return deleteMerchant(data.id);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
// 修改商户备注信息
|
||||
submitRemark(){
|
||||
@ -316,14 +325,26 @@ export default {
|
||||
console.log("hello world")
|
||||
this.$refs["form1"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form1.storeId = this.id
|
||||
addMerchantApi(this.form1).then(res => {
|
||||
if (res.data == 1){
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.getList()
|
||||
this.dialogVisible = false
|
||||
}
|
||||
})
|
||||
if (this.form1.id){
|
||||
editMerchantRemark(this.form1).then(res => {
|
||||
if (res.data===1){
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.getList()
|
||||
this.show = false
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.form1.storeId = this.id
|
||||
addMerchantApi(this.form1).then(res => {
|
||||
if (res.data == 1){
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.getList()
|
||||
this.dialogVisible = false
|
||||
}else {
|
||||
this.$modal.msgError("添加失败,当前通道未配置")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -134,13 +134,11 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
public int insertMerch(MerchantConfig merchantConfig) {
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
Integer storeId = merchantConfig.getStoreId();
|
||||
if (ObjectUtil.isEmpty(merchantConfig.getStoreId())) {
|
||||
storeId = nowAccountInfo.getStoreId();
|
||||
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// if (ObjectUtil.isEmpty(merchantConfig.getStoreId())) {
|
||||
merchantConfig.setStoreId(nowAccountInfo.getStoreId());
|
||||
}
|
||||
merchantConfig.setStoreId(storeId);
|
||||
int row = 0;
|
||||
if (merchantConfig.getMerchantName().equals("富友")){
|
||||
merchantConfig.setInsCd(FuYouPublicMerchant.insCd);
|
||||
@ -152,7 +150,7 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
}
|
||||
merchantConfig.setAppid(FuYouPublicMerchant.appid);
|
||||
merchantConfig.setAlipayAppid(FuYouPublicMerchant.alipayAppid);
|
||||
MerchantConfig merchantConfig1 = this.selectMeChByIdIsUse(nowAccountInfo.getStoreId());
|
||||
MerchantConfig merchantConfig1 = this.selectMeChByIdIsUse(storeId);
|
||||
if (ObjectUtil.isEmpty(merchantConfig1)){
|
||||
merchantConfig.setIsUse("1");
|
||||
}else {
|
||||
|
@ -41,6 +41,8 @@ import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.entity.OilBalanceChange;
|
||||
import com.fuint.business.order.service.OilBalanceChangeService;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNameService;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.userManager.entity.UserBalance;
|
||||
import com.fuint.business.userManager.mapper.LJUserMapper;
|
||||
import com.fuint.business.userManager.service.UserBalanceService;
|
||||
@ -93,6 +95,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
private OilBalanceChangeService oilBalanceChangeService;
|
||||
@Resource
|
||||
private OilNameService oilNameService;
|
||||
@Autowired
|
||||
private ILJStoreService storeService;
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
@ -424,8 +428,10 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
//订单信息
|
||||
CardFuleOrders cardFuleOrders = new CardFuleOrders();
|
||||
// 店铺信息
|
||||
LJStore store = storeService.selectStoreByStoreId(cardFuelRecordDTO.getStoreId());
|
||||
//会员信息
|
||||
LJUserVo ljUserVo = ljUserMapper.selectUserById(nowAccountInfo.getId());
|
||||
LJUserVo ljUserVo = ljUserMapper.queryUserByChainStoreId(nowAccountInfo.getId(),store.getChainStoreId());
|
||||
//员工信息
|
||||
LJStaff ljStaff = mtStaffService.selectStaffById(cardFuelRecordDTO.getMtStaffId());
|
||||
//查询囤油卡信息
|
||||
|
@ -10,6 +10,7 @@ import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
|
||||
import com.fuint.business.marketingActivity.cardGift.service.CardGiftService;
|
||||
import com.fuint.business.oilDepotConfiguration.entity.OilDepotConfig;
|
||||
import com.fuint.business.oilDepotConfiguration.service.OilDepotConfigService;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
import com.fuint.business.userManager.entity.UserBalance;
|
||||
import com.fuint.business.userManager.mapper.LJUserMapper;
|
||||
@ -175,8 +176,10 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
|
||||
//更新用户余额
|
||||
Double cardAmount = one.getCardAmount();
|
||||
//会员信息
|
||||
LJUserVo ljUserVo = ljUserMapper.selectUserById(userId);
|
||||
UserBalance userBalance = userBalanceService.selectUserBalance(userId,ljUserVo.getChainStoreId());
|
||||
// LJUserVo ljUserVo = ljUserMapper.selectUserById(userId);
|
||||
// UserBalance userBalance = userBalanceService.selectUserBalance(userId,ljUserVo.getChainStoreId());
|
||||
MtStore store = storeService.getById(cardGift.getStoreId());
|
||||
UserBalance userBalance = userBalanceService.selectUserBalance(userId,store.getChainStoreId());
|
||||
Double cardBalance = userBalance.getCardBalance();
|
||||
BigDecimal bigDecimal = BigDecimal.valueOf(cardAmount);
|
||||
BigDecimal bigDecimal1 = BigDecimal.valueOf(cardBalance);
|
||||
|
@ -41,6 +41,8 @@ import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.service.CardBalanceChangeService;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.userManager.entity.UserBalance;
|
||||
import com.fuint.business.userManager.mapper.LJUserMapper;
|
||||
import com.fuint.business.userManager.service.UserBalanceService;
|
||||
@ -111,6 +113,8 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
private CardFavorableRecordService cardFavorableRecordService;
|
||||
@Resource
|
||||
private CardExchangeRecordService cardExchangeRecordService;
|
||||
@Autowired
|
||||
private ILJStoreService storeService;
|
||||
/**
|
||||
* 储值卡充值(新增)
|
||||
* @param cardValueRecordDTO
|
||||
@ -124,8 +128,10 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
//订单信息
|
||||
CardValueOrders cardValueOrders = new CardValueOrders();
|
||||
//店铺信息
|
||||
LJStore store = storeService.selectStoreByStoreId(cardValueRecordDTO.getStoreId());
|
||||
//会员信息
|
||||
LJUserVo ljUserVo = ljUserMapper.selectUserById(nowAccountInfo.getId());
|
||||
LJUserVo ljUserVo = ljUserMapper.queryUserByChainStoreId(nowAccountInfo.getId(),store.getChainStoreId());
|
||||
//员工信息
|
||||
LJStaff ljStaff = mtStaffService.selectStaffById(cardValueRecordDTO.getMtStaffId());
|
||||
//查询储值卡信息
|
||||
|
@ -243,4 +243,14 @@ public class OilOrderController extends BaseController {
|
||||
public ResponseObject orderStatistics(OilOrder order){
|
||||
return getSuccessResult(orderService.orderStatistics(order));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户id和店铺id查询当前用户在此店铺消费的所有油品总金额
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getAllAmount/{userId}")
|
||||
public ResponseObject getAllAmount(@PathVariable Integer userId){
|
||||
return getSuccessResult(orderService.sumOilOrderAmountByUserIdAndStoreId(userId));
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,13 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
|
||||
|
||||
List<OilOrderExcel> selectOilOrderListExcel(@Param("order") OilOrder order);
|
||||
|
||||
/**
|
||||
* 根据userId和店铺id查询当前用户在此店铺加油的总金额
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Double sumOilOrderAmountByUserIdAndStoreId(@Param("userId") Integer userId,@Param("storeId") Integer StoreId);
|
||||
|
||||
/**
|
||||
* 根据userid查询油品订单信息
|
||||
* @param page
|
||||
|
@ -435,4 +435,10 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="sumOilOrderAmountByUserIdAndStoreId" resultType="double">
|
||||
select sum(order_amount) from oil_order
|
||||
<where>
|
||||
user_id = #{userId} and store_id = #{storeId}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -28,6 +28,12 @@ public interface OilOrderService extends IService<OilOrder> {
|
||||
|
||||
void export(HttpServletResponse response, OilOrder order);
|
||||
|
||||
/**
|
||||
* 根据userId和店铺id查询当前用户在此店铺加油的总金额
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Double sumOilOrderAmountByUserIdAndStoreId(Integer userId);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询油品订单信息
|
||||
|
@ -120,6 +120,12 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double sumOilOrderAmountByUserIdAndStoreId(Integer userId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return baseMapper.sumOilOrderAmountByUserIdAndStoreId(userId,nowAccountInfo.getStoreId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<OilOrder> selectOilOrderByUserId(Page page, OilOrder order) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
@ -138,10 +138,9 @@
|
||||
|
||||
<select id="selectUserById" resultType="com.fuint.business.userManager.vo.LJUserVo"
|
||||
parameterType="java.lang.Integer">
|
||||
<include refid="selectUser"></include>
|
||||
select * from mt_user
|
||||
<where>
|
||||
mu.id = #{id}
|
||||
limit 1
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -128,7 +128,9 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
*/
|
||||
@Override
|
||||
public LJUserVo selectUserById(int id) {
|
||||
return baseMapper.selectUserById(id);
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.queryUserByChainStoreId(id,store.getChainStoreId());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
|
@ -230,7 +230,7 @@
|
||||
<el-table-column label="会员ID" prop="id" align="center" width="60"/>
|
||||
<el-table-column label="头像" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
<img v-if="scope.row.avatar" class="list-avatar" :src="scope.row.avatar">
|
||||
<img v-if="scope.row.avatar" class="list-avatar" :src="baseUrl + scope.row.avatar">
|
||||
<img v-else class="list-avatar" src="@/assets/images/avatar.png">
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -521,6 +521,7 @@
|
||||
name: "vipList",
|
||||
data(){
|
||||
return{
|
||||
baseUrl:process.env.VUE_APP_BASE_API,
|
||||
// 公众号列表
|
||||
officialList:[],
|
||||
result:{},
|
||||
|
Loading…
Reference in New Issue
Block a user