- 问题一 :这个接口是前台的,登录的情况下不应该是拒绝访问未授权资源

- 解决方法:添加注解==》@LoginAccess :个人理解意思》当在controller层时添加上是权限不会拦截的作用
- 当禁止启用中台数据时前台相应伙伴类型不显示


- 解决方法:前台列表数据回传来的 为0 就显示,为1 不显示

- 配送上代码更容易看懂
- web层(FrontPartnerTypeController)
package com.humi.partner.front.web; import com.humi.cloud.common.model.Result; import com.humi.cloud.security.support.annotation.LoginAccess; import com.humi.partner.front.model.partnerType.PartnerTypeListQueryResponse; import com.humi.partner.front.service.FrontPartnerTypeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.util.concurrent.Callable; / * <pre> * @Auther: lishijie * @Date: 2019/10/24 10:03 * Ver Date Author Detail * ---------------------------------------------------------------------- * 1.0 2019/10/24 10:03 [email protected] new file. * @Description:Codes * </pre> */ @RestController @RequestMapping("/front/partner_type") @Api(tags = "前台-伙伴类型", protocols = MediaType.APPLICATION_JSON_UTF8_VALUE) class FrontPartnerTypeController {
@Autowired FrontPartnerTypeService frontPartnerTypeService; @LoginAccess @GetMapping("/lib/list") @ApiOperation(value = "查询伙伴类型列表",notes ="伙伴类型",response = PartnerTypeListQueryResponse.class) public Callable<Result> getPartnerTypeLibPage( ){
return () ->
讯享网


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/61887.html