Merge branch 'ty_fix' into score_shop
| | |
| | | registry.addInterceptor(hostInterceptor).addPathPatterns("/**/wxapi/**") |
| | | .addPathPatterns("/api/common/wxLogin/**") |
| | | .addPathPatterns("/api/common/bindUser") |
| | | .addPathPatterns("/api/user/xcxloginOut/**") |
| | | .excludePathPatterns("/wxCommon/wxapi/wxpayCallback") |
| | | .excludePathPatterns("/wxCommon/wxapi/rechargeCallBack"); |
| | | } |
| | |
| | | List<String> openIds = StrUtil.split(hasBind.getOpenIds(), ','); |
| | | openIds.remove(loginDto.getOpenId()); |
| | | |
| | | hasBind.setOpenIds(CollUtil.join(openIds, ",")); |
| | | sysUsersService.modifyByModel(hasBind); |
| | | sysUsersService.modifyUserOpenId(CollUtil.join(openIds, ","), hasBind.getSuId()); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @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); |
| | |
| | | public List<AppVersion> selectAppVersion(); |
| | | |
| | | SysUsers selectUserByOpenId(@Param("openId") String openId, @Param("companyId") Long companyId); |
| | | |
| | | int updateUserOpenId(@Param("openId") String openId, @Param("suId") Long suId); |
| | | } |
| | |
| | | public List<AppVersion> findAppVersion(); |
| | | |
| | | SysUsers findByOpenId(String openId, Long companyId); |
| | | |
| | | int modifyUserOpenId(String openId, Long suId); |
| | | } |
| | |
| | | public SysUsers findByOpenId(String openId, Long companyId) { |
| | | return sysUsersDao.selectUserByOpenId(openId, companyId); |
| | | } |
| | | |
| | | @Override |
| | | public int modifyUserOpenId(String openId, Long suId) { |
| | | return sysUsersDao.updateUserOpenId(openId, suId); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <update id="updateUserOpenId"> |
| | | update sys_users |
| | | set open_ids=#{openId} |
| | | where su_id=#{suId} |
| | | </update> |
| | | </mapper> |