Browse Source

门店基础信息 代码修改

qxy 5 ngày trước cách đây
mục cha
commit
84f0027dd6

+ 4 - 6
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -1518,8 +1518,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
             if (storeInfodto.getId() != null) {
                 //效验当前店铺存在未完成的订单及正在销售的商品
                 verificationStoreInfoStatus(storeInfodto);
-                StoreInfo storeInfoOne = storeInfoMapper.selectOne(new LambdaQueryWrapper<StoreInfo>().eq(StoreInfo::getId, storeInfodto.getId()));
-
 
                 //获取经营板块id
                 Integer businessSection = storeInfodto.getBusinessSection();
@@ -1569,16 +1567,16 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 nearMeService.inGeolocation(new Point(Double.parseDouble(storeInfodto.getStorePositionLongitude()),
                         Double.parseDouble(storeInfodto.getStorePositionLatitude())), storeInfo.getId().toString(), Boolean.TRUE);
 
-                int num = storeInfoMapper.updateById(storeInfoOne);
+                int num = storeInfoMapper.updateById(storeInfo);
                 if(num>0){
                     return num;
                 }else{
                     return num;
                 }
             } else {
-                StoreInfo storeInfoOne = new StoreInfo();
-                BeanUtils.copyProperties(storeInfodto, storeInfoOne);
-                int num = storeInfoMapper.insert(storeInfoOne);
+                StoreInfo storeInfo = new StoreInfo();
+                BeanUtils.copyProperties(storeInfodto, storeInfo);
+                int num = storeInfoMapper.insert(storeInfo);
                 if(num>0){
                     return num;
                 }else{