From 861eb5853d91ffd48f1919cb739f28f7e2bb0b59 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期一, 01 八月 2022 17:51:44 +0800
Subject: [PATCH] bug修改
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java
index 03574a5..fc7bf59 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java
@@ -53,9 +53,6 @@
@Override
@Transactional
public R<ComStreetVO> addStreet(ComStreetVO comStreetVO) {
- String password = comStreetVO.getPassword();
- String encode = new BCryptPasswordEncoder().encode(password);
- comStreetVO.setPassword(encode);
ComStreetDO comStreetDO = new ComStreetDO();
LambdaQueryWrapper<ComStreetDO> param = new QueryWrapper<ComStreetDO>().lambda();
param.eq(ComStreetDO::getName, comStreetVO.getName());
@@ -79,6 +76,10 @@
BeanUtils.copyProperties(comStreetVO, comStreetDO);
int insert = comStreetDAO.insert(comStreetDO);
if (insert > 0) {
+ AdministratorsUserVO administratorsUserVO1=new AdministratorsUserVO();
+ administratorsUserVO1.setUserId(Long.parseLong(r.getData().toString()));
+ administratorsUserVO1.setStreetId(comStreetDO.getStreetId());
+ userService.updateStreet(administratorsUserVO1);
ComStreetDO comStreetDO1 = comStreetDAO.selectOne(param);
BeanUtils.copyProperties(comStreetDO1, comStreetVO);
return R.ok(comStreetVO);
@@ -130,10 +131,10 @@
if (ObjectUtils.isEmpty(comStreetDO)) {
return R.fail();
}
- ComActVO comActVO = new ComActVO();
- BeanUtils.copyProperties(comStreetDO, comActVO);
- comActVO.setAreaName(comActDAO.selectAreaName(comActVO.getAreaCode()));
- return R.ok(comActVO);
+ ComStreetVO comStreetVO = new ComStreetVO();
+ BeanUtils.copyProperties(comStreetDO, comStreetVO);
+ comStreetVO.setAdministrativeRegions(comStreetDAO.retrieveRegions(comStreetVO.getAreaCode().toString()));
+ return R.ok(comStreetVO);
}
/**
@@ -160,6 +161,9 @@
if (pageComStreetDTO.getName() != null) {
userLambdaQueryWrapper.like(ComStreetDO::getName, pageComStreetDTO.getName());
}
+ if (pageComStreetDTO.getAreaCode() != null) {
+ userLambdaQueryWrapper.like(ComStreetDO::getAreaCode, pageComStreetDTO.getAreaCode());
+ }
Page userPage = new Page(pageNum, pageSize);
IPage<ComStreetDO> doPager =
comStreetDAO.selectPage(userPage, userLambdaQueryWrapper.orderByDesc(ComStreetDO::getCreateAt));
--
Gitblit v1.7.1