bug
This commit is contained in:
parent
43b6dad16d
commit
a43012cda0
@ -666,93 +666,95 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
if (StringUtils.isNotEmpty(gradeId)) {
|
if (StringUtils.isNotEmpty(gradeId)) {
|
||||||
LJStore store = iljStoreService.selectStoreByStoreId(storeId);
|
LJStore store = iljStoreService.selectStoreByStoreId(storeId);
|
||||||
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
|
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
|
||||||
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
if (ObjectUtils.isNotEmpty(chainStoreConfig)) {
|
||||||
if (isEnableLevel.equals("yes")) {
|
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
||||||
|
if (isEnableLevel.equals("yes")) {
|
||||||
|
|
||||||
LJUserGrade ljUserGrade = ljUserGradeMapper.selectAllByGradeId(gradeId);
|
LJUserGrade ljUserGrade = ljUserGradeMapper.selectAllByGradeId(gradeId);
|
||||||
if (ObjectUtils.isNotEmpty(ljUserGrade)) {
|
if (ObjectUtils.isNotEmpty(ljUserGrade)) {
|
||||||
if (oilTypebyId.equals("汽油")) {
|
if (oilTypebyId.equals("汽油")) {
|
||||||
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
||||||
|
|
||||||
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
||||||
String gasolineRule = ljUserGrade.getGasolineRule();
|
String gasolineRule = ljUserGrade.getGasolineRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("gasolineRule1");
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("gasolineRule1");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
//升数
|
//升数
|
||||||
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
||||||
BigDecimal gasolineRule3 = jsonObject.getBigDecimal("gasolineRule3");
|
BigDecimal gasolineRule3 = jsonObject.getBigDecimal("gasolineRule3");
|
||||||
BigDecimal multiply = divide.multiply(gasolineRule3);
|
BigDecimal multiply = divide.multiply(gasolineRule3);
|
||||||
paymentActiveVO.setMemberFavorableAmount(multiply);
|
paymentActiveVO.setMemberFavorableAmount(multiply);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String gasolineRule = ljUserGrade.getGasolineRule();
|
String gasolineRule = ljUserGrade.getGasolineRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
||||||
BigDecimal gasolineRule1 = jsonObject.getBigDecimal("gasolineRule1");
|
BigDecimal gasolineRule1 = jsonObject.getBigDecimal("gasolineRule1");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(gasolineRule1) >= 0) {
|
if (paymentActiveDTO.getAmount().compareTo(gasolineRule1) >= 0) {
|
||||||
//升数
|
//升数
|
||||||
Integer gasolineRule3 = jsonObject.getInteger("gasolineRule2");
|
Integer gasolineRule3 = jsonObject.getInteger("gasolineRule2");
|
||||||
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
||||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (oilTypebyId.equals("柴油")) {
|
||||||
if (oilTypebyId.equals("柴油")) {
|
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
||||||
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
|
||||||
|
|
||||||
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
||||||
String gasolineRule = ljUserGrade.getDieselRule();
|
String gasolineRule = ljUserGrade.getDieselRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1");
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
//升数
|
//升数
|
||||||
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
||||||
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("dieselRule3");
|
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("dieselRule3");
|
||||||
BigDecimal multiply = divide.multiply(bigDecimal2);
|
BigDecimal multiply = divide.multiply(bigDecimal2);
|
||||||
paymentActiveVO.setMemberFavorableAmount(multiply);
|
paymentActiveVO.setMemberFavorableAmount(multiply);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String gasolineRule = ljUserGrade.getDieselRule();
|
String gasolineRule = ljUserGrade.getDieselRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1");
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
//升数
|
//升数
|
||||||
Integer gasolineRule3 = jsonObject.getInteger("dieselRule2");
|
Integer gasolineRule3 = jsonObject.getInteger("dieselRule2");
|
||||||
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
||||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (oilTypebyId.equals("天然气")) {
|
||||||
|
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
||||||
|
|
||||||
}
|
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
||||||
if (oilTypebyId.equals("天然气")) {
|
String gasolineRule = ljUserGrade.getNaturalGasRule();
|
||||||
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
||||||
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
|
||||||
String gasolineRule = ljUserGrade.getNaturalGasRule();
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
//升数
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
|
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("naturalGas3");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
BigDecimal multiply = divide.multiply(bigDecimal2);
|
||||||
//升数
|
paymentActiveVO.setMemberFavorableAmount(multiply);
|
||||||
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
}
|
||||||
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("naturalGas3");
|
} else {
|
||||||
BigDecimal multiply = divide.multiply(bigDecimal2);
|
String gasolineRule = ljUserGrade.getGasolineRule();
|
||||||
paymentActiveVO.setMemberFavorableAmount(multiply);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
}
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
||||||
} else {
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
|
||||||
String gasolineRule = ljUserGrade.getGasolineRule();
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
//升数
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
Integer gasolineRule3 = jsonObject.getInteger("naturalGas2");
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
|
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||||
//升数
|
}
|
||||||
Integer gasolineRule3 = jsonObject.getInteger("naturalGas2");
|
|
||||||
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
|
||||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,8 +95,10 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public LJStaff selectStaffByMobile(String mobile) {
|
public LJStaff selectStaffByMobile(String mobile) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
QueryWrapper queryWrapper = new QueryWrapper();
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
queryWrapper.eq("mobile",mobile);
|
queryWrapper.eq("mobile",mobile);
|
||||||
|
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||||
LJStaff staff = baseMapper.selectOne(queryWrapper);
|
LJStaff staff = baseMapper.selectOne(queryWrapper);
|
||||||
return staff;
|
return staff;
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,18 @@ public class ChainStoreConfigServiceImpl extends ServiceImpl<ChainStoreConfigMap
|
|||||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("chain_store_id",store.getChainStoreId());
|
queryWrapper.eq("chain_store_id",store.getChainStoreId());
|
||||||
return baseMapper.selectOne(queryWrapper);
|
ChainStoreConfig chainStoreConfig = baseMapper.selectOne(queryWrapper);
|
||||||
|
if (ObjectUtil.isEmpty(chainStoreConfig)){
|
||||||
|
ChainStoreConfig chainStoreConfig1 = new ChainStoreConfig();
|
||||||
|
chainStoreConfig1.setChainStoreId(store.getChainStoreId());
|
||||||
|
chainStoreConfig1.setIsEnableLevel("no");
|
||||||
|
chainStoreConfig1.setIsMonthClear("clear_month");
|
||||||
|
chainStoreConfig1.setGasGrowthValue("1");
|
||||||
|
chainStoreConfig1.setDieselGrowthValue("1");
|
||||||
|
chainStoreConfig1.setNaturalGrowthValue("1");
|
||||||
|
baseMapper.insert(chainStoreConfig1);
|
||||||
|
}
|
||||||
|
chainStoreConfig = baseMapper.selectOne(queryWrapper);
|
||||||
|
return chainStoreConfig;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
:autoplay="autoplay" :interval="interval" :duration="duration">
|
:autoplay="autoplay" :interval="interval" :duration="duration">
|
||||||
<swiper-item v-for="(item,index) in list1" :key="index" @click="goPage(item.routeUrl)">
|
<swiper-item v-for="(item,index) in list1" :key="index" @click="goPage(item.routeUrl)">
|
||||||
<view class="swiper-item uni-bg-red"></view>
|
<view class="swiper-item uni-bg-red"></view>
|
||||||
<!-- <image style="width: 100%;" :src="item.bannerUrl"></image> -->
|
<image style="width: 100%;" :src="item.bannerUrl"></image>
|
||||||
<image style="width: 100%;" :src="getBannerUrl(item.bannerUrl)"></image>
|
<!-- <image style="width: 100%;" :src="getBannerUrl(item.bannerUrl)"></image> -->
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@ -257,12 +257,20 @@ import { callWithErrorHandling } from "vue"
|
|||||||
},
|
},
|
||||||
// 获取首页轮播图信息
|
// 获取首页轮播图信息
|
||||||
getIndexBanner() {
|
getIndexBanner() {
|
||||||
|
let _this = this
|
||||||
if (uni.getStorageSync("storeId")) {
|
if (uni.getStorageSync("storeId")) {
|
||||||
request({
|
request({
|
||||||
url: 'business/indexBanner/list/' + uni.getStorageSync("storeId"),
|
url: 'business/indexBanner/list/' + uni.getStorageSync("storeId"),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.list1 = res.data
|
_this.list1 = res.data
|
||||||
|
for (let i = 0;i<res.data.length;i++){
|
||||||
|
if (res.data[i].bannerUrl.includes("http")){
|
||||||
|
_this.list1[i].bannerUrl = res.data[i].bannerUrl
|
||||||
|
}else{
|
||||||
|
_this.list1[i].bannerUrl = _this.baseUrl + res.data[i].bannerUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<text>评价有礼</text>
|
<text>评价有礼</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="item.orderStatus=='unpaid'" class="end-box" @click="goPayment()">
|
<view v-else-if="item.orderStatus=='unpaid'" class="end-box" @click="goPayment(item.orderNo)">
|
||||||
<view class="anniu">
|
<view class="anniu">
|
||||||
<text>去支付</text>
|
<text>去支付</text>
|
||||||
</view>
|
</view>
|
||||||
@ -403,8 +403,10 @@
|
|||||||
// this.getBalanceOrder()
|
// this.getBalanceOrder()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goPayment(){
|
goPayment(orderNo){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesRefuel/orderDetail/index?orderNo=' + orderNo,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
goComment() {
|
goComment() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<view class="my-icons"></view>
|
<view class="my-icons"></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 顶部区域 -->
|
<!-- 顶部区域 -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<button class="box-hang" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
<button class="box-hang" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
||||||
<view class="">头像</view>
|
<view class="">头像</view>
|
||||||
<view class="touxiang">
|
<view class="touxiang">
|
||||||
@ -14,6 +15,16 @@
|
|||||||
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
|
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
</button>
|
</button>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-ALIPAY -->
|
||||||
|
<button class="box-hang" @click="onChooseAvatar1">
|
||||||
|
<view class="">头像</view>
|
||||||
|
<view class="touxiang">
|
||||||
|
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined" :src="baseUrl + user.avatar" mode="aspectFit"></image>
|
||||||
|
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
</button>
|
||||||
|
<!-- #endif -->
|
||||||
<view class="box-hang" @click="goEdit(0)">
|
<view class="box-hang" @click="goEdit(0)">
|
||||||
<view class="">昵称</view>
|
<view class="">昵称</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
@ -99,6 +110,30 @@
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 用户选择头像
|
||||||
|
onChooseAvatar1(e){
|
||||||
|
let _this = this;
|
||||||
|
//从本地相册选择图片或使用相机拍照
|
||||||
|
uni.chooseImage({
|
||||||
|
sourceType: ['album', 'camera'],//选择方式相册或者相机
|
||||||
|
success: (res) => {
|
||||||
|
console.log('图片', res)
|
||||||
|
var tempFilePath = res.tempFilePaths;
|
||||||
|
var filePath = tempFilePath[0];
|
||||||
|
console.log(filePath);//输出本地头像路径
|
||||||
|
//调用上传下载api
|
||||||
|
// 将图片上传服务器
|
||||||
|
upload({
|
||||||
|
url: '/clientApi/file/upload',
|
||||||
|
filePath: filePath,
|
||||||
|
}).then((res) => {
|
||||||
|
console.log('images', res.data.fileName);
|
||||||
|
_this.user.avatar = res.data.fileName
|
||||||
|
_this.editUser()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 修改用户信息
|
// 修改用户信息
|
||||||
editUser(){
|
editUser(){
|
||||||
request({
|
request({
|
||||||
|
Loading…
Reference in New Issue
Block a user