KKbes
2023-07-19 928599f123fc94198808ca1a4114c1393474bc30
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
public with sharing class lexSubAuthorizedButtonController {
    //button 取消
    @AuraEnabled
    public static SubAuthorized__c init(String recordId){
        SubAuthorized__c res = new SubAuthorized__c();
        try{
            res = [SELECT Status__c 
                    From SubAuthorized__c
                        WHERE Id = : recordId];
        }
        catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
 
    @AuraEnabled
    public static void updateStatuById(String Id){
        try{
            SubAuthorized__c res = new SubAuthorized__c();
            res.Id = Id;
            res.Status__c = '已取消';
            update res;
        }
        catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
    }
}