张天森
2022-09-29 8ef17e73b4f8e3ca60f6770a254f1674c8853807
update
3个文件已修改
119 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComSanshuoExpert.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java
@@ -36,6 +36,8 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.user.UserService;
import static java.util.Objects.nonNull;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 登录认证
@@ -102,9 +104,11 @@
            // 维护最后登录时间
            userService.putUserLastLoginTime(loginUserInfoVO.getUserId());
            //是否为专家登陆
            R r1 = communityService.isExpert(loginUserInfoVO.getPhone());
            if (r1.getCode()== Constants.SUCCESS){
                loginUserInfoVO.setType(13);
            if (nonNull(loginUserInfoVO.getPhone())){
                R r1 = communityService.isExpert(loginUserInfoVO.getPhone());
                if (r1.getCode()== Constants.SUCCESS){
                    loginUserInfoVO.setType(13);
                }
            }
            return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList);
        }
@@ -136,9 +140,11 @@
            // 维护最后登录时间
            userService.putUserLastLoginTime(loginUserInfoVO.getUserId());
            //是否为专家登陆
            R r1 = communityService.isExpert(loginUserInfoVO.getPhone());
            if (r1.getCode()== Constants.SUCCESS){
                loginUserInfoVO.setType(13);
            if (nonNull(loginUserInfoVO.getPhone())){
                R r1 = communityService.isExpert(loginUserInfoVO.getPhone());
                if (r1.getCode()== Constants.SUCCESS){
                    loginUserInfoVO.setType(13);
                }
            }
            return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComSanshuoExpert.java
@@ -111,11 +111,6 @@
    private Long industryCenterId;
    /**
     * 备用字段1
     */
    private String param1;
    /**
     * 所属单位
     */
    private String unit;
@@ -131,95 +126,5 @@
    @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;
        }
        ComSanshuoExpert other = (ComSanshuoExpert) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getCommunityId() == null ? other.getCommunityId() == null : this.getCommunityId().equals(other.getCommunityId()))
            && (this.getWorkTime() == null ? other.getWorkTime() == null : this.getWorkTime().equals(other.getWorkTime()))
            && (this.getGoodAt() == null ? other.getGoodAt() == null : this.getGoodAt().equals(other.getGoodAt()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getAccount() == null ? other.getAccount() == null : this.getAccount().equals(other.getAccount()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIntroduction() == null ? other.getIntroduction() == null : this.getIntroduction().equals(other.getIntroduction()))
            && (this.getStreetId() == null ? other.getStreetId() == null : this.getStreetId().equals(other.getStreetId()))
            && (this.getIndustryCenterId() == null ? other.getIndustryCenterId() == null : this.getIndustryCenterId().equals(other.getIndustryCenterId()))
            && (this.getParam1() == null ? other.getParam1() == null : this.getParam1().equals(other.getParam1()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()));
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getCommunityId() == null) ? 0 : getCommunityId().hashCode());
        result = prime * result + ((getWorkTime() == null) ? 0 : getWorkTime().hashCode());
        result = prime * result + ((getGoodAt() == null) ? 0 : getGoodAt().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIntroduction() == null) ? 0 : getIntroduction().hashCode());
        result = prime * result + ((getStreetId() == null) ? 0 : getStreetId().hashCode());
        result = prime * result + ((getIndustryCenterId() == null) ? 0 : getIndustryCenterId().hashCode());
        result = prime * result + ((getParam1() == null) ? 0 : getParam1().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().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(", level=").append(level);
        sb.append(", communityId=").append(communityId);
        sb.append(", workTime=").append(workTime);
        sb.append(", goodAt=").append(goodAt);
        sb.append(", name=").append(name);
        sb.append(", avatar=").append(avatar);
        sb.append(", phone=").append(phone);
        sb.append(", account=").append(account);
        sb.append(", password=").append(password);
        sb.append(", status=").append(status);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", createTime=").append(createTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", introduction=").append(introduction);
        sb.append(", streetId=").append(streetId);
        sb.append(", industryCenterId=").append(industryCenterId);
        sb.append(", param1=").append(param1);
        sb.append(", unit=").append(unit);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml
@@ -34,7 +34,7 @@
        password,status,del_flag,
        create_time,create_by,update_time,
        introduction,street_id,industry_center_id,
        param1,unit from com_sanshuo_expert
        unit_id,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 where status=1 and del_flag=1 group by level
@@ -46,7 +46,7 @@
        password,status,del_flag,
        create_time,create_by,update_time,
        introduction,street_id,industry_center_id,
        param1,unit from com_sanshuo_expert
        unit_id,unit from com_sanshuo_expert
        where del_flag=1
            <if test="keyWord != null and keyWord != ''">
                AND unit like concat('%',#{keyWord},'%')
@@ -91,6 +91,6 @@
    <select id="selectExpertByNameOrPhoneOrAccount"
            resultType="com.panzhihua.service_community.entity.ComSanshuoExpert">
        select * from com_sanshuo_expert where name=#{dto.name} or phone=#{dto.phone} or account=#{dto.account}
        where stutas=1 and del_flag=1
        where status=1 and del_flag=1
    </select>
</mapper>