张天森
2022-09-14 6716feef7e41bb352f07e50a1d7c762aa03b5052
update
7个文件已修改
189 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/sanshuo/ComMediateTypeDTO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSanShuoApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComMediateType.java 148 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComSanshuoExpert.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/sanshuo/ComMediateTypeDTO.java
@@ -25,7 +25,7 @@
     * code码
     */
    @ApiModelProperty("code码")
    private String key;
    private String code;
    /**
     * 父id((根节点为0))
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -13,6 +13,7 @@
import com.panzhihua.common.model.dtos.community.dpc.PageDpcDTO;
import com.panzhihua.common.model.dtos.community.enterprise.*;
import com.panzhihua.common.model.dtos.community.reserve.*;
import com.panzhihua.common.model.dtos.community.sanshuo.ComMediateTypeDTO;
import com.panzhihua.common.model.dtos.community.sanshuo.ComSanShuoIndustryCenterDTO;
import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoEventDTO;
import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO;
@@ -10461,13 +10462,13 @@
     * 新增事件类型
     * */
    @PostMapping("/sanshuo/event")
    R addEvent(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO);
    R addEvent(@RequestBody ComMediateTypeDTO comSanshuoEventDTO);
    /**
     * 新增事件类型
     * */
    @PutMapping("/sanshuo/event")
    R updateEvent(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO);
    R updateEvent(@RequestBody ComMediateTypeDTO comSanshuoEventDTO);
    /**
     * 删除事件类型
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSanShuoApi.java
@@ -1,6 +1,7 @@
package com.panzhihua.community_backstage.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.sanshuo.ComMediateTypeDTO;
import com.panzhihua.common.model.dtos.community.sanshuo.ComSanShuoIndustryCenterDTO;
import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoEventDTO;
import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO;
@@ -111,13 +112,13 @@
    @ApiOperation("添加事件类型")
    @PostMapping("/event")
    public R addEvent(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO){
    public R addEvent(@RequestBody ComMediateTypeDTO comSanshuoEventDTO){
        return communityService.addEvent(comSanshuoEventDTO);
    }
    @ApiOperation("修改事件类型")
    @PutMapping("/event")
    public R updateEvent(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO){
    public R updateEvent(@RequestBody ComMediateTypeDTO comSanshuoEventDTO){
        return communityService.updateEvent(comSanshuoEventDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java
@@ -54,7 +54,7 @@
     * */
    @PostMapping
    public R add(@RequestBody ComMediateTypeDTO comMediateTypeDTO){
        //comMediateTypeDTO.setCreateUser(this.getLoginUserInfo().getUserId());
        comMediateTypeDTO.setCreateUser(this.getLoginUserInfo().getUserId());
        return commediateTypeService.addOrUpdate(comMediateTypeDTO);
    }
@@ -63,7 +63,7 @@
     * */
    @PutMapping
    public R update(@RequestBody ComMediateTypeDTO comMediateTypeDTO){
        //comMediateTypeDTO.setModifyUser(this.getLoginUserInfo().getUserId());
        comMediateTypeDTO.setModifyUser(this.getLoginUserInfo().getUserId());
        return commediateTypeService.addOrUpdate(comMediateTypeDTO);
    }
@@ -75,7 +75,7 @@
        ComMediateType comMediateType = commediateTypeService.getById(id);
        comMediateType.setDeleteFlag(true);
        comMediateType.setEnabled(false);
        //comMediateType.setModifyUser(this.getLoginUserInfo().getUserId());
        comMediateType.setModifyUser(this.getLoginUserInfo().getUserId());
        return R.ok(commediateTypeService.updateById(comMediateType));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComMediateType.java
