Helius
2022-05-27 4351e71d782741143a98f86f6648acd16689165f
zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java
@@ -112,16 +112,15 @@
    }
    @ApiOperation(value = "小程序退出登陆", notes = "小程序退出登陆")
    @GetMapping(value = "/loginOut/{code}")
    public AjaxResult loginOut(HttpServletRequest request, String code) {
    @GetMapping(value = "/xcxloginOut/{code}")
    public AjaxResult xcxloginOut(HttpServletRequest request, @PathVariable("code") String code) {
        SysUsers hasBind = sysUsersService.findByOpenId(code, HostInterceptor.getCompanyId());
        if (hasBind != null) {
            if(StrUtil.isNotBlank(hasBind.getOpenIds())) {
                List<String> openIds = StrUtil.split(hasBind.getOpenIds(), ',');
                openIds.remove(code);
                hasBind.setOpenIds(CollUtil.join(openIds, ","));
                sysUsersService.modifyByModel(hasBind);
                sysUsersService.modifyUserOpenId(CollUtil.join(openIds, ","), hasBind.getSuId());
            }
        }
        String token=ApiUserLoginInterceptor.resolveToken(request,privateKey);