public with sharing class LexQuoteEntryDecidebottonController { @AuraEnabled public static String updateOpportunity(String recordId){ try { Opportunity opp = new Opportunity(); opp.Id = recordId; opp.Estimation_Decision__c = false; opp.Stock_Confrim_Date__c = null; update opp; return 'success'; } catch (Exception e) { return '取消Decide失败:'+e.getMessage(); } } @AuraEnabled public static Opportunity selectOpportunityById(String recordId){ Opportunity opp = [select id,Estimation_Decision__c from Opportunity where Id = :recordId]; return opp; } @AuraEnabled public static User selectUser(){ User us = new User(); String userid = UserInfo.getUserId(); if (userid != null) { us = [Select Id,Quote_Correct__c From User Where Id = :userid]; } return us; } }