Delete SystemAPIController.java

pull/3958/head
JEECG 2022-07-20 18:13:56 +08:00 committed by GitHub
parent 0cbdc092d1
commit 372adbd580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 663 deletions

View File

@ -1,663 +0,0 @@
package org.jeecg.modules.api.controller;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.dto.OnlineAuthDTO;
import org.jeecg.common.api.dto.message.*;
import org.jeecg.common.system.vo.*;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* system
* @author: jeecg-boot
*/
@Slf4j
@RestController
@RequestMapping("/sys/api")
public class SystemApiController {
@Autowired
private SysBaseApiImpl sysBaseApi;
@Autowired
private ISysUserService sysUserService;
/**
*
* @param message 使 category()2
*/
@PostMapping("/sendSysAnnouncement")
public void sendSysAnnouncement(@RequestBody MessageDTO message){
sysBaseApi.sendSysAnnouncement(message);
}
/**
*
* @param message 使
*/
@PostMapping("/sendBusAnnouncement")
public void sendBusAnnouncement(@RequestBody BusMessageDTO message){
sysBaseApi.sendBusAnnouncement(message);
}
/**
*
* @param message 使
*/
@PostMapping("/sendTemplateAnnouncement")
public void sendTemplateAnnouncement(@RequestBody TemplateMessageDTO message){
sysBaseApi.sendTemplateAnnouncement(message);
}
/**
*
* @param message 使
*/
@PostMapping("/sendBusTemplateAnnouncement")
public void sendBusTemplateAnnouncement(@RequestBody BusTemplateMessageDTO message){
sysBaseApi.sendBusTemplateAnnouncement(message);
}
/**
*
* @param templateDTO 使
* @return
*/
@PostMapping("/parseTemplateByCode")
public String parseTemplateByCode(@RequestBody TemplateDTO templateDTO){
return sysBaseApi.parseTemplateByCode(templateDTO);
}
/**
* busTypebusId
*/
@GetMapping("/updateSysAnnounReadFlag")
public void updateSysAnnounReadFlag(@RequestParam("busType") String busType, @RequestParam("busId")String busId){
sysBaseApi.updateSysAnnounReadFlag(busType, busId);
}
/**
*
* @param username
* @return
*/
@GetMapping("/getUserByName")
public LoginUser getUserByName(@RequestParam("username") String username){
return sysBaseApi.getUserByName(username);
}
/**
* id
* @param id
* @return
*/
@GetMapping("/getUserById")
LoginUser getUserById(@RequestParam("id") String id){
return sysBaseApi.getUserById(id);
}
/**
*
* @param username
* @return
*/
@GetMapping("/getRolesByUsername")
List<String> getRolesByUsername(@RequestParam("username") String username){
return sysBaseApi.getRolesByUsername(username);
}
/**
*
* @param username
* @return id
*/
@GetMapping("/getDepartIdsByUsername")
List<String> getDepartIdsByUsername(@RequestParam("username") String username){
return sysBaseApi.getDepartIdsByUsername(username);
}
/**
* name
* @param username
* @return name
*/
@GetMapping("/getDepartNamesByUsername")
List<String> getDepartNamesByUsername(@RequestParam("username") String username){
return sysBaseApi.getDepartNamesByUsername(username);
}
/**
*
* @param code
* @return
*/
@GetMapping("/queryDictItemsByCode")
List<DictModel> queryDictItemsByCode(@RequestParam("code") String code){
return sysBaseApi.queryDictItemsByCode(code);
}
/**
*
* @param code
* @return
*/
@GetMapping("/queryEnableDictItemsByCode")
List<DictModel> queryEnableDictItemsByCode(@RequestParam("code") String code){
return sysBaseApi.queryEnableDictItemsByCode(code);
}
/** 查询所有的父级字典按照create_time排序 */
@GetMapping("/queryAllDict")
List<DictModel> queryAllDict(){
// try{
// //睡10秒gateway网关5秒超时会触发熔断降级操作
// Thread.sleep(10000);
// }catch (Exception e){
// e.printStackTrace();
// }
log.info("--我是jeecg-system服务节点微服务接口queryAllDict被调用--");
return sysBaseApi.queryAllDict();
}
/**
*
* @return
*/
@GetMapping("/queryAllSysCategory")
List<SysCategoryModel> queryAllSysCategory(){
return sysBaseApi.queryAllSysCategory();
}
/**
* id -->value,departName -->text
* @return
*/
@GetMapping("/queryAllDepartBackDictModel")
List<DictModel> queryAllDepartBackDictModel(){
return sysBaseApi.queryAllDepartBackDictModel();
}
/**
*
* roleIds
* @return
*/
@GetMapping("/queryAllRole")
public List<ComboModel> queryAllRole(@RequestParam(name = "roleIds",required = false)String[] roleIds){
if(roleIds==null || roleIds.length==0){
return sysBaseApi.queryAllRole();
}else{
return sysBaseApi.queryAllRole(roleIds);
}
}
/**
* Id
* @param username
* @return
*/
@GetMapping("/getRoleIdsByUsername")
public List<String> getRoleIdsByUsername(@RequestParam("username")String username){
return sysBaseApi.getRoleIdsByUsername(username);
}
/**
* id
* @param orgCode
* @return
*/
@GetMapping("/getDepartIdsByOrgCode")
public String getDepartIdsByOrgCode(@RequestParam("orgCode")String orgCode){
return sysBaseApi.getDepartIdsByOrgCode(orgCode);
}
/**
*
* @return
*/
@GetMapping("/getAllSysDepart")
public List<SysDepartModel> getAllSysDepart(){
return sysBaseApi.getAllSysDepart();
}
/**
* id DynamicDataSourceModel
*
* @param dbSourceId
* @return
*/
@GetMapping("/getDynamicDbSourceById")
DynamicDataSourceModel getDynamicDbSourceById(@RequestParam("dbSourceId")String dbSourceId){
return sysBaseApi.getDynamicDbSourceById(dbSourceId);
}
/**
* Id
* @param deptId
* @return
*/
@GetMapping("/getDeptHeadByDepId")
public List<String> getDeptHeadByDepId(@RequestParam("deptId") String deptId){
return sysBaseApi.getDeptHeadByDepId(deptId);
}
/**
*
* @param departId
* @return
*/
@GetMapping("/getParentDepartId")
public DictModel getParentDepartId(@RequestParam("departId")String departId){
return sysBaseApi.getParentDepartId(departId);
}
/**
* code DynamicDataSourceModel
*
* @param dbSourceCode
* @return
*/
@GetMapping("/getDynamicDbSourceByCode")
public DynamicDataSourceModel getDynamicDbSourceByCode(@RequestParam("dbSourceCode") String dbSourceCode){
return sysBaseApi.getDynamicDbSourceByCode(dbSourceCode);
}
/**
*
* @param userIds
* @param cmd
*/
@GetMapping("/sendWebSocketMsg")
public void sendWebSocketMsg(String[] userIds, String cmd){
sysBaseApi.sendWebSocketMsg(userIds, cmd);
}
/**
* id
* userIds
* @return
*/
@GetMapping("/queryAllUserByIds")
public List<LoginUser> queryAllUserByIds(@RequestParam("userIds") String[] userIds){
return sysBaseApi.queryAllUserByIds(userIds);
}
/**
* ComboModel
* @return
*/
@GetMapping("/queryAllUserBackCombo")
public List<ComboModel> queryAllUserBackCombo(){
return sysBaseApi.queryAllUserBackCombo();
}
/**
* JSONObject
* @return
*/
@GetMapping("/queryAllUser")
public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) int pageSize){
return sysBaseApi.queryAllUser(userIds, pageNo, pageSize);
}
/**
*
* userIds
* @return
* @param userId
*/
@GetMapping("/meetingSignWebsocket")
public void meetingSignWebsocket(@RequestParam("userId")String userId){
sysBaseApi.meetingSignWebsocket(userId);
}
/**
* name
* userNames
* @return
*/
@GetMapping("/queryUserByNames")
public List<LoginUser> queryUserByNames(@RequestParam("userNames")String[] userNames){
return sysBaseApi.queryUserByNames(userNames);
}
/**
*
* @param username
* @return
*/
@GetMapping("/getUserRoleSet")
public Set<String> getUserRoleSet(@RequestParam("username")String username){
return sysBaseApi.getUserRoleSet(username);
}
/**
*
* @param username
* @return
*/
@GetMapping("/getUserPermissionSet")
public Set<String> getUserPermissionSet(@RequestParam("username") String username){
return sysBaseApi.getUserPermissionSet(username);
}
//-----
/**
* online访
* @param onlineAuthDTO
* @return
*/
@PostMapping("/hasOnlineAuth")
public boolean hasOnlineAuth(@RequestBody OnlineAuthDTO onlineAuthDTO){
return sysBaseApi.hasOnlineAuth(onlineAuthDTO);
}
/**
*
* @param username
* @return
*/
@GetMapping("/queryUserRoles")
public Set<String> queryUserRoles(@RequestParam("username") String username){
return sysUserService.getUserRolesSet(username);
}
/**
*
* @param username
* @return
*/
@GetMapping("/queryUserAuths")
public Set<String> queryUserAuths(@RequestParam("username") String username){
return sysUserService.getUserPermissionsSet(username);
}
/**
* id
*/
@GetMapping("/selectAllById")
public SysDepartModel selectAllById(@RequestParam("id") String id){
return sysBaseApi.selectAllById(id);
}
/**
* idids
* @param userId
* @return
*/
@GetMapping("/queryDeptUsersByUserId")
public List<String> queryDeptUsersByUserId(@RequestParam("userId") String userId){
return sysBaseApi.queryDeptUsersByUserId(userId);
}
/**
*
* @return
*/
@GetMapping("/queryPermissionDataRule")
public List<SysPermissionDataRuleModel> queryPermissionDataRule(@RequestParam("component") String component, @RequestParam("requestPath")String requestPath, @RequestParam("username") String username){
return sysBaseApi.queryPermissionDataRule(component, requestPath, username);
}
/**
*
* @param username
* @return
*/
@GetMapping("/getCacheUser")
public SysUserCacheInfo getCacheUser(@RequestParam("username") String username){
return sysBaseApi.getCacheUser(username);
}
/**
*
* @param code
* @param key
* @return
*/
@GetMapping("/translateDict")
public String translateDict(@RequestParam("code") String code, @RequestParam("key") String key){
return sysBaseApi.translateDict(code, key);
}
/**
* 36()
* @param usernames
* @return
*/
@RequestMapping("/queryUsersByUsernames")
List<JSONObject> queryUsersByUsernames(@RequestParam("usernames") String usernames){
return this.sysBaseApi.queryUsersByUsernames(usernames);
}
/**
* 37id()
* @param ids
* @return
*/
@RequestMapping("/queryUsersByIds")
List<JSONObject> queryUsersByIds(@RequestParam("ids") String ids){
return this.sysBaseApi.queryUsersByIds(ids);
}
/**
* 38()
* @param orgCodes
* @return
*/
@GetMapping("/queryDepartsByOrgcodes")
List<JSONObject> queryDepartsByOrgcodes(@RequestParam("orgCodes") String orgCodes){
return this.sysBaseApi.queryDepartsByOrgcodes(orgCodes);
}
/**
* 39ID()
* @param ids
* @return
*/
@GetMapping("/queryDepartsByIds")
List<JSONObject> queryDepartsByIds(@RequestParam("ids") String ids){
return this.sysBaseApi.queryDepartsByIds(ids);
}
/**
* 40
* @param email
* @param title
* @param content
*/
@GetMapping("/sendEmailMsg")
public void sendEmailMsg(@RequestParam("email")String email,@RequestParam("title")String title,@RequestParam("content")String content){
this.sysBaseApi.sendEmailMsg(email,title,content);
};
/**
* 41
* @param orgCode
*/
@GetMapping("/getDeptUserByOrgCode")
List<Map> getDeptUserByOrgCode(@RequestParam("orgCode")String orgCode){
return this.sysBaseApi.getDeptUserByOrgCode(orgCode);
}
/**
*
*
* @param ids id
* @return
*/
@GetMapping("/loadCategoryDictItem")
public List<String> loadCategoryDictItem(@RequestParam("ids") String ids) {
return sysBaseApi.loadCategoryDictItem(ids);
}
/**
* codetext
*
* @param dictCode tableName,text,code
* @param keys key
* @return
*/
@GetMapping("/loadDictItem")
public List<String> loadDictItem(@RequestParam("dictCode") String dictCode, @RequestParam("keys") String keys) {
return sysBaseApi.loadDictItem(dictCode, keys);
}
/**
* code
*
* @param dictCode tableName,text,code
* @param dictCode key
* @return
*/
@GetMapping("/getDictItems")
public List<DictModel> getDictItems(@RequestParam("dictCode") String dictCode) {
return sysBaseApi.getDictItems(dictCode);
}
/**
* code
*
* @param dictCodeList
* @return key = dictCode value=
*/
@RequestMapping("/getManyDictItems")
public Map<String, List<DictModel>> getManyDictItems(@RequestParam("dictCodeList") List<String> dictCodeList) {
return sysBaseApi.getManyDictItems(dictCodeList);
}
/**
*
*
*
* @param dictCode codetable,text,code
* @param keyword
* @return
*/
@GetMapping("/loadDictItemByKeyword")
public List<DictModel> loadDictItemByKeyword(@RequestParam("dictCode") String dictCode, @RequestParam("keyword") String keyword, @RequestParam(value = "pageSize", required = false) Integer pageSize) {
return sysBaseApi.loadDictItemByKeyword(dictCode, keyword, pageSize);
}
/**
* 48 dictCode
* @param dictCodes
* @param keys
* @return
*/
@GetMapping("/translateManyDict")
public Map<String, List<DictModel>> translateManyDict(@RequestParam("dictCodes") String dictCodes, @RequestParam("keys") String keys){
return this.sysBaseApi.translateManyDict(dictCodes, keys);
}
/**
*
* @param table
* @param text
* @param code
* @return
*/
@GetMapping("/queryTableDictItemsByCode")
List<DictModel> queryTableDictItemsByCode(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code){
return sysBaseApi.queryTableDictItemsByCode(table, text, code);
}
/**
*
* @param table
* @param text
* @param code
* @param filterSql
* @return
*/
@GetMapping("/queryFilterTableDictInfo")
List<DictModel> queryFilterTableDictInfo(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("filterSql") String filterSql){
return sysBaseApi.queryFilterTableDictInfo(table, text, code, filterSql);
}
/**
*
* table text code textvalue
* @param table
* @param text
* @param code
* @param keyArray
* @return
*/
@Deprecated
@GetMapping("/queryTableDictByKeys")
public List<String> queryTableDictByKeys(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("keyArray") String[] keyArray){
return sysBaseApi.queryTableDictByKeys(table, text, code, keyArray);
}
/**
*
* @param table
* @param text
* @param code
* @param key
* @return
*/
@GetMapping("/translateDictFromTable")
public String translateDictFromTable(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("key") String key){
return sysBaseApi.translateDictFromTable(table, text, code, key);
}
/**
*
* 49
*
* @param table
* @param text
* @param code
* @param keys
* @return
*/
@GetMapping("/translateDictFromTableByKeys")
public List<DictModel> translateDictFromTableByKeys(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("keys") String keys) {
return this.sysBaseApi.translateDictFromTableByKeys(table, text, code, keys);
}
/**
*
* @param message
*/
@PostMapping("/sendTemplateMessage")
public void sendTemplateMessage(@RequestBody MessageDTO message){
sysBaseApi.sendTemplateMessage(message);
}
/**
*
* @param code
* @return
*/
@GetMapping("/getTemplateContent")
public String getTemplateContent(@RequestParam("code") String code){
return this.sysBaseApi.getTemplateContent(code);
}
}