DESKTOP-71BH0QO\L、ming
2021-03-29 68d8b72a646b4022e8a842f153ba9475e74803bc
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -9,7 +9,11 @@
import com.panzhihua.common.model.vos.community.ComActVO;
import com.panzhihua.common.model.vos.community.ComMngStructOtherBuildVO;
import com.panzhihua.service_community.dao.ComActDAO;
import com.panzhihua.service_community.dao.ComActVillageDAO;
import com.panzhihua.service_community.dao.ComStreetDAO;
import com.panzhihua.service_community.model.dos.ComActDO;
import com.panzhihua.service_community.model.dos.ComMngVillageDO;
import com.panzhihua.service_community.model.dos.ComStreetDO;
import com.panzhihua.service_community.service.ComActService;
import org.springframework.beans.BeanUtils;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@@ -30,6 +34,9 @@
public class ComActServiceImpl implements ComActService {
    @Resource
    private ComActDAO comActDAO;
    @Resource
    private ComStreetDAO comStreetDAO;
    /**
     * 新增社区
     *
@@ -41,6 +48,10 @@
        String password = comActVO.getPassword();
        String encode = new BCryptPasswordEncoder().encode(password);
        comActVO.setPassword(encode);
        ComStreetDO comStreetDO = comStreetDAO.selectById(comActVO.getStreetId());
        if (comStreetDO == null) {
            return R.fail("当前街道不存在!");
        }
        ComActDO comActDO=new ComActDO();
        Integer integer = comActDAO.selectCount(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getName, comActVO.getName()));
        if (integer>0) {
@@ -75,10 +86,15 @@
            comActVO.setPassword(encode);
            a=1;
        }
        ComStreetDO comStreetDO = comStreetDAO.selectById(comActVO.getStreetId());
        if (comStreetDO == null) {
            return R.fail("当前街道不存在!");
        }
//        if(!ObjectUtils.isEmpty(account)||!ObjectUtils.isEmpty(contacts)){
//            a=1;
//        }
        BeanUtils.copyProperties(comActVO,comActDO);
        int update = comActDAO.updateById(comActDO);
        if (update>0) {
            if (a==1) {