yangys
2024-03-28 d0c4758b378e46b35429e2a2ca7d6d3ecf284143
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
package com.qianwen.smartman.modules.system.controller;
 
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import java.lang.invoke.SerializedLambda;
import java.util.List;
import javax.validation.Valid;
import com.qianwen.smartman.common.cache.RegionCache;
import com.qianwen.smartman.common.utils.Lambda;
import com.qianwen.core.scanner.modular.annotation.GetResource;
import com.qianwen.core.scanner.modular.annotation.PostResource;
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.modules.system.entity.MetaObjectTypeField;
import com.qianwen.smartman.modules.system.service.IMetaObjectTypeFieldService;
import com.qianwen.smartman.modules.system.vo.MetaObjectTypeFieldVO;
import com.qianwen.smartman.modules.system.wrapper.MetaObjectTypeFieldWrapper;
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;
 
@ApiResource({"blade-system/meta-object-type-field"})
@Api(value = "业务对象", tags = {"业务对象字段类型相关接口"})
@RestController
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/system/controller/MetaObjectTypeFieldController.class */
public class MetaObjectTypeFieldController {
    @Autowired
    private IMetaObjectTypeFieldService metaObjectTypeFieldService;
 
    private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) {
        String implMethodName = lambda.getImplMethodName();
        boolean z = true;
        switch (implMethodName.hashCode()) {
            case -2126571984:
                if (implMethodName.equals("getObjectId")) {
                    z = true;
                    break;
                }
                break;
            case -1249350359:
                if (implMethodName.equals("getSeq")) {
                    z = true;
                    break;
                }
                break;
            case 33655584:
                if (implMethodName.equals("getElementType")) {
                    z = false;
                    break;
                }
                break;
            case 1952130493:
                if (implMethodName.equals("getFCode")) {
                    z = true;
                    break;
                }
                break;
            case 1952445019:
                if (implMethodName.equals("getFName")) {
                    z = true;
                    break;
                }
                break;
            case 1953253188:
                if (implMethodName.equals("getField")) {
                    z = true;
                    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/MetaObjectTypeField") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
                    return (v0) -> {
                        return v0.getElementType();
                    };
                }
                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/MetaObjectTypeField") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) {
                    return (v0) -> {
                        return v0.getSeq();
                    };
                }
                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/MetaObjectTypeField") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
                    return (v0) -> {
                        return v0.getFName();
                    };
                }
                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/MetaObjectTypeField") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
                    return (v0) -> {
                        return v0.getFCode();
                    };
                }
                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/MetaObjectTypeField") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
                    return (v0) -> {
                        return v0.getField();
                    };
                }
                break;
            case RegionCache.VILLAGE_LEVEL /* 5 */:
                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/MetaObjectTypeField") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
                    return (v0) -> {
                        return v0.getObjectId();
                    };
                }
                break;
        }
        throw new IllegalArgumentException("Invalid lambda deserialization");
    }
 
    public MetaObjectTypeFieldController(final IMetaObjectTypeFieldService metaObjectTypeFieldService) {
        this.metaObjectTypeFieldService = metaObjectTypeFieldService;
    }
 
    @GetResource({"/list"})
    @ApiOperation(value = "分页", notes = "业务对象字段类型列表")
    public R<List<MetaObjectTypeFieldVO>> findAll(@RequestParam(value = "objectId", required = false) @ApiParam("所属业务对象") String objectId, @RequestParam(value = "fCode", required = false) @ApiParam("字段编码") String fCode, @RequestParam(value = "fName", required = false) @ApiParam("字段标题") String fName, @RequestParam(value = "field", required = false) @ApiParam("数据库实体属性") String field, @RequestParam(value = "elementType", required = false) @ApiParam("元素类型") String elementType) {
        List<MetaObjectTypeField> list = this.metaObjectTypeFieldService.list((Wrapper) Lambda.eq(Func.isNotEmpty(objectId), (v0) -> {
            return v0.getObjectId();
        }, objectId).eq(Func.isNotEmpty(fCode), (v0) -> {
            return v0.getFCode();
        }, fCode).eq(Func.isNotEmpty(fName), (v0) -> {
            return v0.getFName();
        }, fName).eq(Func.isNotEmpty(field), (v0) -> {
            return v0.getField();
        }, field).eq(Func.isNotEmpty(elementType), (v0) -> {
            return v0.getElementType();
        }, elementType).orderByAsc((v0) -> {
            return v0.getSeq();
        }));
        return R.data(MetaObjectTypeFieldWrapper.build().listVO(list));
    }
 
    @PostResource({"/submit"})
    public R submit(@Valid @RequestBody MetaObjectTypeFieldVO vo) {
        return R.data(Boolean.valueOf(this.metaObjectTypeFieldService.saveOrUpdate(vo)));
    }
 
    @PostResource({"/remove"})
    public R remove(@RequestParam @ApiParam(value = "主键集合", required = true) String ids) {
        return R.status(this.metaObjectTypeFieldService.removeByIds(Func.toLongList(ids)));
    }
}