diff --git a/fuintAdmin/src/views/member/index.vue b/fuintAdmin/src/views/member/index.vue index 004f5c5fb..182a385cb 100644 --- a/fuintAdmin/src/views/member/index.vue +++ b/fuintAdmin/src/views/member/index.vue @@ -726,17 +726,15 @@ export default { this.$refs["form"].validate(valid => { if (valid) { if (this.form.id) { - getUserPhone({mobile:this.form.mobile}).then( response => { - if (response.data) { + updateUser(this.form).then(response => { + if (response.data==1){ + this.$modal.msgSuccess("修改会员成功"); + this.open = false; + this.getList(); + }else { this.$modal.msgError("手机号已存在"); - } else { - updateUser(this.form).then(response => { - this.$modal.msgSuccess("修改会员成功"); - this.open = false; - this.getList(); - }); } - }) + }); } else { getUserPhone({mobile:this.form.mobile}).then( response => { if(response.data){ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java index e5280584c..e44f8fc14 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java @@ -236,6 +236,14 @@ public class OilOrderServiceImpl extends ServiceImpl i OilOrder oilOrder1 = null; LJOrder ljOrder1 = null; + // 根据店铺id查询商户配置信息 + MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId); + + if (ObjectUtil.isEmpty(merchantConfig)){ + orders.put("error","请先配置支付通道"); + return orders; + } + // 添加商品订单信息 if (!goodsOrder.equals("[]")){ LJOrder ljOrder = new LJOrder(); @@ -358,8 +366,7 @@ public class OilOrderServiceImpl extends ServiceImpl i if (list.size()>0){ oilConfigService.oilRule(); } - // 根据店铺id查询商户配置信息 - MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId); + // 处理支付需要的数据 Map map1 = new HashMap<>(); map1.put("authCode",map.get("authCode")); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java index 2272a078c..6e5dbae71 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java @@ -116,6 +116,7 @@ public class LJStoreServiceImpl extends ServiceImpl impl } List> list1 = new ArrayList<>(); + List> list2 = new ArrayList<>(); Integer storeId = null; if (StringUtils.isNotEmpty(map.get("storeId"))){ @@ -138,6 +139,7 @@ public class LJStoreServiceImpl extends ServiceImpl impl store.setOilList(oilNumberNameVos); Map map1 = new HashMap<>(); + map1.put("store",store); if (StringUtils.isNotEmpty(store.getLatitude()) && StringUtils.isNotEmpty(store.getLongitude())){ double dLat1 = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat); double dLon1 = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon); @@ -149,8 +151,10 @@ public class LJStoreServiceImpl extends ServiceImpl impl double c1 = 2 * Math.atan2(Math.sqrt(a1), Math.sqrt(1 - a1)); distance = earthRadius * c1; map1.put("distance",distance); - map1.put("store",store); list1.add(map1); + }else { + map1.put("distance",""); + list2.add(map1); } } @@ -161,6 +165,9 @@ public class LJStoreServiceImpl extends ServiceImpl impl return Double.compare(Double.parseDouble(o1.get("distance").toString()), Double.parseDouble(o2.get("distance").toString())); } }); + for (Map stringObjectMap : list2) { + list1.add(stringObjectMap); + } } } return list1; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java index bee8e7235..e80c6ce33 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java @@ -117,6 +117,14 @@ public interface LJUserService extends IService { */ public int updateUser(LJUserVo user); + /** + * 根据用户id和手机号查询用户信息 + * @param mobile + * @param userId + * @return + */ + LJUser selectUserByMobileAndUserId(String mobile,Integer userId); + /** * 登录用户修改会员信息(自己修改) * @param user diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java index 3c15dfbad..132c2df24 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java @@ -322,6 +322,12 @@ public class LJUserServiceImpl extends ServiceImpl impleme */ @Override public int updateUser(LJUserVo userVo) { + int row = 0; + LJUser user1 = this.selectUserByMobileAndUserId(userVo.getMobile(), userVo.getId()); + if (ObjectUtil.isNotEmpty(user1)){ + row = 0; + return row; + } LJUser user = new LJUser(); user.setId(userVo.getId()); user.setUserNo(userVo.getUserNo()); @@ -338,7 +344,7 @@ public class LJUserServiceImpl extends ServiceImpl impleme user.setStatus(userVo.getStatus()); user.setDescription(userVo.getDescription()); user.setOfficial(userVo.getOfficial()); - int row = baseMapper.updateById(user); + row = baseMapper.updateById(user); // 修改认证会员手机号 CertifiedMember certifiedMember = new CertifiedMember(); certifiedMember.setUserId(userVo.getId()); @@ -357,6 +363,14 @@ public class LJUserServiceImpl extends ServiceImpl impleme return row; } + @Override + public LJUser selectUserByMobileAndUserId(String mobile, Integer userId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("mobile",mobile); + queryWrapper.eq("id",userId); + return baseMapper.selectOne(queryWrapper); + } + @Override public int editUser(LJUser user) { return baseMapper.updateById(user); diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 5ed28099d..109ef4521 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -2557,6 +2557,12 @@ this.dialogVisiblej = false; return; } + if (response.data.error=="请先配置支付通道"){ + this.$modal.msgError(response.data.error) + this.loading = false; + this.dialogVisiblej = false; + return; + } }) this.loading = true; _this.queryPayStatus(); diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 9a6bd5b07..698b8b28e 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -223,10 +223,11 @@ if (uni.getStorageSync("storeId")) { this.storeId = uni.getStorageSync("storeId") } else { - let storeId = "12"; + let storeId = "34"; uni.setStorageSync("storeId", storeId) } + // this.isExistStoreId() } this.getUserAuthority(); this.getOilType(); diff --git a/gasStation-uni/pages/refuel/refuel.vue b/gasStation-uni/pages/refuel/refuel.vue index efc67a2b0..488b83d38 100644 --- a/gasStation-uni/pages/refuel/refuel.vue +++ b/gasStation-uni/pages/refuel/refuel.vue @@ -210,9 +210,9 @@ }, // 获取门店信息 getStore(id){ - uni.showToast({ - title:333 - }) + // uni.showToast({ + // title:333 + // }) let _this = this; request({ url: "business/storeInformation/store/queryStoreById", diff --git a/gasStation-uni/pagesRefuel/pagesRefuel/index.vue b/gasStation-uni/pagesRefuel/pagesRefuel/index.vue index e602cb48e..5803c06f2 100644 --- a/gasStation-uni/pagesRefuel/pagesRefuel/index.vue +++ b/gasStation-uni/pagesRefuel/pagesRefuel/index.vue @@ -32,7 +32,7 @@ - {{(Math.ceil(item.distance)).toFixed(1)}}km + {{item.distance?(Math.ceil(item.distance)).toFixed(1)+"km":""}}