张天森
2022-09-29 850c53cff0efa962eee149b6379027d667534610
update
9个文件已修改
67 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java
@@ -13,6 +13,7 @@
import javax.crypto.NoSuchPaddingException;
import com.panzhihua.auth.config.MyAESUtil;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.model.helper.AESUtil;
import com.panzhihua.common.utlis.AES;
import org.springframework.beans.factory.annotation.Value;
@@ -97,6 +98,11 @@
            }
            // 维护最后登录时间
            userService.putUserLastLoginTime(loginUserInfoVO.getUserId());
            //是否为专家登陆
            R r1 = userService.isExpert(loginUserInfoVO.getPhone());
            if (r1.getCode()== Constants.SUCCESS){
                loginUserInfoVO.setType(13);
            }
            return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList);
        }
        else {
@@ -126,6 +132,11 @@
            }
            // 维护最后登录时间
            userService.putUserLastLoginTime(loginUserInfoVO.getUserId());
            //是否为专家登陆
            R r1 = userService.isExpert(loginUserInfoVO.getPhone());
            if (r1.getCode()== Constants.SUCCESS){
                loginUserInfoVO.setType(13);
            }
            return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList);
        }
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -10524,4 +10524,10 @@
    @PostMapping("/repassStreet")
    R repassStreet(@RequestBody ComStreetVO comActVO);
    /**
     * 是否有绑定手机号码的专家账号
     * */
    @GetMapping("/sanshuo/expert/checkExpert")
    R isExpert(@RequestParam("number") String number);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -1286,4 +1286,11 @@
     * */
    @GetMapping("/sanshuoResetPassword")
    R sanShuoResetPassword(@RequestParam("account") String account,@RequestParam("pass")String password);
    /**
     * 是否为专家登陆小程序
     * */
    @GetMapping("/isSanShuoExpert")
    R isExpert(@RequestParam("number") String number);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java
@@ -23,6 +23,9 @@
import java.util.Date;
import java.util.List;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
/**
 * 三说会堂调解专家控制器
 * */
@@ -135,4 +138,17 @@
                            @RequestParam(value = "id",required = false)Long id){
        return comSanShuoExpertService.expertShowList(level,id);
    }
    /**
     * 是否为专家登陆小程序
     * */
    @GetMapping("/checkExpert")
    public R checkExpert(@RequestParam("number") String number){
        ComSanshuoExpert expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getPhone, number));
        if (nonNull(expert)){
            return R.ok();
        }
        return R.fail();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO;
import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO;
import com.panzhihua.common.model.vos.sanshuo.ExpertShowVO;
import com.panzhihua.service_community.entity.ComSanshuoExpert;
@@ -55,6 +56,11 @@
     * 小程序获取专家列表
     * */
    List<ComSanshuoExpert> selectExpertList();
    /**
     * 是否重名,重复手机号,重复账号
     * */
    ComSanshuoExpert selectExpertByNameOrPhoneOrAccount(@Param("dto") ComSanshuoExpertDTO comSanshuoExpertDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java
@@ -60,6 +60,11 @@
     * */
    @Override
    public R addExpert(ComSanshuoExpertDTO comSanshuoExpertDTO) {
        //是否重名
        ComSanshuoExpert checkExpert=comSanshuoExpertDao.selectExpertByNameOrPhoneOrAccount(comSanshuoExpertDTO);
        if (nonNull(checkExpert)){
            return R.fail("账号信息有重复");
        }
        ComSanshuoExpert expert=new ComSanshuoExpert();
        BeanUtil.copyProperties(comSanshuoExpertDTO,expert);
        //处理id
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -91,6 +91,7 @@
        select event_process_status as status ,count(1) as  sum
        from com_sanshuo_event_info
        group by event_process_status
        having event_process_status not in (9)
    </select>
    <select id="dateAnalysis" resultType="com.panzhihua.common.model.vos.sanshuo.IndexDateVO">
        SELECT
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml
@@ -88,4 +88,8 @@
        left join com_sanshuo_event_info t1 on t.id=t1.specialist_id
        where t.status=1 and t.del_flag=1
    </select>
    <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}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -11,6 +11,7 @@
import com.panzhihua.common.model.dtos.community.microCommercialStreet.BindUserPhoneDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@@ -43,6 +44,8 @@
    private UserService userService;
    @Resource
    private SysUserInputService sysUserInputService;
    @Resource
    private CommunityService communityService;
    /**
     * 新增微信用户
@@ -1466,4 +1469,12 @@
    public R sanshuoAddUser(@RequestParam("account") String account,@RequestParam("pass")String password){
        return userService.resetPassExpertOrIndustryCenter(account,password);
    }
    /**
     * 是否为专家登陆小程序
     * */
    @GetMapping("/isSanShuoExpert")
    public R isExpert(@RequestParam("number") String number){
        return communityService.isExpert(number);
    }
}