| | |
| | | */ |
| | | @Override |
| | | public ZTSysuserGetTokenResponse getSysuserToken(String mobile){ |
| | | ZTBaseResponse<ZTSysuserGetTokenResponse> result = sendHttpRequest( |
| | | ZTBaseResponse<ZTSysuserGetTokenResponse> result = sendSysHttpRequest( |
| | | ZTConstants.IntegerUrl.USER_MOBILE_FASTLOGIN_URL+"?mobile="+mobile, |
| | | ZTConstants.IntegerName.USER_MOBILE_FASTLOGIN_NAME, |
| | | null, |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public <T> ZTBaseResponse<T> sendSysHttpRequest(String url,String name,String token,String userType,String param,TypeReference<ZTBaseResponse<T>> typeReference){ |
| | | log.info("【"+name+"】================开始===="+ JSONObject.toJSONString(param)); |
| | | String res = null; |
| | | int success = 0; |
| | | try { |
| | | Map<String,String> headers = new HashMap<>(); |
| | | if(StringUtils.equals(userType,ZTConstants.CUSTOMER)){ |
| | | //如果是C端客户 |
| | | headers.put(ZTConstants.HEADER_TOKEN,token); |
| | | }else{ |
| | | //如果是B端用户 |
| | | headers.put(ZTConstants.HEADER_SYSUSER_TOKEN,token); |
| | | } |
| | | headers.put(ZTConstants.HEADER_USERTYPE,userType); |
| | | String index = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_ZHONGTAI_SYS_API_URL); |
| | | res = HttpsUtil.postJsonWithHeaders(index+url,param,headers); |
| | | ZTBaseResponse<T> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,name); |
| | | if(Constants.equalsInteger(result.getCode(),ZTConstants.CODE_SUCCESS)){ |
| | | return result; |
| | | }else{ |
| | | success =1; |
| | | } |
| | | }catch (Exception e){ |
| | | success = 1; |
| | | log.error("【"+name+"】================失败===="+ JSONObject.toJSONString(param)); |
| | | }finally { |
| | | saveInterfaceLog(url,name,param,success,res); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public void saveInterfaceLog(String url,String name,String param,Integer success,String respone){ |
| | | if(interfaceLogMapper ==null){ |
| | | return; |
| | |
| | | /** |
| | | * 是否收藏 true:收藏 false:未收藏 |
| | | */ |
| | | private boolean isCollection; |
| | | private Boolean isCollection; |
| | | private String layoutUlr; |
| | | private String panorama; |
| | | /** |
| | |
| | | @ApiModelProperty(value = "收藏量") |
| | | private Integer collectCount; |
| | | |
| | | @ApiModelProperty(value = "喜欢量") |
| | | private Integer likeCount; |
| | | |
| | | @ApiModelProperty(value = "是否喜欢") |
| | | private Boolean isLike; |
| | | |
| | | @ApiModelProperty(value = "是否收藏") |
| | | private Boolean isCollection; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | /** |
| | | * 是否收藏 true:收藏 false:未收藏 |
| | | */ |
| | | @ApiModelProperty(value = "是否收藏 true:收藏 false:未收藏") |
| | | private boolean isCollection; |
| | | private Boolean isCollection; |
| | | /** |
| | | * 发布日期 |
| | | */ |
| | |
| | | /** |
| | | * 是否收藏 |
| | | */ |
| | | private boolean isCollection; |
| | | private Boolean isCollection; |
| | | private String langCode; |
| | | /** |
| | | * 喜欢数量 |
| | |
| | | /** |
| | | * 是否收藏 |
| | | */ |
| | | private boolean isCollection; |
| | | private Boolean isCollection; |
| | | private String langCode; |
| | | private long likeCount; |
| | | private String publishDepartment; |
| | |
| | | public class JwtTokenUtil { |
| | | //Header 名称 |
| | | public static final String HEADER_KEY = "token"; |
| | | //Header 名称 |
| | | public static final String BUSINESS_HEADER_KEY = "business_token"; |
| | | //取值名称 |
| | | public static final String UserId_Name = "AppUserId"; |
| | | //取值名称 |
| | | public static final String UserType = "UserType"; |
| | | //取值名称 |
| | | public static final String UserInfo = "UserInfo"; |
| | | //加密密钥 |
| | | private final static String jwtSecret = "MhAjU9poLf8ko54K25XBDtonaL33vtt1"; |
| | | //过期时间(s) 86400L=1天 604800L=7天 |
| | |
| | | |
| | | Class<?> beanType = handlerMethod.getBeanType(); |
| | | Boolean checkFlag = false; |
| | | if(!( |
| | | beanType.isAnnotationPresent(LoginRequired.class) || handlerMethod.hasMethodAnnotation(LoginRequired.class) |
| | | || beanType.isAnnotationPresent(UserLoginRequired.class) || handlerMethod.hasMethodAnnotation(UserLoginRequired.class)) |
| | | if(!( handlerMethod.hasMethodAnnotation(LoginRequired.class) || handlerMethod.hasMethodAnnotation(UserLoginRequired.class)) |
| | | ){ |
| | | return true; |
| | | } |
| | | // 有 @LoginRequired 注解,需要登录认证 客户端使用 |
| | | if (!checkFlag && (beanType.isAnnotationPresent(LoginRequired.class) || handlerMethod.hasMethodAnnotation(LoginRequired.class))) { |
| | | String token = request.getHeader(JwtTokenUtil.HEADER_KEY); |
| | | if(StringUtils.isBlank(token)){ |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录"); |
| | | } |
| | | if (StringUtils.isNotBlank(token)) { |
| | | checkFlag = checkLogin(request,response,token); |
| | | } |
| | | String token = request.getHeader(JwtTokenUtil.HEADER_KEY); |
| | | if(StringUtils.isBlank(token)){ |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录"); |
| | | } |
| | | if(!checkFlag && (beanType.isAnnotationPresent(UserLoginRequired.class) || handlerMethod.hasMethodAnnotation(UserLoginRequired.class))){ |
| | | String token = request.getHeader(JwtTokenUtil.HEADER_KEY); |
| | | if(StringUtils.isBlank(token)){ |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录"); |
| | | } |
| | | if (StringUtils.isNotBlank(token)) { |
| | | if (handlerMethod.hasMethodAnnotation(LoginRequired.class)) { |
| | | checkFlag = checkLogin(request,response,token); |
| | | } |
| | | if(!checkFlag && handlerMethod.hasMethodAnnotation(UserLoginRequired.class)){ |
| | | checkFlag = checkPersonnelLogin(request,response,token); |
| | | } |
| | | } |
| | | if(!checkFlag){ |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录"); |
| | |
| | | } |
| | | request.setAttribute(JwtTokenUtil.UserId_Name, memberId); |
| | | request.setAttribute(JwtTokenUtil.UserType, ZTConstants.CUSTOMER); |
| | | request.setAttribute(JwtTokenUtil.HEADER_KEY, ZTConstants.CUSTOMER+"_"+token); |
| | | request.setAttribute(JwtTokenUtil.UserInfo, tokenRedis); |
| | | return true; |
| | | } catch (IllegalArgumentException | JwtException e) { |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录"); |
| | |
| | | } |
| | | request.setAttribute(JwtTokenUtil.UserId_Name, userId); |
| | | request.setAttribute(JwtTokenUtil.UserType, ZTConstants.BUSINESS); |
| | | request.setAttribute(JwtTokenUtil.HEADER_KEY, ZTConstants.CUSTOMER+"_"+token); |
| | | request.setAttribute(JwtTokenUtil.UserInfo, tokenRedis); |
| | | return true; |
| | | } catch (IllegalArgumentException | JwtException e) { |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录"); |
| | |
| | | |
| | | public static final String WX_PLATFORM = "WX_PLATFORM"; |
| | | public static final String ZBOM_ZHONGTAI_API_URL = "ZBOM_ZHONGTAI_API_URL"; |
| | | public static final String ZBOM_ZHONGTAI_SYS_API_URL = "ZBOM_ZHONGTAI_SYS_API_URL"; |
| | | public static final String WX_PLATFORM_ACCESS_TOKEN = "WX_PLATFORM_ACCESS_TOKEN"; |
| | | public static final String ZBOM_ENCODE_URL = "ZBOM_ENCODE_URL"; |
| | | public static final String WX_PLATFORM_APPID = "WX_PLATFORM_APPID"; |
| | |
| | | String ZBOM_ENCODE_URL ="ZBOM_ENCODE_URL"; |
| | | String ZBOM_SMS_API_KEY ="ZBOM_SMS_API_KEY"; |
| | | String ZBOM_ZHONGTAI_API_URL ="ZBOM_ZHONGTAI_API_URL"; |
| | | String ZBOM_ZHONGTAI_SYS_API_URL ="ZBOM_ZHONGTAI_SYS_API_URL"; |
| | | String ZBOM_CRM_POSTCUS_API_KEY ="ZBOM_CRM_POSTCUS_API_KEY"; |
| | | String ZBOM_AREA_REDIS_KEY ="ZBOM_AREA_REDIS_KEY"; |
| | | String ZBOM_SMS_API_URL ="ZBOM_SMS_API_URL"; |
| | |
| | | public interface GetZhongTaiDataService { |
| | | |
| | | |
| | | ZSZXCatalogResponse getZSZXCatalogs(Long userId); |
| | | ZSZXCatalogResponse getZSZXCatalogs(Long userId,String userType); |
| | | |
| | | /** |
| | | * 分类数据 |
| | |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_SMS_API_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_SMS_API_URL).getCode()); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_SMS_API_KEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_SMS_API_KEY).getCode()); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_ZHONGTAI_API_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_ZHONGTAI_API_URL).getCode()); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_ZHONGTAI_SYS_API_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_ZHONGTAI_SYS_API_URL).getCode()); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_ENCODE_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_ENCODE_URL).getCode()); |
| | | } |
| | | @PostConstruct |
| | |
| | | * 用户注销 |
| | | * @param memberId |
| | | */ |
| | | ZTBaseRequst logOff(Long memberId); |
| | | ZTBaseRequst logOff(Long memberId,String token); |
| | | |
| | | } |
| | |
| | | |
| | | String getContentShareImg(Users loginUserInfo, ContentShareImgDto param); |
| | | |
| | | ZTBaseRequst logOff(Long userId); |
| | | ZTBaseRequst logOff(Long userId,String token); |
| | | |
| | | AccountResponse getWxMiniPhoneLogin(WxPhoneRequest wxPhoneRequest); |
| | | } |
| | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.IamInterfaceLogMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.UsersMapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Override |
| | | public ZSZXCatalogResponse getZSZXCatalogs(Long userId){ |
| | | public ZSZXCatalogResponse getZSZXCatalogs(Long userId,String userType){ |
| | | ZSZXCatalogResponse response = new ZSZXCatalogResponse(); |
| | | ZTCatalogListRequest param = new ZTCatalogListRequest(); |
| | | param.setUserId(userId.toString()); |
| | | param.setUserType(ZTConstants.CUSTOMER); |
| | | param.setUserType(userType); |
| | | param.setCatalogCode(ZTConstants.CatalogCode.ZHISHUO_ZHUANGXIU); |
| | | List<ZTCatalogInfoResponse> cataList = getCatalogList(param); |
| | | if(cataList!=null ){ |
| | |
| | | ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz, |
| | | Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType()); |
| | | ztContentListRequest.setToken(ztBaseInfoResponse.getToken()); |
| | | System.out.println("开始时间========================》"+DateUtil.getLongDate(new Date())); |
| | | ZTBasePageResponse<ZTProductInfoResponse> response = zbomZhongTaiService.pageProductList(ztContentListRequest); |
| | | System.out.println("结束时间========================》"+DateUtil.getLongDate(new Date())); |
| | | return response; |
| | | } |
| | | |
| | |
| | | |
| | | import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; |
| | | import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | this.saveCustomerUser(users,member.getId()); |
| | | member = this.getMemberInfo(member.getId()); |
| | | } |
| | | //创建token |
| | | JwtPayLoad payLoad = new JwtPayLoad(member.getId(),Constants.ZERO); |
| | | String token = JwtTokenUtil.generateToken(payLoad); |
| | | redisTemplate.opsForValue().set(ZTConstants.CUSTOMER+"_"+member.getId(),token); |
| | | String token = JwtTokenUtil.generateTokenForZb(users.getId(),ZTConstants.CUSTOMER, JSONObject.toJSON(member).toString(),redisTemplate); |
| | | AccountResponse accountResponse = new AccountResponse(); |
| | | accountResponse.setToken(token); |
| | | accountResponse.setSessionKey(session.getSessionKey()); |
| | |
| | | // .set(Member::getTokenDate,date)//默认有效期为两小时 |
| | | .eq(Member::getId,member.getId())); |
| | | ztBaseInfoResponse.setToken(ztUserGetTokenResponse.getToken()); |
| | | }else{ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"中台TOKEN获取失败,请联系管理员"); |
| | | } |
| | | } |
| | | ztBaseInfoResponse.setToken(member.getToken()); |
| | |
| | | ztBaseInfoResponse.setUserType(ZTConstants.BUSINESS); |
| | | ztBaseInfoResponse.setOpenId(users.getOpenid()); |
| | | if(Objects.isNull(users.getTokenDate()) || users.getTokenDate().getTime()<=System.currentTimeMillis() ){ |
| | | ZTUserGetTokenRequest param = new ZTUserGetTokenRequest(); |
| | | //查询APPID |
| | | String appId = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_CUSTOMER).getCode(); |
| | | param.setAppId(appId); |
| | | param.setOpenId(users.getOpenid()); |
| | | ZTSysuserGetTokenResponse ztUserGetTokenResponse = zbomZhongTaiService.getSysuserToken(users.getPhone()); |
| | | if(Objects.nonNull(ztUserGetTokenResponse)){ |
| | | users.setToken(ztUserGetTokenResponse.getToken()); |
| | |
| | | .eq(Users::getId,users.getId())); |
| | | ztBaseInfoResponse.setToken(ztUserGetTokenResponse.getToken()); |
| | | return ztBaseInfoResponse; |
| | | }else{ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"中台TOKEN获取失败,请联系管理员"); |
| | | } |
| | | } |
| | | ztBaseInfoResponse.setToken(users.getToken()); |
| | | // return ztBaseInfoResponse; |
| | | }else{ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"参数错误"); |
| | | } |
| | | return ztBaseInfoResponse; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public ZTBaseRequst logOff(Long memberId){ |
| | | public ZTBaseRequst logOff(Long memberId,String token){ |
| | | Member member = memberMapper.selectById(memberId); |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(StringUtils.isBlank(member.getPhone())){ |
| | | redisTemplate.delete(ZTConstants.CUSTOMER+"_"+ member.getId()); |
| | | redisTemplate.delete(token); |
| | | return null; |
| | | } |
| | | //校验用户token信息 |
| | |
| | | // JwtPayLoad payLoad = new JwtPayLoad(users.getId(),Constants.ONE); |
| | | // String token = JwtTokenUtil.generateToken(payLoad); |
| | | // redisTemplate.opsForValue().set(ZTConstants.BUSINESS+"_"+users.getId(),token); |
| | | String token = JwtTokenUtil.generateTokenForZb(users.getId(),ZTConstants.BUSINESS,users.getId()+"",redisTemplate); |
| | | String token = JwtTokenUtil.generateTokenForZb(users.getId(),ZTConstants.BUSINESS,JSONObject.toJSON(users).toString(),redisTemplate); |
| | | AccountResponse accountResponse = new AccountResponse(); |
| | | accountResponse.setToken(token); |
| | | accountResponse.setUsers(users); |
| | |
| | | users.setOpenid(openId); |
| | | usersMapper.updateById(users); |
| | | //创建token |
| | | JwtPayLoad payLoad = new JwtPayLoad(users.getId(),Constants.ONE); |
| | | String token = JwtTokenUtil.generateToken(payLoad); |
| | | redisTemplate.opsForValue().set(ZTConstants.BUSINESS+"_"+users.getId(),token); |
| | | String token = JwtTokenUtil.generateTokenForZb(users.getId(),ZTConstants.BUSINESS,users.getId()+"",redisTemplate); |
| | | accountResponse.setToken(token); |
| | | getUsersDetail(users); |
| | | accountResponse.setSessionKey(session.getSessionKey()); |
| | |
| | | return accountResponse; |
| | | } |
| | | accountResponse.setUsers(users); |
| | | //创建token |
| | | JwtPayLoad payLoad = new JwtPayLoad(users.getId(),Constants.ZERO); |
| | | String token = JwtTokenUtil.generateToken(payLoad); |
| | | redisTemplate.opsForValue().set(ZTConstants.BUSINESS+"_"+users.getId(),token); |
| | | String token = JwtTokenUtil.generateTokenForZb(users.getId(),ZTConstants.BUSINESS,users.getId()+"",redisTemplate); |
| | | accountResponse.setToken(token); |
| | | return accountResponse; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | |
| | | |
| | | @Override |
| | | public ZTBaseRequst logOff(Long userId){ |
| | | public ZTBaseRequst logOff(Long userId,String token){ |
| | | Users users = usersMapper.selectById(userId); |
| | | if(Objects.isNull(users)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(StringUtils.isBlank(users.getOpenid())){ |
| | | redisTemplate.delete(ZTConstants.BUSINESS+"_"+ users.getId()); |
| | | redisTemplate.delete(token); |
| | | return null; |
| | | } |
| | | //校验用户token信息 |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.UsersService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.ss.formula.ptg.MemAreaPtg; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | return obj != null ? (Long) obj : null; |
| | | } |
| | | |
| | | protected String getToken() { |
| | | Object obj = this.getRequest().getAttribute(JwtTokenUtil.HEADER_KEY); |
| | | return obj != null ? (String) obj : null; |
| | | } |
| | | |
| | | |
| | | protected Long getUserId() { |
| | |
| | | return obj != null ? (Long) obj : null; |
| | | } |
| | | protected Users getLoginUserInfo() { |
| | | Long userId = getUserId(); |
| | | if(userId== null){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"未登录"); |
| | | } |
| | | Users user = usersService.findById(userId); |
| | | return user; |
| | | Long userId = getUserId(); |
| | | if(userId== null){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"未登录"); |
| | | } |
| | | Object obj = this.getRequest().getAttribute(JwtTokenUtil.UserInfo); |
| | | String userInfo = obj != null ? (String) obj : null; |
| | | Users user = new Users(); |
| | | if(StringUtils.isNotBlank(userInfo)){ |
| | | user = JSONObject.toJavaObject(JSONObject.parseObject(userInfo),Users.class); |
| | | } |
| | | return user; |
| | | } |
| | | protected Member getLoginMemberInfo() { |
| | | Long userId = getMemberId(); |
| | | if(userId== null){ |
| | | return null; |
| | | } |
| | | Member user = memberService.findById(userId); |
| | | return user; |
| | | Object obj = this.getRequest().getAttribute(JwtTokenUtil.UserInfo); |
| | | String userInfo = obj != null ? (String) obj : null; |
| | | Member member = new Member(); |
| | | if(StringUtils.isNotBlank(userInfo)){ |
| | | member = JSONObject.toJavaObject(JSONObject.parseObject(userInfo),Member.class); |
| | | } |
| | | return member; |
| | | } |
| | | |
| | | protected Long getUserType() { |
| | | protected String getUserType() { |
| | | Object obj = this.getRequest().getAttribute(JwtTokenUtil.UserType); |
| | | return obj != null ? (Long) obj : null; |
| | | return obj != null ? (String) obj : null; |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "获取手机号", notes = "客户端小程序") |
| | | @PostMapping("/getWxMiniPhone") |
| | |
| | | @ApiOperation(value = "用户注销", notes = "客户端小程序") |
| | | @GetMapping("/logOff") |
| | | public ApiResponse logOff() { |
| | | ZTBaseRequst ztBaseRequst = memberService.logOff(getUserId()); |
| | | ZTBaseRequst ztBaseRequst = memberService.logOff(getUserId(),getToken()); |
| | | if(Objects.nonNull(ztBaseRequst)){ |
| | | getZhongTaiDataService.userLogout(ztBaseRequst); |
| | | } |
| | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "产品资讯详情 - 中台", notes = "客户端小程序") |
| | | @GetMapping("/getProductNewsInfo") |
| | | @ApiOperation(value = "产品资讯详情 - 中台", notes = "客户端小程序") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "内容主键", required = true), |
| | |
| | | public GetZhongTaiDataService getZhongTaiDataService; |
| | | |
| | | |
| | | @UserLoginRequired |
| | | @LoginRequired |
| | | @ApiOperation(value = "【C端小程序】获取首页志说装修四个模块类目数据", notes = "获取首页志说装修四个模块类目数据,背景图暂时写死,参考UI") |
| | | @PostMapping("/getZSZXCatalogs") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<ZSZXCatalogResponse> getZSZXCatalogs() { |
| | | return ApiResponse.success(getZhongTaiDataService.getZSZXCatalogs(getMemberId())); |
| | | return ApiResponse.success(getZhongTaiDataService.getZSZXCatalogs(getMemberId(),getUserType())); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse logOff() { |
| | | ZTBaseRequst ztBaseRequst = usersService.logOff(getUserId()); |
| | | ZTBaseRequst ztBaseRequst = usersService.logOff(getUserId(),getToken()); |
| | | if(Objects.nonNull(ztBaseRequst)){ |
| | | getZhongTaiDataService.userLogout(ztBaseRequst); |
| | | } |