mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
3.2.0-beta,重构很大:升级springboot2.6.6、spring-cloud-alibaba 2021.1、mybatisplus3.5.1、代码规范部分重构
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-boot-base-api</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.2.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -1,89 +0,0 @@
|
||||
package org.jeecg.common.bpm.api;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.ServiceNameConstants;
|
||||
import org.jeecg.common.online.api.factory.OnlineBaseExtAPIFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 流程接口
|
||||
*
|
||||
* @author scott
|
||||
*/
|
||||
@Component
|
||||
@FeignClient(contextId = "bpmBaseRemoteApi", value = ServiceNameConstants.SYSTEM_SERVICE,
|
||||
fallbackFactory = OnlineBaseExtAPIFallbackFactory.class)
|
||||
public interface IBpmBaseExtAPI {
|
||||
/**
|
||||
* 23. 流程提交接口(online,自定义开发)
|
||||
*
|
||||
* @param flowCode
|
||||
* 流程业务关联 例如:joa_leave_01
|
||||
* @param id
|
||||
* 表单业务数据data id
|
||||
* @param formUrl
|
||||
* 流程审批时附件页面默认展示的PC端表单组件(地址)
|
||||
* @param formUrlMobile
|
||||
* 流程审批时附件页面默认展示的移动端表单组件(地址)
|
||||
* @param username
|
||||
* 流程发起人账号
|
||||
* @param jsonData
|
||||
* Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping(value = "/act/process/extActProcess/startMutilProcess")
|
||||
Result<String> startMutilProcess(@RequestParam("flowCode") String flowCode, @RequestParam("id") String id,
|
||||
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
|
||||
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
|
||||
|
||||
/**
|
||||
* 24. 流程提交接口(自定义表单设计器)
|
||||
*
|
||||
* @param flowCode
|
||||
* 流程业务关联 例如:joa_leave_01
|
||||
* @param id
|
||||
* 表单业务数据data id
|
||||
* @param formUrl
|
||||
* 流程审批时附件页面默认展示的PC端表单组件(地址)
|
||||
* @param formUrlMobile
|
||||
* 流程审批时附件页面默认展示的移动端表单组件(地址)
|
||||
* @param username
|
||||
* 流程发起人账号
|
||||
* @param jsonData
|
||||
* Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping(value = "/act/process/extActProcess/startDesFormMutilProcess")
|
||||
Result<String> startDesFormMutilProcess(@RequestParam("flowCode") String flowCode, @RequestParam("id") String id,
|
||||
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
|
||||
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
|
||||
|
||||
/**
|
||||
* 25. 保存流程草稿箱接口(自定义开发表单、online表单)
|
||||
*
|
||||
* @param flowCode
|
||||
* 流程业务关联 例如:joa_leave_01
|
||||
* @param id
|
||||
* 表单业务数据data id
|
||||
* @param formUrl
|
||||
* 流程审批时附件页面默认展示的PC端表单组件(地址) 【非必填】
|
||||
* @param formUrlMobile
|
||||
* 流程审批时附件页面默认展示的移动端表单组件(地址) 【非必填】
|
||||
* @param username
|
||||
* 流程发起人账号
|
||||
* @param jsonData
|
||||
* Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping(value = "/act/process/extActProcess/saveMutilProcessDraft")
|
||||
Result<String> saveMutilProcessDraft(@RequestParam("flowCode") String flowCode, @RequestParam("id") String id,
|
||||
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
|
||||
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package org.jeecg.common.bpm.api.factory;
|
||||
|
||||
import org.jeecg.common.bpm.api.IBpmBaseExtAPI;
|
||||
import org.jeecg.common.bpm.api.fallback.BpmBaseExtAPIFallback;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import feign.hystrix.FallbackFactory;
|
||||
|
||||
@Component
|
||||
public class BpmBaseExtAPIFallbackFactory implements FallbackFactory<IBpmBaseExtAPI> {
|
||||
|
||||
@Override
|
||||
public IBpmBaseExtAPI create(Throwable throwable) {
|
||||
BpmBaseExtAPIFallback fallback = new BpmBaseExtAPIFallback();
|
||||
fallback.setCause(throwable);
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
package org.jeecg.common.bpm.api.fallback;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.bpm.api.IBpmBaseExtAPI;
|
||||
import org.jeecg.common.online.api.IOnlineBaseExtAPI;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 进入fallback的方法 检查是否token未设置
|
||||
*/
|
||||
@Slf4j
|
||||
public class BpmBaseExtAPIFallback implements IBpmBaseExtAPI {
|
||||
|
||||
@Setter
|
||||
private Throwable cause;
|
||||
|
||||
@Override
|
||||
public Result<String> startMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile,
|
||||
String username, String jsonData) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> startDesFormMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile,
|
||||
String username, String jsonData) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> saveMutilProcessDraft(String flowCode, String id, String formUrl, String formUrlMobile,
|
||||
String username, String jsonData) throws Exception {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,73 +0,0 @@
|
||||
package org.jeecg.common.online.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.jeecg.common.constant.ServiceNameConstants;
|
||||
import org.jeecg.common.online.api.factory.OnlineBaseExtAPIFallbackFactory;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 【Online】Feign API接口
|
||||
*/
|
||||
@Component
|
||||
@FeignClient(contextId = "onlineBaseRemoteApi", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = OnlineBaseExtAPIFallbackFactory.class)
|
||||
//@FeignClient(contextId = "onlineBaseRemoteApi", value = ServiceNameConstants.SYSTEM_ONLINE, fallbackFactory = OnlineBaseExtAPIFallbackFactory.class)
|
||||
public interface IOnlineBaseExtAPI {
|
||||
|
||||
/**
|
||||
* 【Online】 表单设计器专用:同步新增
|
||||
*/
|
||||
@PostMapping(value = "/online/api/cgform/crazyForm/{name}")
|
||||
String cgformPostCrazyForm(@PathVariable("name") String tableName, @RequestBody JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* 【Online】 表单设计器专用:同步编辑
|
||||
*/
|
||||
@PutMapping(value = "/online/api/cgform/crazyForm/{name}")
|
||||
String cgformPutCrazyForm(@PathVariable("name") String tableName, @RequestBody JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* 通过online表名查询数据,同时查询出子表的数据
|
||||
*
|
||||
* @param tableName online表名
|
||||
* @param dataIds online数据ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/online/api/cgform/queryAllDataByTableName")
|
||||
JSONObject cgformQueryAllDataByTableName(@RequestParam("tableName") String tableName, @RequestParam("dataIds") String dataIds);
|
||||
|
||||
/**
|
||||
* online表单删除数据
|
||||
*
|
||||
* @param cgformCode Online表单code
|
||||
* @param dataIds 数据ID,可逗号分割
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/online/api/cgform/cgformDeleteDataByCode")
|
||||
String cgformDeleteDataByCode(@RequestParam("cgformCode") String cgformCode, @RequestParam("dataIds") String dataIds);
|
||||
|
||||
/**
|
||||
* 【cgreport】通过 head code 获取 sql语句,并执行该语句返回查询数据
|
||||
*
|
||||
* @param code 报表Code,如果没传ID就通过code查
|
||||
* @param forceKey
|
||||
* @param dataList
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/online/api/cgreportGetData")
|
||||
Map<String, Object> cgreportGetData(@RequestParam("code") String code, @RequestParam("forceKey") String forceKey, @RequestParam("dataList") String dataList);
|
||||
|
||||
/**
|
||||
* 【cgreport】对 cgreportGetData 的返回值做优化,封装 DictModel 集合
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/online/api/cgreportGetDataPackage")
|
||||
List<DictModel> cgreportGetDataPackage(@RequestParam("code") String code, @RequestParam("dictText") String dictText, @RequestParam("dictCode") String dictCode, @RequestParam("dataList") String dataList);
|
||||
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package org.jeecg.common.online.api.factory;
|
||||
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import org.jeecg.common.online.api.IOnlineBaseExtAPI;
|
||||
import org.jeecg.common.online.api.fallback.OnlineBaseExtAPIFallback;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class OnlineBaseExtAPIFallbackFactory implements FallbackFactory<IOnlineBaseExtAPI> {
|
||||
|
||||
@Override
|
||||
public IOnlineBaseExtAPI create(Throwable throwable) {
|
||||
OnlineBaseExtAPIFallback fallback = new OnlineBaseExtAPIFallback();
|
||||
fallback.setCause(throwable);
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
package org.jeecg.common.online.api.fallback;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.online.api.IOnlineBaseExtAPI;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 进入fallback的方法 检查是否token未设置
|
||||
*/
|
||||
@Slf4j
|
||||
public class OnlineBaseExtAPIFallback implements IOnlineBaseExtAPI {
|
||||
|
||||
@Setter
|
||||
private Throwable cause;
|
||||
|
||||
@Override
|
||||
public String cgformPostCrazyForm(String tableName, JSONObject jsonObject) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String cgformPutCrazyForm(String tableName, JSONObject jsonObject) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject cgformQueryAllDataByTableName(String tableName, String dataIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String cgformDeleteDataByCode(String cgformCode, String dataIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> cgreportGetData(String code, String forceKey, String dataList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> cgreportGetDataPackage(String code, String dictText, String dictCode, String dataList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -7,6 +7,7 @@ import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.constant.ServiceNameConstants;
|
||||
import org.jeecg.common.system.api.factory.SysBaseAPIFallbackFactory;
|
||||
import org.jeecg.common.system.vo.*;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -16,18 +17,17 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 相比较local版
|
||||
* 去掉了一些方法:
|
||||
* addLog getDatabaseType queryAllDepart
|
||||
* queryAllUser(Wrapper wrapper) queryAllUser(String[] userIds, int pageNo, int pageSize)
|
||||
* 修改了一些方法:
|
||||
* createLog
|
||||
* sendSysAnnouncement 只保留了一个,其余全部干掉
|
||||
*
|
||||
* cloud接口数量43 local:35 common:9 额外一个特殊queryAllRole一个当两个用
|
||||
* 1、cloud接口数量43 local:35 common:9 额外一个特殊queryAllRole一个当两个用
|
||||
* - 相比较local版
|
||||
* - 去掉了一些方法:addLog、getDatabaseType、queryAllDepart、queryAllUser(Wrapper wrapper)、queryAllUser(String[] userIds, int pageNo, int pageSize)
|
||||
* - 修改了一些方法:createLog、sendSysAnnouncement(只保留了一个,其余全部干掉)
|
||||
* 2、@ConditionalOnMissingClass("org.jeecg.modules.system.service.impl.SysBaseApiImpl")=> 有实现类的时候,不实例化Feign接口
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Component
|
||||
@FeignClient(contextId = "sysBaseRemoteApi", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = SysBaseAPIFallbackFactory.class)
|
||||
@FeignClient(contextId = "sysBaseRemoteApi", value = ServiceNameConstants.SERVICE_SYSTEM, fallbackFactory = SysBaseAPIFallbackFactory.class)
|
||||
@ConditionalOnMissingClass("org.jeecg.modules.system.service.impl.SysBaseApiImpl")
|
||||
public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
@ -103,6 +103,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryDictItemsByCode")
|
||||
List<DictModel> queryDictItemsByCode(@RequestParam("code") String code);
|
||||
|
||||
@ -111,10 +112,13 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryEnableDictItemsByCode")
|
||||
public List<DictModel> queryEnableDictItemsByCode(@RequestParam("code") String code);
|
||||
|
||||
/** 11查询所有的父级字典,按照create_time排序 */
|
||||
/** 11查询所有的父级字典,按照create_time排序
|
||||
* @return List<DictModel> 字典值集合
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllDict")
|
||||
List<DictModel> queryAllDict();
|
||||
|
||||
@ -122,8 +126,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* 12查询所有分类字典
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllDSysCategory")
|
||||
List<SysCategoryModel> queryAllDSysCategory();
|
||||
@GetMapping("/sys/api/queryAllSysCategory")
|
||||
List<SysCategoryModel> queryAllSysCategory();
|
||||
|
||||
/**
|
||||
* 13获取表数据字典
|
||||
@ -132,6 +136,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryTableDictItemsByCode")
|
||||
List<DictModel> queryTableDictItemsByCode(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code);
|
||||
|
||||
@ -144,6 +149,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 15根据业务类型 busType 及业务 busId 修改消息已读
|
||||
* @param busType 业务类型
|
||||
* @param busId 业务id
|
||||
*/
|
||||
@GetMapping("/sys/api/updateSysAnnounReadFlag")
|
||||
public void updateSysAnnounReadFlag(@RequestParam("busType") String busType, @RequestParam("busId")String busId);
|
||||
@ -180,6 +187,9 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 19分页查询用户 返回JSONObject
|
||||
* @param userIds 多个用户id
|
||||
* @param pageNo 当前页数
|
||||
* @param pageSize 每页条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllUser")
|
||||
@ -188,7 +198,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 20获取所有角色 带参
|
||||
* roleIds 默认选中角色
|
||||
* @param roleIds 默认选中角色
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllRole")
|
||||
@ -243,7 +253,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 27根据id获取所有参与用户
|
||||
* userIds
|
||||
* @param userIds 多个用户id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllUserByIds")
|
||||
@ -260,7 +270,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 29根据name获取所有参与用户
|
||||
* userNames
|
||||
* @param userNames 多个用户账号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryUserByNames")
|
||||
@ -293,6 +303,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 33通过部门id获取部门全部信息
|
||||
* @param id 部门id
|
||||
* @return SysDepartModel 部门信息
|
||||
*/
|
||||
@GetMapping("/sys/api/selectAllById")
|
||||
SysDepartModel selectAllById(@RequestParam("id") String id);
|
||||
@ -313,6 +325,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryUserRoles")
|
||||
Set<String> queryUserRoles(@RequestParam("username")String username);
|
||||
|
||||
@ -321,6 +334,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryUserAuths")
|
||||
Set<String> queryUserAuths(@RequestParam("username")String username);
|
||||
|
||||
@ -330,6 +344,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param dbSourceId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/getDynamicDbSourceById")
|
||||
DynamicDataSourceModel getDynamicDbSourceById(@RequestParam("dbSourceId") String dbSourceId);
|
||||
|
||||
@ -339,13 +354,16 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param dbSourceCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/getDynamicDbSourceByCode")
|
||||
DynamicDataSourceModel getDynamicDbSourceByCode(@RequestParam("dbSourceCode") String dbSourceCode);
|
||||
|
||||
/**
|
||||
* 39根据用户账号查询用户信息 CommonAPI中定义
|
||||
* @param username
|
||||
* @return LoginUser 用户信息
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/getUserByName")
|
||||
LoginUser getUserByName(@RequestParam("username") String username);
|
||||
|
||||
@ -357,6 +375,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/translateDictFromTable")
|
||||
String translateDictFromTable(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("key") String key);
|
||||
|
||||
@ -366,13 +385,18 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/translateDict")
|
||||
String translateDict(@RequestParam("code") String code, @RequestParam("key") String key);
|
||||
|
||||
/**
|
||||
* 42查询数据权限
|
||||
* @param component
|
||||
* @param requestPath
|
||||
* @param username 用户姓名
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryPermissionDataRule")
|
||||
List<SysPermissionDataRuleModel> queryPermissionDataRule(@RequestParam("component") String component, @RequestParam("requestPath")String requestPath, @RequestParam("username") String username);
|
||||
|
||||
@ -381,6 +405,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/getCacheUser")
|
||||
SysUserCacheInfo getCacheUser(@RequestParam("username") String username);
|
||||
|
||||
@ -426,13 +451,16 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
void sendEmailMsg(@RequestParam("email")String email,@RequestParam("title")String title,@RequestParam("content")String content);
|
||||
/**
|
||||
* 41 获取公司下级部门和公司下所有用户id
|
||||
* @param orgCode
|
||||
* @param orgCode 部门编号
|
||||
* @return List<Map>
|
||||
*/
|
||||
@GetMapping("/sys/api/getDeptUserByOrgCode")
|
||||
List<Map> getDeptUserByOrgCode(@RequestParam("orgCode")String orgCode);
|
||||
|
||||
/**
|
||||
* 42 查询分类字典翻译
|
||||
* @param ids 多个分类字典id
|
||||
* @return List<String>
|
||||
*/
|
||||
@GetMapping("/sys/api/loadCategoryDictItem")
|
||||
List<String> loadCategoryDictItem(@RequestParam("ids") String ids);
|
||||
@ -472,6 +500,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
*
|
||||
* @param dictCode 字典code格式:table,text,code
|
||||
* @param keyword 过滤关键字
|
||||
* @param pageSize 每页条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/loadDictItemByKeyword")
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
package org.jeecg.common.system.api.factory;
|
||||
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.api.fallback.SysBaseAPIFallback;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Description: SysBaseAPIFallbackFactory
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Component
|
||||
public class SysBaseAPIFallbackFactory implements FallbackFactory<ISysBaseAPI> {
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ import java.util.Set;
|
||||
|
||||
/**
|
||||
* 进入fallback的方法 检查是否token未设置
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Slf4j
|
||||
public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
@ -79,11 +80,12 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
|
||||
@Override
|
||||
public List<DictModel> queryAllDict() {
|
||||
log.error("fegin接口queryAllDict失败:"+cause.getMessage(), cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysCategoryModel> queryAllDSysCategory() {
|
||||
public List<SysCategoryModel> queryAllSysCategory() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -221,7 +223,7 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
|
||||
@Override
|
||||
public LoginUser getUserByName(String username) {
|
||||
log.error("通过用户名获取当前登录用户信息 {}", cause);
|
||||
log.error("jeecg-system服务节点不通,导致获取登录用户信息失败: " + cause.getMessage(), cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -1,164 +1,180 @@
|
||||
package org.jeecg.config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.SortedMap;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.jeecg.common.config.mqtoken.UserTokenContext;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.PathMatcherUtil;
|
||||
import org.jeecg.config.sign.interceptor.SignAuthConfiguration;
|
||||
import org.jeecg.config.sign.util.HttpUtils;
|
||||
import org.jeecg.config.sign.util.SignUtil;
|
||||
import org.springframework.beans.factory.ObjectFactory;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
|
||||
import org.springframework.cloud.openfeign.support.SpringDecoder;
|
||||
import org.springframework.cloud.openfeign.support.SpringEncoder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
||||
import com.alibaba.fastjson.support.springfox.SwaggerJsonSerializer;
|
||||
|
||||
import feign.Feign;
|
||||
import feign.Logger;
|
||||
import feign.RequestInterceptor;
|
||||
import feign.codec.Decoder;
|
||||
import feign.codec.Encoder;
|
||||
import feign.form.spring.SpringFormEncoder;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ConditionalOnClass(Feign.class)
|
||||
@AutoConfigureBefore(FeignAutoConfiguration.class)
|
||||
@Slf4j
|
||||
@Configuration
|
||||
public class FeignConfig {
|
||||
|
||||
@Bean
|
||||
public RequestInterceptor requestInterceptor() {
|
||||
return requestTemplate -> {
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
if (null != attributes) {
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
log.debug("Feign request: {}", request.getRequestURI());
|
||||
// 将token信息放入header中
|
||||
String token = request.getHeader(CommonConstant.X_ACCESS_TOKEN);
|
||||
if(token==null || "".equals(token)){
|
||||
token = request.getParameter("token");
|
||||
}
|
||||
log.debug("Feign request token: {}", token);
|
||||
requestTemplate.header(CommonConstant.X_ACCESS_TOKEN, token);
|
||||
|
||||
//根据URL地址过滤请求 【字典表参数签名验证】
|
||||
if (PathMatcherUtil.matches(Arrays.asList(SignAuthConfiguration.urlList),requestTemplate.path())) {
|
||||
try {
|
||||
log.info("============================ [begin] fegin api url ============================");
|
||||
log.info(requestTemplate.path());
|
||||
log.info(requestTemplate.method());
|
||||
String queryLine = requestTemplate.queryLine();
|
||||
if(queryLine!=null && queryLine.startsWith("?")){
|
||||
queryLine = queryLine.substring(1);
|
||||
}
|
||||
log.info(queryLine);
|
||||
if(requestTemplate.body()!=null){
|
||||
log.info(new String(requestTemplate.body()));
|
||||
}
|
||||
SortedMap<String, String> allParams = HttpUtils.getAllParams(requestTemplate.path(),queryLine,requestTemplate.body(),requestTemplate.method());
|
||||
String sign = SignUtil.getParamsSign(allParams);
|
||||
log.info(" Feign request params sign: {}",sign);
|
||||
log.info("============================ [end] fegin api url ============================");
|
||||
requestTemplate.header(CommonConstant.X_SIGN, sign);
|
||||
requestTemplate.header(CommonConstant.X_TIMESTAMP, DateUtils.getCurrentTimestamp().toString());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
String token = UserTokenContext.getToken();
|
||||
log.debug("Feign request token: {}", token);
|
||||
requestTemplate.header(CommonConstant.X_ACCESS_TOKEN, token);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Feign 客户端的日志记录,默认级别为NONE
|
||||
* Logger.Level 的具体级别如下:
|
||||
* NONE:不记录任何信息
|
||||
* BASIC:仅记录请求方法、URL以及响应状态码和执行时间
|
||||
* HEADERS:除了记录 BASIC级别的信息外,还会记录请求和响应的头信息
|
||||
* FULL:记录所有请求与响应的明细,包括头信息、请求体、元数据
|
||||
*/
|
||||
@Bean
|
||||
Logger.Level feignLoggerLevel() {
|
||||
return Logger.Level.FULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Feign支持文件上传
|
||||
* @param messageConverters
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
@Primary
|
||||
@Scope("prototype")
|
||||
public Encoder multipartFormEncoder(ObjectFactory<HttpMessageConverters> messageConverters) {
|
||||
return new SpringFormEncoder(new SpringEncoder(messageConverters));
|
||||
}
|
||||
|
||||
// update-begin--Author:sunjianlei Date:20210604 for: 给 Feign 添加 FastJson 的解析支持 ----------
|
||||
@Bean
|
||||
public Encoder feignEncoder() {
|
||||
return new SpringEncoder(feignHttpMessageConverter());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Decoder feignDecoder() {
|
||||
return new SpringDecoder(feignHttpMessageConverter());
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置解码器为fastjson
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private ObjectFactory<HttpMessageConverters> feignHttpMessageConverter() {
|
||||
final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(this.getFastJsonConverter());
|
||||
return () -> httpMessageConverters;
|
||||
}
|
||||
|
||||
private FastJsonHttpMessageConverter getFastJsonConverter() {
|
||||
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
|
||||
|
||||
List<MediaType> supportedMediaTypes = new ArrayList<>();
|
||||
MediaType mediaTypeJson = MediaType.valueOf(MediaType.APPLICATION_JSON_VALUE);
|
||||
supportedMediaTypes.add(mediaTypeJson);
|
||||
converter.setSupportedMediaTypes(supportedMediaTypes);
|
||||
FastJsonConfig config = new FastJsonConfig();
|
||||
config.getSerializeConfig().put(JSON.class, new SwaggerJsonSerializer());
|
||||
config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect);
|
||||
converter.setFastJsonConfig(config);
|
||||
|
||||
return converter;
|
||||
}
|
||||
// update-end--Author:sunjianlei Date:20210604 for: 给 Feign 添加 FastJson 的解析支持 ----------
|
||||
|
||||
}
|
||||
//package org.jeecg.config;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.Arrays;
|
||||
//import java.util.List;
|
||||
//import java.util.SortedMap;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//
|
||||
//import org.jeecg.common.config.mqtoken.UserTokenContext;
|
||||
//import org.jeecg.common.constant.CommonConstant;
|
||||
//import org.jeecg.common.util.DateUtils;
|
||||
//import org.jeecg.common.util.PathMatcherUtil;
|
||||
//import org.jeecg.config.sign.interceptor.SignAuthConfiguration;
|
||||
//import org.jeecg.config.sign.util.HttpUtils;
|
||||
//import org.jeecg.config.sign.util.SignUtil;
|
||||
//import org.springframework.beans.factory.ObjectFactory;
|
||||
//import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
//import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
//import org.springframework.cloud.openfeign.FeignAutoConfiguration;
|
||||
//import org.springframework.cloud.openfeign.support.SpringDecoder;
|
||||
//import org.springframework.cloud.openfeign.support.SpringEncoder;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.context.annotation.Primary;
|
||||
//import org.springframework.context.annotation.Scope;
|
||||
//import org.springframework.http.MediaType;
|
||||
//import org.springframework.web.context.request.RequestContextHolder;
|
||||
//import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
//
|
||||
//import com.alibaba.fastjson.JSON;
|
||||
//import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
//import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||
//import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
||||
//import com.alibaba.fastjson.support.springfox.SwaggerJsonSerializer;
|
||||
//
|
||||
//import feign.Feign;
|
||||
//import feign.Logger;
|
||||
//import feign.RequestInterceptor;
|
||||
//import feign.codec.Decoder;
|
||||
//import feign.codec.Encoder;
|
||||
//import feign.form.spring.SpringFormEncoder;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//
|
||||
///**
|
||||
// * @Description: FeignConfig
|
||||
// * @author: JeecgBoot
|
||||
// */
|
||||
//@ConditionalOnClass(Feign.class)
|
||||
//@AutoConfigureBefore(FeignAutoConfiguration.class)
|
||||
//@Slf4j
|
||||
//@Configuration
|
||||
//public class FeignConfig {
|
||||
//
|
||||
// /**
|
||||
// * 设置feign header参数
|
||||
// * 【X_ACCESS_TOKEN】【X_SIGN】【X_TIMESTAMP】
|
||||
// * @return
|
||||
// */
|
||||
// @Bean
|
||||
// public RequestInterceptor requestInterceptor() {
|
||||
// return requestTemplate -> {
|
||||
// ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
// if (null != attributes) {
|
||||
// HttpServletRequest request = attributes.getRequest();
|
||||
// log.debug("Feign request: {}", request.getRequestURI());
|
||||
// // 将token信息放入header中
|
||||
// String token = request.getHeader(CommonConstant.X_ACCESS_TOKEN);
|
||||
// if(token==null || "".equals(token)){
|
||||
// token = request.getParameter("token");
|
||||
// }
|
||||
// log.info("Feign Login Request token: {}", token);
|
||||
// requestTemplate.header(CommonConstant.X_ACCESS_TOKEN, token);
|
||||
// }else{
|
||||
// //解决后台任务、MQ中调用feign接口,无会话token的问题
|
||||
// String token = UserTokenContext.getToken();
|
||||
// log.info("Feign No Login token: {}", token);
|
||||
// requestTemplate.header(CommonConstant.X_ACCESS_TOKEN, token);
|
||||
// }
|
||||
//
|
||||
// //================================================================================================================
|
||||
// //针对特殊接口,进行加签验证 ——根据URL地址过滤请求 【字典表参数签名验证】
|
||||
// if (PathMatcherUtil.matches(Arrays.asList(SignAuthConfiguration.SIGN_URL_LIST),requestTemplate.path())) {
|
||||
// try {
|
||||
// log.info("============================ [begin] fegin api url ============================");
|
||||
// log.info(requestTemplate.path());
|
||||
// log.info(requestTemplate.method());
|
||||
// String queryLine = requestTemplate.queryLine();
|
||||
// String questionMark="?";
|
||||
// if(queryLine!=null && queryLine.startsWith(questionMark)){
|
||||
// queryLine = queryLine.substring(1);
|
||||
// }
|
||||
// log.info(queryLine);
|
||||
// if(requestTemplate.body()!=null){
|
||||
// log.info(new String(requestTemplate.body()));
|
||||
// }
|
||||
// SortedMap<String, String> allParams = HttpUtils.getAllParams(requestTemplate.path(),queryLine,requestTemplate.body(),requestTemplate.method());
|
||||
// String sign = SignUtil.getParamsSign(allParams);
|
||||
// log.info(" Feign request params sign: {}",sign);
|
||||
// log.info("============================ [end] fegin api url ============================");
|
||||
// requestTemplate.header(CommonConstant.X_SIGN, sign);
|
||||
// requestTemplate.header(CommonConstant.X_TIMESTAMP, DateUtils.getCurrentTimestamp().toString());
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// //================================================================================================================
|
||||
// };
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Feign 客户端的日志记录,默认级别为NONE
|
||||
// * Logger.Level 的具体级别如下:
|
||||
// * NONE:不记录任何信息
|
||||
// * BASIC:仅记录请求方法、URL以及响应状态码和执行时间
|
||||
// * HEADERS:除了记录 BASIC级别的信息外,还会记录请求和响应的头信息
|
||||
// * FULL:记录所有请求与响应的明细,包括头信息、请求体、元数据
|
||||
// */
|
||||
// @Bean
|
||||
// Logger.Level feignLoggerLevel() {
|
||||
// return Logger.Level.FULL;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Feign支持文件上传
|
||||
// * @param messageConverters
|
||||
// * @return
|
||||
// */
|
||||
// @Bean
|
||||
// @Primary
|
||||
// @Scope("prototype")
|
||||
// public Encoder multipartFormEncoder(ObjectFactory<HttpMessageConverters> messageConverters) {
|
||||
// return new SpringFormEncoder(new SpringEncoder(messageConverters));
|
||||
// }
|
||||
//
|
||||
// // update-begin--Author:sunjianlei Date:20210604 for: 给 Feign 添加 FastJson 的解析支持 ----------
|
||||
// /**
|
||||
// * 给 Feign 添加 FastJson 的解析支持
|
||||
// */
|
||||
// @Bean
|
||||
// public Encoder feignEncoder() {
|
||||
// return new SpringEncoder(feignHttpMessageConverter());
|
||||
// }
|
||||
//
|
||||
// @Bean
|
||||
// public Decoder feignDecoder() {
|
||||
// return new SpringDecoder(feignHttpMessageConverter());
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 设置解码器为fastjson
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// private ObjectFactory<HttpMessageConverters> feignHttpMessageConverter() {
|
||||
// final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(this.getFastJsonConverter());
|
||||
// return () -> httpMessageConverters;
|
||||
// }
|
||||
//
|
||||
// private FastJsonHttpMessageConverter getFastJsonConverter() {
|
||||
// FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
|
||||
//
|
||||
// List<MediaType> supportedMediaTypes = new ArrayList<>();
|
||||
// MediaType mediaTypeJson = MediaType.valueOf(MediaType.APPLICATION_JSON_VALUE);
|
||||
// supportedMediaTypes.add(mediaTypeJson);
|
||||
// converter.setSupportedMediaTypes(supportedMediaTypes);
|
||||
// FastJsonConfig config = new FastJsonConfig();
|
||||
// config.getSerializeConfig().put(JSON.class, new SwaggerJsonSerializer());
|
||||
// config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect);
|
||||
// converter.setFastJsonConfig(config);
|
||||
//
|
||||
// return converter;
|
||||
// }
|
||||
// // update-end--Author:sunjianlei Date:20210604 for: 给 Feign 添加 FastJson 的解析支持 ----------
|
||||
//
|
||||
//}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-boot-base-api</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.2.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
package org.jeecg.common.bpm.api;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* 流程接口
|
||||
*
|
||||
* @author scott
|
||||
*/
|
||||
public interface IBpmBaseExtAPI {
|
||||
/**
|
||||
* 23. 流程提交接口(online,自定义开发)
|
||||
* @param flowCode 流程业务关联 例如:joa_leave_01
|
||||
* @param id 表单业务数据data id
|
||||
* @param formUrl 流程审批时附件页面默认展示的PC端表单组件(地址)
|
||||
* @param formUrlMobile 流程审批时附件页面默认展示的移动端表单组件(地址)
|
||||
* @param username 流程发起人账号
|
||||
* @param jsonData Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
Result<String> startMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile, String username, String jsonData) throws Exception;
|
||||
|
||||
/**
|
||||
* 24. 流程提交接口(自定义表单设计器)
|
||||
* @param flowCode 流程业务关联 例如:joa_leave_01
|
||||
* @param id 表单业务数据data id
|
||||
* @param formUrl 流程审批时附件页面默认展示的PC端表单组件(地址)
|
||||
* @param formUrlMobile 流程审批时附件页面默认展示的移动端表单组件(地址)
|
||||
* @param username 流程发起人账号
|
||||
* @param jsonData Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
Result<String> startDesFormMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile, String username, String jsonData) throws Exception;
|
||||
/**
|
||||
* 25. 保存流程草稿箱接口(自定义开发表单、online表单)
|
||||
* @param flowCode 流程业务关联 例如:joa_leave_01
|
||||
* @param id 表单业务数据data id
|
||||
* @param formUrl 流程审批时附件页面默认展示的PC端表单组件(地址) 【非必填】
|
||||
* @param formUrlMobile 流程审批时附件页面默认展示的移动端表单组件(地址) 【非必填】
|
||||
* @param username 流程发起人账号
|
||||
* @param jsonData Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
Result<String> saveMutilProcessDraft(String flowCode, String id, String formUrl, String formUrlMobile, String username, String jsonData) throws Exception;
|
||||
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package org.jeecg.common.online.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 表单设计器【Online】翻译API接口
|
||||
*
|
||||
* @author sunjianlei
|
||||
*/
|
||||
public interface IOnlineBaseExtAPI {
|
||||
|
||||
/**
|
||||
* 【Online】 表单设计器专用:同步新增
|
||||
*/
|
||||
String cgformPostCrazyForm(String tableName, JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* 【Online】 表单设计器专用:同步编辑
|
||||
*/
|
||||
String cgformPutCrazyForm(String tableName, JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* online表单删除数据
|
||||
*
|
||||
* @param cgformCode Online表单code
|
||||
* @param dataIds 数据ID,可逗号分割
|
||||
* @return
|
||||
*/
|
||||
String cgformDeleteDataByCode(String cgformCode, String dataIds);
|
||||
|
||||
/**
|
||||
* 通过online表名查询数据,同时查询出子表的数据
|
||||
*
|
||||
* @param tableName online表名
|
||||
* @param dataIds online数据ID
|
||||
* @return
|
||||
*/
|
||||
JSONObject cgformQueryAllDataByTableName(String tableName, String dataIds);
|
||||
|
||||
/**
|
||||
* 对 cgreportGetData 的返回值做优化,封装 DictModel 集合
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<DictModel> cgreportGetDataPackage(String code, String dictText, String dictCode, String dataList);
|
||||
|
||||
/**
|
||||
* 【cgreport】通过 head code 获取 sql语句,并执行该语句返回查询数据
|
||||
*
|
||||
* @param code 报表Code,如果没传ID就通过code查
|
||||
* @param forceKey
|
||||
* @param dataList
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> cgreportGetData(String code, String forceKey, String dataList);
|
||||
|
||||
}
|
||||
@ -80,14 +80,16 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
|
||||
|
||||
/** 11查询所有的父级字典,按照create_time排序 */
|
||||
/** 11查询所有的父级字典,按照create_time排序
|
||||
* @return List<DictModel> 字典集合
|
||||
*/
|
||||
public List<DictModel> queryAllDict();
|
||||
|
||||
/**
|
||||
* 12查询所有分类字典
|
||||
* @return
|
||||
*/
|
||||
public List<SysCategoryModel> queryAllDSysCategory();
|
||||
public List<SysCategoryModel> queryAllSysCategory();
|
||||
|
||||
|
||||
/**
|
||||
@ -132,6 +134,9 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 19分页查询用户 返回JSONObject
|
||||
* @param userIds 多个用户id
|
||||
* @param pageNo 当前页数
|
||||
* @param pageSize 每页显示条数
|
||||
* @return
|
||||
*/
|
||||
public JSONObject queryAllUser(String userIds, Integer pageNo, Integer pageSize);
|
||||
@ -144,7 +149,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 21获取所有角色 带参
|
||||
* roleIds 默认选中角色
|
||||
* @param roleIds 默认选中角色
|
||||
* @return
|
||||
*/
|
||||
public List<ComboModel> queryAllRole(String[] roleIds );
|
||||
@ -192,7 +197,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 28根据id获取所有参与用户
|
||||
* userIds
|
||||
* @param userIds 多个用户id
|
||||
* @return
|
||||
*/
|
||||
public List<LoginUser> queryAllUserByIds(String[] userIds);
|
||||
@ -207,7 +212,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 30根据name获取所有参与用户
|
||||
* userNames
|
||||
* @param userNames 多个用户账户
|
||||
* @return
|
||||
*/
|
||||
List<LoginUser> queryUserByNames(String[] userNames);
|
||||
@ -236,6 +241,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 34通过部门id获取部门全部信息
|
||||
* @param id 部门id
|
||||
* @return SysDepartModel对象
|
||||
*/
|
||||
SysDepartModel selectAllById(String id);
|
||||
|
||||
@ -284,11 +291,14 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
/**
|
||||
* 41 获取公司下级部门和公司下所有用户信息
|
||||
* @param orgCode
|
||||
* @return List<Map>
|
||||
*/
|
||||
List<Map> getDeptUserByOrgCode(String orgCode);
|
||||
|
||||
/**
|
||||
* 查询分类字典翻译
|
||||
* @param ids 多个分类字典id
|
||||
* @return List<String>
|
||||
*/
|
||||
List<String> loadCategoryDictItem(String ids);
|
||||
|
||||
@ -323,6 +333,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
*
|
||||
* @param dictCode 字典code格式:table,text,code
|
||||
* @param keyword 过滤关键字
|
||||
* @param pageSize 分页条数
|
||||
* @return
|
||||
*/
|
||||
List<DictModel> loadDictItemByKeyword(String dictCode, String keyword, Integer pageSize);
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-boot-base</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.2.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user