|
@@ -10,6 +10,7 @@ import com.xy.entity.*;
|
|
|
import com.xy.mapper.*;
|
|
|
import com.xy.redis.RedisCache;
|
|
|
import com.xy.service.SysSystemService;
|
|
|
+import com.xy.utils.Emptys;
|
|
|
import com.xy.utils.MybatisPlusQuery;
|
|
|
import com.xy.utils.PageBean;
|
|
|
import com.xy.utils.R;
|
|
@@ -61,6 +62,23 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
|
|
|
|
|
|
private SysRoleServiceImpl sysRoleService;
|
|
|
|
|
|
+ @PostMapping("obj")
|
|
|
+ @ApiOperation("对象查询")
|
|
|
+ public R<SysSystemDto.Vo> obj(@RequestBody SysSystemDto.Vo vo) {
|
|
|
+ SysSystemDto.Select selectList = copy(SysSystemDto.Select.class, vo);
|
|
|
+ List<SysSystemDto.Vo> list = listCommon(selectList).getData();
|
|
|
+ if (Emptys.check(list)) {
|
|
|
+ return R.ok(list.get(0));
|
|
|
+ }
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ public R<List<SysSystemDto.Vo>> listCommon(@RequestBody SysSystemDto.Select select) {
|
|
|
+ LambdaQueryWrapper<SysSystem> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(select, SysSystem.class).build().eq(SysSystem::getStatus, true);
|
|
|
+ List<SysSystem> list = list(lambdaQueryWrapper);
|
|
|
+ return R.ok(copy(SysSystemDto.Vo.class, list));
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("save")
|
|
|
@ApiOperation("添加系统")
|
|
|
@Transactional(rollbackFor = Exception.class)
|