This commit is contained in:
cun-nan 2024-10-16 11:31:40 +08:00
parent 6f21acbccc
commit 1da831fd2b
8 changed files with 97 additions and 13 deletions

View File

@ -93,7 +93,7 @@ public class FleetInfoController extends BaseController {
*/
@GetMapping("/getFleetInfoByStoreId")
public ResponseObject getFleetInfoByStoreId(@Param("storeId")Integer storeId){
return getSuccessResult(fleetInfoService.queryByStoreId(storeId));
return getSuccessResult(fleetInfoService.queryByStoreId(storeId,null));
}
/**

View File

@ -68,7 +68,7 @@ public interface FleetInfoService {
* @param storeId
* @return
*/
List<FleetInfoUniVo> queryByStoreId(Integer storeId);
List<FleetInfoUniVo> queryByStoreId(Integer storeId,Integer userId);
/**
* 新增车队信息(小程序)

View File

@ -233,12 +233,15 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper, FleetInfo
* @return
*/
@Override
public List<FleetInfoUniVo> queryByStoreId(Integer storeId) {
public List<FleetInfoUniVo> queryByStoreId(Integer storeId,Integer userId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
if (ObjectUtil.isEmpty(userId)){
userId = nowAccountInfo.getId();
}
//查询当前登录人的车队信息
List<FleetMember> fleetMembers = fleetMemberMapper.selectList(new LambdaQueryWrapper<FleetMember>()
.eq(FleetMember::getStoreId, storeId)
.eq(FleetMember::getUserId, nowAccountInfo.getId()));
.eq(FleetMember::getUserId, userId));
//获取所在车队的id集合
List<Integer> fleetIds = fleetMembers.stream().map(FleetMember::getFleetId).collect(Collectors.toList());
if (CollUtil.isEmpty(fleetIds)) {

View File

@ -22,6 +22,7 @@ import com.fuint.business.convenienceSore.entity.LJGoods;
import com.fuint.business.convenienceSore.entity.SaleDetail;
import com.fuint.business.convenienceSore.service.LJGoodsService;
import com.fuint.business.convenienceSore.service.SaleDetailService;
import com.fuint.business.fleet.service.FleetInfoService;
import com.fuint.business.integral.service.IntegralSettingsService;
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService;
@ -198,6 +199,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
private IMtUserFuelService userFuelService;
@Autowired
private CardValueRuleService cardValueRuleService;
@Autowired
private FleetInfoService fleetInfoService;
@Override
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
@ -487,7 +490,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId, transactionType, oilGunId);
if (ObjectUtil.isEmpty(merchantConfig) && !payType.equals("CASH") && !payType.equals("after_pay") &&
!map.get("allAmount").equals("0")) {
!map.get("allAmount").equals("0") && !payType.equals("card_value") && !payType.equals("fule_card")
&& !payType.equals("car_card_value")) {
orders.put("error", "请先配置支付通道");
return orders;
}

View File

@ -350,7 +350,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
List<MtUserFuel> list = userFuelService.list(queryWrapper);
ljUserVo.setUserFuels(list);
//判断当前用户是否存在车队
List<FleetInfoUniVo> fleetInfoUniVos = fleetInfoService.queryByStoreId(storeId);
List<FleetInfoUniVo> fleetInfoUniVos = fleetInfoService.queryByStoreId(storeId,null);
if (CollUtil.isNotEmpty(fleetInfoUniVos)) {
ljUserVo.setFleetInfoUniVos(fleetInfoUniVos);
}
@ -381,6 +381,11 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
queryWrapper.eq(MtUserFuel::getStoreId,nowAccountInfo.getStoreId()).eq(MtUserFuel::getMtUserId,it.getId());
List<MtUserFuel> list = userFuelService.list(queryWrapper);
it.setUserFuels(list);
//判断当前用户是否存在车队
List<FleetInfoUniVo> fleetInfoUniVos = fleetInfoService.queryByStoreId(nowAccountInfo.getStoreId(),it.getId());
if (CollUtil.isNotEmpty(fleetInfoUniVos)) {
it.setFleetInfoUniVos(fleetInfoUniVos);
}
});
return ljUserVos;
}

View File

@ -15,10 +15,12 @@
placement="bottom"
trigger="hover">
<div> 储值卡{{ chooseVipUser.cardBalance || 0 }}</div>
<div> 储值卡1000.00</div>
<div> 储值卡1000.00</div>
<div> 储值卡1000.00</div>
<div> 储值卡1000.00</div>
<div v-if="chooseVipUser.userFuels">
<div v-for="(item,index) in chooseVipUser.userFuels" :key="index"> 囤油卡{{ item.fuelAmount }}</div>
</div>
<div v-if="chooseVipUser.fleetInfoUniVos">
<div v-for="(item,index) in chooseVipUser.fleetInfoUniVos" :key="index"> 车队卡{{ item.totalBalance }}</div>
</div>
<img slot="reference" src="./imgs/kbao.png" style="width: 24px;height: 24px;margin-right: 10px">
</el-popover>
@ -533,6 +535,18 @@
</el-dialog>
<!-- 车队卡支付-->
<el-dialog
title="车队卡支付"
:visible.sync="dialogVisible"
width="30%">
<carCard :fleetList="chooseVipUser.fleetInfoUniVos"></carCard>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -543,6 +557,7 @@ import pickUp from './newHomeComponents/pickUpTheOrder.vue'
import accountPending from './newHomeComponents/accountPending.vue'
import memberRecharge from './newHomeComponents/memberRecharge.vue'
import refuelingAmount from './newHomeComponents/refuelingAmount.vue'
import carCard from "./newHomeComponents/carCard.vue";
import {
cashRegisterList,
cashRegisterGoodsList,
@ -569,6 +584,7 @@ export default {
dicts: ['CardCoupon_type'],
data() {
return {
dialogVisible:false,
isClickable: false, //
payForm: {
realyPayBills: 0.00,
@ -787,7 +803,8 @@ export default {
pickUp,
accountPending,
memberRecharge,
refuelingAmount
refuelingAmount,
carCard
},
created() {
//

View File

@ -0,0 +1,55 @@
<template>
<div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
<el-form-item label="车队卡名称" prop="unitName">
<el-select v-model="ruleForm.value" placeholder="请选择车队卡" style="width: 100%">
<el-option
v-for="item in unitList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<div class="hui-size">车队卡支付时必须选择车队卡名称后才能进行支付</div>
</el-form-item>
<el-form-item label="车队卡余额" prop="residueCreditLimit">
<el-input v-model="ruleForm.residueCreditLimit" disabled>
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="支付金额" prop="amount">
<el-input v-model="ruleForm.amount" disabled>
<template slot="append"></template>
</el-input>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
props:["fleetList"],
data(){
return{
ruleForm: {},
unitList:[],
rules: {
unitName: [
{required: true, message: '请输入挂账单位名称', trigger: 'blur'},
],
amount: [
{required: true, message: '请输入活动名称', trigger: 'blur'},
],
}
}
},
created() {
this.unitList = this.fleetList
},
methods:{}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -5,8 +5,8 @@ module.exports = {
// baseUrl: 'https://www.tuofeng.cc/oilAdmin/',
// baseUrl: 'https://oilapi.youkerr.com/oilAdmin/',
// baseUrl: 'https://8q4f124343.yicp.fun/',
baseUrl: 'http://47.94.122.58:8080/',
// baseUrl: 'http://localhost:8080/',
// baseUrl: 'http://47.94.122.58:8080/',
baseUrl: 'http://localhost:8080/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
// 应用信息