manailin
2022-09-15 634049809ba850fbdea4625ffe115a684c1d0c18
Merge remote-tracking branch 'origin/sanshuohuitang_dev' into sanshuohuitang_dev
9个文件已修改
194 ■■■■ 已修改文件
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/model/dtos/community/sanshuo/ComSanshuoExpertDTO.java 1 ●●●● 补丁 | 查看 | 原始文档 | 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 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml 10 ●●●● 补丁 | 查看 | 原始文档 | 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/model/dtos/community/sanshuo/ComSanshuoExpertDTO.java
@@ -129,6 +129,7 @@
     */
    @ApiModelProperty("所属单位")
    private String unit;
    private String unitId;
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
@@ -54,8 +54,21 @@
    public R addExpert(ComSanshuoExpertDTO comSanshuoExpertDTO) {
        ComSanshuoExpert expert=new ComSanshuoExpert();
        BeanUtil.copyProperties(comSanshuoExpertDTO,expert);
        //处理id
        if (nonNull(comSanshuoExpertDTO.getUnit())){
            String id = comSanshuoExpertDTO.getUnit();
            String[] split = id.split(",");
            comSanshuoExpertDTO.setUnitId(split[split.length]);
        }
        expert.setId(Snowflake.getId());
        expert.setCreateTime(new Date());
        if (expert.getLevel()==2){
            expert.setIndustryCenterId(Long.parseLong(comSanshuoExpertDTO.getUnitId()));
        }else if(expert.getLevel()==3){
            expert.setStreetId(Long.parseLong(comSanshuoExpertDTO.getUnitId()));
        }else if(expert.getLevel()==4){
            expert.setCommunityId(Long.parseLong(comSanshuoExpertDTO.getUnitId()));
        }
        int insert = comSanshuoExpertDao.insert(expert);
        if (insert>0){
            try {
@@ -93,12 +106,14 @@
        Integer range=null;
        if (nonNull(loginUserInfo)){
            if (nonNull(loginUserInfo.getUserType()) || nonNull(loginUserInfo.getType())){
                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();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml
@@ -37,7 +37,7 @@
        param1,unit from com_sanshuo_expert
    </sql>
    <select id="expertShow" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO">
        select  count(id) as 'count',level from com_sanshuo_expert group by level
        select  count(id) as 'count',level from com_sanshuo_expert where status=1 and del_flag=1 group by level
    </select>
    <select id="expertPage"  resultType="com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO">
        select id,level,community_id,
@@ -47,7 +47,7 @@
        create_time,create_by,update_time,
        introduction,street_id,industry_center_id,
        param1,unit from com_sanshuo_expert
        where del_flag=0
        where del_flag=1
            <if test="keyWord != null and keyWord != ''">
                AND unit like concat('%',#{keyWord},'%')
                OR name like concat('%',#{keyWord},'%')
@@ -68,19 +68,19 @@
    <select id="selectExpertIndustry" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO">
        select  count(t.id) as 'count',t1.name from com_sanshuo_expert t
        left join com_sanshuo_industry_center t1 on t.industry_center_id=t1.id
        where t.level=2
        where t.level=2 and t.status=1 and t.del_flag=1
        group by t1.name
    </select>
    <select id="selectExpertStreet" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO">
        select  count(t.id) as 'count',t1.name from com_sanshuo_expert t
        left join com_street t1 on t.street_id=t1.street_id
        where t.level=3
        where t.level=3 and t.status=1 and t.del_flag=1
        group by t1.name
    </select>
    <select id="selectExpertCommunity" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO">
        select  count(t.id) as 'count',t1.name from com_sanshuo_expert t
        left join com_act t1 on t.community_id=t1.community_id
        where t.level=4
        where t.level=4 and t.status=1 and t.del_flag=1
        group by t1.name
    </select>
</mapper>