From bc11d6edd670912d12da2435d696ff69656ec359 Mon Sep 17 00:00:00 2001
From: KKbes <1620284052@qq.com>
Date: 星期五, 28 七月 2023 17:59:45 +0800
Subject: [PATCH] button
---
force-app/main/default/classes/LexSubmitCampaignController.cls | 85 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 82 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/LexSubmitCampaignController.cls b/force-app/main/default/classes/LexSubmitCampaignController.cls
index a63c04f..8b97e05 100644
--- a/force-app/main/default/classes/LexSubmitCampaignController.cls
+++ b/force-app/main/default/classes/LexSubmitCampaignController.cls
@@ -15,15 +15,17 @@
}
@AuraEnabled
- public static void newAndUpddateCampaign(String Id,String Status){
+ public static String newAndUpddateCampaign(String Id,String Status){
try{
Campaign res = new Campaign();
res.Id = Id;
res.Status=Status;
update res;
+ return 'success';
}
catch(Exception e){
System.debug('lexSubmitCampaign,method:newAndUpddateCampaign error: '+e.getMessage());
+ return e.getMessage();
}
@@ -203,8 +205,85 @@
System.debug('lexSubmitCampaign,method:addCampaignEvent error: '+e.getMessage());
return e.getMessage();
}
-
-
}
+ //浼氳鍙樻洿鐢宠鍒楄〃鎸夐挳
+ @AuraEnabled
+ public static Campaign initMeetingDelayApply(String recordId){
+ Campaign res = new Campaign();
+ try {
+ res = [SELECT Id,PlanBackData__c,Meeting_Cooperate__c,Meeting_Cooperate2__c,
+ Meeting_Cooperate3__c,Meeting_Cooperate4__c,Meeting_Type__c,HostName__c,
+ cooperatorCompany__c,StartDate,EndDate,IF_Approved__c,Status,CampaignStatus__c,IF_Submit__c,
+ Meeting_Approved_No__c
+ FROM Campaign
+ WHERE Id = :recordId];
+ return res;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:initMeetingDelayApply error: '+e.getMessage());
+ return null;
+ }
+ }
+
+ @AuraEnabled
+ public static List<meeting_delay_apply__c> findQualified1(String CampaignId){
+ List<meeting_delay_apply__c> res = new List<meeting_delay_apply__c>();
+ try {
+ res = [SELECT Id FROM meeting_delay_apply__c
+ WHERE Status__c = '瀹℃壒涓�' And Campaign__c =:CampaignId ];
+ return res;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage());
+ return res;
+ }
+
+ }
+
+ @AuraEnabled
+ public static List<Consum_Apply__c> findQualified2(String CampaignId){
+ List<Consum_Apply__c> res = new List<Consum_Apply__c>();
+ try {
+ res = [SELECT Id FROM Consum_Apply__c
+ WHERE Status__c Not in ('鑽夋涓�','鍙栨秷') And Campaign__c =:CampaignId ];
+ return res;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage());
+ return res;
+ }
+
+ }
+
+ @AuraEnabled
+ public static List<Rental_Apply__c> findQualified3(String CampaignId){
+ List<Rental_Apply__c> res = new List<Rental_Apply__c>();
+ try {
+ res = [SELECT Id FROM Rental_Apply__c
+ WHERE Status__c Not in ('鑽夋涓�','鍙栨秷') And Campaign__c =:CampaignId ];
+ return res;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage());
+ return res;
+ }
+
+ }
+
+ @AuraEnabled
+ public static String getRecordIdByName(String Name){
+ try {
+ List<RecordType> res = [Select Id, Name From RecordType Where Name LIKE :Name limit 1];
+ String needId = res[0].Id;
+ return needId;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:getRecordIdByName error: '+e.getMessage());
+ return '';
+ }
+
+ }
+
+
}
\ No newline at end of file
--
Gitblit v1.9.1