commit
361ec2dcaf
534 changed files with 19735 additions and 0 deletions
@ -0,0 +1,176 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>admin-biz</artifactId> |
|||
<groupId>com.yxt.admin</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>admin</artifactId> |
|||
|
|||
<properties> |
|||
<maven.compiler.source>8</maven.compiler.source> |
|||
<maven.compiler.target>8</maven.compiler.target> |
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|||
</properties> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.alibaba</groupId> |
|||
<artifactId>easyexcel</artifactId> |
|||
<version>3.3.2</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.yxt</groupId> |
|||
<artifactId>yxt-common-base</artifactId> |
|||
<version>0.0.1</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-openfeign</artifactId> |
|||
</dependency> |
|||
<!--mysql--> |
|||
<dependency> |
|||
<groupId>mysql</groupId> |
|||
<artifactId>mysql-connector-java</artifactId> |
|||
<scope>runtime</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.baomidou</groupId> |
|||
<artifactId>mybatis-plus-boot-starter</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.baomidou</groupId> |
|||
<artifactId>mybatis-plus-annotation</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
<version>1.18.24</version> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.yxt</groupId> |
|||
<artifactId>yxt-common-base</artifactId> |
|||
<version>0.0.1</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-openfeign</artifactId> |
|||
</dependency> |
|||
|
|||
<!--mysql--> |
|||
<dependency> |
|||
<groupId>mysql</groupId> |
|||
<artifactId>mysql-connector-java</artifactId> |
|||
<scope>runtime</scope> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.baomidou</groupId> |
|||
<artifactId>mybatis-plus-boot-starter</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.baomidou</groupId> |
|||
<artifactId>mybatis-plus-annotation</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>junit</groupId> |
|||
<artifactId>junit</artifactId> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
|
|||
<!-- Sa-Token 权限认证,在线文档:https://sa-token.cc --> |
|||
<dependency> |
|||
<groupId>cn.dev33</groupId> |
|||
<artifactId>sa-token-spring-boot-starter</artifactId> |
|||
<version>1.37.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>cn.hutool</groupId> |
|||
<artifactId>hutool-all</artifactId> |
|||
<version>5.8.23</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>cn.hutool</groupId> |
|||
<artifactId>hutool-core</artifactId> |
|||
<version>5.8.23</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.google.zxing</groupId> |
|||
<artifactId>core</artifactId> |
|||
<version>3.5.2</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>io.springfox</groupId> |
|||
<artifactId>springfox-swagger2</artifactId> |
|||
<version>2.9.2</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>io.springfox</groupId> |
|||
<artifactId>springfox-swagger-ui</artifactId> |
|||
<version>2.8.0</version> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<version>2.5.6</version> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>repackage</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
</plugins> |
|||
<resources> |
|||
<resource> |
|||
<directory>src/main/java</directory> |
|||
<includes> |
|||
<include>**/*Mapper.xml</include> |
|||
</includes> |
|||
</resource> |
|||
<resource> |
|||
<directory>src/main/resources</directory> |
|||
<includes> |
|||
<include>**/*.*</include> |
|||
</includes> |
|||
<filtering>false</filtering> |
|||
</resource> |
|||
</resources> |
|||
</build> |
|||
</project> |
@ -0,0 +1,23 @@ |
|||
package com.yxt.admin; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
|||
import org.springframework.cloud.openfeign.EnableFeignClients; |
|||
import org.springframework.scheduling.annotation.EnableScheduling; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date ${DATE} ${TIME} |
|||
*/ |
|||
@SpringBootApplication(scanBasePackages = { |
|||
"com.yxt.common.base.config", |
|||
"com.yxt.admin" |
|||
}) |
|||
@EnableDiscoveryClient |
|||
@EnableScheduling |
|||
@EnableFeignClients |
|||
public class AdminApplication { |
|||
public static void main(String[] args) { |
|||
SpringApplication.run(AdminApplication.class, args); |
|||
}} |
@ -0,0 +1,10 @@ |
|||
package com.yxt.admin.apiadmin; |
|||
|
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
@RestController("com.yxt.admin.apiadmin.AdminHomeRest") |
|||
@RequestMapping("/apiadmin/home") |
|||
public class AdminHomeRest { |
|||
|
|||
} |
@ -0,0 +1,99 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.dictcommon.*; |
|||
import com.yxt.admin.biz.func.dicttype.DictTypeService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/5 21:29 |
|||
* @description |
|||
*/ |
|||
@Slf4j |
|||
@Controller |
|||
@RequestMapping("apiadmin/dictcommons") |
|||
@Api(tags = "数据字典数据项管理") |
|||
public class DictCommonRest { |
|||
|
|||
@Autowired |
|||
private DictTypeService dictTypeService; |
|||
|
|||
@Autowired |
|||
private DictCommonService dictCommonService; |
|||
|
|||
@PostMapping(value = "/save") |
|||
@ResponseBody |
|||
@ApiOperation(value = "数据字典数据项保存") |
|||
ResultBean save(@Valid @RequestBody DictCommonDto dictCommonDto) { |
|||
return dictCommonService.save(dictCommonDto); |
|||
} |
|||
|
|||
@PostMapping("/pageList") |
|||
@ResponseBody |
|||
@ApiOperation(value = "数据字典数据项分页列表") |
|||
ResultBean<PagerVo<DictCommonVo>> pageList(@RequestBody PagerQuery<DictCommonQuery> pagerQuery) { |
|||
return dictCommonService.pageList(pagerQuery); |
|||
} |
|||
|
|||
@PostMapping("/update/{sid}") |
|||
@ResponseBody |
|||
@ApiOperation(value = "数据字典修改后保存") |
|||
ResultBean update(@Valid @RequestBody DictCommonDto dictCommonDto, @ApiParam(value = "数据项sid", required = true) @PathVariable("sid") String sid){ |
|||
|
|||
return dictCommonService.updateBySid(dictCommonDto, sid); |
|||
} |
|||
|
|||
@ResponseBody |
|||
@DeleteMapping("/delete/{sid}") |
|||
@ApiOperation(value = "删除") |
|||
ResultBean delete(@ApiParam(value = "数据项sid", required = true) @PathVariable("sid") String sid){ |
|||
return dictCommonService.del(sid); |
|||
} |
|||
|
|||
@GetMapping("/typeValues") |
|||
@ResponseBody |
|||
@ApiOperation("下拉框的获取") |
|||
ResultBean<List<DictCommonVo>> getTypeValues(@RequestParam("type") String type, @RequestParam(value = "psid", defaultValue = "0")String psid){ |
|||
return dictCommonService.getValue(type,psid); |
|||
} |
|||
|
|||
@ResponseBody |
|||
@GetMapping("/selectBykey/{key}/{type}") |
|||
@ApiOperation(value = "数据字典信息修改时的初始化信息") |
|||
public ResultBean<DictCommonVo> selectBykey(@ApiParam(value = "数据字典key", required = true) @PathVariable("key") String key, @ApiParam(value = "数据字典type", required = true) @PathVariable("type") String type) { |
|||
|
|||
return dictCommonService.selectBykey(key, type); |
|||
} |
|||
|
|||
@GetMapping("/getFirstDictKeyByType") |
|||
@ResponseBody |
|||
@ApiOperation("根据数据字典的key获取第一个值(默认值)") |
|||
ResultBean getFirstDictKeyByType(@RequestParam("dictType") String dictType, @RequestParam("psid") String psid){ |
|||
ResultBean<List<DictCommonVo>> resultBean = getTypeValues(dictType, psid); |
|||
if (resultBean.getSuccess() && resultBean.getData() != null) { |
|||
String dictKey = resultBean.getData().get(0).getDictKey(); |
|||
return new ResultBean().success().setData(dictKey); |
|||
} else { |
|||
return new ResultBean().fail().setData(new DictCommon()); |
|||
} |
|||
} |
|||
|
|||
@GetMapping("/getTypeValueList") |
|||
@ResponseBody |
|||
@ApiOperation("根据分类编码和数据分组查询数据字典") |
|||
ResultBean<List<DictCommonVo>> getTypeValueList(@RequestParam("type")String type,@RequestParam("groupNum")String groupNum){ |
|||
return dictCommonService.getList(type,groupNum); |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.dictcommon.DictCommonService; |
|||
import com.yxt.admin.biz.func.dicttype.*; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.validation.Valid; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/5 22:37 |
|||
* @description |
|||
*/ |
|||
@Slf4j |
|||
@Controller |
|||
@RequestMapping("apiadmin/dicttypes") |
|||
@Api(tags = "数据字典类型管理") |
|||
public class DictTypeRest{ |
|||
|
|||
@Autowired |
|||
private DictTypeService dictTypeService; |
|||
|
|||
|
|||
|
|||
@PostMapping(value = "/save") |
|||
@ResponseBody |
|||
@ApiOperation(value = "数据字典类型保存") |
|||
ResultBean save(@Valid @RequestBody DictTypeDto dictTypeDto){ |
|||
return dictTypeService.save(dictTypeDto); |
|||
} |
|||
@PostMapping("/pageList") |
|||
@ResponseBody |
|||
@ApiOperation(value = "数据字典类型分页列表") |
|||
ResultBean<PagerVo<DictTypeVo>> pageList(@RequestBody PagerQuery<DictTypeQuery> pagerQuery){ |
|||
return dictTypeService.pageList(pagerQuery); |
|||
} |
|||
|
|||
@PostMapping("/update/{sid}") |
|||
@ResponseBody |
|||
@ApiOperation(value = "数据字典类型更新") |
|||
ResultBean update(@RequestBody @Valid DictTypeDto dictTypeDto, @ApiParam(value = "数据字典类型sid", required = true) @PathVariable("sid") String sid){ |
|||
return dictTypeService.updateBySid(dictTypeDto, sid); |
|||
} |
|||
|
|||
@DeleteMapping("/delete/{sid}") |
|||
@ResponseBody |
|||
@ApiOperation(value = "数据字典类型删除") |
|||
ResultBean delete(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid){ |
|||
return dictTypeService.del(sid); |
|||
} |
|||
} |
@ -0,0 +1,33 @@ |
|||
|
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.admin.biz.func.organizationappkey.OrganizationAppKeyQuery; |
|||
import com.yxt.admin.biz.func.organizationappkey.OrganizationAppKeyService; |
|||
import com.yxt.admin.biz.func.organizationappkey.OrganizationAppKeyVo; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2025/1/21 10:42 |
|||
*/ |
|||
@Api(tags = "申请组织appkey") |
|||
@RestController |
|||
@RequestMapping("apiadmin/organizationappkey") |
|||
public class OrganizationAppKeyRest { |
|||
|
|||
@Autowired |
|||
OrganizationAppKeyService organizationAppKeyService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<OrganizationAppKeyVo>> listPage(@RequestBody PagerQuery<OrganizationAppKeyQuery> pq) { |
|||
return organizationAppKeyService.listPageVo(pq); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.admin.biz.func.region.RegionChildTwoVo; |
|||
import com.yxt.admin.biz.func.region.RegionService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Api(tags = "省、市、县") |
|||
@RestController |
|||
@RequestMapping("/apiadmin/regions") |
|||
public class RegionRest { |
|||
|
|||
@Autowired |
|||
private RegionService regionService; |
|||
|
|||
/** |
|||
* 区域获取省 |
|||
* |
|||
* @return 所有省的集合 |
|||
*/ |
|||
@ApiOperation("获取省") |
|||
@ResponseBody |
|||
@GetMapping("/getProvince") |
|||
public ResultBean getProvince() { |
|||
List<RegionChildTwoVo> regionList = regionService.getProvince(); |
|||
return ResultBean.fireSuccess().setData(regionList); |
|||
} |
|||
|
|||
/** |
|||
* 根据省查询该省下所有的市 |
|||
* |
|||
* @param sid 省sid |
|||
* @return 某省下所有的市 |
|||
*/ |
|||
@ApiOperation("根据省sid获取该省的所有市") |
|||
@ResponseBody |
|||
@GetMapping("/getCity") |
|||
public ResultBean getCity(@RequestParam("sid") String sid){ |
|||
List<RegionChildTwoVo> city = regionService.getCity(sid); |
|||
return ResultBean.fireSuccess().setData(city); |
|||
}; |
|||
|
|||
/** |
|||
* 根据市查询该市下的所有县区 |
|||
* |
|||
* @param sid 市sid |
|||
* @return 某市下的所有县区 |
|||
*/ |
|||
@ApiOperation("根据市sid获取该市的所有县区") |
|||
@ResponseBody |
|||
@GetMapping("/getCounty") |
|||
public ResultBean getCounty(@RequestParam("sid") String sid){ |
|||
List<RegionChildTwoVo> county = regionService.getCounty(sid); |
|||
return ResultBean.fireSuccess().setData(county); |
|||
}; |
|||
} |
@ -0,0 +1,62 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.admin.biz.func.sysauthorizegroup.*; |
|||
import com.yxt.admin.utils.OrgPathQuery; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/7/26 17:26 |
|||
*/ |
|||
@Api(tags = "权限组") |
|||
@RestController |
|||
@RequestMapping("apiadmin/sysauthorizegroup") |
|||
public class SysAuthorizeGroupRest { |
|||
@Autowired |
|||
SysAuthorizeGroupService sysAuthorizeGroupService; |
|||
|
|||
@ApiOperation("分页列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysAuthorizeGroupVo>> listPage(@RequestBody PagerQuery<SysAuthorizeGroupQuery> pq) { |
|||
return sysAuthorizeGroupService.listPage(pq); |
|||
} |
|||
@ApiOperation("查询所有的类别") |
|||
@GetMapping("/listAll") |
|||
public ResultBean<List<SysAuthorizeGroup>> listAll() { |
|||
return sysAuthorizeGroupService.listAll(); |
|||
} |
|||
|
|||
@ApiOperation("保存修改") |
|||
@PostMapping("/saveOrUpdate") |
|||
public ResultBean<String> saveOrUpdate(@RequestBody SysAuthorizeGroupDto dto) { |
|||
return sysAuthorizeGroupService.saveOrUpdate(dto); |
|||
} |
|||
|
|||
@ApiOperation("初始化") |
|||
@GetMapping("/initialization/{sid}") |
|||
public ResultBean<SysAuthorizeGroupVo> initialization(@PathVariable("sid") String sid) { |
|||
return sysAuthorizeGroupService.initialization(sid); |
|||
} |
|||
|
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable("sid") String sid) { |
|||
return sysAuthorizeGroupService.delete(sid); |
|||
} |
|||
|
|||
@ApiOperation("根据sid批量删除") |
|||
@DeleteMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
sysAuthorizeGroupService.delAll(sids); |
|||
return rb.success(); |
|||
} |
|||
} |
@ -0,0 +1,188 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.base.utils.StringUtils; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.sysmenu.*; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Project: anrui_admin(门户建设) <br/> |
|||
* File: SysMenuFeignFallback.java <br/> |
|||
* Class: com.yxt.user.biz.sysmenu.SysMenuRest <br/> |
|||
* Description: 菜单表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "菜单表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/sysmenu") |
|||
public class SysMenuRest { |
|||
|
|||
@Autowired |
|||
SysMenuService sysMenuService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysMenuVo>> listPage(@RequestBody PagerQuery<SysMenuQuery> pq) { |
|||
|
|||
return sysMenuService.listPageVo(pq); |
|||
} |
|||
|
|||
/* @Override |
|||
public ResultBean<List<SysMenuVo>> listAll(@RequestBody SysMenuQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SysMenuVo> list = sysMenuService.listAllVo(query); |
|||
return rb.success().setData(list); |
|||
}*/ |
|||
|
|||
/** |
|||
* 菜单列表:根据资源归类 |
|||
* |
|||
* @param query |
|||
* @return |
|||
*/ |
|||
@ApiOperation("菜单列表:根据资源归类") |
|||
@PostMapping("/listAllVoForSource") |
|||
public ResultBean<List<SysMenuTreeVo>> listAllVoForSource(@RequestBody PagerQuery<SysMenuQuery> query){ |
|||
return sysMenuService.listAllVoForSource(query); |
|||
} |
|||
|
|||
/** |
|||
* 菜单列表:根据资源归类 设置功能的url用 |
|||
* @return |
|||
*/ |
|||
@ApiOperation("菜单列表:根据资源归类 设置功能的url用") |
|||
@PostMapping("/getMenusForFunction") |
|||
public ResultBean<List<Map<String,String>>> getMenusForFunction(@RequestBody SysMenuFunctionQuery sysMenuFunctionQuery) { |
|||
return sysMenuService.getMenusForFunction(sysMenuFunctionQuery); |
|||
} |
|||
private void makeMenuListForChildren(SysMenuTreeVo s, List<Map<String,String>> l){ |
|||
List<SysMenuTreeVo> children = s.getChildren(); |
|||
int size = children.size(); |
|||
for (int i=0;i<size;i++){ |
|||
makeMenuListForChildren( children.get(i), l) ; |
|||
} |
|||
String menuUrl = s.getMenuUrl(); |
|||
if(StringUtils.isNotBlank(menuUrl)){ |
|||
Map<String,String> m=new HashMap<>(); |
|||
m.put("name",s.getName()); |
|||
m.put("url",s.getMenuUrl()); |
|||
m.put("sid",s.getSid()); |
|||
l.add(m); |
|||
} |
|||
|
|||
} |
|||
@ApiOperation("根据用户sid查询所有数据列表 ") |
|||
@PostMapping("/sourceMenuTreeByUserSid") |
|||
public ResultBean<List<Map<String, Object>>> sourceMenuTreeByUserSid(@RequestBody SysMenuQuery query){ |
|||
return sysMenuService.sourceMenuTreeByUserSid(query); |
|||
} |
|||
@ApiOperation("根据资源sid查询所有数据列表 ") |
|||
@PostMapping("/sourcemenutree") |
|||
public ResultBean<List<Map<String, Object>>> sourcemenutree(@RequestBody SysMenuQuery query) { |
|||
return sysMenuService.sourcemenutree(query); |
|||
} |
|||
|
|||
@ApiOperation("根据角色sid条件查询所有数据列表") |
|||
@PostMapping("/listAllByRoleSid") |
|||
public ResultBean<List<SysMenuVo>> listAllByRoleSid(@RequestBody SysMenuQuery query) { |
|||
return sysMenuService.listAllByRoleSid(query); |
|||
} |
|||
|
|||
|
|||
public ResultBean<List<SysMenuVo>> list() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
return sysMenuService.listVo(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@Valid @RequestBody SysMenuDto dto) { |
|||
return sysMenuService.saveMenu(dto); |
|||
} |
|||
|
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update/{sid}") |
|||
public ResultBean update(@Valid @RequestBody SysMenuDto dto, @PathVariable("sid") String sid){ |
|||
return sysMenuService.updateBySid(dto, sid); |
|||
} |
|||
|
|||
/** |
|||
* 修改是否可用的状态 |
|||
* |
|||
* @param sid 菜单sid或资源sid |
|||
* @param isEnable 是否可用的状态:1可用,0不可用 |
|||
* @return |
|||
*/ |
|||
@ApiOperation("修改是否可用的状态 ") |
|||
@PostMapping("/updateIsEnable/{sid}/{isEnable}") |
|||
public ResultBean updateIsEnable(@PathVariable("sid") String sid, @PathVariable("isEnable") Integer isEnable) { |
|||
return sysMenuService.updateIsEnable(sid,isEnable); |
|||
} |
|||
|
|||
/* @Override |
|||
public ResultBean del(String ids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
sysMenuService.delByIds(ids); |
|||
return rb.success(); |
|||
}*/ |
|||
/** |
|||
* 根据当前行sid删除菜单 |
|||
* |
|||
* @param sid 菜单sid |
|||
* @return |
|||
*/ |
|||
@ApiOperation("删除记录 根据sid") |
|||
@GetMapping("/delBySids/{sid}") |
|||
public ResultBean delBySids(@PathVariable("sid") String sid) { |
|||
return sysMenuService.delBySids(sid); |
|||
} |
|||
|
|||
/* @Override |
|||
public ResultBean<SysMenuVo> fetch(String id) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
SysMenuVo vo = sysMenuService.fetchByIdVo(id); |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
|
|||
public ResultBean<SysMenuVo> fetchBySid(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
SysMenu sysMenu = sysMenuService.fetchBySid(sid); |
|||
SysMenuVo vo = new SysMenuVo(); |
|||
BeanUtil.copyProperties(sysMenu, vo); |
|||
return rb.success().setData(vo); |
|||
}*/ |
|||
|
|||
@ApiOperation("菜单列表:根据资源归类") |
|||
@PostMapping("/listAllVoForSourceG") |
|||
public ResultBean<List<SysMenuTreeVo>> listAllVoForSourceG(@RequestBody PagerQuery<SysMenuQuery> query){ |
|||
return sysMenuService.listAllVoForSourceG(query); |
|||
} |
|||
@ApiOperation("根据角色sid条件查询所有数据列表") |
|||
@PostMapping("/listAllByRoleSidG") |
|||
public ResultBean<List<SysMenuVo>> listAllByRoleSidG(@RequestBody SysMenuQuery query){ |
|||
return sysMenuService.listAllByRoleSidG(query); |
|||
} |
|||
@ApiOperation("查询按钮的权限") |
|||
@PostMapping("/getButtonPermissions") |
|||
public ResultBean<List<ButtonPermissionVo>> getButtonPermissions(@RequestBody ButtonPermissionQuery query){ |
|||
return sysMenuService.getButtonPermissions(query); |
|||
} |
|||
} |
@ -0,0 +1,116 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.sysmenurole.*; |
|||
import com.yxt.admin.biz.func.sysrole.SysRoleService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRoleFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.sysmenurole.SysMenuRoleRest <br/> |
|||
* Description: 菜单与角色关联表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "菜单与角色关联表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/sysmenurole") |
|||
public class SysMenuRoleRest { |
|||
@Autowired |
|||
private SysMenuRoleService sysMenuRoleService; |
|||
@Autowired |
|||
private SysRoleService sysRoleService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysMenuRoleVo>> listPage(@RequestBody PagerQuery<SysMenuRoleQuery> pq){ |
|||
return sysMenuRoleService.listPageVo(pq); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据条件查询所有数据列表") |
|||
@PostMapping("/listAll") |
|||
public ResultBean<List<SysMenuRoleVo>> listAll(@RequestBody SysMenuRoleQuery query){ |
|||
return sysMenuRoleService.listAllVo(query); |
|||
} |
|||
|
|||
@ApiOperation("根据角色查询授权的菜单列表(PC)") |
|||
@PostMapping("/selMenuByRole") |
|||
public ResultBean<List<SysMenuRoleDataVo>> selMenuByRole(@RequestBody SysMenuRoleDataQuery query) { |
|||
return sysMenuRoleService.selMenuByRole(query); |
|||
} |
|||
|
|||
@ApiOperation("根据角色查询授权的菜单列表(APP)") |
|||
@PostMapping("/selMenuByRoleApp") |
|||
public ResultBean<List<SysMenuRoleDataVo>> selMenuByRoleApp(@RequestBody SysMenuRoleDataQuery query) { |
|||
return sysMenuRoleService.selMenuByRoleApp(query); |
|||
} |
|||
|
|||
@ApiOperation("修改角色菜单的数据权限(PC)") |
|||
@PostMapping("/updateDataByRoleMenu") |
|||
public ResultBean updateDataByRoleMenu(@RequestBody List<SysMenuRoleDataDto> dtos) { |
|||
return sysMenuRoleService.updateDataByRoleMenu(dtos); |
|||
} |
|||
|
|||
@ApiOperation("修改角色菜单的数据权限(移动端)") |
|||
@PostMapping("/updateDataByRoleMenuApp") |
|||
public ResultBean updateDataByRoleMenuApp(@RequestBody List<SysMenuRoleDataDto> dtos) { |
|||
return sysMenuRoleService.updateDataByRoleMenuApp(dtos); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("所有数据列表") |
|||
@GetMapping("/list") |
|||
public ResultBean<List<SysMenuRoleVo>> list(){ |
|||
return sysMenuRoleService.listVo(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody SysMenuRoleDto dto){ |
|||
return sysMenuRoleService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update/{sid}") |
|||
public ResultBean update(@RequestBody SysMenuRoleDto dto,@PathVariable("sid") String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
return sysMenuRoleService.updateBySid(dto,sid); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("修改角色的菜单配置") |
|||
@PostMapping("/updateRoleAndMenu") |
|||
public ResultBean updateRoleAndMenu(@RequestBody SysMenuRoleDto dto) { |
|||
|
|||
return sysMenuRoleService.updateRoleAndMenu(dto); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("删除记录") |
|||
@GetMapping("/del/{ids}") |
|||
public ResultBean del(@PathVariable("ids") String ids){ |
|||
return sysMenuRoleService.del(ids); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("获取一条记录") |
|||
@GetMapping("/fetch/{id}") |
|||
public ResultBean<SysMenuRoleVo> fetch(@PathVariable("id") String id){ |
|||
return sysMenuRoleService.fetchByIdVo(id); |
|||
} |
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.admin.biz.func.sysorgauthorize.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/5/16 11:32 |
|||
*/ |
|||
@Api(tags = "组织授权表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/sysorgauthorize") |
|||
public class SysOrgAuthorizeRest { |
|||
@Autowired |
|||
SysOrgAuthorizeService sysOrgAuthorizeService; |
|||
|
|||
@ApiOperation("分页列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysOrgAuthorizeVo>> listPage(@RequestBody PagerQuery<SysOrgAuthorizeQuery> pq) { |
|||
return sysOrgAuthorizeService.listPage(pq); |
|||
} |
|||
@ApiOperation("查询所有的类别") |
|||
@GetMapping("/listAll") |
|||
public ResultBean<List<SysOrgAuthorize>> listAll() { |
|||
return sysOrgAuthorizeService.listAll(); |
|||
} |
|||
|
|||
@ApiOperation("保存修改") |
|||
@PostMapping("/saveOrUpdate") |
|||
public ResultBean<String> saveOrUpdate(@RequestBody SysOrgAuthorizeDto dto) { |
|||
return sysOrgAuthorizeService.saveOrUpdate(dto); |
|||
} |
|||
|
|||
@ApiOperation("初始化") |
|||
@GetMapping("/initialization/{sid}") |
|||
public ResultBean<SysOrgAuthorizeVo> initialization(@PathVariable("sid") String sid) { |
|||
return sysOrgAuthorizeService.initialization(sid); |
|||
} |
|||
|
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable("sid") String sid) { |
|||
return sysOrgAuthorizeService.delete(sid); |
|||
} |
|||
|
|||
@ApiOperation("根据sid批量删除") |
|||
@DeleteMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
sysOrgAuthorizeService.delAll(sids); |
|||
return rb.success(); |
|||
} |
|||
@ApiOperation("获取注册信息") |
|||
@GetMapping("/getRegistrationInformation/{sid}") |
|||
public ResultBean getRegistrationInformation(@PathVariable("sid") String sid){ |
|||
return sysOrgAuthorizeService.getRegistrationInformation(sid); |
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.admin.biz.func.sysorgregister.SysOrgRegisterDto; |
|||
import com.yxt.admin.biz.func.sysorgregister.SysOrgRegisterService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/7/26 17:26 |
|||
*/ |
|||
@Api(tags = "组织授权表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/sysorgregister") |
|||
public class SysOrgRegisterRest { |
|||
@Autowired |
|||
SysOrgRegisterService sysOrgRegisterService; |
|||
@ApiOperation("保存") |
|||
@PostMapping("/save") |
|||
public ResultBean<String> saveOrUpdate(@RequestBody List<SysOrgRegisterDto> dtos) { |
|||
return sysOrgRegisterService.saveOrUpdate(dtos); |
|||
} |
|||
} |
@ -0,0 +1,269 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.base.config.RedisUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.sysorganization.*; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.cloud.openfeign.SpringQueryMap; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysOrganizationFeignFallback.java <br/> |
|||
* Class: SysOrganizationRest <br/> |
|||
* Description: 组织机构表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "组织机构表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/sysorganization") |
|||
public class SysOrganizationRest { |
|||
|
|||
@Autowired |
|||
private SysOrganizationService sysOrganizationService; |
|||
|
|||
@Autowired |
|||
private RedisUtil redisUtil; |
|||
|
|||
@PostMapping("/saveSysOrg") |
|||
public ResultBean saveOrg(@RequestBody SysOrganizationDto dto){ |
|||
return sysOrganizationService.saveOrg(dto); |
|||
} |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysOrganizationVo>> listPage(@RequestBody PagerQuery<SysOrganizationQuery> pq) { |
|||
return sysOrganizationService.listPageVo(pq); |
|||
} |
|||
|
|||
@ApiOperation("根据条件查询所有数据列表") |
|||
@PostMapping("/listAll") |
|||
public ResultBean<List<SysOrganizationVo>> listAll(@RequestBody SysOrganizationQuery query) { |
|||
return sysOrganizationService.listAllVo(query); |
|||
} |
|||
|
|||
@ApiOperation("所有数据列表") |
|||
@GetMapping("/list/{orgSid}") |
|||
public ResultBean<List<SysOrganizationVo>> list(@PathVariable("orgSid") String orgSid) { |
|||
return sysOrganizationService.listVo(orgSid); |
|||
} |
|||
|
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody SysOrganizationDto dto) { |
|||
return sysOrganizationService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("一级组织机构列表") |
|||
@GetMapping("/selectFirstOrgList") |
|||
public ResultBean<List<SysOrganizationVo>> selectFirstOrgList(){ |
|||
return sysOrganizationService.selectFirstOrgList(); |
|||
} |
|||
|
|||
@ApiOperation("根据父级sid查询子集列表") |
|||
@GetMapping("/selectChildrenListBySid/{sid}") |
|||
public ResultBean<List<SysOrganizationVo>> selectChildrenListBySid(@PathVariable("sid") String sid) { |
|||
return sysOrganizationService.selectChildrenListBySid(sid); |
|||
} |
|||
|
|||
|
|||
@Transactional(rollbackFor = Exception.class) |
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update/{sid}") |
|||
public ResultBean update(@RequestBody SysOrganizationDto dto, @PathVariable("sid") String sid){ |
|||
return sysOrganizationService.updateBySid(dto, sid); |
|||
} |
|||
|
|||
@ApiOperation("删除记录") |
|||
@GetMapping("/del/{ids}") |
|||
public ResultBean del(@PathVariable("ids") String ids){ |
|||
return sysOrganizationService.del(ids); |
|||
} |
|||
|
|||
@ApiOperation("删除记录 根据sid") |
|||
@GetMapping("/delBySid/{sid}") |
|||
public ResultBean delBySid(@PathVariable("sid") String sid){ |
|||
|
|||
return sysOrganizationService.deIds(sid); |
|||
} |
|||
|
|||
@ApiOperation("获取一条记录") |
|||
@GetMapping("/fetch/{id}") |
|||
public ResultBean<SysOrganizationVo> fetch(@PathVariable("id") String id){ |
|||
return sysOrganizationService.fetchByIdVo(id); |
|||
} |
|||
|
|||
@ApiOperation("获取一条记录 根据sid") |
|||
@ResponseBody |
|||
@GetMapping("/fetchBySid/{sid}") |
|||
public ResultBean<SysOrganizationVo> fetchBySid(@PathVariable("sid") String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
|
|||
return sysOrganizationService.fetchBySidVo(sid); |
|||
} |
|||
|
|||
@ApiOperation("手机获取组织架构") |
|||
@ResponseBody |
|||
@GetMapping("/selectAppOrganization") |
|||
public ResultBean<Map<String, Object>> selectAppOrganization(@RequestParam(value = "sid", required = false) String sid) { |
|||
return sysOrganizationService.selectAppOrganization(sid); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("组织架构") |
|||
@ResponseBody |
|||
@GetMapping("/selectListOrg") |
|||
ResultBean<List<SysOrgVo>> selectListOrg(){ |
|||
return sysOrganizationService.treeList(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("获取到分公司") |
|||
@ResponseBody |
|||
@GetMapping("/getListOrg") |
|||
ResultBean<List<SysOrgVo>> getListOrg(){ |
|||
return sysOrganizationService.getListOrg(); |
|||
} |
|||
|
|||
@ApiOperation("获取同品牌下分公司") |
|||
@ResponseBody |
|||
@GetMapping("/getListOrgByBrand/{orgSid}") |
|||
ResultBean<List<SysOrgVo>> getListOrgByBrand(@PathVariable(value = "orgSid") String orgSid){ |
|||
return null;//sysOrganizationService.getListOrgByBrand(orgSid);
|
|||
} |
|||
|
|||
@ApiOperation("获取指定品牌下分公司(已筛选本分公司)") |
|||
@ResponseBody |
|||
@GetMapping("/getListOrgByBrandSid/{orgSid}/{brandSid}") |
|||
ResultBean<List<SysOrgVo>> getListOrgByBrandSid(@PathVariable(value = "orgSid") String orgSid,@PathVariable(value = "brandSid") String brandSid){ |
|||
return null;//sysOrganizationService.getListOrgByBrandSid(orgSid,brandSid);
|
|||
} |
|||
|
|||
@ApiOperation("获取指定品牌下分公司(未筛选本分公司)") |
|||
@ResponseBody |
|||
@GetMapping("/getListOrgByBrandSidNo/{orgSid}/{brandSid}") |
|||
ResultBean<List<SysOrgVo>> getListOrgByBrandSidNo(@PathVariable(value = "orgSid") String orgSid,@PathVariable(value = "brandSid") String brandSid){ |
|||
return null;//sysOrganizationService.getListOrgByBrandSidNo(orgSid,brandSid);
|
|||
} |
|||
|
|||
@ApiOperation("获取指定分公司下部门信息") |
|||
@ResponseBody |
|||
@GetMapping("/getListDeptByOrgSid/{orgSid}") |
|||
ResultBean<List<SysOrgVo>> getListDeptByOrgSid(@PathVariable(value = "orgSid") String orgSid){ |
|||
return sysOrganizationService.getListDeptByOrgSid(orgSid); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据业务员sid获取到分公司") |
|||
@ResponseBody |
|||
@GetMapping("/getUseOrgByUserSid") |
|||
ResultBean<SysOrganizationVo> getUseOrgByUserSid(@RequestParam("userSid") String userSid){ |
|||
ResultBean<SysOrganizationVo> rb = ResultBean.fireFail(); |
|||
SysOrganizationVo vo = sysOrganizationService.getUseOrgByUserSid(userSid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据部门sid查询组织信息") |
|||
@ResponseBody |
|||
@GetMapping("/selectBySid") |
|||
ResultBean<SysOrganization> selectBySid(@RequestParam("sid") String sid){ |
|||
return sysOrganizationService.selectBySid(sid); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据组织架构sid查询组织下所有分公司") |
|||
@ResponseBody |
|||
@GetMapping("/selectUseOrgSidBySid") |
|||
ResultBean<List<Map<String, String>>> selectUseOrgSidBySid(@RequestParam("sid") String sid){ |
|||
return sysOrganizationService.selectUseOrgSidBySid(sid); |
|||
} |
|||
|
|||
/** |
|||
* 查询公司所有的部门 |
|||
* |
|||
* @return |
|||
*/ |
|||
@ApiOperation("所在部门下拉") |
|||
@ResponseBody |
|||
@GetMapping("/selectListOne") |
|||
ResultBean<List<SysOrgListVo>> selectListOne(){ |
|||
return sysOrganizationService.selectListOne(); |
|||
} |
|||
|
|||
@PostMapping("/getQrCode/{sid}") |
|||
@ResponseBody |
|||
@ApiOperation("查看二维码") |
|||
public ResultBean<QrCodeVo> getQrCode(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid) { |
|||
return sysOrganizationService.getQrCode(sid); |
|||
} |
|||
|
|||
|
|||
@GetMapping("/getOrgSid/{sid}") |
|||
@ResponseBody |
|||
@ApiOperation("根据当前用户的所在组织获取当前用户所在的分公司") |
|||
ResultBean<String> getOrgSid(@PathVariable(value = "sid") String sid){ |
|||
return sysOrganizationService.getOrgSid(sid); |
|||
} |
|||
|
|||
@GetMapping("/selectOrgList") |
|||
@ResponseBody |
|||
@ApiOperation("当前分公司销售部门及部门人员") |
|||
ResultBean<List<SysOrganizationListVo>> selectOrgList(@SpringQueryMap SysOrganizationListQuery query){ |
|||
return sysOrganizationService.selectOrgList(query); |
|||
} |
|||
|
|||
|
|||
@GetMapping("/selectOrgLists") |
|||
@ResponseBody |
|||
@ApiOperation("当前分公司下所有部门") |
|||
ResultBean<List<SysOrganizationListsVo>> selectOrgLists(@SpringQueryMap SysOrganizationListQuery query){ |
|||
return sysOrganizationService.selectOrgLists(query); |
|||
} |
|||
|
|||
|
|||
@GetMapping("/selectByPSid") |
|||
@ResponseBody |
|||
@ApiOperation("查询分公司下的销售支持部") |
|||
ResultBean<SysOrganizationVo> selectByPSid(@RequestParam("sid") String sid, @RequestParam("name") String name){ |
|||
return sysOrganizationService.selectByPSid(sid,name); |
|||
} |
|||
|
|||
@GetMapping("/selectOrgSidList") |
|||
@ResponseBody |
|||
@ApiOperation("所有分公司sid") |
|||
ResultBean<List<SysOrganizationVo>> selectOrgSidList() { |
|||
return sysOrganizationService.selectOrgSidList(); |
|||
} |
|||
|
|||
|
|||
@GetMapping("/selectOrgByPSid") |
|||
@ResponseBody |
|||
@ApiOperation("查询事业部下所有分公司") |
|||
ResultBean<List<SysOrganizationVo>> selectOrgByPSid(@RequestParam("psid") String psid){ |
|||
return sysOrganizationService.selectOrgByPSid(psid); |
|||
} |
|||
|
|||
|
|||
@GetMapping("/selectByOrgSidPath") |
|||
@ResponseBody |
|||
@ApiOperation("组织层级分页查询") |
|||
ResultBean<SysOrganizationVo> selectByOrgSidPath(@RequestParam("orgSidPath") String orgSidPath){ |
|||
return sysOrganizationService.selectByOrgSidPath(orgSidPath); |
|||
} |
|||
} |
@ -0,0 +1,119 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.syspost.*; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysPostFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.syspost.SysPostRest <br/> |
|||
* Description: 岗位. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "岗位") |
|||
@RestController |
|||
@RequestMapping("apiadmin/syspost") |
|||
public class SysPostRest { |
|||
|
|||
@Autowired |
|||
private SysPostService sysPostService; |
|||
|
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysPostVo>> listPage(@RequestBody PagerQuery<SysPostQuery> pq) { |
|||
return sysPostService.listPageVo(pq); |
|||
} |
|||
|
|||
@ApiOperation("根据条件查询所有数据列表") |
|||
@PostMapping("/listAll") |
|||
public ResultBean<List<SysPostVo>> listAll(@RequestBody SysPostQuery query){ |
|||
return sysPostService.listAllVo(query); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("所有数据列表") |
|||
@GetMapping("/list") |
|||
public ResultBean<List<SysPostVo>> list() { |
|||
return sysPostService.listVo(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody SysPostDto dto){ |
|||
return sysPostService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update/{sid}") |
|||
public ResultBean update(@RequestBody SysPostDto dto, @PathVariable("sid") String sid){ |
|||
return sysPostService.updateBySid(dto, sid); |
|||
} |
|||
|
|||
@ApiOperation("删除记录") |
|||
@GetMapping("/del/{ids}") |
|||
public ResultBean del(@PathVariable("ids") String ids){ |
|||
return sysPostService.del(ids); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("删除记录") |
|||
@GetMapping("/delBySids/{sids}") |
|||
public ResultBean delBySids(@PathVariable("sids") String sids){ |
|||
return sysPostService.delBySids(sids); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("获取一条记录") |
|||
@GetMapping("/fetch/{id}") |
|||
public ResultBean<SysPostVo> fetch(@PathVariable("id") String id){ |
|||
return sysPostService.fetchByIdVo(id); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("获取一条记录") |
|||
@GetMapping("/fetchBySid/{sid}") |
|||
public ResultBean<SysPostVo> fetchBySid(@PathVariable("sid") String sid){ |
|||
return sysPostService.fetchBySidVo(sid); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据部门sid获取岗位列表") |
|||
@GetMapping("/fetchByOrgSid/{orgSid}") |
|||
public ResultBean<List<SysPostVo>> fetchByOrgSid(@PathVariable("orgSid") String orgSid){ |
|||
return sysPostService.fetchByOrgSid(orgSid); |
|||
} |
|||
|
|||
@ApiOperation("根据部门sid获取岗位编号") |
|||
@GetMapping("/fetchByOrgSidPostCode/{orgSid}") |
|||
public ResultBean<String> fetchByOrgSidPostCode(){ |
|||
return sysPostService.fetchByOrgSidPostCode(); |
|||
} |
|||
|
|||
/** |
|||
* 查询岗位列表 |
|||
* |
|||
* @return |
|||
*/ |
|||
@ApiOperation("查询岗位列表") |
|||
@GetMapping("/selectList") |
|||
public ResultBean<List<SysPostListVo>> selectList() { |
|||
return sysPostService.selectList(); |
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.admin.biz.func.sysroleauthorize.SysRoleAuthorizeDto; |
|||
import com.yxt.admin.biz.func.sysroleauthorize.SysRoleAuthorizeService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/5/15 16:00 |
|||
*/ |
|||
@Api(tags = "角色授权表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/sysroleauthorize") |
|||
public class SysRoleAuthorizeRest { |
|||
@Autowired |
|||
SysRoleAuthorizeService sysRoleAuthorizeService; |
|||
@ApiOperation("修改角色的菜单配置") |
|||
@PostMapping("/updateRoleAndMenu") |
|||
public ResultBean updateRoleAndMenu(@RequestBody SysRoleAuthorizeDto dto){ |
|||
return sysRoleAuthorizeService.updateRoleAndMenu(dto); |
|||
} |
|||
@ApiOperation("修改角色的菜单配置(管理后台)") |
|||
@PostMapping("/updateRoleAndMenuAdmin") |
|||
public ResultBean updateRoleAndMenuAdmin(@RequestBody List<SysRoleAuthorizeDto> dtos){ |
|||
return sysRoleAuthorizeService.updateRoleAndMenuAdmin(dtos); |
|||
} |
|||
} |
@ -0,0 +1,117 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.sysrole.SysRoleDto; |
|||
import com.yxt.admin.biz.func.sysrole.SysRoleQuery; |
|||
import com.yxt.admin.biz.func.sysrole.SysRoleService; |
|||
import com.yxt.admin.biz.func.sysrole.SysRoleVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysRoleFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.sysrole.SysRoleRest <br/> |
|||
* Description: 角色. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "角色") |
|||
@RestController |
|||
@RequestMapping("apiadmin/sysrole") |
|||
public class SysRoleRest { |
|||
|
|||
@Autowired |
|||
private SysRoleService sysRoleService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysRoleVo>> listPage(@RequestBody PagerQuery<SysRoleQuery> pq){ |
|||
return sysRoleService.listPageVo(pq); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据条件查询所有数据列表") |
|||
@PostMapping("/listAll") |
|||
public ResultBean<List<SysRoleVo>> listAll(@RequestBody SysRoleQuery query){ |
|||
return sysRoleService.listAllVo(query); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("查询所有的角色数据,并根据用户sid查询被选中的角色") |
|||
@PostMapping("/listAllByUserSid/{userSid}/{orgSid}") |
|||
public ResultBean<List<SysRoleVo>> listAllByUserSid(@PathVariable("userSid") String userSid,@PathVariable("orgSid") String orgSid){ |
|||
return sysRoleService.listAllByUserSid(userSid,orgSid); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据用户sid查询用户的角色列表") |
|||
@PostMapping("/fetchByUserSid/{userSid}") |
|||
public ResultBean<List<SysRoleVo>> fetchByUserSid(@PathVariable("userSid") String userSid){ |
|||
return sysRoleService.fetchByUserSid(userSid); |
|||
} |
|||
|
|||
|
|||
public ResultBean<List<SysRoleVo>> list(){ |
|||
return sysRoleService.listVo(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody SysRoleDto dto){ |
|||
return sysRoleService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update/{sid}") |
|||
public ResultBean update(@RequestBody SysRoleDto dto,@PathVariable("sid") String sid){ |
|||
return sysRoleService.updateBySid(dto,sid); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("删除记录") |
|||
@GetMapping("/del/{ids}") |
|||
public ResultBean del(@PathVariable("ids") String ids){ |
|||
return sysRoleService.del(ids); |
|||
} |
|||
|
|||
@ApiOperation("删除记录根据sids") |
|||
@GetMapping("/delBySids/{sids}") |
|||
public ResultBean delBySids(@PathVariable("sids") String sids){ |
|||
return sysRoleService.delBySid(sids); |
|||
} |
|||
|
|||
@ApiOperation("获取一条记录") |
|||
@GetMapping("/fetch/{id}") |
|||
public ResultBean<SysRoleVo> fetch(@PathVariable("id") String id){ |
|||
return sysRoleService.fetchByIdVo(id); |
|||
} |
|||
|
|||
@ApiOperation("获取一条记录根据sid") |
|||
@GetMapping("/fetchBySid/{sid}") |
|||
public ResultBean<SysRoleVo> fetchBySid(@PathVariable("sid") String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
return sysRoleService.fetchBySidVo(sid); |
|||
} |
|||
|
|||
@PostMapping("/setIsEnable/{sid}/{isEnable}") |
|||
@ResponseBody |
|||
@ApiOperation(value = "设置是否可用:isEnable:1可用,0不可用") |
|||
public ResultBean setIsEnable(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid, @ApiParam(value = "isEnable", required = true) @PathVariable("isEnable") String isEnable){ |
|||
return sysRoleService.updateIsEnable(sid, isEnable); |
|||
} |
|||
} |
@ -0,0 +1,100 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
//import com.yxt.user.biz.systemlog.SystemLog;
|
|||
|
|||
import com.yxt.admin.feign.portal.syssource.SysSourceFeign; |
|||
import com.yxt.common.base.config.RedisUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.syssource.*; |
|||
import com.yxt.admin.biz.func.sysuser.SysUserService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysSourceFeignFallback.java <br/> |
|||
* Class: com.yxt.user.biz.syssource.SysSourceRest <br/> |
|||
* Description: 资源表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "资源表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/syssource") |
|||
public class SysSourceRest { |
|||
|
|||
@Autowired |
|||
private SysSourceFeign sysSourceFeign; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysSourceVo>> listPage(@RequestBody PagerQuery<SysSourceQuery> pq){ |
|||
return sysSourceFeign.listPage(pq); |
|||
} |
|||
|
|||
@ApiOperation("根据条件查询所有数据列表") |
|||
@PostMapping("/listAll") |
|||
public ResultBean<List<SysSourceVo>> listAll(@RequestBody SysSourceQuery query){ |
|||
return sysSourceFeign.listAll(query); |
|||
} |
|||
|
|||
@ApiOperation("根据角色sid条件查询所有数据列表") |
|||
@PostMapping("/listAllByRoleSid") |
|||
public ResultBean<List<SysSourceVo>> listAllByRoleSid(@RequestBody SysSourceQuery query) { |
|||
return sysSourceFeign.listAllByRoleSid(query); |
|||
} |
|||
|
|||
@ApiOperation("所有数据列表") |
|||
@GetMapping("/list") |
|||
public ResultBean<List<SysSourceVo>> list(){ |
|||
return sysSourceFeign.list(); |
|||
} |
|||
|
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody SysSourceDto dto){ |
|||
return sysSourceFeign.save(dto); |
|||
} |
|||
|
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update/{sid}") |
|||
public ResultBean update(SysSourceDto dto,String sid){ |
|||
return sysSourceFeign.update(dto,sid); |
|||
} |
|||
|
|||
@ApiOperation("删除记录") |
|||
@DeleteMapping("/del/{ids}") |
|||
public ResultBean del(@PathVariable("ids") String ids){ |
|||
return sysSourceFeign.del(ids); |
|||
} |
|||
|
|||
@ApiOperation("删除记录 根据sid") |
|||
@DeleteMapping("/delBySids/{sids}") |
|||
public ResultBean delBySids(@PathVariable("sids") String sids) { |
|||
return sysSourceFeign.delBySids(sids); |
|||
} |
|||
|
|||
@ApiOperation("获取一条记录") |
|||
@GetMapping("/fetch/{id}") |
|||
public ResultBean<SysSourceVo> fetch( @PathVariable("id")String id){ |
|||
return sysSourceFeign.fetch(id); |
|||
} |
|||
|
|||
@ApiOperation("获取一条记录 根据sid") |
|||
@GetMapping("/fetchBySid/{sid}") |
|||
public ResultBean<SysSourceVo> fetchBySid(@PathVariable("ids")String sid) { |
|||
return sysSourceFeign.fetchBySid(sid); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.admin.biz.func.sysstafforg.SysStaffOrgByUserVo; |
|||
import com.yxt.admin.biz.func.sysstafforg.SysStaffOrgService; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
@RestController |
|||
@RequestMapping("/apiadmin/sysstafforg") |
|||
public class SysStaffOrgRest { |
|||
|
|||
@Autowired |
|||
private SysStaffOrgService sysStaffOrgService; |
|||
|
|||
@GetMapping("/getOrgSidByPath") |
|||
@ResponseBody |
|||
@ApiOperation("根据用户组织全路径获取用户的分公司sid") |
|||
ResultBean<String> getOrgSidByPath(@RequestParam("orgPath") String orgPath){ |
|||
return sysStaffOrgService.getOrgSidByPath(orgPath); |
|||
} |
|||
|
|||
@GetMapping("/selAllByOrgSidPath") |
|||
@ResponseBody |
|||
@ApiOperation("根据组织全路径查询当前部门下的所有员工") |
|||
public ResultBean<List<SysStaffOrgByUserVo>> selAllByOrgSidPath(String orgSidPath) { |
|||
return sysStaffOrgService.selAllByOrgSidPath(orgSidPath); |
|||
} |
|||
} |
@ -0,0 +1,196 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.sysstaffinfo.*; |
|||
import com.yxt.admin.biz.func.sysstaffinfo.app.AppSysStaffQuery; |
|||
import com.yxt.admin.biz.func.sysstaffinfo.app.AppSysStaffVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysStaffinfoFeignFallback.java <br/> |
|||
* Class: com.yxt.user.biz.sysstaffinfo.SysStaffinfoRest <br/> |
|||
* Description: 人员基础信息表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "人员基础信息表") |
|||
@RestController |
|||
@RequestMapping("/apiadmin/sysstaffinfo") |
|||
public class SysStaffinfoRest { |
|||
|
|||
|
|||
|
|||
@Autowired |
|||
private SysStaffinfoService sysStaffinfoService; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 员工管理的分页列表 |
|||
* |
|||
* @param pq 查询条件 |
|||
* @return |
|||
*/ |
|||
@ApiOperation("员工管理分页列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysStaffinfoVo>> listPage(@RequestBody PagerQuery<SysStaffinfoQuery> pq) { |
|||
return sysStaffinfoService.pagerList(pq); |
|||
} |
|||
|
|||
/** |
|||
* 员工信息的新增保存 |
|||
* |
|||
* @param dto 数据传输对象 |
|||
* @return |
|||
*/ |
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody SysStaffinfoDto dto) { |
|||
return sysStaffinfoService.saveStaffInfo(dto); |
|||
} |
|||
|
|||
/** |
|||
* 员工信息的修改保存 |
|||
* |
|||
* @param dto 数据传输对象 |
|||
* @param sid 员工信息sid |
|||
* @return |
|||
*/ |
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update/{sid}") |
|||
public ResultBean update(@RequestBody SysStaffinfoDto dto, @PathVariable("sid") String sid) { |
|||
return sysStaffinfoService.updateStaffInfo(dto, sid); |
|||
} |
|||
|
|||
/** |
|||
* 进行删除操作,即设置员工类型为离职类型02的操作。 |
|||
* |
|||
* @param sysStaffQuery 数据传输对象 |
|||
* @return |
|||
*/ |
|||
@ApiOperation("设置离职") |
|||
@PostMapping("/del") |
|||
public ResultBean del(SysStaffQuery sysStaffQuery) { |
|||
return sysStaffinfoService.del(sysStaffQuery); |
|||
} |
|||
|
|||
@ApiOperation("员工信息编辑初始化及详情") |
|||
@GetMapping("/fetchBySid/{sid}/{orgSid}") |
|||
public ResultBean<SysStaffinfoDetailsVo> fetchBySid(@PathVariable("sid") String sid,@PathVariable("orgSid") String orgSid) { |
|||
return sysStaffinfoService.selectDetailsBySid(sid,orgSid); |
|||
} |
|||
/** |
|||
* 获取集团内全部员工姓名 |
|||
* |
|||
* @param staffName 员工姓名 |
|||
* @return |
|||
*/ |
|||
@ApiOperation("获取集团内全部员工姓名") |
|||
@GetMapping("/getStaffName") |
|||
|
|||
public ResultBean<List<Map<String, String>>> getStaffName(String staffName, String deptSid) { |
|||
return sysStaffinfoService.getStaffName(staffName, deptSid); |
|||
} |
|||
/** |
|||
* 获取部门内全部员工姓名 |
|||
* |
|||
* @param staffName 员工姓名 |
|||
* @return |
|||
*/ |
|||
@ApiOperation("获取部门内全部员工姓名") |
|||
@GetMapping("/getStaffNameByDeptSid") |
|||
|
|||
public ResultBean<List<Map<String, String>>> getStaffNameByDeptSid(String staffName, String deptSid) { |
|||
return sysStaffinfoService.getStaffNameByDeptSid(staffName, deptSid); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("获取App通讯录") |
|||
@ResponseBody |
|||
@GetMapping("/selectAppContactsList") |
|||
public ResultBean<List<SysStaffinfoAppContactsVo>> selectAppContactsList(String names) { |
|||
return sysStaffinfoService.selectAppContactsList(); |
|||
} |
|||
|
|||
@ApiOperation("app查看通讯录详情") |
|||
@ResponseBody |
|||
@GetMapping("/selectAppContactsVO/{staffSid}") |
|||
public ResultBean<AppContactsDetailsVo> selectAppContactsVO(String staffSid) { |
|||
|
|||
return sysStaffinfoService.selectAppContactsVO(staffSid); |
|||
} |
|||
|
|||
@ApiOperation("App通讯录搜索") |
|||
@ResponseBody |
|||
@PostMapping("/searchAppContactsList") |
|||
public ResultBean<PagerVo<SysStaffinfoAppContactsSearchVo>> searchAppContactsList(PagerQuery<SysStaffinfoQuery> pq) { |
|||
|
|||
return sysStaffinfoService.searchAppContactsList(pq); |
|||
} |
|||
|
|||
@ApiOperation("App通讯录搜索2") |
|||
@ResponseBody |
|||
@PostMapping("/searchAppContactsList2") |
|||
public ResultBean<PagerVo<SysStaffinfoAppContactsSearchVo>> searchAppContactsList2(PagerQuery<SysStaffinfoQuery> pq) { |
|||
return sysStaffinfoService.searchAppContactsList2(pq); |
|||
} |
|||
|
|||
@ApiOperation("销售订单-内部推荐人下拉框") |
|||
@ResponseBody |
|||
@GetMapping("/selectStaffList") |
|||
public ResultBean<List<PcSysStaffVo>> selectStaffList(PcSysStaffQuery pcSysStaffQuery) { |
|||
return sysStaffinfoService.selectStaffList(pcSysStaffQuery); |
|||
} |
|||
|
|||
@ApiOperation("移动端-销售订单-内部推荐人下拉框") |
|||
@ResponseBody |
|||
@PostMapping("/getUserList") |
|||
public ResultBean<PagerVo<AppSysStaffVo>> getUserList(PagerQuery<AppSysStaffQuery> pagerQuery) { |
|||
return sysStaffinfoService.getUserList(pagerQuery); |
|||
} |
|||
|
|||
@ApiOperation("存放地点变更-获取人员列表") |
|||
@ResponseBody |
|||
@GetMapping("/getGressionUserList/{userSid}") |
|||
public ResultBean<List<AppSysStaffVo>> getGressionUserList(String userSid) { |
|||
return sysStaffinfoService.getGressionUserList(userSid, ""); |
|||
} |
|||
|
|||
@ApiOperation("切换机构:存放地点变更-获取人员列表") |
|||
@ResponseBody |
|||
@GetMapping("/getGressionUserList") |
|||
public ResultBean<List<AppSysStaffVo>> getGressionUserList(String userSid, String orgPath) { |
|||
return sysStaffinfoService.getGressionUserList(userSid, orgPath); |
|||
} |
|||
|
|||
@ApiOperation("获取集团所有人员") |
|||
@ResponseBody |
|||
@GetMapping("/selectStaffLists") |
|||
public ResultBean<List<PcSysStaffVo>> selectStaffLists() { |
|||
return sysStaffinfoService.selectStaffLists(); |
|||
} |
|||
|
|||
@ApiOperation("获取集团所有在职人员") |
|||
@ResponseBody |
|||
@GetMapping("/selectStaffListss") |
|||
public ResultBean<List<PcSysStaffVo>> selectStaffListss() { |
|||
return sysStaffinfoService.selectStaffListss(); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,120 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.admin.biz.func.sysuser.SysUserService; |
|||
import com.yxt.admin.feign.portal.sysuser.SysUserDto; |
|||
import com.yxt.admin.feign.portal.sysuser.SysUserQuery; |
|||
import com.yxt.admin.feign.portal.sysuser.SysUserVo; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/5/6 10:29 |
|||
*/ |
|||
@Api(tags = "用户信息") |
|||
@RestController |
|||
@RequestMapping("/apiadmin/sysuser") |
|||
public class SysUserRest { |
|||
@Autowired |
|||
SysUserService sysUserService; |
|||
|
|||
|
|||
@PostMapping("/login") |
|||
@ResponseBody |
|||
@ApiOperation(value = "3、登录") |
|||
@ApiOperationSupport(order = 30) |
|||
public ResultBean<SysUserVo> login(@RequestBody SysUserQuery userQuery){ |
|||
return sysUserService.login(userQuery); |
|||
} |
|||
@PostMapping("/register") |
|||
@ResponseBody |
|||
@ApiOperation(value = "3、注册") |
|||
@ApiOperationSupport(order = 30) |
|||
public ResultBean register(@RequestBody SysUserDto dto){ |
|||
return sysUserService.register(dto); |
|||
} |
|||
@PostMapping("/loginDetails") |
|||
@ResponseBody |
|||
@ApiOperation(value = "获取登录人") |
|||
@ApiOperationSupport(order = 30) |
|||
public ResultBean<SysUserVo> loginDetails(HttpServletRequest httpServletRequest){ |
|||
return sysUserService.loginDetails(httpServletRequest); |
|||
} |
|||
@PostMapping("/sendMessageCode") |
|||
@ResponseBody |
|||
@ApiOperation(value = "3、获取注册码") |
|||
public ResultBean sendMessageCode(@RequestParam("mobile") String mobile){ |
|||
return sysUserService.sendMessageCode(mobile); |
|||
} |
|||
@PostMapping("/sendMessageLogin") |
|||
@ResponseBody |
|||
@ApiOperation(value = "3、获取登录码") |
|||
public ResultBean sendMessageLogin(@RequestParam("mobile") String mobile){ |
|||
return sysUserService.sendMessageLogin(mobile); |
|||
} |
|||
@PostMapping("/sendMessageUpdate") |
|||
@ResponseBody |
|||
@ApiOperation(value = "3、获取修改码") |
|||
public ResultBean sendMessageUpdate(@RequestParam("mobile") String mobile){ |
|||
return sysUserService.sendMessageUpdate(mobile); |
|||
} |
|||
|
|||
@PostMapping("/listPage") |
|||
@ResponseBody |
|||
public ResultBean listPage(@RequestBody PagerQuery<SysUserQuery> pq){ |
|||
return sysUserService. listPage(pq); |
|||
} |
|||
@ApiOperation("根据条件分页查询数据的列表 ") |
|||
@PostMapping("/listPageVoAdmin") |
|||
public ResultBean<PagerVo<SysUserVo>> listPageVoAdmin(@RequestBody PagerQuery<SysUserQuery> pq) { |
|||
return sysUserService.listPageAdmin(pq); |
|||
} |
|||
@PostMapping("/bindOrganization") |
|||
@ResponseBody |
|||
@ApiOperation(value = "绑定组织") |
|||
@ApiOperationSupport(order = 30) |
|||
public ResultBean bindOrganization(@RequestBody SysUserDto dto){ |
|||
return sysUserService.bindOrganization(dto); |
|||
} |
|||
@PostMapping("/selOrganization") |
|||
@ResponseBody |
|||
@ApiOperation(value = "选择所登录的组织") |
|||
@ApiOperationSupport(order = 30) |
|||
public ResultBean selOrganization(@RequestBody SysUserDto dto){ |
|||
return sysUserService.selOrganization(dto); |
|||
} |
|||
@PostMapping("/setIsEnable/{sid}/{isEnable}") |
|||
@ResponseBody |
|||
@ApiOperation(value = "设置是否可用:isEnable:1可用,0不可用") |
|||
public ResultBean setIsEnable(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid, @ApiParam(value = "isEnable", required = true) @PathVariable("isEnable") String isEnable){ |
|||
return sysUserService.setIsEnable(sid,isEnable); |
|||
} |
|||
/** |
|||
* 初始化密码 |
|||
* |
|||
* @param sid 用户sid |
|||
* @return ResultBean |
|||
*/ |
|||
@ResponseBody |
|||
@PostMapping("/initPwd/{sid}") |
|||
@ApiOperation(value = "10、用户初始化密码") |
|||
@ApiOperationSupport(order = 100) |
|||
public ResultBean |
|||
initPwd(@ApiParam(value = "用户sid", required = true) @PathVariable("sid") String sid) { |
|||
return sysUserService.initPwd(sid); |
|||
} |
|||
@ApiOperation("删除记录根据sid") |
|||
@GetMapping("/delBySid/{sid}") |
|||
public ResultBean delBySid(@PathVariable("sid") String sid){ |
|||
return sysUserService.delBySid(sid); |
|||
}; |
|||
} |
@ -0,0 +1,104 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.sysuserrole.SysUserRoleDto; |
|||
import com.yxt.admin.biz.func.sysuserrole.SysUserRoleQuery; |
|||
import com.yxt.admin.biz.func.sysuserrole.SysUserRoleService; |
|||
import com.yxt.admin.biz.func.sysuserrole.SysUserRoleVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysUserRoleFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.sysuserrole.SysUserRoleRest <br/> |
|||
* Description: 用户与角色关联表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "用户与角色关联表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/sysuserrole") |
|||
public class SysUserRoleRest { |
|||
|
|||
@Autowired |
|||
private SysUserRoleService sysUserRoleService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SysUserRoleVo>> listPage(@RequestBody PagerQuery<SysUserRoleQuery> pq){ |
|||
return sysUserRoleService.listPageVo(pq); |
|||
} |
|||
|
|||
@ApiOperation("根据条件查询所有数据列表") |
|||
@PostMapping("/listAll") |
|||
public ResultBean<List<SysUserRoleVo>> listAll(@RequestBody SysUserRoleQuery query){ |
|||
return sysUserRoleService.listAllVo(query); |
|||
} |
|||
|
|||
@ApiOperation("所有数据列表") |
|||
@GetMapping("/list") |
|||
public ResultBean<List<SysUserRoleVo>> list(){ |
|||
return sysUserRoleService.listVo(); |
|||
} |
|||
|
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody SysUserRoleDto dto){ |
|||
return sysUserRoleService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update") |
|||
public ResultBean update(@RequestBody SysUserRoleDto dto){ |
|||
return sysUserRoleService.saveOrUpdate(dto); |
|||
} |
|||
|
|||
@ApiOperation("删除记录") |
|||
@GetMapping("/del/{ids}") |
|||
public ResultBean del(@PathVariable("ids") String ids){ |
|||
return sysUserRoleService.del(ids); |
|||
} |
|||
|
|||
@ApiOperation("根据用户sid和角色sid删除记录") |
|||
@GetMapping("/delByUserSidAndRoleSid/{userSid}/{roleSid}") |
|||
public ResultBean delByUserSidAndRoleSid(@PathVariable("userSid")String userSid, |
|||
@PathVariable("roleSid")String roleSid) { |
|||
return sysUserRoleService.delByUserSidAndRoleSid(userSid,roleSid); |
|||
} |
|||
|
|||
@ApiOperation("获取一条记录") |
|||
@GetMapping("/fetch/{id}") |
|||
public ResultBean<SysUserRoleVo> fetch(@PathVariable("id") String id){ |
|||
return sysUserRoleService.fetchByIdVo(id); |
|||
} |
|||
|
|||
@ApiOperation("根据用户sid查询用户角色sid列表") |
|||
@GetMapping("/getUserRoleSidByUserSid/{userSid}") |
|||
public ResultBean<List<String>> getUserRoleSidByUserSid(@PathVariable("userSid") String userSid) { |
|||
return sysUserRoleService.getUserRoleSidByUserSid(userSid); |
|||
} |
|||
|
|||
@ApiOperation("根据角色sid查询用户id列表") |
|||
@GetMapping("/getUserIdListByRoleSid") |
|||
public ResultBean<List<String>> getUserIdListByRoleSid(@RequestParam("roleList") List<String> roleList) { |
|||
return sysUserRoleService.getUserIdListByRoleSid(roleList); |
|||
} |
|||
|
|||
@ApiOperation("查询用户的角色") |
|||
@GetMapping("/selectByUserSid") |
|||
ResultBean<List<String>> selectByUserSid(@RequestParam("userSid") String userSid) { |
|||
return sysUserRoleService.selectByUserSids(userSid); |
|||
} |
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.yxt.admin.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.systemlog.*; |
|||
import com.yxt.admin.feign.portal.systemlog.SystemLogFeign; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLogFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.systemlog.SystemLogRest <br/> |
|||
* Description: 系统日志表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "系统日志表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/systemlog") |
|||
public class SystemLogRest implements SystemLogFeign { |
|||
|
|||
@Resource |
|||
private SystemLogService systemLogService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<SystemLogVo>> listPage(@RequestBody PagerQuery<SystemLogQuery> pq){ |
|||
return systemLogService.listPageVo(pq); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<SystemLogVo>> listAll(@RequestBody SystemLogQuery query){ |
|||
return systemLogService.listAllVo(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<SystemLogVo>> list(){ |
|||
return systemLogService.listVo(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean save(SystemLogDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
systemLogService.saveOrUpdateDto(dto); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean update(SystemLogDto dto,String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
systemLogService.updateBySid(dto.toMap(),sid); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean del(String ids){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
systemLogService.delByIds(ids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<SystemLogVo> fetch(String id){ |
|||
return systemLogService.fetchByIdVo(id); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.yxt.admin.apiwx; |
|||
|
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
@RestController("com.yxt.admin.apiwx.WxHomeRest") |
|||
@RequestMapping("/apiwx/home") |
|||
public class WxHomeRest { |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.yxt.admin.biz.func.commonmethod; |
|||
|
|||
import com.yxt.common.base.utils.StringUtils; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.admin.feign.portal.privilege.PrivilegeQuery; |
|||
import com.yxt.admin.feign.portal.sysuser.SysUserFeign; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/7/11 10:35 |
|||
*/ |
|||
@Service |
|||
public class CommonMethod { |
|||
@Autowired |
|||
SysUserFeign sysUserFeign; |
|||
|
|||
/** |
|||
* 根据参数组装新的数据权限参数 |
|||
* @param orgPath |
|||
* @param menuUrl |
|||
* @param userSid |
|||
* @return |
|||
*/ |
|||
public ResultBean<DataRule> dataRule (String orgPath,String menuUrl,String userSid){ |
|||
ResultBean rb=new ResultBean().fail(); |
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(orgPath); |
|||
privilegeQuery.setMenuUrl(menuUrl); |
|||
privilegeQuery.setUserSid(userSid); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
DataRule dataRule=new DataRule(); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1全部、2、本部门及子部门 3子部门、4本人数据)
|
|||
String orgSidPath = orgPath; |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
// int i3 = orgSidPath.indexOf("/", i2 + 1);
|
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
dataRule.setDataRuleId(orgLevelKey); |
|||
if ("1".equals(orgLevelKey)) { |
|||
dataRule.setIndex(i1); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
dataRule.setIndex(i2); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
dataRule.setIndex(i2); |
|||
} |
|||
} |
|||
return rb.success().setData(dataRule); |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.yxt.admin.biz.func.commonmethod; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/7/11 10:54 |
|||
*/ |
|||
@Data |
|||
public class DataRule { |
|||
private String dataRuleId; |
|||
private int index; |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.yxt.admin.biz.func.dictcommon; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/23 15:40 |
|||
* @description 数据字典数据项 |
|||
*/ |
|||
@Data |
|||
public class DictCommon extends BaseEntity { |
|||
private static final long serialVersionUID = 8921237815183601526L; |
|||
@ApiModelProperty(value = "数据项值") |
|||
private String dictKey; |
|||
@ApiModelProperty(value = "数据类型") |
|||
private String dictType; |
|||
@ApiModelProperty(value = "数据项相对应的value值") |
|||
private String dictValue; |
|||
@ApiModelProperty(value = "数据项的父级sid") |
|||
private String parentSid; |
|||
@ApiModelProperty(value = "分组名称") |
|||
private String groupName; |
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.yxt.admin.biz.func.dictcommon; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/23 15:41 |
|||
* @description 数据字典数据项参数 |
|||
*/ |
|||
@Data |
|||
public class DictCommonDto implements Dto { |
|||
private static final long serialVersionUID = 9102264215113210976L; |
|||
|
|||
@ApiModelProperty(value = "数据项值", required = true) |
|||
@NotBlank(message = "数据项值不能为空") |
|||
private String dictKey; |
|||
|
|||
@ApiModelProperty(value = "数据类型", required = true) |
|||
@NotBlank(message = "数据类型不能为空") |
|||
private String dictType; |
|||
|
|||
@ApiModelProperty(value = "数据项相对应的value值", required = true) |
|||
@NotBlank(message = "数据项相对应的value值不能为空") |
|||
private String dictValue; |
|||
|
|||
@ApiModelProperty(value = "数据项的父级sid", required = true) |
|||
@NotBlank(message = "数据项的父级sid不能为空") |
|||
private String parentSid; |
|||
|
|||
@ApiModelProperty(value = "分组名称", required = true) |
|||
private String groupName; |
|||
} |
@ -0,0 +1,60 @@ |
|||
package com.yxt.admin.biz.func.dictcommon; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/23 15:07 |
|||
* @description |
|||
*/ |
|||
@Mapper |
|||
public interface DictCommonMapper extends BaseMapper<DictCommon> { |
|||
/** |
|||
* 根据数据项的key值和分类类型code值查询数量 |
|||
* |
|||
* @param dictKey 数据项key值 |
|||
* @param dictType 类型code值 |
|||
* @param parentSid 父级sid,无父级的此字段为0 |
|||
* @return |
|||
*/ |
|||
DictCommon selectSize(@Param("dictkey") String dictKey, @Param("dictType") String dictType, @Param("parentSid") String parentSid); |
|||
|
|||
|
|||
/** |
|||
* 根据类型查询数据项 |
|||
* |
|||
* @param dictTypeCode 数据分类的类型 |
|||
* @return |
|||
*/ |
|||
List<DictCommon> selectByType(String dictTypeCode); |
|||
|
|||
|
|||
IPage<DictCommonVo> pageList( |
|||
IPage<DictCommonQuery> page, @Param(Constants.WRAPPER) Wrapper<DictCommonVo> qw); |
|||
|
|||
DictCommonVo selectBykey(@Param("key") String key, @Param("type") String sid); |
|||
|
|||
/** |
|||
* 根据类型和父级sid查询数据字典 |
|||
* |
|||
* @param qw 查询条件 |
|||
* @return |
|||
*/ |
|||
List<DictCommonVo> getValue(@Param(Constants.WRAPPER) QueryWrapper<DictCommonVo> qw); |
|||
|
|||
/** |
|||
* 根据数据字典编码类别和分组查询数据字典 |
|||
* @param type 数据字典编码类别 |
|||
* @param groupNum 数据字典分组 |
|||
* @return |
|||
*/ |
|||
List<DictCommonVo> getList(@Param("type") String type, @Param("groupNum") String groupNum); |
|||
} |
@ -0,0 +1,43 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.admin.biz.func.dictcommon.DictCommonMapper"> |
|||
<select id="selectSize" resultType="com.yxt.admin.biz.func.dictcommon.DictCommon"> |
|||
SELECT * |
|||
FROM dict_common |
|||
WHERE dictKey = #{dictkey} |
|||
AND dictType = #{dictType} |
|||
AND parentSid = #{parentSid} |
|||
</select> |
|||
|
|||
<select id="selectByType" resultType="com.yxt.admin.biz.func.dictcommon.DictCommon"> |
|||
SELECT * |
|||
FROM dict_common |
|||
WHERE dictType = #{dictTypeCode} |
|||
</select> |
|||
|
|||
<select id="pageList" resultType="com.yxt.admin.biz.func.dictcommon.DictCommonVo"> |
|||
SELECT dc.dictValue, dc.dictType, dc.dictKey, dc.sid, dc.parentSid,dc.groupName |
|||
FROM dict_common dc |
|||
${ew.customSqlSegment} |
|||
</select> |
|||
<!--获取下拉框--> |
|||
<select id="getValue" resultType="com.yxt.admin.biz.func.dictcommon.DictCommonVo"> |
|||
SELECT dc.sid, dc.dictType, dc.dictKey, dc.dictValue, dc.parentSid |
|||
FROM dict_common dc ${ew.customSqlSegment} |
|||
</select> |
|||
|
|||
<select id="selectBykey" resultType="com.yxt.admin.biz.func.dictcommon.DictCommonVo"> |
|||
SELECT sid, |
|||
dictKey, |
|||
dictType, |
|||
dictValue, |
|||
groupName |
|||
FROM dict_common |
|||
WHERE dictType = #{type} |
|||
AND dictkey = #{key} |
|||
</select> |
|||
|
|||
<select id="getList" resultType="com.yxt.admin.biz.func.dictcommon.DictCommonVo"> |
|||
select * from dict_common dc where dc.dictType = #{type} and find_in_set(#{groupNum}, replace(dc.groupName, ',', ',')); |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,24 @@ |
|||
package com.yxt.admin.biz.func.dictcommon; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/28 10:39 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class DictCommonQuery implements Query { |
|||
private static final long serialVersionUID = -787372981183812826L; |
|||
|
|||
@ApiModelProperty(value = "数据字典条目key", required = false) |
|||
private String dictKey; |
|||
|
|||
@ApiModelProperty(value = "数据字典文本", required = false) |
|||
private String dictValue; |
|||
|
|||
@ApiModelProperty(value ="dictType") |
|||
private String dictType; |
|||
} |
@ -0,0 +1,60 @@ |
|||
package com.yxt.admin.biz.func.dictcommon; |
|||
|
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.feign.portal.dictcommon.DictCommonFeign; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/23 15:06 |
|||
* @description |
|||
*/ |
|||
@Service |
|||
public class DictCommonService extends MybatisBaseService<DictCommonMapper, DictCommon> { |
|||
|
|||
@Autowired |
|||
DictCommonFeign dictCommonFeign; |
|||
|
|||
public ResultBean save(DictCommonDto dictCommonDto) { |
|||
return dictCommonFeign.save(dictCommonDto); |
|||
} |
|||
public ResultBean updateBySid(DictCommonDto dictCommonDto,String sid ) { |
|||
return dictCommonFeign.update(dictCommonDto,sid ); |
|||
} |
|||
public ResultBean del(String sid ) { |
|||
return dictCommonFeign.delete(sid ); |
|||
} |
|||
|
|||
public List<DictCommon> selectByType(String dictTypeCode) { |
|||
return baseMapper.selectByType(dictTypeCode); |
|||
} |
|||
|
|||
public ResultBean<PagerVo<DictCommonVo>> pageList(PagerQuery<DictCommonQuery> pagerQuery) { |
|||
return dictCommonFeign.pageList(pagerQuery); |
|||
} |
|||
|
|||
/** |
|||
* 根据类型和父级sid查询数据字典 |
|||
* |
|||
* @param 查询条件 |
|||
* @return |
|||
*/ |
|||
public ResultBean<List<DictCommonVo>> getValue(String type,String psid) { |
|||
|
|||
return dictCommonFeign.getTypeValues(type, psid); |
|||
} |
|||
|
|||
public ResultBean<DictCommonVo> selectBykey(String key, String type) { |
|||
return dictCommonFeign.selectBykey(key, type); |
|||
} |
|||
|
|||
public ResultBean<List<DictCommonVo>> getList(String type, String groupNum) { |
|||
return dictCommonFeign.getTypeValueList(type,groupNum); |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.admin.biz.func.dictcommon; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/9/30 15:33 |
|||
* @description 下拉框条件 |
|||
*/ |
|||
@Data |
|||
public class DictCommonTypeQuery implements Query { |
|||
private static final long serialVersionUID = 139959085226402464L; |
|||
|
|||
@ApiModelProperty(value = "数据字典类型", required = true) |
|||
private String type; |
|||
|
|||
@ApiModelProperty(value = "psid", required = false,example = "0") |
|||
private String psid; |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.yxt.admin.biz.func.dictcommon; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/23 15:54 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class DictCommonVo implements Vo { |
|||
private static final long serialVersionUID = -1094142938193916816L; |
|||
|
|||
@ApiModelProperty(value = "数据字典项sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty(value = "数据字典项key") |
|||
private String dictKey; |
|||
|
|||
@ApiModelProperty(value = "数据字典类型") |
|||
private String dictType; |
|||
|
|||
@ApiModelProperty(value = "数据字典项名称") |
|||
private String dictValue; |
|||
@ApiModelProperty(value = "父级sid:0为第一级") |
|||
private String parentSid; |
|||
|
|||
@ApiModelProperty(value = "分组名称") |
|||
private String groupName; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.admin.biz.func.dicttype; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/5 22:29 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class DictType extends BaseEntity { |
|||
|
|||
private static final long serialVersionUID = -2790449398289680139L; |
|||
|
|||
@ApiModelProperty(value = "类型代码") |
|||
private String dictTypeCode; |
|||
@ApiModelProperty(value = "类型名称") |
|||
private String dictTypeName; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.admin.biz.func.dicttype; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/23 15:20 |
|||
* @description 数据字典类型参数 |
|||
*/ |
|||
@Data |
|||
public class DictTypeDto implements Dto { |
|||
private static final long serialVersionUID = -2302005624272862359L; |
|||
|
|||
@ApiModelProperty(value = "类型代码", required = true) |
|||
@NotBlank(message = "类型代码不能为空") |
|||
private String dictTypeCode; |
|||
|
|||
@ApiModelProperty(value = "类型名称", required = true) |
|||
@NotBlank(message = "类型名称不能为空") |
|||
private String dictTypeName; |
|||
|
|||
@ApiModelProperty(value = "类型说明", required = false) |
|||
private String remarks; |
|||
|
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.yxt.admin.biz.func.dicttype; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/23 14:56 |
|||
* @description |
|||
*/ |
|||
@Mapper |
|||
public interface DictTypeMapper extends BaseMapper<DictType> { |
|||
|
|||
/** |
|||
* 查询该类型代码存在的数量 |
|||
* |
|||
* @param dictTypeCode 类型代码 |
|||
* @return |
|||
*/ |
|||
int selectSize(String dictTypeCode); |
|||
|
|||
IPage<DictTypeVo> pageList(IPage<?> page, @Param(Constants.WRAPPER) Wrapper<DictTypeVo> qw); |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.admin.biz.func.dicttype.DictTypeMapper"> |
|||
|
|||
<select id="selectSize" resultType="java.lang.Integer"> |
|||
SELECT COUNT(*) |
|||
FROM dict_type |
|||
WHERE dictTypeCode = #{dictTypeCode} |
|||
</select> |
|||
|
|||
<select id="pageList" resultType="com.yxt.admin.biz.func.dicttype.DictTypeVo"> |
|||
SELECT dt.dictTypeCode, dt.dictTypeName, dt.sid, dt.remarks |
|||
FROM dict_type dt |
|||
${ew.customSqlSegment} |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,24 @@ |
|||
package com.yxt.admin.biz.func.dicttype; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/28 9:17 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class DictTypeQuery implements Query { |
|||
private static final long serialVersionUID = -1033205660448956012L; |
|||
|
|||
@ApiModelProperty(value = "数据字典code", required = false) |
|||
private String dictTypeCode; |
|||
|
|||
@ApiModelProperty(value = "数据分类名称", required = false) |
|||
private String dictTypeName; |
|||
|
|||
@ApiModelProperty(value = "说明", required = false) |
|||
private String remarks; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.admin.biz.func.dicttype; |
|||
|
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.feign.portal.dicttype.DictTypeFeign; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/23 14:55 |
|||
* @description 数据字典类型实现类 |
|||
*/ |
|||
@Service |
|||
public class DictTypeService extends MybatisBaseService<DictTypeMapper, DictType> { |
|||
@Autowired |
|||
DictTypeFeign dictTypeFeign; |
|||
|
|||
|
|||
public ResultBean save(DictTypeDto dictTypeDto) { |
|||
return dictTypeFeign.save(dictTypeDto); |
|||
} |
|||
public ResultBean updateBySid(DictTypeDto dictTypeDto,String sid ) { |
|||
return dictTypeFeign.update(dictTypeDto,sid); |
|||
} |
|||
public ResultBean del( String sid ) { |
|||
return dictTypeFeign.delete(sid); |
|||
} |
|||
|
|||
public ResultBean<PagerVo<DictTypeVo>> pageList(PagerQuery<DictTypeQuery> pagerQuery) { |
|||
return dictTypeFeign.pageList(pagerQuery); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.yxt.admin.biz.func.dicttype; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/6/23 15:18 |
|||
* @description 数据字典类型返回数据 |
|||
*/ |
|||
@Data |
|||
public class DictTypeVo implements Vo { |
|||
private static final long serialVersionUID = 9052935182700117654L; |
|||
|
|||
@ApiModelProperty(value = "数据类型sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty(value = "类型代码") |
|||
private String dictTypeCode; |
|||
|
|||
@ApiModelProperty(value = "类型名称") |
|||
private String dictTypeName; |
|||
|
|||
@ApiModelProperty(value = "说明") |
|||
private String remarks; |
|||
|
|||
@ApiModelProperty(value = "分组名称") |
|||
private String groupName; |
|||
|
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package com.yxt.admin.biz.func.organizationappkey; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2025/1/21 11:19 |
|||
*/ |
|||
@Data |
|||
public class OrganizationAppKey extends BaseEntity { |
|||
private String orgSid; |
|||
private String appKey; |
|||
private String secret; |
|||
} |
@ -0,0 +1,14 @@ |
|||
|
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.portal.biz.organizationappkey.OrganizationAppKeyMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
|
|||
<select id="listPage" resultType="com.yxt.portal.biz.organizationappkey.OrganizationAppKeyVo"> |
|||
select * from organization_appkey |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,15 @@ |
|||
package com.yxt.admin.biz.func.organizationappkey; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2025/1/21 11:19 |
|||
*/ |
|||
@Data |
|||
public class OrganizationAppKeyDto { |
|||
private String orgSid; |
|||
private String appKey; |
|||
private String secret; |
|||
private String state; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.yxt.admin.biz.func.organizationappkey; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2025/1/21 11:19 |
|||
*/ |
|||
@Mapper |
|||
public interface OrganizationAppKeyMapper extends BaseMapper<OrganizationAppKey> { |
|||
IPage<OrganizationAppKeyVo> listPage(IPage<OrganizationAppKey> page, @Param(Constants.WRAPPER) QueryWrapper<OrganizationAppKey> qw); |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.yxt.admin.biz.func.organizationappkey; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2025/1/21 14:53 |
|||
*/ |
|||
@Data |
|||
public class OrganizationAppKeyQuery implements Query { |
|||
private String state; |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.yxt.admin.biz.func.organizationappkey; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.admin.biz.func.sysorgregister.SysOrgRegisterService; |
|||
import com.yxt.admin.feign.portal.organizationappkey.OrganizationAppKeyFeign; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2025/1/21 11:19 |
|||
*/ |
|||
@Service |
|||
public class OrganizationAppKeyService extends MybatisBaseService<OrganizationAppKeyMapper, OrganizationAppKey> { |
|||
@Autowired |
|||
OrganizationAppKeyFeign organizationAppKeyFeign; |
|||
|
|||
|
|||
private QueryWrapper<OrganizationAppKey> createQueryWrapper(OrganizationAppKeyQuery query) { |
|||
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|||
QueryWrapper<OrganizationAppKey> qw = new QueryWrapper<>(); |
|||
if (StringUtils.isNotBlank(query.getState())) { |
|||
qw.eq("state",query.getState()); |
|||
} |
|||
return qw; |
|||
} |
|||
|
|||
public ResultBean<PagerVo<OrganizationAppKeyVo>> listPageVo(PagerQuery<OrganizationAppKeyQuery> pq) { |
|||
return organizationAppKeyFeign.listPage(pq); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package com.yxt.admin.biz.func.organizationappkey; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2025/1/21 11:19 |
|||
*/ |
|||
@Data |
|||
public class OrganizationAppKeyVo { |
|||
private String orgSid; |
|||
private String appKey; |
|||
private String secret; |
|||
private String state; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/2 14:21 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class Region extends BaseEntity { |
|||
private static final long serialVersionUID = -2834981997098086066L; |
|||
@ApiModelProperty(value = "上级sid") |
|||
private String pSid; |
|||
@ApiModelProperty(value = "级别") |
|||
private Integer level; |
|||
@ApiModelProperty(value = "名称,区域名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "行政区划代码") |
|||
private String districtCode; |
|||
@ApiModelProperty(value = "sid全路径") |
|||
private String sidPath; |
|||
@ApiModelProperty(value = "排序号") |
|||
private Integer sortNo; |
|||
|
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/2 23:15 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class RegionChildTwoVo implements Vo { |
|||
private static final long serialVersionUID = 4618662603777612150L; |
|||
|
|||
@ApiModelProperty(value = "sid") |
|||
private String sid; |
|||
@ApiModelProperty(value = "上级sid") |
|||
private String pSid; |
|||
@ApiModelProperty(value = "级别") |
|||
private Integer level; |
|||
@ApiModelProperty(value = "名称,区域名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "行政区划代码") |
|||
private String districtCode; |
|||
@ApiModelProperty(value = "sid全路径") |
|||
private String sidPath; |
|||
@ApiModelProperty(value = "排序号") |
|||
private Integer sortNo; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/2 23:14 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class RegionChildVo implements Vo { |
|||
private static final long serialVersionUID = -4741874809037026585L; |
|||
|
|||
@ApiModelProperty(value = "sid") |
|||
private String sid; |
|||
@ApiModelProperty(value = "上级sid") |
|||
private String pSid; |
|||
@ApiModelProperty(value = "级别") |
|||
private Integer level; |
|||
@ApiModelProperty(value = "名称,区域名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "行政区划代码") |
|||
private String districtCode; |
|||
@ApiModelProperty(value = "sid全路径") |
|||
private String sidPath; |
|||
@ApiModelProperty(value = "排序号") |
|||
private Integer sortNo; |
|||
|
|||
private List<RegionChildTwoVo> regionChildTwoVoList; |
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.Size; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2021/11/11 15:18 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class RegionDto implements Dto { |
|||
private static final long serialVersionUID = 1283045363206557586L; |
|||
/** |
|||
* 名称,区域名称 |
|||
*/ |
|||
@ApiModelProperty(value = "区域名称", required = true) |
|||
@NotBlank(message = "区域名称不能为空") |
|||
@Size(max = 64, min = 1) |
|||
private String name; |
|||
/** |
|||
* 行政区划代码 |
|||
*/ |
|||
@ApiModelProperty(value = "行政区划代码", required = true) |
|||
@NotBlank(message = "行政区划代码不能为空") |
|||
private String districtCode; |
|||
/** |
|||
* 上级sid |
|||
*/ |
|||
@ApiModelProperty(value = "上级sid", required = true, example = "0") |
|||
private String psid; |
|||
|
|||
/** |
|||
* 排序号 |
|||
*/ |
|||
@ApiModelProperty(value = "排序号", required = true) |
|||
private Integer sortNo; |
|||
@ApiModelProperty(value = "级别") |
|||
private int level; |
|||
|
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/13 21:41 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class RegionListVo implements Vo { |
|||
private static final long serialVersionUID = 8123582673134551495L; |
|||
@ApiModelProperty(value = "sid") |
|||
private String sid; |
|||
@ApiModelProperty(value = "名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "区划代码") |
|||
private String districtCode; |
|||
@ApiModelProperty(value = "排序") |
|||
private Integer sortNo; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/2 15:10 |
|||
* @description |
|||
*/ |
|||
@Mapper |
|||
public interface RegionMapper extends BaseMapper<Region> { |
|||
|
|||
List<RegionChildTwoVo> getProvince(); |
|||
|
|||
List<RegionChildTwoVo> getCity(String sid); |
|||
|
|||
List<RegionChildTwoVo> getCounty(String sid); |
|||
} |
@ -0,0 +1,33 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.admin.biz.func.region.RegionMapper"> |
|||
<resultMap id="regionMapNoChild" type="com.yxt.admin.biz.func.region.RegionChildTwoVo"> |
|||
<result column="name" jdbcType="VARCHAR" property="name"/> |
|||
<result column="sid" jdbcType="VARCHAR" property="sid"/> |
|||
<result column="pSid" jdbcType="VARCHAR" property="pSid"/> |
|||
<result column="districtCode" jdbcType="INTEGER" property="districtCode"/> |
|||
<result column="sidPath" jdbcType="VARCHAR" property="sidPath"/> |
|||
</resultMap> |
|||
|
|||
<select id="getProvince" parameterType="com.yxt.admin.biz.func.region.RegionVo" resultMap="regionMapNoChild"> |
|||
SELECT name, sid, pSid, districtCode, sidPath |
|||
FROM region |
|||
WHERE level = 1 |
|||
AND pSid = 0 |
|||
</select> |
|||
|
|||
<select id="getCity" parameterType="com.yxt.admin.biz.func.region.RegionVo" resultMap="regionMapNoChild"> |
|||
SELECT name, sid, pSid, districtCode, sidPath |
|||
FROM region |
|||
WHERE level = 2 |
|||
AND pSid = #{sid} |
|||
ORDER BY sortNo + 0 |
|||
</select> |
|||
|
|||
<select id="getCounty" parameterType="com.yxt.admin.biz.func.region.RegionVo" resultMap="regionMapNoChild"> |
|||
SELECT name, sid, pSid, districtCode, sidPath |
|||
FROM region |
|||
WHERE level = 3 |
|||
AND pSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,23 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/13 21:55 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class RegionQuery implements Query { |
|||
private static final long serialVersionUID = -3494331991678665867L; |
|||
|
|||
@ApiModelProperty(value = "行政区划") |
|||
private String districtCode; |
|||
@ApiModelProperty(value = "名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "pSid,市级列表此值需要传省级列表sid", example = "0") |
|||
private String psid; |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.admin.feign.portal.region.RegionFeign; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/2 15:06 |
|||
* @description |
|||
*/ |
|||
@Service |
|||
public class RegionService extends MybatisBaseService<RegionMapper, Region> { |
|||
|
|||
@Autowired |
|||
private RegionFeign regionFeign; |
|||
|
|||
public List<RegionChildTwoVo> getProvince() { |
|||
return regionFeign.getProvince().getData(); |
|||
} |
|||
|
|||
/** |
|||
* 获取某省下的所有市 |
|||
* |
|||
* @param sid 省sid |
|||
* @return 该省下的所有市的list |
|||
*/ |
|||
public List<RegionChildTwoVo> getCity(String sid) { |
|||
return regionFeign.getCity(sid).getData(); |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 获取某市下的所有区县 |
|||
* |
|||
* @param sid 市sid |
|||
* @return 该市下的所有县区的list |
|||
*/ |
|||
public List<RegionChildTwoVo> getCounty(String sid) { |
|||
return regionFeign.getCounty(sid).getData(); |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author liuguohui |
|||
* @Date 2021/10/4 |
|||
*/ |
|||
@Data |
|||
public class RegionThirdLevelNameVo implements Vo { |
|||
|
|||
@ApiModelProperty(value = "省") |
|||
private String province; |
|||
|
|||
@ApiModelProperty(value = "市") |
|||
private String city; |
|||
|
|||
@ApiModelProperty(value = "县") |
|||
private String county; |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.admin.biz.func.region; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/7/2 14:22 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class RegionVo implements Vo { |
|||
private static final long serialVersionUID = 3351684167946104384L; |
|||
|
|||
@ApiModelProperty(value = "sid") |
|||
private String sid; |
|||
@ApiModelProperty(value = "上级sid") |
|||
private String pSid; |
|||
@ApiModelProperty(value = "级别") |
|||
private Integer level; |
|||
@ApiModelProperty(value = "名称,区域名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "行政区划代码") |
|||
private String districtCode; |
|||
@ApiModelProperty(value = "sid全路径") |
|||
private String sidPath; |
|||
@ApiModelProperty(value = "排序号") |
|||
private Integer sortNo; |
|||
|
|||
private List<RegionVo> children; |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroup; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
@ApiModel(value = "权限组表", description = "权限组表") |
|||
@TableName("sys_authorize_group") |
|||
@Data |
|||
public class SysAuthorizeGroup extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
@ApiModelProperty("权限组名") |
|||
private String groupName; |
|||
private String groupCode; |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroup; |
|||
|
|||
|
|||
import com.yxt.admin.biz.func.sysauthorizegroupdetail.SysAuthorizeGroupDetailDto; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
|
|||
@ApiModel(value = "权限组表 数据传输对象", description = "权限组表 数据传输对象") |
|||
@Data |
|||
public class SysAuthorizeGroupDto implements Dto { |
|||
|
|||
private String sid; |
|||
private String groupName; |
|||
private List<SysAuthorizeGroupDetailDto> list =new ArrayList<>(); |
|||
private String groupCode; |
|||
private String remarks; |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroup; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuMapper.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.sysmenu.SysMenuMapper <br/> |
|||
* Description: 菜单表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface SysAuthorizeGroupMapper extends BaseMapper<SysAuthorizeGroup> { |
|||
|
|||
int updateBySidIsDelete(List<String> list); |
|||
IPage<SysAuthorizeGroupVo> listPage(IPage<SysAuthorizeGroup> page, @Param(Constants.WRAPPER) QueryWrapper<SysAuthorizeGroup> qw); |
|||
List<SysAuthorizeGroupVo> listAll(@Param("orgPath")String orgPath); |
|||
List<SysAuthorizeGroupVo> getGroupByOrgSid(@Param("orgSid") String orgSid,@Param("sourceSid") String sourceSid); |
|||
} |
@ -0,0 +1,38 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.admin.biz.func.sysauthorizegroup.SysAuthorizeGroupMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="listPage" resultType="com.yxt.admin.biz.func.sysauthorizegroup.SysAuthorizeGroupVo"> |
|||
select |
|||
* |
|||
from sys_authorize_group a |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="listAll" resultType="com.yxt.admin.biz.func.sysauthorizegroup.SysAuthorizeGroupVo"> |
|||
select |
|||
* |
|||
from sys_authorize_group a |
|||
<where> |
|||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1' and a.isEnable='1' |
|||
</where> |
|||
</select> |
|||
<update id="updateBySidIsDelete"> |
|||
UPDATE sys_authorize_group |
|||
SET isDelete=1 |
|||
where sid in |
|||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</update> |
|||
<!--将该资源下的所有一级菜单列表--> |
|||
<select id="getGroupByOrgSid" resultType="com.yxt.admin.biz.func.sysmenu.SysMenuTreeVo"> |
|||
SELECT * |
|||
FROM sys_authorize_group gr |
|||
LEFT JOIN sys_org_authorize au ON gr.sid = au.ahthorizeGroupSid |
|||
WHERE source.sid = #{sourceSid} AND menu.psid='0' and menu.isDelete!=1 |
|||
ORDER BY menu.sortNo ASC |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,21 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroup; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
@ApiModel(value = "权限组表 查询条件 功能菜单设置查询用", description = "权限组表 查询条件 功能菜单设置查询用") |
|||
@Data |
|||
public class SysAuthorizeGroupQuery implements Query { |
|||
|
|||
|
|||
@ApiModelProperty("资源sid") |
|||
private String sourceSid; |
|||
private String orgSid; |
|||
private String groupName; |
|||
private String groupCode; |
|||
|
|||
} |
@ -0,0 +1,69 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroup; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.date.DateTime; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.admin.feign.portal.sysauthorizegroup.SysAuthorizeGroupFeign; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.base.utils.StringUtils; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.utils.OrgPathQuery; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Arrays; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuService.java <br/> |
|||
* Class: com.yxt.user.biz.sysmenu.SysMenuService <br/> |
|||
* Description: 菜单表 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class SysAuthorizeGroupService extends MybatisBaseService<SysAuthorizeGroupMapper, SysAuthorizeGroup> { |
|||
@Autowired |
|||
SysAuthorizeGroupFeign sysAuthorizeGroupFeign; |
|||
|
|||
public ResultBean<PagerVo<SysAuthorizeGroupVo>> listPage(PagerQuery<SysAuthorizeGroupQuery> pq) { |
|||
return sysAuthorizeGroupFeign.listPage(pq); |
|||
} |
|||
public ResultBean<List<SysAuthorizeGroup>> listAll() { |
|||
return sysAuthorizeGroupFeign.listAll(); |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdate(SysAuthorizeGroupDto dto) { |
|||
return sysAuthorizeGroupFeign.saveOrUpdate(dto); |
|||
} |
|||
|
|||
public ResultBean<SysAuthorizeGroupVo> initialization(String sid) { |
|||
return sysAuthorizeGroupFeign.initialization(sid); |
|||
} |
|||
|
|||
|
|||
|
|||
public ResultBean delete(String sid) { |
|||
return sysAuthorizeGroupFeign.delete(sid); |
|||
} |
|||
public void delAll(String[] sids) { |
|||
sysAuthorizeGroupFeign.delBySids(sids); |
|||
} |
|||
public List<SysAuthorizeGroupVo> getGroupByOrgSid(SysAuthorizeGroupQuery query) { |
|||
return baseMapper.getGroupByOrgSid(query.getOrgSid(),query.getSourceSid()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroup; |
|||
|
|||
|
|||
import com.yxt.admin.biz.func.sysauthorizegroupdetail.SysAuthorizeGroupDetailDto; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuVo.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenu.SysMenuVo <br/> |
|||
* Description: 菜单表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单表 视图数据对象", description = "菜单表 视图数据对象") |
|||
@Data |
|||
public class SysAuthorizeGroupVo implements Vo { |
|||
|
|||
private String sid; |
|||
private String groupName; |
|||
private List<SysAuthorizeGroupDetailDto> list =new ArrayList<>(); |
|||
private String groupCode; |
|||
private String remarks; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroupdetail; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
|
|||
@ApiModel(value = "权限组表", description = "权限组表") |
|||
@TableName("sys_authorize_group_detail") |
|||
@Data |
|||
public class SysAuthorizeGroupDetail extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
private String sid; |
|||
private String groupSid; |
|||
private String sourceSid; |
|||
private String menuSid; |
|||
private String children; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroupdetail; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
|
|||
@ApiModel(value = "权限组表 数据传输对象", description = "权限组表 数据传输对象") |
|||
@Data |
|||
public class SysAuthorizeGroupDetailDto implements Dto { |
|||
|
|||
private String sid; |
|||
private String groupSid; |
|||
private String sourceSid; |
|||
private String menuSid; |
|||
private String menuName; |
|||
private String children; |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroupdetail; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuMapper.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.sysmenu.SysMenuMapper <br/> |
|||
* Description: 菜单表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface SysAuthorizeGroupDetailMapper extends BaseMapper<SysAuthorizeGroupDetail> { |
|||
|
|||
|
|||
int updateBySidIsDelete(List<String> list); |
|||
IPage<SysAuthorizeGroupDetailVo> listPage(IPage<SysAuthorizeGroupDetail> page, @Param(Constants.WRAPPER) QueryWrapper<SysAuthorizeGroupDetail> qw); |
|||
List<SysAuthorizeGroupDetailVo> listAll(@Param("orgPath")String orgPath); |
|||
List<SysAuthorizeGroupDetailVo> getGroupByOrgSid(@Param("orgSid") String orgSid, @Param("sourceSid") String sourceSid); |
|||
} |
@ -0,0 +1,38 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.admin.biz.func.sysauthorizegroupdetail.SysAuthorizeGroupDetailMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="listPage" resultType="com.yxt.admin.biz.func.sysauthorizegroup.SysAuthorizeGroupVo"> |
|||
select |
|||
* |
|||
from sys_authorize_group_datail a |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="listAll" resultType="com.yxt.admin.biz.func.sysauthorizegroup.SysAuthorizeGroupVo"> |
|||
select |
|||
* |
|||
from sys_authorize_group_datail a |
|||
<where> |
|||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1' and a.isEnable='1' |
|||
</where> |
|||
</select> |
|||
<update id="updateBySidIsDelete"> |
|||
UPDATE sys_authorize_group_datail |
|||
SET isDelete=1 |
|||
where sid in |
|||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</update> |
|||
<!--将该资源下的所有一级菜单列表--> |
|||
<select id="getGroupByOrgSid" resultType="com.yxt.admin.biz.func.sysmenu.SysMenuTreeVo"> |
|||
SELECT * |
|||
FROM sys_authorize_group gr |
|||
LEFT JOIN sys_org_authorize au ON gr.sid = au.ahthorizeGroupSid |
|||
WHERE source.sid = #{sourceSid} AND menu.psid='0' and menu.isDelete!=1 |
|||
ORDER BY menu.sortNo ASC |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,19 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroupdetail; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
@ApiModel(value = "权限组表 查询条件 功能菜单设置查询用", description = "权限组表 查询条件 功能菜单设置查询用") |
|||
@Data |
|||
public class SysAuthorizeGroupDetailQuery implements Query { |
|||
|
|||
|
|||
@ApiModelProperty("资源sid") |
|||
private String sourceSid; |
|||
private String orgSid; |
|||
|
|||
} |
@ -0,0 +1,106 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroupdetail; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.date.DateTime; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.admin.utils.OrgPathQuery; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuService.java <br/> |
|||
* Class: com.yxt.user.biz.sysmenu.SysMenuService <br/> |
|||
* Description: 菜单表 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class SysAuthorizeGroupDetailService extends MybatisBaseService<SysAuthorizeGroupDetailMapper, SysAuthorizeGroupDetail> { |
|||
|
|||
|
|||
public ResultBean<PagerVo<SysAuthorizeGroupDetailVo>> listPage(PagerQuery<SysAuthorizeGroupDetailQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
SysAuthorizeGroupDetailQuery query = pq.getParams(); |
|||
QueryWrapper<SysAuthorizeGroupDetail> qw = new QueryWrapper<>(); |
|||
|
|||
qw.ne("a.isDelete","1"); |
|||
qw.orderByDesc("a.sortNo"); |
|||
IPage<SysAuthorizeGroupDetail> page = PagerUtil.queryToPage(pq); |
|||
IPage<SysAuthorizeGroupDetailVo> pagging = baseMapper.listPage(page, qw); |
|||
PagerVo<SysAuthorizeGroupDetailVo> p = PagerUtil.pageToVo(pagging, null); |
|||
List<SysAuthorizeGroupDetailVo> records = pagging.getRecords(); |
|||
return rb.success().setData(p); |
|||
} |
|||
public ResultBean<List<SysAuthorizeGroupDetail>> listAll(OrgPathQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SysAuthorizeGroupDetailVo> pagging = baseMapper.listAll(query.getOrgPath()); |
|||
return rb.success().setData(pagging); |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdate(List<SysAuthorizeGroupDetailDto> dtos) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String sid = ""; |
|||
if(dtos.size()!=0){ |
|||
baseMapper.delete(new QueryWrapper<SysAuthorizeGroupDetail>().eq("groupSid",dtos.get(0).getGroupSid())); |
|||
} |
|||
for (SysAuthorizeGroupDetailDto dto : dtos) { |
|||
SysAuthorizeGroupDetail wmsGoods = new SysAuthorizeGroupDetail(); |
|||
sid = wmsGoods.getSid(); |
|||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); |
|||
wmsGoods.setCreateTime(new DateTime()); |
|||
baseMapper.insert(wmsGoods); |
|||
} |
|||
return rb.success().setMsg("成功"); |
|||
} |
|||
|
|||
public ResultBean<SysAuthorizeGroupDetailVo> initialization(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
SysAuthorizeGroupDetailVo vo = new SysAuthorizeGroupDetailVo(); |
|||
SysAuthorizeGroupDetail wmsSysAuthorizeGroupDetail = fetchBySid(sid); |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|||
if (null != wmsSysAuthorizeGroupDetail) { |
|||
BeanUtil.copyProperties(wmsSysAuthorizeGroupDetail, vo); |
|||
// if (StringUtils.isNotBlank(wmsGoods.getPicUrl())) {
|
|||
// vo.setPicUrl(fileUploadComponent.getUrlPrefix() + wmsGoods.getPicUrl());
|
|||
// }
|
|||
// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime()));
|
|||
} |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
|
|||
|
|||
public ResultBean delete(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
SysAuthorizeGroupDetail wmsSysAuthorizeGroupDetail = fetchBySid(sid); |
|||
if (null != wmsSysAuthorizeGroupDetail) { |
|||
baseMapper.deleteById(wmsSysAuthorizeGroupDetail.getId()); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
public void delAll(String[] sids) { |
|||
int count = baseMapper.updateBySidIsDelete(Arrays.stream(sids).collect(Collectors.toList())); |
|||
} |
|||
|
|||
public List<SysAuthorizeGroupDetailVo> getGroupByOrgSid(SysAuthorizeGroupDetailQuery query) { |
|||
|
|||
return baseMapper.getGroupByOrgSid(query.getOrgSid(),query.getSourceSid()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.yxt.admin.biz.func.sysauthorizegroupdetail; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuVo.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenu.SysMenuVo <br/> |
|||
* Description: 菜单表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单表 视图数据对象", description = "菜单表 视图数据对象") |
|||
@Data |
|||
public class SysAuthorizeGroupDetailVo implements Vo { |
|||
|
|||
private String groupSid; |
|||
private String sourceSid; |
|||
private String menuSid; |
|||
private String menuName; |
|||
private String children; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 查询按钮的权限的表单参数 |
|||
*/ |
|||
@ApiModel(value = "查询按钮的权限的表单参数", description = "查询按钮的权限的表单参数") |
|||
@Data |
|||
public class ButtonPermissionQuery { |
|||
@ApiModelProperty("userSid") |
|||
private String userSid; |
|||
@ApiModelProperty("url") |
|||
private String url; |
|||
@ApiModelProperty("type") |
|||
private String type; |
|||
private String sourceSid; |
|||
private String orgSid; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@ApiModel(value = "返回查询的按钮权限集合", description = "返回查询的按钮权限集合") |
|||
@Data |
|||
public class ButtonPermissionVo { |
|||
@ApiModelProperty("buttonId") |
|||
private String buttonId; |
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenu.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenu.SysMenu <br/> |
|||
* Description: 菜单表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单表", description = "菜单表") |
|||
@TableName("sys_menu") |
|||
@Data |
|||
public class SysMenu extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
@ApiModelProperty("菜单名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("菜单路由路径(VUE)") |
|||
private String menuUrl; |
|||
|
|||
@ApiModelProperty("菜单对应的前端页面路径") |
|||
private String pageUrl; |
|||
|
|||
@ApiModelProperty("菜单图标地址") |
|||
private String iconUrl; |
|||
|
|||
@ApiModelProperty("资源sid") |
|||
private String sourceSid; |
|||
|
|||
@ApiModelProperty("是否显示,默认为1显示,0为不显示") |
|||
private String isShow; |
|||
|
|||
@ApiModelProperty("排序号") |
|||
private Integer sortNo; |
|||
|
|||
@ApiModelProperty("上级sid") |
|||
private String pSid; |
|||
|
|||
@ApiModelProperty("前端页面路径重定向") |
|||
private Integer pageUrlRedirect; |
|||
|
|||
@ApiModelProperty("前端页面名称(vue组件名)") |
|||
private String pageName; |
|||
|
|||
@ApiModelProperty("前端页面别名") |
|||
private String pageAliasName; |
|||
|
|||
@ApiModelProperty("菜单类型(0左侧当行菜单,1页面中功能)") |
|||
private String menuType; |
|||
private String cid; |
|||
} |
@ -0,0 +1,74 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuDto.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenu.SysMenuDto <br/> |
|||
* Description: 菜单表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单表 数据传输对象", description = "菜单表 数据传输对象") |
|||
@Data |
|||
public class SysMenuDto implements Dto { |
|||
|
|||
|
|||
private static final long serialVersionUID = -8143707488992909267L; |
|||
@ApiModelProperty(value = "菜单名称", required = true) |
|||
// @NotBlank(message = "菜单名称不能为空")
|
|||
private String name; |
|||
|
|||
@ApiModelProperty("菜单路由路径(VUE)") |
|||
private String menuUrl; |
|||
|
|||
@ApiModelProperty("菜单对应的前端页面路径") |
|||
private String pageUrl; |
|||
|
|||
@ApiModelProperty("菜单图标地址") |
|||
private String iconUrl; |
|||
|
|||
@ApiModelProperty(value = "资源sid", required = true) |
|||
@NotBlank(message = "资源不能为空") |
|||
private String sourceSid; |
|||
|
|||
@ApiModelProperty(value = "是否显示,默认为1显示,0为不显示", required = true) |
|||
@NotBlank(message = "是否显示不能为空") |
|||
private String isShow; |
|||
|
|||
@ApiModelProperty("排序号") |
|||
private Integer sortNo; |
|||
|
|||
@ApiModelProperty(value = "上级sid", example = "0", required = true) |
|||
@NotBlank(message = "上级菜单不能为空") |
|||
private String pSid; |
|||
|
|||
@ApiModelProperty(value = "前端页面路径重定向", required = false) |
|||
private Integer pageUrlRedirect; |
|||
|
|||
@ApiModelProperty("前端页面名称(vue组件名)") |
|||
private String pageName; |
|||
|
|||
@ApiModelProperty(value = "前端页面别名", required = false) |
|||
private String pageAliasName; |
|||
|
|||
@ApiModelProperty("菜单类型(0左侧当行菜单,1页面中功能)") |
|||
private String menuType; |
|||
|
|||
@ApiModelProperty(value = "备注") |
|||
private String remarks; |
|||
private String cid; |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuQuery.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenu.SysMenuQuery <br/> |
|||
* Description: 菜单表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单表 查询条件 功能菜单设置查询用", description = "菜单表 查询条件 功能菜单设置查询用") |
|||
@Data |
|||
public class SysMenuFunctionQuery implements Query { |
|||
|
|||
|
|||
@ApiModelProperty("资源sid") |
|||
private String sourceSid; |
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuMapper.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.sysmenu.SysMenuMapper <br/> |
|||
* Description: 菜单表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface SysMenuMapper extends BaseMapper<SysMenu> { |
|||
|
|||
//@Update("update sys_menu set name=#{msg} where id=#{id}")
|
|||
//IPage<SysMenuVo> voPage(IPage<SysMenu> page, @Param(Constants.WRAPPER) QueryWrapper<SysMenu> qw);
|
|||
|
|||
IPage<SysMenuVo> selectPageVo(IPage<SysMenu> page, @Param(Constants.WRAPPER) Wrapper<SysMenu> qw); |
|||
|
|||
List<SysMenuVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<SysMenu> qw); |
|||
|
|||
@Select("select * from sys_menu") |
|||
List<SysMenuVo> selectListVo(); |
|||
|
|||
List<SysMenuVo> listAllParentByRoleSid(String roleSid, String sid, @Param("sourceSid") String sourceSid); |
|||
|
|||
@Select("SELECT menu.*,sourceMenu.`sourceSid` FROM sys_menu menu " + |
|||
"LEFT JOIN sys_source_menu sourceMenu ON menu.sid=sourceMenu.menuSid where menu.sid=#{sid}") |
|||
SysMenu fetchBySid(@Param("sid") String sid); |
|||
|
|||
List<SysMenuTreeVo> getChildrensForMenuTree(@Param(Constants.WRAPPER) QueryWrapper<SysMenuTreeVo> qw); |
|||
|
|||
/** |
|||
* 将该资源下的所有菜单设置是否可用 |
|||
* |
|||
* @param sid 资源sid |
|||
* @param isEnable 是否可用:1可用,0不可用 |
|||
* @return |
|||
*/ |
|||
int updateBySourceSid(@Param("sid") String sid, @Param("isEnable") Integer isEnable); |
|||
|
|||
/** |
|||
* 根据上级sid查询菜单的子集菜单 |
|||
* |
|||
* @param sid 菜单sid |
|||
* @return |
|||
*/ |
|||
List<SysMenuTreeVo> selectChildernList(String sid); |
|||
|
|||
/** |
|||
* 查询该资源下是否有可用的菜单 |
|||
* |
|||
* @param isEnable |
|||
* @return |
|||
*/ |
|||
int selectBySourceSid(@Param("isEnable") int isEnable, @Param("sourceSid") String sourceSid); |
|||
|
|||
List<SysMenu> selectByMenuUrl(String menuUrl); |
|||
|
|||
/** |
|||
* 查询该资源下一级菜单列表 |
|||
* |
|||
* @param sourceSid 资源sid |
|||
* @return |
|||
*/ |
|||
List<SysMenuTreeVo> fetchRootMenuBySourceSid(@Param("sourceSid") String sourceSid); |
|||
} |
@ -0,0 +1,88 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.admin.biz.func.sysmenu.SysMenuMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.admin.biz.func.sysmenu.SysMenuVo"> |
|||
SELECT * |
|||
FROM sys_menu |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="selectListAllVo" resultType="com.yxt.admin.biz.func.sysmenu.SysMenuVo"> |
|||
SELECT menu.*, source.sourceName, pmenu.name as pName |
|||
FROM sys_menu menu |
|||
left join sys_menu pmenu on pmenu.sid = menu.psid |
|||
left join sys_source_menu sourceMenu on sourceMenu.menuSid = menu.sid |
|||
left join sys_source source on source.sid = sourceMenu.sourceSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="listAllParentByRoleSid" resultType="com.yxt.admin.biz.func.sysmenu.SysMenuVo"> |
|||
SELECT menu.*, ISNULL(menuRole.sid) as checked |
|||
FROM sys_menu menu |
|||
left join sys_menu_role menuRole on menu.sid = menuRole.menuSid AND menuRole.roleSid = #{param1} |
|||
where menu.pSid = #{param2} |
|||
<if test="sourceSid != null"> |
|||
and menu.sourceSid = #{sourceSid} |
|||
</if> |
|||
</select> |
|||
<select id="getChildrensForMenuTree" resultType="com.yxt.admin.biz.func.sysmenu.SysMenuTreeVo"> |
|||
SELECT menu.*, source.sourceName, sourceMenu.menuRootSid as menuRootSid |
|||
FROM sys_menu menu |
|||
left join sys_source_menu sourceMenu on sourceMenu.menuSid = menu.sid |
|||
left join sys_source source on source.sid = sourceMenu.sourceSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<!--将该资源下的所有菜单设置为是否可用--> |
|||
<update id="updateBySourceSid"> |
|||
update sys_menu |
|||
set isEnable = #{isEnable} |
|||
where sourceSid = #{sid} |
|||
</update> |
|||
|
|||
<select id="selectChildernList" resultType="com.yxt.admin.biz.func.sysmenu.SysMenuTreeVo"> |
|||
SELECT menu.*, source.sourceName, menu.pSid as menuRootSid |
|||
FROM sys_menu menu |
|||
left join sys_source source on source.sid = menu.sourceSid |
|||
where menu.pSid = #{sid} |
|||
ORDER BY menu.sortNo ASC |
|||
</select> |
|||
|
|||
<select id="selectBySourceSid" resultType="int"> |
|||
select count(*) |
|||
from sys_menu |
|||
where isEnable = #{isEnable} |
|||
and sourceSid = #{sourceSid} |
|||
</select> |
|||
|
|||
<select id="selectByMenuUrl" resultType="com.yxt.admin.biz.func.sysmenu.SysMenu"> |
|||
select * from sys_menu where menuUrl = #{menuUrl} |
|||
</select> |
|||
<!--将该资源下的所有一级菜单列表--> |
|||
<select id="fetchRootMenuBySourceSid" resultType="com.yxt.admin.biz.func.sysmenu.SysMenuTreeVo"> |
|||
SELECT menu.NAME AS NAME, |
|||
menu.sid AS sid, |
|||
menu.sid AS sid, |
|||
source.sid AS sourceSid, |
|||
menu.sortNo AS sortNo, |
|||
menu.pSid AS pSid, |
|||
source.sourceName AS sourceName, |
|||
menu.sid AS menuRootSid, |
|||
menu.menuUrl AS menuUrl, |
|||
menu.iconUrl AS iconUrl, |
|||
menu.pageName AS pageName, |
|||
menu.pageUrlRedirect AS pageUrlRedirect, |
|||
menu.pageUrl AS pageUrl, |
|||
menu.remarks, |
|||
menu.isEnable |
|||
FROM sys_menu menu |
|||
LEFT JOIN sys_source source ON menu.sourceSid = source.sid |
|||
WHERE source.sid = #{sourceSid} AND menu.psid='0' and menu.isDelete!=1 |
|||
ORDER BY menu.sortNo ASC |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,68 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuQuery.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenu.SysMenuQuery <br/> |
|||
* Description: 菜单表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单表 查询条件", description = "菜单表 查询条件") |
|||
@Data |
|||
public class SysMenuQuery implements Query { |
|||
|
|||
|
|||
@ApiModelProperty("菜单名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("菜单路由路径(VUE)") |
|||
private String menuUrl; |
|||
|
|||
@ApiModelProperty("菜单对应的前端页面路径") |
|||
private String pageUrl; |
|||
|
|||
@ApiModelProperty("菜单图标地址") |
|||
private String iconUrl; |
|||
|
|||
@ApiModelProperty("资源sid") |
|||
private String sourceSid; |
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty("角色sid") |
|||
private String roleSid; |
|||
|
|||
@ApiModelProperty("是否显示,默认为1显示,0为不显示") |
|||
private String isShow; |
|||
|
|||
@ApiModelProperty("排序号") |
|||
private Integer sortNo; |
|||
|
|||
@ApiModelProperty("上级sid") |
|||
private String pSid; |
|||
|
|||
@ApiModelProperty("前端页面路径重定向") |
|||
private Integer pageUrlRedirect; |
|||
|
|||
@ApiModelProperty("前端页面名称(vue组件名)") |
|||
private String pageName; |
|||
|
|||
@ApiModelProperty("前端页面别名") |
|||
private String pageAliasName; |
|||
|
|||
@ApiModelProperty("菜单类型(0左侧当行菜单,1页面中功能)") |
|||
private String menuType; |
|||
private String orgSid;//部门
|
|||
|
|||
} |
@ -0,0 +1,418 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.sysmenurole.SysMenuRoleVo; |
|||
import com.yxt.admin.feign.portal.sysmenu.SysMenuFeign; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuService.java <br/> |
|||
* Class: com.yxt.user.biz.sysmenu.SysMenuService <br/> |
|||
* Description: 菜单表 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class SysMenuService extends MybatisBaseService<SysMenuMapper, SysMenu> { |
|||
@Autowired |
|||
SysMenuFeign sysMenuFeign; |
|||
|
|||
|
|||
|
|||
public PagerVo<SysMenu> listPage(PagerQuery<SysMenuQuery> pq) { |
|||
SysMenuQuery query = pq.getParams(); |
|||
QueryWrapper<SysMenu> qw = createQueryWrapper(query); |
|||
IPage<SysMenu> page = PagerUtil.queryToPage(pq); |
|||
IPage<SysMenu> pagging = baseMapper.selectPage(page, qw); |
|||
PagerVo<SysMenu> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
@Override |
|||
public SysMenu fetchBySid(String sid) { |
|||
return baseMapper.fetchBySid(sid); |
|||
} |
|||
|
|||
public List<SysMenu> listAll(SysMenuQuery query) { |
|||
QueryWrapper<SysMenu> qw = createQueryWrapper(query); |
|||
return baseMapper.selectList(qw); |
|||
} |
|||
|
|||
private QueryWrapper<SysMenu> createQueryWrapper(SysMenuQuery query) { |
|||
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|||
QueryWrapper<SysMenu> qw = new QueryWrapper<>(); |
|||
if (StringUtils.isNotBlank(query.getName())) { |
|||
qw.eq("name", query.getName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getMenuUrl())) { |
|||
qw.eq("menuUrl", query.getMenuUrl()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getPageUrl())) { |
|||
qw.eq("pageUrl", query.getPageUrl()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getIconUrl())) { |
|||
qw.eq("iconUrl", query.getIconUrl()); |
|||
} |
|||
if (query.getSourceSid() != null) { |
|||
qw.eq("sourceSid", query.getSourceSid()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getIsShow())) { |
|||
qw.eq("isShow", query.getIsShow()); |
|||
} |
|||
|
|||
if (query.getSortNo() != null) { |
|||
qw.eq("sortNo", query.getSortNo()); |
|||
} |
|||
|
|||
if (StringUtils.isNotBlank(query.getPSid())) { |
|||
qw.eq("pSid", query.getPSid()); |
|||
} |
|||
|
|||
if (query.getPageUrlRedirect() != null) { |
|||
qw.eq("pageUrlRedirect", query.getPageUrlRedirect()); |
|||
} |
|||
|
|||
if (StringUtils.isNotBlank(query.getPageName())) { |
|||
qw.eq("pageName", query.getPageName()); |
|||
} |
|||
|
|||
if (StringUtils.isNotBlank(query.getPageAliasName())) { |
|||
qw.eq("pageAliasName", query.getPageAliasName()); |
|||
} |
|||
|
|||
if (StringUtils.isNotBlank(query.getMenuType())) { |
|||
qw.eq("menuType", query.getMenuType()); |
|||
} |
|||
return qw; |
|||
} |
|||
|
|||
public ResultBean<PagerVo<SysMenuVo>> listPageVo(PagerQuery<SysMenuQuery> pq) { |
|||
return sysMenuFeign.listPage(pq); |
|||
} |
|||
|
|||
/* public List<SysMenuVo> listAllVo(SysMenuQuery query) { |
|||
QueryWrapper<SysMenu> qw = new QueryWrapper<>(); |
|||
qw.eq("menu.pSid", "0"); |
|||
List<SysMenuVo> sysMenuVos = baseMapper.selectListAllVo(qw); |
|||
for(SysMenuVo s:sysMenuVos){ |
|||
getChildrens(s); |
|||
} |
|||
return sysMenuVos; |
|||
}*/ |
|||
public ResultBean<List<SysMenuTreeVo>> listAllVoForSource(PagerQuery<SysMenuQuery> query) { |
|||
|
|||
return sysMenuFeign.listAllVoForSource(query.getParams()); |
|||
} |
|||
public ResultBean<List<SysMenuTreeVo>> listAllVoForSourceG(PagerQuery<SysMenuQuery> query) { |
|||
|
|||
return sysMenuFeign.listAllVoForSourceG(query.getParams()); |
|||
} |
|||
public ResultBean<List<Map<String,String>>> getMenusForFunction(SysMenuFunctionQuery sysMenuFunctionQuery) { |
|||
return sysMenuFeign.getMenusForFunction(sysMenuFunctionQuery); |
|||
} |
|||
public ResultBean<List<Map<String, Object>>> sourceMenuTreeByUserSid(SysMenuQuery query) { |
|||
return sysMenuFeign.sourceMenuTreeByUserSid(query); |
|||
} |
|||
|
|||
public ResultBean<List<Map<String, Object>>> sourcemenutree(SysMenuQuery query) { |
|||
return sysMenuFeign.sourcemenutree(query); |
|||
} |
|||
|
|||
public void getChildList(List<SysMenuTreeVo> list) { |
|||
list.forEach(str -> { |
|||
String sid = str.getSid(); |
|||
List<SysMenuTreeVo> listChildren = baseMapper.selectChildernList(sid); |
|||
str.setChildren(listChildren); |
|||
getChildList(listChildren); |
|||
}); |
|||
} |
|||
|
|||
/*暂时废弃*/ |
|||
/*private List<SysMenuTreeVo> getChildrensForMenuTree(List<SysMenuTreeVo> sysMenuVoList) { |
|||
List<SysMenuTreeVo> list = new ArrayList<>(); |
|||
for (SysMenuTreeVo s : sysMenuVoList) { |
|||
SysMenu sysMenu = sysMenuService.fetchBySid(s.getMenuRootSid()); |
|||
SysMenuTreeVo sysMenuTreeVo = new SysMenuTreeVo(); |
|||
BeanUtil.copyProperties(sysMenu, sysMenuTreeVo); |
|||
list.add(sysMenuTreeVo); |
|||
} |
|||
for (SysMenuTreeVo s : list) { |
|||
getChildrensForMenuTree(s, s.getSid()); |
|||
} |
|||
return list; |
|||
} |
|||
private void getChildrensForMenuTree(SysMenuTreeVo s,String sid){ |
|||
QueryWrapper<SysMenuTreeVo> qw = new QueryWrapper<>(); |
|||
if (StringUtils.isNotBlank(sid)) { |
|||
qw.eq("menu.pSid", sid); |
|||
} |
|||
List<SysMenuTreeVo> sysMenuVos = baseMapper.getChildrensForMenuTree(qw); |
|||
if(!sysMenuVos.isEmpty()){ |
|||
for(SysMenuTreeVo smv:sysMenuVos){ |
|||
getChildrensForMenuTree(smv,smv.getSid()); |
|||
} |
|||
} |
|||
s.setChildren(sysMenuVos); |
|||
} |
|||
private void getChildrens(SysMenuVo s){ |
|||
String sid = s.getSid(); |
|||
QueryWrapper<SysMenu> qw = new QueryWrapper<>(); |
|||
if (StringUtils.isNotBlank(sid)) { |
|||
qw.eq("menu.pSid", sid); |
|||
} |
|||
List<SysMenuVo> sysMenuVos = baseMapper.selectListAllVo(qw); |
|||
if(!sysMenuVos.isEmpty()){ |
|||
for(SysMenuVo smv:sysMenuVos){ |
|||
getChildrens(smv); |
|||
} |
|||
} |
|||
s.setChildren(sysMenuVos); |
|||
}*/ |
|||
public ResultBean<List<SysMenuVo>> listVo() { |
|||
return sysMenuFeign.list(); |
|||
} |
|||
|
|||
/* public void saveOrUpdateDto(SysMenuDto dto) { |
|||
SysMenu entity = new SysMenu(); |
|||
dto.fillEntity(entity); |
|||
SysSourceMenu sysSourceMenu = new SysSourceMenu(); |
|||
sysSourceMenu.setMenuSid(entity.getSid()); |
|||
sysSourceMenu.setSourceSid(dto.getSourceSid()); |
|||
setRootSid(entity, sysSourceMenu); |
|||
sysSourceMenuService.save(sysSourceMenu); |
|||
this.saveOrUpdate(entity); |
|||
}*/ |
|||
|
|||
// private void setRootSid(SysMenu entity, SysSourceMenu sysSourceMenu) {
|
|||
// String pSid = entity.getPSid();
|
|||
// if ("0".equals(pSid)) {
|
|||
// sysSourceMenu.setMenuRootSid(entity.getSid());
|
|||
// } else {
|
|||
// SysMenu sysMenu = sysMenuService.fetchBySid(pSid);
|
|||
// String pSid1 = sysMenu.getPSid();
|
|||
// if ("0".equals(pSid1)) {
|
|||
// sysSourceMenu.setMenuRootSid(sysMenu.getSid());
|
|||
// }
|
|||
// setRootSid(sysMenu, sysSourceMenu);
|
|||
// }
|
|||
// }
|
|||
|
|||
public SysMenuVo fetchByIdVo(String id) { |
|||
SysMenu entity = this.fetchById(id); |
|||
SysMenuVo vo = new SysMenuVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
return vo; |
|||
} |
|||
|
|||
public ResultBean<List<SysMenuVo>> listAllByRoleSid(SysMenuQuery query) { |
|||
|
|||
return sysMenuFeign.listAllByRoleSid(query); |
|||
} |
|||
|
|||
private void getChildrensByRoleSid(SysMenuVo s, String roleSid, String sourceSid) { |
|||
String sid = s.getSid(); |
|||
List<SysMenuVo> sysMenuVos = baseMapper.listAllParentByRoleSid(roleSid, sid, sourceSid); |
|||
if (!sysMenuVos.isEmpty()) { |
|||
for (SysMenuVo smv : sysMenuVos) { |
|||
getChildrensByRoleSid(smv, roleSid, sourceSid); |
|||
} |
|||
} |
|||
s.setChildren(sysMenuVos); |
|||
} |
|||
|
|||
/*public List<SysMenuTreeVo> listAllVoBySourceSId(SysMenuQuery query) { |
|||
SysSource sysSource = sysSourceService.fetchBySid(query.getSourceSid()); |
|||
List<SysMenuTreeVo> sysSourceVos = new ArrayList<>();//sysSourceService.listAllVoBySourceSId(query.getSourceSid());
|
|||
SysMenuTreeVo smtv=new SysMenuTreeVo(); |
|||
smtv.setName(sysSource.getSourceName()); |
|||
smtv.setSid(sysSource.getSid()); |
|||
smtv.setSourceSid(sysSource.getSid()); |
|||
sysSourceVos.add(smtv); |
|||
for(SysMenuTreeVo s:sysSourceVos){ |
|||
List<SysMenuTreeVo> sysMenuVoList=sysSourceMenuService.fetchRootMenuBySourceSid(s.getSourceSid()); |
|||
if(!sysMenuVoList.isEmpty()){ |
|||
sysMenuVoList = getChildrensForMenuTree(sysMenuVoList); |
|||
} |
|||
s.setChildren(sysMenuVoList); |
|||
} |
|||
return sysSourceVos; |
|||
}*/ |
|||
|
|||
/** |
|||
* 资源菜单树形列表 |
|||
* |
|||
* @return 资源菜单树形列表(第一级一级菜单 第二级二级菜单) |
|||
*/ |
|||
public List<Map<String, Object>> getSourceMenuTree(List<SysMenuRoleVo> list_menu, Map<String, Object> map_selectMenus) { |
|||
|
|||
//获取当前资源的菜单列表
|
|||
List<Map<String, Object>> list_menus_map = new ArrayList<Map<String, Object>>(); |
|||
|
|||
|
|||
//获取资源第一级菜单列表
|
|||
List<SysMenuRoleVo> list_firstLevel_menu = list_menu.stream().filter(s -> s.getPSid().equals("0")).collect(Collectors.toList()); |
|||
|
|||
//遍历资源的第一级菜单
|
|||
for (int i = 0; i < list_firstLevel_menu.size(); i++) { |
|||
Map<String, Object> map_firstLevel_menu = getMenuTreeFromStream(list_firstLevel_menu.get(i).getSid(), list_menu, map_selectMenus); |
|||
//把该菜单挂在当前菜单列表中
|
|||
if (null != map_firstLevel_menu) |
|||
list_menus_map.add(map_firstLevel_menu); |
|||
} |
|||
return list_menus_map; |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 递归把list转换成菜单树形列表 |
|||
* |
|||
* @param psid |
|||
* @param list_menu |
|||
* @return |
|||
*/ |
|||
private Map<String, Object> getMenuTreeFromStream(String psid, List<SysMenuRoleVo> list_menu, Map<String, Object> map_selectMenus) { |
|||
//获取当前菜单
|
|||
List<SysMenuRoleVo> list_current_menu = list_menu.stream().filter(s -> s.getSid().equals(psid)).collect(Collectors.toList()); |
|||
if (null == list_current_menu || 0 == list_current_menu.size()) |
|||
return null; |
|||
|
|||
Map<String, Object> map_menu = getMenuMap(list_current_menu.get(0), map_selectMenus); |
|||
|
|||
//2.获取菜单的子菜单列表
|
|||
//存储最终子菜单列表结果
|
|||
List<Map<String, Object>> list_child = new ArrayList<Map<String, Object>>(); |
|||
|
|||
//获取子菜单列表
|
|||
List<SysMenuRoleVo> list_child_menu = list_menu.stream().filter(s -> s.getPSid().equals(psid)).collect(Collectors.toList()); |
|||
for (int i = 0; i < list_child_menu.size(); i++) { |
|||
//获取该菜单子菜单列表
|
|||
Map<String, Object> map_child_menu = getMenuTreeFromStream(list_child_menu.get(i).getSid(), list_menu, map_selectMenus); |
|||
//把该菜单挂在当前菜单列表中
|
|||
if (null != map_child_menu) |
|||
list_child.add(map_child_menu); |
|||
} |
|||
//把该菜单列表放到父菜单的childMenus中
|
|||
map_menu.put("children", list_child); |
|||
|
|||
return map_menu; |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 构造菜单的结果map |
|||
* |
|||
* @return |
|||
*/ |
|||
private Map<String, Object> getMenuMap(SysMenuRoleVo menuVo, Map<String, Object> map_selectMenus) { |
|||
Map<String, Object> map_menu = new HashMap<String, Object>(); |
|||
|
|||
if (null != map_selectMenus) { |
|||
//角色授权时,菜单列表
|
|||
map_menu.put("sid", menuVo.getSid()); |
|||
map_menu.put("menuName", menuVo.getMenuName() + (StringUtils.isNotBlank(menuVo.getRemarks()) ? "(" + menuVo.getRemarks() + ")" : "")); |
|||
map_menu.put("menuUrl", menuVo.getMenuUrl()); |
|||
map_menu.put("pageUrl", menuVo.getPageUrl()); |
|||
map_menu.put("iconUrl", menuVo.getIconUrl()); |
|||
map_menu.put("isShow", menuVo.getIsShow()); |
|||
if (menuVo.getAlwaysShow() == 0) { |
|||
map_menu.put("alwaysShow", false); |
|||
} else if (menuVo.getAlwaysShow() == 1) { |
|||
map_menu.put("alwaysShow", true); |
|||
} |
|||
|
|||
//如果角色已有的菜单,则设置选中,并移除map中的项;否则设置不选中
|
|||
if (map_selectMenus.containsKey(menuVo.getSid())) { |
|||
map_menu.put("isCheck", 1); |
|||
map_selectMenus.remove(menuVo.getSid()); |
|||
} else { |
|||
map_menu.put("isCheck", 0); |
|||
} |
|||
} else { |
|||
//左侧菜单列表
|
|||
Map<String, Object> map_meta = new HashMap<String, Object>(); |
|||
map_meta.put("title", menuVo.getMenuName()); |
|||
map_meta.put("icon", menuVo.getIconUrl()); |
|||
map_menu.put("meta", map_meta); |
|||
|
|||
map_menu.put("redirect", menuVo.getPageUrlRedirect()); |
|||
//路径
|
|||
map_menu.put("path", menuVo.getPageUrl() != null && !menuVo.getPageUrl().equals("") ? menuVo.getPageUrl() : "/" + menuVo.getPageName()); |
|||
map_menu.put("name", menuVo.getPageAliasName() != null && !menuVo.getPageAliasName().equals("") ? menuVo.getPageAliasName() : menuVo.getPageUrl()); |
|||
//组件名
|
|||
map_menu.put("component", menuVo.getPageName()); |
|||
if (menuVo.getAlwaysShow() == 0) { |
|||
map_menu.put("alwaysShow", false); |
|||
} else if (menuVo.getAlwaysShow() == 1) { |
|||
map_menu.put("alwaysShow", true); |
|||
} |
|||
} |
|||
return map_menu; |
|||
} |
|||
|
|||
/** |
|||
* 将该资源下的所有菜单设置为是否可用 |
|||
* |
|||
* @param sid 资源sid |
|||
* @param isEnable 是否可用:1可用,0不可用 |
|||
* @return |
|||
*/ |
|||
public int updateBySourceSid(String sid, Integer isEnable) { |
|||
return baseMapper.updateBySourceSid(sid, isEnable); |
|||
} |
|||
|
|||
public ResultBean saveMenu(SysMenuDto dto) { |
|||
return sysMenuFeign.save(dto); |
|||
} |
|||
public ResultBean updateBySid( SysMenuDto dto, String sid) { |
|||
return sysMenuFeign.update(dto,sid); |
|||
} |
|||
public ResultBean updateIsEnable( String sid, Integer isEnable) { |
|||
return sysMenuFeign.updateIsEnable(sid,isEnable); |
|||
} |
|||
public ResultBean delBySids( String sid) { |
|||
return sysMenuFeign.delBySids(sid); |
|||
} |
|||
|
|||
public List<SysMenu> selectByMenuUrl(String menuUrl) { |
|||
return baseMapper.selectByMenuUrl(menuUrl); |
|||
} |
|||
|
|||
/** |
|||
* 根据资源sid查询该资源下的一级菜单列表(yxt_mtl 2024-01-31) |
|||
* |
|||
* @param sid 资源sid |
|||
* @return |
|||
*/ |
|||
public List<SysMenuTreeVo> fetchRootMenuBySourceSid(String sid) { |
|||
return baseMapper.fetchRootMenuBySourceSid(sid); |
|||
} |
|||
|
|||
public ResultBean<List<SysMenuVo>> listAllByRoleSidG(@RequestBody SysMenuQuery query){ |
|||
return sysMenuFeign.listAllByRoleSidG(query); |
|||
} |
|||
public ResultBean<List<ButtonPermissionVo>> getButtonPermissions(ButtonPermissionQuery query) { |
|||
return sysMenuFeign.getButtonPermissions(query); |
|||
} |
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuVo.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenu.SysMenuVo <br/> |
|||
* Description: 菜单表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单表 视图数据对象", description = "菜单表 视图数据对象") |
|||
@Data |
|||
public class SysMenuTreeVo implements Vo { |
|||
@ApiModelProperty("菜单名称") |
|||
private String name; |
|||
@ApiModelProperty("资源sid") |
|||
private String sourceSid; |
|||
@ApiModelProperty("排序号") |
|||
private Integer sortNo; |
|||
@ApiModelProperty("上级sid") |
|||
private String pSid; |
|||
@ApiModelProperty("上级菜单名称") |
|||
private String pName; |
|||
@ApiModelProperty("sid") |
|||
private String sid; |
|||
@ApiModelProperty("资源名称") |
|||
private String sourceName; |
|||
@ApiModelProperty("菜单根路径sid") |
|||
private String menuRootSid; |
|||
@ApiModelProperty("pageUrl") |
|||
private String pageUrl; |
|||
@ApiModelProperty("menuUrl") |
|||
private String menuUrl; |
|||
@ApiModelProperty("menuUrl") |
|||
private String pageName; |
|||
@ApiModelProperty("iconUrl") |
|||
private String iconUrl; |
|||
@ApiModelProperty("菜单列表用,是否是资源层级1是,0不是") |
|||
private String isSource = "0"; |
|||
@ApiModelProperty("是否可用") |
|||
private String isEnable; |
|||
@ApiModelProperty(value = "备注") |
|||
private String remarks; |
|||
@ApiModelProperty("子菜单") |
|||
private List<SysMenuTreeVo> children; |
|||
private String menuType; |
|||
private String isShow; |
|||
private String menuTypeValue; |
|||
private String cid; |
|||
|
|||
} |
@ -0,0 +1,76 @@ |
|||
package com.yxt.admin.biz.func.sysmenu; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuVo.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenu.SysMenuVo <br/> |
|||
* Description: 菜单表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单表 视图数据对象", description = "菜单表 视图数据对象") |
|||
@Data |
|||
public class SysMenuVo implements Vo { |
|||
|
|||
|
|||
@ApiModelProperty("菜单名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("菜单路由路径(VUE)") |
|||
private String menuUrl; |
|||
|
|||
@ApiModelProperty("菜单对应的前端页面路径") |
|||
private String pageUrl; |
|||
|
|||
@ApiModelProperty("菜单图标地址") |
|||
private String iconUrl; |
|||
|
|||
@ApiModelProperty("资源sid") |
|||
private String sourceSid; |
|||
|
|||
@ApiModelProperty("是否显示,默认为1显示,0为不显示") |
|||
private String isShow; |
|||
|
|||
@ApiModelProperty("排序号") |
|||
private Integer sortNo; |
|||
|
|||
@ApiModelProperty("上级sid") |
|||
private String pSid; |
|||
@ApiModelProperty("上级名称") |
|||
private String pName; |
|||
@ApiModelProperty("sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("前端页面路径重定向") |
|||
private Integer pageUrlRedirect; |
|||
|
|||
@ApiModelProperty("前端页面名称(vue组件名)") |
|||
private String pageName; |
|||
|
|||
@ApiModelProperty("前端页面别名") |
|||
private String pageAliasName; |
|||
|
|||
@ApiModelProperty("菜单类型(0左侧当行菜单,1页面中功能)") |
|||
private String menuType; |
|||
@ApiModelProperty("子菜单") |
|||
private List<SysMenuVo> children; |
|||
@ApiModelProperty("是否选中,1:未选中,0:选中") |
|||
private String checked; |
|||
@ApiModelProperty("资源名称") |
|||
private String sourceName; |
|||
private String cid; |
|||
|
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: 菜单和角色临时存储 |
|||
* @author: dimengzhe |
|||
* @date: 2023/6/1 |
|||
**/ |
|||
@Data |
|||
public class MenuRoleVo { |
|||
|
|||
|
|||
@ApiModelProperty("数据权限ID(1集团、2事业部、3分公司、4部门、5个人)") |
|||
private String dataRuleId; |
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRole.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenurole.SysMenuRole <br/> |
|||
* Description: 菜单与角色关联表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单与角色关联表", description = "菜单与角色关联表") |
|||
@TableName("sys_menu_role") |
|||
@Data |
|||
public class SysMenuRole extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
|
|||
@ApiModelProperty("角色sid") |
|||
private String roleSid; |
|||
|
|||
@ApiModelProperty("数据权限ID(1集团、2事业部、3分公司、4部门、5个人)") |
|||
private String dataRuleId; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRoleDto.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenurole.SysMenuRoleDto <br/> |
|||
* Description: 菜单与角色关联表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单与角色关联表 数据传输对象", description = "菜单与角色关联表 数据传输对象") |
|||
@Data |
|||
public class SysMenuRoleDataDto implements Dto { |
|||
|
|||
@ApiModelProperty("菜单与角色关联表sid") |
|||
private String sid; |
|||
@ApiModelProperty("数据权限ID(1集团、2事业部、3分公司、4部门、5个人)") |
|||
private String dataRuleId; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRoleQuery.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenurole.SysMenuRoleQuery <br/> |
|||
* Description: 菜单与角色关联表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单与角色关联表 查询条件", description = "菜单与角色关联表 查询条件") |
|||
@Data |
|||
public class SysMenuRoleDataQuery implements Query { |
|||
|
|||
@ApiModelProperty("角色sid") |
|||
private String roleSid; |
|||
@ApiModelProperty("菜单名称") |
|||
private String menuName; |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRoleVo.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenurole.SysMenuRoleVo <br/> |
|||
* Description: 菜单与角色关联表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单与角色关联表 视图数据对象", description = "菜单与角色关联表 视图数据对象") |
|||
@Data |
|||
public class SysMenuRoleDataVo implements Vo { |
|||
|
|||
@ApiModelProperty("菜单与角色关联表sid") |
|||
private String sid; |
|||
@ApiModelProperty("菜单名称") |
|||
private String name; |
|||
@ApiModelProperty("数据权限ID(1集团、2事业部、3分公司、4部门、5个人)") |
|||
private String dataRuleId; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRoleDto.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenurole.SysMenuRoleDto <br/> |
|||
* Description: 菜单与角色关联表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单与角色关联表 数据传输对象", description = "菜单与角色关联表 数据传输对象") |
|||
@Data |
|||
public class SysMenuRoleDto implements Dto { |
|||
|
|||
|
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
@ApiModelProperty("角色sid") |
|||
private String roleSid; |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRoleMapper.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.sysmenurole.SysMenuRoleMapper <br/> |
|||
* Description: 菜单与角色关联表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface SysMenuRoleMapper extends BaseMapper<SysMenuRole> { |
|||
|
|||
//@Update("update sys_menu_role set name=#{msg} where id=#{id}")
|
|||
//IPage<SysMenuRoleVo> voPage(IPage<SysMenuRole> page, @Param(Constants.WRAPPER) QueryWrapper<SysMenuRole> qw);
|
|||
|
|||
IPage<SysMenuRoleVo> selectPageVo(IPage<SysMenuRole> page, @Param(Constants.WRAPPER) Wrapper<SysMenuRole> qw); |
|||
|
|||
List<SysMenuRoleVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<SysMenuRole> qw); |
|||
|
|||
@Select("select * from sys_menu_role") |
|||
List<SysMenuRoleVo> selectListVo(); |
|||
|
|||
@Delete("delete from sys_menu_role where roleSid=#{roleSid}") |
|||
void delByRoleSid(@Param("roleSid") String roleSid); |
|||
|
|||
List<SysMenuRoleVo> list(@Param(Constants.WRAPPER) QueryWrapper<SysMenuRoleVo> qw); |
|||
|
|||
List<MenuRoleVo> selectByRoleSid(String roleSid); |
|||
|
|||
List<SysMenuRoleDataVo> selMenuByRole(@Param(Constants.WRAPPER) QueryWrapper qw); |
|||
|
|||
List<SysMenuRoleDataVo> selMenuByRoleApp(@Param(Constants.WRAPPER) QueryWrapper qw); |
|||
|
|||
@Update("update sys_menu_role set dataRuleId = #{dataRuleId} where sid = #{sid}") |
|||
void updateDataByRoleMenu(@Param("sid") String sid,@Param("dataRuleId") String dataRuleId); |
|||
|
|||
@Update("update sys_mobile_menu_role set dataRuleId = #{dataRuleId} where sid = #{sid}") |
|||
void updateDataByRoleMenuApp(@Param("sid") String sid,@Param("dataRuleId") String dataRuleId); |
|||
|
|||
|
|||
} |
@ -0,0 +1,74 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.admin.biz.func.sysmenurole.SysMenuRoleMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.admin.biz.func.sysmenurole.SysMenuRoleVo"> |
|||
SELECT * FROM sys_menu_role |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.admin.biz.func.sysmenurole.SysMenuRoleVo"> |
|||
SELECT * FROM sys_menu_role |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="list" parameterType="com.yxt.admin.biz.func.sysmenurole.SysMenuRoleQuery" |
|||
resultType="com.yxt.admin.biz.func.sysmenurole.SysMenuRoleVo"> |
|||
SELECT distinct rm.menuSid as sid, |
|||
m.name as menuName, |
|||
m.menuUrl, |
|||
m.pageUrl, |
|||
m.pageName, |
|||
m.pageUrlRedirect, |
|||
m.pageAliasName, |
|||
m.iconUrl, |
|||
m.sourceSid, |
|||
m.isShow, |
|||
m.pSid, |
|||
m.sortNo, |
|||
m.remarks, |
|||
1 as alwaysShow |
|||
FROM sys_menu_role rm |
|||
LEFT JOIN sys_menu m ON rm.menuSid = m.sid |
|||
${ew.customSqlSegment} |
|||
</select> |
|||
|
|||
<select id="selectByRoleSid" resultType="com.yxt.admin.biz.func.sysmenurole.MenuRoleVo"> |
|||
select menuSid, dataRuleId |
|||
from sys_menu_role |
|||
where roleSid = #{roleSid} |
|||
</select> |
|||
|
|||
<select id="selMenuByRole" resultType="com.yxt.admin.biz.func.sysmenurole.SysMenuRoleDataVo"> |
|||
SELECT |
|||
smr.sid, |
|||
sm.`name`, |
|||
smr.`dataRuleId` |
|||
FROM |
|||
sys_menu sm |
|||
LEFT JOIN sys_menu_role smr |
|||
ON smr.`menuSid` = sm.`sid` |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selMenuByRoleApp" resultType="com.yxt.admin.biz.func.sysmenurole.SysMenuRoleDataVo"> |
|||
SELECT |
|||
smmr.sid, |
|||
smm.`name`, |
|||
smmr.`dataRuleId` |
|||
FROM |
|||
sys_mobile_menu smm |
|||
LEFT JOIN sys_mobile_menu_role smmr |
|||
ON smmr.`menuSid` = smm.`sid` |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,40 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRoleQuery.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenurole.SysMenuRoleQuery <br/> |
|||
* Description: 菜单与角色关联表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单与角色关联表 查询条件", description = "菜单与角色关联表 查询条件") |
|||
@Data |
|||
public class SysMenuRoleQuery implements Query { |
|||
|
|||
|
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
|
|||
@ApiModelProperty("角色sid") |
|||
private String roleSid; |
|||
@ApiModelProperty("多个角色sid计集合") |
|||
private List<String> roleSids; |
|||
@ApiModelProperty("资源sid") |
|||
private String sourceSid; |
|||
@ApiModelProperty("是否是系统管理员") |
|||
private String isAdmin; |
|||
} |
@ -0,0 +1,210 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.admin.biz.func.sysmenu.SysMenuService; |
|||
import com.yxt.admin.feign.portal.sysmenurole.SysMenuRoleFeign; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRoleService.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.sysmenurole.SysMenuRoleService <br/> |
|||
* Description: 菜单与角色关联表 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class SysMenuRoleService extends MybatisBaseService<SysMenuRoleMapper, SysMenuRole> { |
|||
|
|||
@Autowired |
|||
SysMenuRoleFeign sysMenuRoleFeign; |
|||
@Autowired |
|||
SysMenuService sysMenuService; |
|||
|
|||
public PagerVo<SysMenuRole> listPage(PagerQuery<SysMenuRoleQuery> pq) { |
|||
SysMenuRoleQuery query = pq.getParams(); |
|||
QueryWrapper<SysMenuRole> qw = createQueryWrapper(query); |
|||
IPage<SysMenuRole> page = PagerUtil.queryToPage(pq); |
|||
IPage<SysMenuRole> pagging = baseMapper.selectPage(page, qw); |
|||
PagerVo<SysMenuRole> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public List<SysMenuRole> listAll(SysMenuRoleQuery query) { |
|||
QueryWrapper<SysMenuRole> qw = createQueryWrapper(query); |
|||
return baseMapper.selectList(qw); |
|||
} |
|||
|
|||
private QueryWrapper<SysMenuRole> createQueryWrapper(SysMenuRoleQuery query) { |
|||
// todo: 这里根据具体业务调整查询条件
|
|||
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|||
QueryWrapper<SysMenuRole> qw = new QueryWrapper<>(); |
|||
|
|||
|
|||
if (StringUtils.isNotBlank(query.getMenuSid())) { |
|||
qw.eq("menuSid", query.getMenuSid()); |
|||
} |
|||
|
|||
if (StringUtils.isNotBlank(query.getRoleSid())) { |
|||
qw.eq("roleSid", query.getRoleSid()); |
|||
} |
|||
return qw; |
|||
} |
|||
|
|||
public ResultBean<PagerVo<SysMenuRoleVo>> listPageVo(PagerQuery<SysMenuRoleQuery> pq) { |
|||
return sysMenuRoleFeign.listPage(pq); |
|||
} |
|||
|
|||
public ResultBean<List<SysMenuRoleVo>> listAllVo(SysMenuRoleQuery query) { |
|||
QueryWrapper<SysMenuRole> qw = createQueryWrapper(query); |
|||
return sysMenuRoleFeign.listAll(query); |
|||
} |
|||
|
|||
public ResultBean<List<SysMenuRoleVo>> listVo() { |
|||
return sysMenuRoleFeign.list(); |
|||
} |
|||
|
|||
public ResultBean saveOrUpdateDto(SysMenuRoleDto dto) { |
|||
return sysMenuRoleFeign.save(dto); |
|||
} |
|||
public ResultBean updateBySid(SysMenuRoleDto dto,String sid) { |
|||
return sysMenuRoleFeign.update(dto,sid); |
|||
} |
|||
public ResultBean updateRoleAndMenu(SysMenuRoleDto dto) { |
|||
return sysMenuRoleFeign.updateRoleAndMenu(dto); |
|||
} |
|||
public ResultBean del(String sid) { |
|||
return sysMenuRoleFeign.del(sid); |
|||
} |
|||
|
|||
public ResultBean<SysMenuRoleVo> fetchByIdVo(String id) { |
|||
return sysMenuRoleFeign.fetch(id); |
|||
} |
|||
|
|||
public void delByRoleSid(String roleSid) { |
|||
baseMapper.delByRoleSid(roleSid); |
|||
} |
|||
|
|||
// 不分页列表
|
|||
public List<SysMenuRoleVo> list(SysMenuRoleQuery query) { |
|||
// mybits所用的查询条件封装类
|
|||
QueryWrapper<SysMenuRoleVo> qw = buildQueryWrapper(query); |
|||
return baseMapper.list(qw); |
|||
} |
|||
|
|||
/** |
|||
* 解析和组装查询条件,封装在qw中 |
|||
* |
|||
* @param query |
|||
* @return |
|||
*/ |
|||
private QueryWrapper<SysMenuRoleVo> buildQueryWrapper(SysMenuRoleQuery query) { |
|||
QueryWrapper<SysMenuRoleVo> qw = new QueryWrapper<>(); |
|||
if (query != null) { |
|||
if (StringUtils.isNotBlank(query.getSourceSid())) { |
|||
qw.eq("m.sourceSid", query.getSourceSid()); |
|||
} |
|||
/*if (org.apache.commons.lang3.StringUtils.isNotBlank(query.getRoleSid())) { |
|||
qw.in("rm.roleSid", query.getRoleSid()); |
|||
}*/ |
|||
if (StringUtils.isNotBlank(query.getIsAdmin())) { |
|||
if (!query.getIsAdmin().equals("1")){ |
|||
qw.eq("m.isEnable", 1); |
|||
} |
|||
} |
|||
|
|||
if (query.getRoleSids() != null && query.getRoleSids().size() > 0) { |
|||
qw.in("rm.roleSid", query.getRoleSids()); |
|||
} |
|||
qw.eq("m.isShow", 1); |
|||
qw.orderByAsc("m.sortNo"); |
|||
} |
|||
|
|||
return qw; |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 资源菜单树形列表 |
|||
* |
|||
* @param query:roleSids,sourceSid |
|||
* @return 资源菜单树形列表(第一级一级菜单 第二级二级菜单) |
|||
*/ |
|||
public List<Map<String, Object>> getSourceMenuTreeOfRoles(SysMenuRoleQuery query, Map<String, Object> map_rolemenus) { |
|||
|
|||
//获取当前资源的菜单列表
|
|||
List<Map<String, Object>> list_menus_map = new ArrayList<Map<String, Object>>(); |
|||
if (null == query) |
|||
return list_menus_map; |
|||
|
|||
//角色s的某个资源的所有菜单列表
|
|||
List<SysMenuRoleVo> list_menu = list(query); |
|||
list_menus_map = sysMenuService.getSourceMenuTree(list_menu, map_rolemenus); |
|||
|
|||
return list_menus_map; |
|||
|
|||
} |
|||
|
|||
public List<MenuRoleVo> selectByRoleSid(String roleSid) { |
|||
return baseMapper.selectByRoleSid(roleSid); |
|||
} |
|||
|
|||
public ResultBean<List<SysMenuRoleDataVo>> selMenuByRole(SysMenuRoleDataQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
QueryWrapper qw = new QueryWrapper<>(); |
|||
qw.eq("smr.roleSid",query.getRoleSid()); |
|||
if (StringUtils.isNotBlank(query.getMenuName())){ |
|||
qw.like("sm.name",query.getMenuName()); |
|||
} |
|||
List<SysMenuRoleDataVo> sysMenuRoleDataVos = baseMapper.selMenuByRole(qw); |
|||
return rb.success().setData(sysMenuRoleDataVos); |
|||
} |
|||
|
|||
public ResultBean<List<SysMenuRoleDataVo>> selMenuByRoleApp(SysMenuRoleDataQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
QueryWrapper qw = new QueryWrapper<>(); |
|||
qw.eq("smmr.roleSid",query.getRoleSid()); |
|||
if (StringUtils.isNotBlank(query.getMenuName())){ |
|||
qw.like("smm.name",query.getMenuName()); |
|||
} |
|||
List<SysMenuRoleDataVo> sysMenuRoleDataVos = baseMapper.selMenuByRoleApp(qw); |
|||
return rb.success().setData(sysMenuRoleDataVos); |
|||
} |
|||
|
|||
public ResultBean updateDataByRoleMenu(List<SysMenuRoleDataDto> dtos) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
for (SysMenuRoleDataDto dto : dtos) { |
|||
if (StringUtils.isNotBlank(dto.getDataRuleId())){ |
|||
baseMapper.updateDataByRoleMenu(dto.getSid(),dto.getDataRuleId()); |
|||
} |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean updateDataByRoleMenuApp(List<SysMenuRoleDataDto> dtos) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
for (SysMenuRoleDataDto dto : dtos) { |
|||
if (StringUtils.isNotBlank(dto.getDataRuleId())){ |
|||
baseMapper.updateDataByRoleMenuApp(dto.getSid(),dto.getDataRuleId()); |
|||
} |
|||
} |
|||
return rb.success(); |
|||
} |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.yxt.admin.biz.func.sysmenurole; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuRoleVo.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.sysmenurole.SysMenuRoleVo <br/> |
|||
* Description: 菜单与角色关联表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单与角色关联表 视图数据对象", description = "菜单与角色关联表 视图数据对象") |
|||
@Data |
|||
public class SysMenuRoleVo implements Vo { |
|||
|
|||
|
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
|
|||
@ApiModelProperty("角色sid") |
|||
private String roleSid; |
|||
@ApiModelProperty("菜单父级sid") |
|||
private String pSid; |
|||
@ApiModelProperty("menusid") |
|||
private String sid; |
|||
@ApiModelProperty("menuUrl") |
|||
private String menuUrl; |
|||
@ApiModelProperty("menuName") |
|||
private String menuName; |
|||
@ApiModelProperty("pageUrl") |
|||
private String pageUrl; |
|||
@ApiModelProperty("iconUrl") |
|||
private String iconUrl; |
|||
@ApiModelProperty("isShow") |
|||
private String isShow; |
|||
@ApiModelProperty("alwaysShow") |
|||
private Integer alwaysShow; |
|||
@ApiModelProperty("pageUrlRedirect") |
|||
private String pageUrlRedirect; |
|||
@ApiModelProperty("pageAliasName") |
|||
private String pageAliasName; |
|||
@ApiModelProperty("pageName") |
|||
private String pageName; |
|||
@ApiModelProperty("remarks") |
|||
private String remarks; |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.yxt.admin.biz.func.sysorganization; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author liuguohui |
|||
* @Date 2021/9/24 |
|||
*/ |
|||
@ApiModel(value = "App通讯录组织架构") |
|||
@Data |
|||
public class AppContactSysOrganizationVo implements Vo { |
|||
|
|||
@ApiModelProperty("部门/组织sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("部门/组织名称|员工姓名") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("员工数量") |
|||
private int staffNum; |
|||
|
|||
@ApiModelProperty("跳转类型:1、部门2、员工列表") |
|||
private Integer type; |
|||
|
|||
@ApiModelProperty("员工电话") |
|||
private String mobile; |
|||
|
|||
@ApiModelProperty("员工头像") |
|||
private String headImage; |
|||
|
|||
@ApiModelProperty("员工所在部门名称(路径)") |
|||
private String orgNamePath; |
|||
|
|||
@ApiModelProperty("员工职位") |
|||
private String position; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.admin.biz.func.sysorganization; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2020/11/3 16:19 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class QrCodeVo { |
|||
@ApiModelProperty("部门名称") |
|||
private String departmentName; |
|||
@ApiModelProperty("单位名称") |
|||
private String organizationName; |
|||
@ApiModelProperty("部门地址") |
|||
private String address; |
|||
@ApiModelProperty("二维码图片地址") |
|||
private String qrFilePath; |
|||
@ApiModelProperty(value = "部门sid") |
|||
private String sid; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.admin.biz.func.sysorganization; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/2/14 11:45 |
|||
* @Description 员工所在部门下拉列表 |
|||
*/ |
|||
@Data |
|||
public class SysOrgListVo implements Vo { |
|||
private static final long serialVersionUID = -3558876605554852892L; |
|||
|
|||
@ApiModelProperty(value = "组织名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "部门编码") |
|||
private String orgCode; |
|||
@ApiModelProperty(value = "sid") |
|||
private String sid; |
|||
@ApiModelProperty(value = "上级sid") |
|||
private String psid; |
|||
@ApiModelProperty(value = "orgSidPath") |
|||
private String orgSidPath; |
|||
private List<SysOrgVo> children; |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.yxt.admin.biz.func.sysorganization; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/26 11:48 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class SysOrgStaffVo implements Vo { |
|||
private static final long serialVersionUID = -4311553944345419092L; |
|||
|
|||
private String staffName; |
|||
private String staffSid; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.admin.biz.func.sysorganization; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author dimengzhe |
|||
* @date 2021/10/12 20:55 |
|||
* @description |
|||
*/ |
|||
@Data |
|||
public class SysOrgVo implements Vo { |
|||
private static final long serialVersionUID = 2983637708030419942L; |
|||
@ApiModelProperty(value = "组织名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "sid") |
|||
private String sid; |
|||
@ApiModelProperty(value = "psid") |
|||
private String psid; |
|||
@ApiModelProperty(value = "id") |
|||
private String id; |
|||
@ApiModelProperty(value = "orgSidPath") |
|||
private String orgSidPath; |
|||
@ApiModelProperty(value = "部门编码") |
|||
private String orgCode; |
|||
|
|||
private List<SysOrgVo> children; |
|||
} |
@ -0,0 +1,87 @@ |
|||
package com.yxt.admin.biz.func.sysorganization; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysOrganization.java <br/> |
|||
* Class: SysOrganization <br/> |
|||
* Description: 组织机构表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "组织机构表", description = "组织机构表") |
|||
@TableName("sys_organization") |
|||
@Data |
|||
public class SysOrganization extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
@ApiModelProperty("部门/组织名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("父(部门/组织) sid") |
|||
private String psid; |
|||
|
|||
@ApiModelProperty("联系电话") |
|||
private String linkPhone; |
|||
@ApiModelProperty("联系人") |
|||
private String linkPerson; |
|||
|
|||
@ApiModelProperty("部门sid全路径") |
|||
private String orgSidPath; |
|||
|
|||
@ApiModelProperty("排序") |
|||
private Integer sort; |
|||
|
|||
@ApiModelProperty("地址") |
|||
private String addrs; |
|||
|
|||
@ApiModelProperty("地理位置经纬度") |
|||
private String jwd; |
|||
|
|||
@ApiModelProperty("二维码") |
|||
private String qrText; |
|||
|
|||
@ApiModelProperty("限制本部门成员查看通讯录:限制开启后,本部门成员只能看到限定范围内的通讯录不能看到所有通讯录,仅可见自己") |
|||
private Integer limitOrgMember; |
|||
|
|||
@ApiModelProperty("部门编码") |
|||
private String orgCode; |
|||
|
|||
// @ApiModelProperty("部门简称(地区简称+门店名称首字母(遇到首字母重复时用2个字母))")
|
|||
// private String orgShortName;
|
|||
|
|||
@ApiModelProperty("销售区域划分(本店终端销售:0,门店对应业务区域划分销售:1至9,具体编号划分各门店报备确定)") |
|||
private String regionDivision; |
|||
|
|||
@ApiModelProperty("是否是部门(0否,1是)") |
|||
private Integer isDept; |
|||
|
|||
@ApiModelProperty("组织简称") |
|||
private String orgAbbre; |
|||
|
|||
@ApiModelProperty("组织属性key") |
|||
private String orgAttributeKey; |
|||
|
|||
@ApiModelProperty("组织属性value") |
|||
private String orgAttributeValue; |
|||
|
|||
@ApiModelProperty("管理层级key") |
|||
private String orgLevelKey; |
|||
|
|||
@ApiModelProperty("管理层级value") |
|||
private String orgLevelValue; |
|||
|
|||
@ApiModelProperty("其他编码") |
|||
private String otherCode; |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue