|
|
@@ -329,6 +329,27 @@ public class ShopAppCorpsDescServiceImpl extends ServiceImpl<ShopAppCorpsDescMap
|
|
|
return userClient.userInfoById(AuthUtil.getUserId());
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R updateShopCorpsInfo(ShopAppPjCorpsDesc corpsDesc) {
|
|
|
+ ShopAppPjCorpsDesc srcCorpsDesc = baseMapper.selectById(corpsDesc.getId());
|
|
|
+ if (Objects.isNull(srcCorpsDesc)) {
|
|
|
+ return R.fail("未查到对应门店信息");
|
|
|
+ }
|
|
|
+ long cnameCount = baseMapper.selectCount(new LambdaQueryWrapper<ShopAppPjCorpsDesc>()
|
|
|
+ .eq(ShopAppPjCorpsDesc::getCname, corpsDesc.getCname())
|
|
|
+ .eq(ShopAppPjCorpsDesc::getIsDeleted, 0)
|
|
|
+ .eq(ShopAppPjCorpsDesc::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .ne(ShopAppPjCorpsDesc::getId, corpsDesc.getId()));
|
|
|
+ if (!corpsDesc.getCname().equals(srcCorpsDesc.getCname()) && cnameCount > 0) {
|
|
|
+ return R.fail("门店名称已存在,请修改门店名称");
|
|
|
+ }
|
|
|
+ int updateCount = baseMapper.updateById(corpsDesc);
|
|
|
+ if (updateCount <= 0) {
|
|
|
+ return R.fail("更新门店信息失败");
|
|
|
+ }
|
|
|
+ return R.data(corpsDesc);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 保存客户联系人信息
|
|
|
*
|