| | |
| | | package com.qianwen.smartman.modules.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.utils.Lambda; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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.qianwen.core.mp.support.Condition; |
| | | import com.qianwen.core.mp.support.Query; |
| | | import com.qianwen.core.scanner.modular.annotation.GetResource; |
| | |
| | | import com.qianwen.core.scanner.modular.stereotype.ApiResource; |
| | | import com.qianwen.core.tool.api.R; |
| | | import com.qianwen.core.tool.utils.Func; |
| | | import com.qianwen.smartman.common.utils.Lambda; |
| | | import com.qianwen.smartman.modules.system.entity.MetaRefObjectType; |
| | | import com.qianwen.smartman.modules.system.service.IMetaRefObjectTypeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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; |
| | | |
| | | @ApiResource({"blade-system/meta-ref-object-type"}) |
| | | @Api(value = "业务对象", tags = {"业务对象字段类型相关接口"}) |
| | |
| | | @Autowired |
| | | private IMetaRefObjectTypeService metaRefObjectTypeService; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -869322735: |
| | | if (implMethodName.equals("getRefObjectTypeId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 378153098: |
| | | if (implMethodName.equals("getObjectTypeId")) { |
| | | 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/MetaRefObjectType") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getObjectTypeId(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | 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/MetaRefObjectType") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getRefObjectTypeId(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | public MetaRefObjectTypeController(final IMetaRefObjectTypeService metaRefObjectTypeService) { |
| | | this.metaRefObjectTypeService = metaRefObjectTypeService; |
| | | } |
| | |
| | | @GetResource({"/list"}) |
| | | @ApiOperation(value = "分页", notes = "业务对象引用关系列表") |
| | | public R<IPage<MetaRefObjectType>> list(@ApiParam("业务对象内码") String objectTypeId, @ApiParam("引用业务对象内码") String refObjectTypeId, Query query) { |
| | | return R.data(this.metaRefObjectTypeService |
| | | .page(Condition.getPage(query), |
| | | Lambda.eq(Func.isNotBlank(objectTypeId), MetaRefObjectType::getObjectTypeId, objectTypeId) |
| | | .eq(Func.isNotBlank(refObjectTypeId), MetaRefObjectType::getRefObjectTypeId, refObjectTypeId))); |
| | | /* |
| | | return R.data(this.metaRefObjectTypeService.page(Condition.getPage(query), Lambda.eq(Func.isNotBlank(objectTypeId), (v0) -> { |
| | | return v0.getObjectTypeId(); |
| | | }, objectTypeId).eq(Func.isNotBlank(refObjectTypeId), (v0) -> { |
| | | return v0.getRefObjectTypeId(); |
| | | }, refObjectTypeId))); |
| | | }, refObjectTypeId)));*/ |
| | | } |
| | | |
| | | @PostResource({"/submit"}) |