| | |
| | | package com.qianwen.smartman.modules.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import javax.validation.Valid; |
| | | import com.qianwen.smartman.common.cache.RegionCache; |
| | | import com.qianwen.smartman.common.constant.ExtCacheConstant; |
| | | import com.qianwen.core.boot.ctrl.BladeController; |
| | | import com.qianwen.core.cache.utils.CacheUtil; |
| | | import com.qianwen.core.mp.support.Condition; |
| | |
| | | import com.qianwen.core.tenant.annotation.NonDS; |
| | | import com.qianwen.core.tool.api.R; |
| | | import com.qianwen.core.tool.utils.Func; |
| | | import com.qianwen.smartman.common.cache.RegionCache; |
| | | import com.qianwen.smartman.common.constant.ExtCacheConstant; |
| | | import com.qianwen.smartman.modules.system.entity.TopMenu; |
| | | import com.qianwen.smartman.modules.system.service.ITopMenuService; |
| | | import com.qianwen.smartman.modules.system.vo.GrantVO; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | |
| | | @Api(value = "顶部菜单表", tags = {"顶部菜单"}) |
| | | @RestController |
| | |
| | | public class TopMenuController extends BladeController { |
| | | private final ITopMenuService topMenuService; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -75145708: |
| | | if (implMethodName.equals("getSort")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | switch (z) { |
| | | case false: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/system/entity/TopMenu") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getSort(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | public TopMenuController(final ITopMenuService topMenuService) { |
| | | this.topMenuService = topMenuService; |
| | |
| | | @GetResource({"/detail"}) |
| | | @ApiOperation(value = "详情", notes = "传入topMenu") |
| | | public R<TopMenu> detail(TopMenu topMenu) { |
| | | TopMenu detail = (TopMenu) this.topMenuService.getOne(Condition.getQueryWrapper(topMenu)); |
| | | TopMenu detail = this.topMenuService.getOne(Condition.getQueryWrapper(topMenu)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | |
| | | @GetResource({"/list"}) |
| | | @ApiOperation(value = "分页", notes = "传入topMenu") |
| | | public R<IPage<TopMenu>> list(TopMenu topMenu, Query query) { |
| | | IPage<TopMenu> pages = this.topMenuService.page(Condition.getPage(query), (Wrapper) Condition.getQueryWrapper(topMenu).lambda().orderByAsc((v0) -> { |
| | | IPage<TopMenu> pages = this.topMenuService.page(Condition.getPage(query), Condition.getQueryWrapper(topMenu).lambda().orderByAsc((v0) -> { |
| | | return v0.getSort(); |
| | | })); |
| | | return R.data(pages); |