@@ -36,7 +36,7 @@
     * code码
     */
    @ApiModelProperty("code码")
    private String key;
    private String code;
    /**
     * 父id((根节点为0))
@@ -107,77 +107,77 @@
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ComMediateType other = (ComMediateType) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getPathId() == null ? other.getPathId() == null : this.getPathId().equals(other.getPathId()))
            && (this.getLevelIndex() == null ? other.getLevelIndex() == null : this.getLevelIndex().equals(other.getLevelIndex()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getEnabled() == null ? other.getEnabled() == null : this.getEnabled().equals(other.getEnabled()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getModifyUser() == null ? other.getModifyUser() == null : this.getModifyUser().equals(other.getModifyUser()))
            && (this.getModifyDate() == null ? other.getModifyDate() == null : this.getModifyDate().equals(other.getModifyDate()))
            && (this.getDeleteFlag() == null ? other.getDeleteFlag() == null : this.getDeleteFlag().equals(other.getDeleteFlag()));
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getKey() == null) ? 0 : getKey().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getPathId() == null) ? 0 : getPathId().hashCode());
        result = prime * result + ((getLevelIndex() == null) ? 0 : getLevelIndex().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getModifyUser() == null) ? 0 : getModifyUser().hashCode());
        result = prime * result + ((getModifyDate() == null) ? 0 : getModifyDate().hashCode());
        result = prime * result + ((getDeleteFlag() == null) ? 0 : getDeleteFlag().hashCode());
        return result;
    }
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", key=").append(key);
        sb.append(", parentId=").append(parentId);
        sb.append(", pathId=").append(pathId);
        sb.append(", levelIndex=").append(levelIndex);
        sb.append(", sort=").append(sort);
        sb.append(", enabled=").append(enabled);
        sb.append(", remarks=").append(remarks);
        sb.append(", createUser=").append(createUser);
        sb.append(", createDate=").append(createDate);
        sb.append(", modifyUser=").append(modifyUser);
        sb.append(", modifyDate=").append(modifyDate);
        sb.append(", deleteFlag=").append(deleteFlag);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
//    @Override
//    public boolean equals(Object that) {
//        if (this == that) {
//            return true;
//        }
//        if (that == null) {
//            return false;
//        }
//        if (getClass() != that.getClass()) {
//            return false;
//        }
//        ComMediateType other = (ComMediateType) that;
//        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
//            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
//            && (this.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey()))
//            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
//            && (this.getPathId() == null ? other.getPathId() == null : this.getPathId().equals(other.getPathId()))
//            && (this.getLevelIndex() == null ? other.getLevelIndex() == null : this.getLevelIndex().equals(other.getLevelIndex()))
//            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
//            && (this.getEnabled() == null ? other.getEnabled() == null : this.getEnabled().equals(other.getEnabled()))
//            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
//            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
//            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
//            && (this.getModifyUser() == null ? other.getModifyUser() == null : this.getModifyUser().equals(other.getModifyUser()))
//            && (this.getModifyDate() == null ? other.getModifyDate() == null : this.getModifyDate().equals(other.getModifyDate()))
//            && (this.getDeleteFlag() == null ? other.getDeleteFlag() == null : this.getDeleteFlag().equals(other.getDeleteFlag()));
//    }
//
//    @Override
//    public int hashCode() {
//        final int prime = 31;
//        int result = 1;
//        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
//        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
//        result = prime * result + ((getKey() == null) ? 0 : getKey().hashCode());
//        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
//        result = prime * result + ((getPathId() == null) ? 0 : getPathId().hashCode());
//        result = prime * result + ((getLevelIndex() == null) ? 0 : getLevelIndex().hashCode());
//        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
//        result = prime * result + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
//        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
//        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
//        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
//        result = prime * result + ((getModifyUser() == null) ? 0 : getModifyUser().hashCode());
//        result = prime * result + ((getModifyDate() == null) ? 0 : getModifyDate().hashCode());
//        result = prime * result + ((getDeleteFlag() == null) ? 0 : getDeleteFlag().hashCode());
//        return result;
//    }
//
//    @Override
//    public String toString() {
//        StringBuilder sb = new StringBuilder();
//        sb.append(getClass().getSimpleName());
//        sb.append(" [");
//        sb.append("Hash = ").append(hashCode());
//        sb.append(", id=").append(id);
//        sb.append(", name=").append(name);
//        sb.append(", key=").append(key);
//        sb.append(", parentId=").append(parentId);
//        sb.append(", pathId=").append(pathId);
//        sb.append(", levelIndex=").append(levelIndex);
//        sb.append(", sort=").append(sort);
//        sb.append(", enabled=").append(enabled);
//        sb.append(", remarks=").append(remarks);
//        sb.append(", createUser=").append(createUser);
//        sb.append(", createDate=").append(createDate);
//        sb.append(", modifyUser=").append(modifyUser);
//        sb.append(", modifyDate=").append(modifyDate);
//        sb.append(", deleteFlag=").append(deleteFlag);
//        sb.append(", serialVersionUID=").append(serialVersionUID);
//        sb.append("]");
//        return sb.toString();
//    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComSanshuoExpert.java
@@ -104,7 +104,7 @@
    /**
     * 行业分中心id
     */
    private String industryCenterId;
    private Long industryCenterId;
    /**
     * 备用字段1
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java
@@ -56,6 +56,13 @@
        BeanUtil.copyProperties(comSanshuoExpertDTO,expert);
        expert.setId(Snowflake.getId());
        expert.setCreateTime(new Date());
        if (expert.getLevel()==2){
            expert.setIndustryCenterId(Long.parseLong(expert.getUnit()));
        }else if(expert.getLevel()==3){
            expert.setStreetId(Long.parseLong(expert.getUnit()));
        }else if(expert.getLevel()==4){
            expert.setCommunityId(Long.parseLong(expert.getUnit()));
        }
        int insert = comSanshuoExpertDao.insert(expert);
        if (insert>0){
            try {
@@ -93,12 +100,14 @@
        Integer range=null;
        if (nonNull(loginUserInfo)){
            if (nonNull(loginUserInfo.getUserType()) || nonNull(loginUserInfo.getType())){
                if (loginUserInfo.getUserType().equals(1)){
                    range=3;
                    id=loginUserInfo.getStreetId();
                }else if (loginUserInfo.getUserType().equals(2)){
                    range=4;
                    id=loginUserInfo.getCommunityId();
                if (nonNull(loginUserInfo.getUserType())){
                    if (loginUserInfo.getUserType().equals(1)){
                        range=3;
                        id=loginUserInfo.getStreetId();
                    }else if (loginUserInfo.getUserType().equals(2)){
                        range=4;
                        id=loginUserInfo.getCommunityId();
                    }
                }else if (loginUserInfo.getType().equals(11)){
                    range=2;
                    id=loginUserInfo.getCommunityId();