优化项
This commit is contained in:
parent
681381d60b
commit
0596e7f689
@ -726,17 +726,15 @@ export default {
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id) {
|
if (this.form.id) {
|
||||||
getUserPhone({mobile:this.form.mobile}).then( response => {
|
|
||||||
if (response.data) {
|
|
||||||
this.$modal.msgError("手机号已存在");
|
|
||||||
} else {
|
|
||||||
updateUser(this.form).then(response => {
|
updateUser(this.form).then(response => {
|
||||||
|
if (response.data==1){
|
||||||
this.$modal.msgSuccess("修改会员成功");
|
this.$modal.msgSuccess("修改会员成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
}else {
|
||||||
|
this.$modal.msgError("手机号已存在");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
getUserPhone({mobile:this.form.mobile}).then( response => {
|
getUserPhone({mobile:this.form.mobile}).then( response => {
|
||||||
if(response.data){
|
if(response.data){
|
||||||
|
@ -236,6 +236,14 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
OilOrder oilOrder1 = null;
|
OilOrder oilOrder1 = null;
|
||||||
LJOrder ljOrder1 = null;
|
LJOrder ljOrder1 = null;
|
||||||
|
|
||||||
|
// 根据店铺id查询商户配置信息
|
||||||
|
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(merchantConfig)){
|
||||||
|
orders.put("error","请先配置支付通道");
|
||||||
|
return orders;
|
||||||
|
}
|
||||||
|
|
||||||
// 添加商品订单信息
|
// 添加商品订单信息
|
||||||
if (!goodsOrder.equals("[]")){
|
if (!goodsOrder.equals("[]")){
|
||||||
LJOrder ljOrder = new LJOrder();
|
LJOrder ljOrder = new LJOrder();
|
||||||
@ -358,8 +366,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
if (list.size()>0){
|
if (list.size()>0){
|
||||||
oilConfigService.oilRule();
|
oilConfigService.oilRule();
|
||||||
}
|
}
|
||||||
// 根据店铺id查询商户配置信息
|
|
||||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId);
|
|
||||||
// 处理支付需要的数据
|
// 处理支付需要的数据
|
||||||
Map<String,String> map1 = new HashMap<>();
|
Map<String,String> map1 = new HashMap<>();
|
||||||
map1.put("authCode",map.get("authCode"));
|
map1.put("authCode",map.get("authCode"));
|
||||||
|
@ -116,6 +116,7 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Map<String, Object>> list1 = new ArrayList<>();
|
List<Map<String, Object>> list1 = new ArrayList<>();
|
||||||
|
List<Map<String, Object>> list2 = new ArrayList<>();
|
||||||
|
|
||||||
Integer storeId = null;
|
Integer storeId = null;
|
||||||
if (StringUtils.isNotEmpty(map.get("storeId"))){
|
if (StringUtils.isNotEmpty(map.get("storeId"))){
|
||||||
@ -138,6 +139,7 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
|||||||
store.setOilList(oilNumberNameVos);
|
store.setOilList(oilNumberNameVos);
|
||||||
|
|
||||||
Map<String,Object> map1 = new HashMap<>();
|
Map<String,Object> map1 = new HashMap<>();
|
||||||
|
map1.put("store",store);
|
||||||
if (StringUtils.isNotEmpty(store.getLatitude()) && StringUtils.isNotEmpty(store.getLongitude())){
|
if (StringUtils.isNotEmpty(store.getLatitude()) && StringUtils.isNotEmpty(store.getLongitude())){
|
||||||
double dLat1 = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
|
double dLat1 = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
|
||||||
double dLon1 = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
|
double dLon1 = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
|
||||||
@ -149,8 +151,10 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
|||||||
double c1 = 2 * Math.atan2(Math.sqrt(a1), Math.sqrt(1 - a1));
|
double c1 = 2 * Math.atan2(Math.sqrt(a1), Math.sqrt(1 - a1));
|
||||||
distance = earthRadius * c1;
|
distance = earthRadius * c1;
|
||||||
map1.put("distance",distance);
|
map1.put("distance",distance);
|
||||||
map1.put("store",store);
|
|
||||||
list1.add(map1);
|
list1.add(map1);
|
||||||
|
}else {
|
||||||
|
map1.put("distance","");
|
||||||
|
list2.add(map1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,6 +165,9 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
|||||||
return Double.compare(Double.parseDouble(o1.get("distance").toString()), Double.parseDouble(o2.get("distance").toString()));
|
return Double.compare(Double.parseDouble(o1.get("distance").toString()), Double.parseDouble(o2.get("distance").toString()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
for (Map<String, Object> stringObjectMap : list2) {
|
||||||
|
list1.add(stringObjectMap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list1;
|
return list1;
|
||||||
|
@ -117,6 +117,14 @@ public interface LJUserService extends IService<LJUser> {
|
|||||||
*/
|
*/
|
||||||
public int updateUser(LJUserVo user);
|
public int updateUser(LJUserVo user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id和手机号查询用户信息
|
||||||
|
* @param mobile
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LJUser selectUserByMobileAndUserId(String mobile,Integer userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录用户修改会员信息(自己修改)
|
* 登录用户修改会员信息(自己修改)
|
||||||
* @param user
|
* @param user
|
||||||
|
@ -322,6 +322,12 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateUser(LJUserVo userVo) {
|
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();
|
LJUser user = new LJUser();
|
||||||
user.setId(userVo.getId());
|
user.setId(userVo.getId());
|
||||||
user.setUserNo(userVo.getUserNo());
|
user.setUserNo(userVo.getUserNo());
|
||||||
@ -338,7 +344,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
user.setStatus(userVo.getStatus());
|
user.setStatus(userVo.getStatus());
|
||||||
user.setDescription(userVo.getDescription());
|
user.setDescription(userVo.getDescription());
|
||||||
user.setOfficial(userVo.getOfficial());
|
user.setOfficial(userVo.getOfficial());
|
||||||
int row = baseMapper.updateById(user);
|
row = baseMapper.updateById(user);
|
||||||
// 修改认证会员手机号
|
// 修改认证会员手机号
|
||||||
CertifiedMember certifiedMember = new CertifiedMember();
|
CertifiedMember certifiedMember = new CertifiedMember();
|
||||||
certifiedMember.setUserId(userVo.getId());
|
certifiedMember.setUserId(userVo.getId());
|
||||||
@ -357,6 +363,14 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
return row;
|
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
|
@Override
|
||||||
public int editUser(LJUser user) {
|
public int editUser(LJUser user) {
|
||||||
return baseMapper.updateById(user);
|
return baseMapper.updateById(user);
|
||||||
|
@ -2557,6 +2557,12 @@
|
|||||||
this.dialogVisiblej = false;
|
this.dialogVisiblej = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (response.data.error=="请先配置支付通道"){
|
||||||
|
this.$modal.msgError(response.data.error)
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogVisiblej = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
_this.queryPayStatus();
|
_this.queryPayStatus();
|
||||||
|
@ -223,10 +223,11 @@
|
|||||||
if (uni.getStorageSync("storeId")) {
|
if (uni.getStorageSync("storeId")) {
|
||||||
this.storeId = uni.getStorageSync("storeId")
|
this.storeId = uni.getStorageSync("storeId")
|
||||||
} else {
|
} else {
|
||||||
let storeId = "12";
|
let storeId = "34";
|
||||||
|
|
||||||
uni.setStorageSync("storeId", storeId)
|
uni.setStorageSync("storeId", storeId)
|
||||||
}
|
}
|
||||||
|
// this.isExistStoreId()
|
||||||
}
|
}
|
||||||
this.getUserAuthority();
|
this.getUserAuthority();
|
||||||
this.getOilType();
|
this.getOilType();
|
||||||
|
@ -210,9 +210,9 @@
|
|||||||
},
|
},
|
||||||
// 获取门店信息
|
// 获取门店信息
|
||||||
getStore(id){
|
getStore(id){
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title:333
|
// title:333
|
||||||
})
|
// })
|
||||||
let _this = this;
|
let _this = this;
|
||||||
request({
|
request({
|
||||||
url: "business/storeInformation/store/queryStoreById",
|
url: "business/storeInformation/store/queryStoreById",
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<view class="top-right-icon" v-if="index == 0">
|
<view class="top-right-icon" v-if="index == 0">
|
||||||
<u-tag text="距离最近" size="mini" type="error" plain plainFill></u-tag>
|
<u-tag text="距离最近" size="mini" type="error" plain plainFill></u-tag>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-hui" style="width: 80px;">{{(Math.ceil(item.distance)).toFixed(1)}}km
|
<view class="box-hui" style="width: 80px;">{{item.distance?(Math.ceil(item.distance)).toFixed(1)+"km":""}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user