From 726f97c55b0937bf0d048313271bdd7a80cdd1f6 Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期二, 20 四月 2021 12:38:30 +0800 Subject: [PATCH] add:添加订单相关联字段 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java index 724c165..3d7c2d5 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java @@ -97,10 +97,10 @@ @Override public R deleteStore(Long[] id) { - ComShopStoreDO storeDO = new ComShopStoreDO(); - storeDO.setDeleteStatus(2); - LambdaQueryWrapper<ComShopStoreDO> query = new LambdaQueryWrapper<ComShopStoreDO>().eq(ComShopStoreDO::getId, id); - int update = this.baseMapper.update(storeDO, query); + LambdaQueryWrapper<ComShopStoreDO> query = new LambdaQueryWrapper<ComShopStoreDO>().in(ComShopStoreDO::getId, id); + ComShopStoreDO comShopStoreDO = this.baseMapper.selectOne(query); + comShopStoreDO.setDeleteStatus(2); + int update = this.baseMapper.updateById(comShopStoreDO); return update > 0 ? R.ok() : R.fail(); } @@ -114,4 +114,15 @@ BeanUtils.copyProperties(comShopStoreDO,shopStoreVO); return R.ok(shopStoreVO); } + + @Override + public R getUserStoreInfo(Long userId) { + ComShopStoreDO comShopStoreDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ComShopStoreDO>().eq(ComShopStoreDO::getDeleteStatus, 1).eq(ComShopStoreDO::getSysUserId, userId)); + if (comShopStoreDO == null) { + R.fail(500,"商铺不存在"); + } + ShopStoreVO shopStoreVO = new ShopStoreVO(); + BeanUtils.copyProperties(comShopStoreDO,shopStoreVO); + return R.ok(shopStoreVO); + } } -- Gitblit v1.7.1