函數(shù)API | 函數(shù)方法 | 描述 | data返回類型 |
---|
context |
|
|
|
context.tenantId | 獲取登錄賬號的企業(yè)ID | String |
context.userId | 獲取登錄賬號的用戶ID | String |
context.details | 獲取綁定對象的明細數(shù)據(jù) | Map |
context.data | 獲取綁定對象的全部數(shù)據(jù)(包含明細數(shù)據(jù)) | Map |
Fx.object |
|
|
|
Fx.object.create(<String apiName>,<Map objectData>) | 創(chuàng)建業(yè)務(wù)對象(普通新建) | Map |
Fx.object.create(<String apiName>,<Map<String,Map> objectData>,<Map details>,<boolean withBizLogic>) | 對象創(chuàng)建同時新建從對象 | Map |
Fx.object.batchCreate(<String apiName>,<List<Map> objectData>) | 批量新建 | List |
Fx.object.update(<String apiName>,<String objectDataId>,<Map objectData>) | 更新業(yè)務(wù)對象 | Map |
Fx.object.batchUpdate(<String apiName>,<Map<String,Map> objectData>) | 批量更新業(yè)務(wù)對象 | List |
Fx.object.findById(<String apiName>,<String objectDataId>) | 按業(yè)務(wù)對象Id查詢業(yè)務(wù)對象數(shù)據(jù)象 | Map |
Fx.object.findByIds(<String apiName>,<List objectDataIds>) | 批量按業(yè)務(wù)對象Id查詢業(yè)務(wù)對象數(shù)據(jù) | List |
Fx.object.find(<String apiName>,<List<Map> criteria>,<BigDecimal limit>,<BigDecimal skip>) | 按查詢條件查詢業(yè)務(wù)對象(普通查詢) | QueryResult |
Fx.object.find(<String apiName>,<List<Map> criteria>,<Map orderBy>,<BigDecimal limit>,<BigDecimal skip>)//orderBy的value值:1 - 升序,-1 - 降序 | 按查詢條件查詢業(yè)務(wù)對象(查詢并排序) | QueryResult |
Fx.object.remove(<String apiName>,<String objectDataId>) | 作廢業(yè)務(wù)對象 | Map |
Fx.object.changeOwner(<String ObjectAPIName>,<String ObjectDataId>,<String OwnerId>) | 更換負(fù)責(zé)人 | Map |
Fx.object.addTeamMember(<String ObjectAPIName>,<String ObjectDataId>,<List UserIdList>,<Integer Role>,<Integer Permission>)//Role:1-負(fù)責(zé)人,2-聯(lián)合跟進人,3-售后服務(wù)人員,4-普通成員 ;Permission:1-只讀,2-讀寫 | 添加團隊成員 | Map |
Fx.object.deleteTeamMember(<String ObjectAPIName>,<String ObjectDataId>,<List UserIdList>) | 刪除團隊成員 | Map |
Fx.object.editTeamMember(<String ObjectAPIName>,<String ObjectDataId>,<List<Map> TeamMemberList>)//TeamMemberList的key值包括:userID:用戶ID;role:用戶角色;permisson:用戶權(quán)限 | 編輯團隊成員 | Map |
Fx.object.getTeamMember(<String objectAPIName>,<String objectId>) | 獲取團隊成員 | Map |
Fx.object.addOutTeamMember(String apiName,String objectId,int permission,List<Map> employee) | 添加外部團隊成員 | String |
Fx.object.getOptionName(<String objectAPIName>,<String filedAPIName>,<String value>) | 獲取單選/多選業(yè)務(wù)名稱/選項名稱 | Map |
Fx.object.copyByRule(<String sourceApiName>,<String sourceId>,<String ruleApiName>) | 根據(jù)映射規(guī)則新建(無從對象) | Map |
Fx.object.copyByRule(<String sourceApiName>,<String sourceId>,<String ruleApiName>,<Map plus>, <Map detailPlus>) | 根據(jù)映射規(guī)則直新建(同時新建從對象) | Map |
Fx.object.lock(String apiName , String objectId , boolean cascadeDetail) | 數(shù)據(jù)鎖定 | null |
Fx.object.unlock(String apiName , String objectId , boolean cascadeDetail) | 數(shù)據(jù)解鎖 | null |
Fx.object.aggregate(String apiName,Aggregate type,int decimalScale,List criteria) | 聚合計算 | String |
Fx.org |
|
|
|
Fx.org.findUserById(<String userId>) | 按用戶ID查詢用戶信息 | Map |
Fx.org.findByUserIds(<List userIdList>) | 按用戶Id列表查詢?nèi)舾捎脩粜畔?/td> | Map |
Fx.org.findEmployeeByDepartmentId(String departmentId) | 根據(jù)部門id查員工信息 | List<Map> |
Fx.org.findDepartmentByIds(List<String> departmentIds) | 根據(jù)部門id查部門信息 | List<Map> |
Fx.org.findSuperordinateDepartments(String id,boolean recursion) | 根據(jù)部門id查上級部門信息 | Map<String , Map> |
Fx.org.findSubordinateDepartments(String id,boolean recursion) | 根據(jù)部門id查下級部門信息 | Map<String , Map> |
Fx.http |
|
|
|
Fx.http.get(<String url>,<Map headers>) | HTTP GET請求 | HttpResult |
Fx.http.get(String url , Map headers , int timeout , boolean retry, int retryCount) | HTTP GET請求 | HttpResult |
Fx.http.post(<String url>,<Map headers>,<Map/String data>) | HTTP POST請求 | HttpResult |
Fx.http.post(String url , Map headers , Map/String data , int timeout , boolean retry, int retryCount) | HTTP POST請求 | HttpResult |
Fx.log |
|
|
|
Fx.log.info(<String string>)或Fx.log.info(<Object object>) | 運行日志 | 無 |
Fx.log.debug(<String string>) 或 Fx.log.debug(<Object object>) | 調(diào)試日志 | 無 |
Fx.crm |
|
|
|
Fx.crm.product.shelf(<String 產(chǎn)品Id>,<Integer value>) //value=1:上架;value=2:下架 | 產(chǎn)品上架下架 | Map |
Fx.crm.leads.giveBack(<String 線索Id>,<String 線索池Id>) | 線索退回 | Map |
Fx.crm.leads.move(<String 線索Id>,<String 線索池Id>) | 線索轉(zhuǎn)移 | Map |
Fx.crm.account.move(<String 客戶Id>, <String 公海Id>) | 客戶轉(zhuǎn)移公海 | Map |
Fx.crm.account.giveBack(<String 客戶Id>, <String 公海Id>) | 客戶退回公海 | Map |
Fx.crm.account.takeOut(<List 客戶Ids>) | 客戶領(lǐng)取 | Map |
Fx.work |
|
|
|
Fx.work.createTask(<String title>,<String content>,<DateTime deadLine>,<Map<List> executeUsers>, <Map<List> atUsers>) //**executeUsers**的key值 : "users" 用戶 ,"departments" 部門;**atUsers**的key值 : "users" 用戶 ,"departments" 部門 | 發(fā)任務(wù) | 無 |
Fx.work.createSchedule(<String content>,<DateTime beginTime>,<DateTime endTime>, <boolean isFullDate>,<boolean needReceipt>,<List remindTimes>,<Map<List> atUsers>) //atUsers的key值 : "users" 用戶 ,"departments" 部門 | 發(fā)日程 | 無 |
Fx.work.createSalesRecord(<String content>,<Map objects>,<Map<List> atUsers>) //objects的key值:"object_api_name" 對象APIName , "id" 對象Id;atUsers的key值 : "users" 用戶 ,"departments" 部門 | 發(fā)銷售記錄 | 無 |
Fx.random | Fx.random.nextInt()或Fx.random.nextInt(<Integer integer>) | 生成隨機數(shù) | 無 |
Fx.crypto |
|
|
|
Fx.crypto.MD5.encode(<String content>)或Fx.crypto.MD5.encode(<byte[] content>) | MD5加密 | String |
Fx.crypto.DESede.encode(<byte[] key>,<String iv>,<byte[] data>) | DESede加密 | byte[ ] |
Fx.crypto.DESede.decode(<byte[] key>,<String iv>,<byte[ ] data>) | DESede解密 | byte[ ] |
Fx.crypto.Base64.encode(<byte[] data>) | Base64加密 | String |
Fx.crypto.Base64.decode(<String data>)或Fx.crypto.Base64.decode(<byte[] data>) | Base64解密 | byte[ ] |
Fx.crypto.SHA1.encode(<String data>)或Fx.crypto.SHA1.encode(<byte[] data>) | SHA1API加密 | byte[ ] |
Fx.crypto.SHA1.hex(<String data>)或Fx.crypto.SHA1.hex(<byte[] data>) | SHA1API十六進制 | byte[ ] |
Fx.json |
|
|
|
Fx.json.toJson(<Map map>) | Map轉(zhuǎn)json字符串 | String |
Fx.json.parse(<String jsonstr>) | json轉(zhuǎn)Map字符串 | Map |
Fx.location |
|
|
|
Fx.location.findByMobile(<String mobile>) | 查詢單個號碼歸屬地 | Map |
Fx.location.findByMobiles( [ List<String> mobiles ] ) | 批量查詢手機號歸屬地 | Map |
Fx.message |
|
|
|
Fx.message.send(String textMessage , List<Integer> receiverIds , <Channel channel>) | 發(fā)送文本消息 | String |
Fx.message.send(<Card card> , List<Integer>receiverIds; , <Channel channel>) | 發(fā)送卡片消息 | String |