linwe
2024-05-16 afda600cf257b5a0eb6ae099a80282d21f971958
E呼即办2行政区域
18 files added
1037 ■■■■■ changed files
src/main/java/org/springblade/modules/counties/controller/CountiesController.java 129 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/dto/CountiesDTO.java 53 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/entity/CountiesEntity.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/mapper/CountiesMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/mapper/CountiesMapper.xml 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/service/ICountiesService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/service/impl/CountiesServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/vo/CountiesVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/wrapper/CountiesWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/controller/IssueClazzController.java 140 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/dto/IssueClazzDTO.java 48 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/entity/IssueClazzEntity.java 53 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/mapper/IssueClazzMapper.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/mapper/IssueClazzMapper.xml 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/service/IIssueClazzService.java 46 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/service/impl/IssueClazzServiceImpl.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/vo/IssueClazzVO.java 93 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/wrapper/IssueClazzWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/controller/CountiesController.java
New file
@@ -0,0 +1,129 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.counties.dto.CountiesDTO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import org.springblade.modules.counties.wrapper.CountiesWrapper;
import org.springblade.modules.counties.service.ICountiesService;
import org.springblade.core.boot.ctrl.BladeController;
import java.util.List;
/**
 * E呼即办区县 控制器
 *
 * @author BladeX
 * @since 2024-05-16
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-counties/counties")
@Api(value = "E呼即办区县", tags = "E呼即办区县接口")
public class CountiesController extends BladeController {
    private final ICountiesService countiesService;
    /**
     * E呼即办区县 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入counties")
    public R<CountiesVO> detail(CountiesEntity counties) {
        CountiesEntity detail = countiesService.getOne(Condition.getQueryWrapper(counties));
        return R.data(CountiesWrapper.build().entityVO(detail));
    }
    /**
     * E呼即办区县 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入counties")
    public R<List<CountiesVO>> list(CountiesEntity counties, Query query) {
        List<CountiesEntity> list = countiesService.list();
        return R.data(CountiesWrapper.build().listVO(list));
    }
    /**
     * E呼即办区县 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入counties")
    public R<IPage<CountiesVO>> page(CountiesVO counties, Query query) {
        IPage<CountiesVO> pages = countiesService.selectCountiesPage(Condition.getPage(query), counties);
        return R.data(pages);
    }
    /**
     * E呼即办区县 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入counties")
    public R save(@Valid @RequestBody CountiesEntity counties) {
        return R.status(countiesService.save(counties));
    }
    /**
     * E呼即办区县 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入counties")
    public R update(@Valid @RequestBody CountiesEntity counties) {
        return R.status(countiesService.updateById(counties));
    }
    /**
     * E呼即办区县 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入counties")
    public R submit(@Valid @RequestBody CountiesEntity counties) {
        return R.status(countiesService.saveOrUpdate(counties));
    }
    /**
     * E呼即办区县 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(countiesService.removeBatchByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/counties/dto/CountiesDTO.java
New file
@@ -0,0 +1,53 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * E呼即办区县 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
public class CountiesDTO {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "", example = "")
    @TableField("name")
    private String name;
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "code", type = IdType.ASSIGN_UUID)
    private String code;
    @ApiModelProperty(value = "", example = "")
    @TableField("up_code")
    private String upCode;
    @ApiModelProperty(value = "", example = "")
    @TableField("code6")
    private String code6;
    @ApiModelProperty(value = "", example = "")
    @TableField("code_append")
    private String codeAppend;
}
src/main/java/org/springblade/modules/counties/entity/CountiesEntity.java
New file
@@ -0,0 +1,59 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
 * E呼即办区县 实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
@TableName("jczz_counties")
@ApiModel(value = "Counties对象", description = "E呼即办区县")
public class CountiesEntity  {
    @ApiModelProperty(value = "", example = "")
    @TableField("name")
    private String name;
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "code", type = IdType.ASSIGN_UUID)
    private String code;
    @ApiModelProperty(value = "", example = "")
    @TableField("up_code")
    private String upCode;
    @ApiModelProperty(value = "", example = "")
    @TableField("code6")
    private String code6;
    @ApiModelProperty(value = "", example = "")
    @TableField("code_append")
    private String codeAppend;
}
src/main/java/org/springblade/modules/counties/mapper/CountiesMapper.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.mapper;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * E呼即办区县 Mapper 接口
 *
 * @author BladeX
 * @since 2024-05-16
 */
public interface CountiesMapper extends BaseMapper<CountiesEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param counties
     * @return
     */
    List<CountiesVO> selectCountiesPage(IPage page, CountiesVO counties);
}
src/main/java/org/springblade/modules/counties/mapper/CountiesMapper.xml
New file
@@ -0,0 +1,15 @@
<?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="org.springblade.modules.counties.mapper.CountiesMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="countiesResultMap" type="org.springblade.modules.counties.entity.CountiesEntity">
    </resultMap>
    <select id="selectCountiesPage" resultMap="countiesResultMap">
        select * from jczz_counties
    </select>
</mapper>
src/main/java/org/springblade/modules/counties/service/ICountiesService.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * E呼即办区县 服务类
 *
 * @author BladeX
 * @since 2024-05-16
 */
public interface ICountiesService extends IService<CountiesEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param counties
     * @return
     */
    IPage<CountiesVO> selectCountiesPage(IPage<CountiesVO> page, CountiesVO counties);
}
src/main/java/org/springblade/modules/counties/service/impl/CountiesServiceImpl.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import org.springblade.modules.counties.mapper.CountiesMapper;
import org.springblade.modules.counties.service.ICountiesService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * E呼即办区县 服务实现类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Service
public class CountiesServiceImpl extends ServiceImpl<CountiesMapper, CountiesEntity> implements ICountiesService {
    @Override
    public IPage<CountiesVO> selectCountiesPage(IPage<CountiesVO> page, CountiesVO counties) {
        return page.setRecords(baseMapper.selectCountiesPage(page, counties));
    }
}
src/main/java/org/springblade/modules/counties/vo/CountiesVO.java
New file
@@ -0,0 +1,35 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.vo;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * E呼即办区县 视图实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class CountiesVO extends CountiesEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/counties/wrapper/CountiesWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import java.util.Objects;
/**
 * E呼即办区县 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-05-16
 */
public class CountiesWrapper extends BaseEntityWrapper<CountiesEntity, CountiesVO>  {
    public static CountiesWrapper build() {
        return new CountiesWrapper();
     }
    @Override
    public CountiesVO entityVO(CountiesEntity counties) {
        CountiesVO countiesVO = Objects.requireNonNull(BeanUtil.copy(counties, CountiesVO.class));
        //User createUser = UserCache.getUser(counties.getCreateUser());
        //User updateUser = UserCache.getUser(counties.getUpdateUser());
        //countiesVO.setCreateUserName(createUser.getName());
        //countiesVO.setUpdateUserName(updateUser.getName());
        return countiesVO;
    }
}
src/main/java/org/springblade/modules/issueClazz/controller/IssueClazzController.java
New file
@@ -0,0 +1,140 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.system.vo.DeptVO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import org.springblade.modules.issueClazz.wrapper.IssueClazzWrapper;
import org.springblade.modules.issueClazz.service.IIssueClazzService;
import org.springblade.core.boot.ctrl.BladeController;
import java.util.List;
/**
 * E呼即办 归口文档 控制器
 *
 * @author BladeX
 * @since 2024-05-16
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-issueClazz/issueClazz")
@Api(value = "E呼即办 归口文档", tags = "E呼即办 归口文档接口")
public class IssueClazzController extends BladeController {
    private final IIssueClazzService issueClazzService;
    /**
     * E呼即办 归口文档 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入issueClazz")
    public R<IssueClazzVO> detail(IssueClazzEntity issueClazz) {
        IssueClazzEntity detail = issueClazzService.getOne(Condition.getQueryWrapper(issueClazz));
        return R.data(IssueClazzWrapper.build().entityVO(detail));
    }
    /**
     * E呼即办 归口文档 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入issueClazz")
    public R<IPage<IssueClazzVO>> list(IssueClazzEntity issueClazz, Query query) {
        IPage<IssueClazzEntity> pages = issueClazzService.page(Condition.getPage(query), Condition.getQueryWrapper(issueClazz));
        return R.data(IssueClazzWrapper.build().pageVO(pages));
    }
    /**
     * E呼即办 归口文档 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入issueClazz")
    public R<IPage<IssueClazzVO>> page(IssueClazzVO issueClazz, Query query) {
        IPage<IssueClazzVO> pages = issueClazzService.selectIssueClazzPage(Condition.getPage(query), issueClazz);
        return R.data(pages);
    }
    /**
     * E呼即办 归口文档 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入issueClazz")
    public R save(@Valid @RequestBody IssueClazzEntity issueClazz) {
        return R.status(issueClazzService.save(issueClazz));
    }
    /**
     * E呼即办 归口文档 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入issueClazz")
    public R update(@Valid @RequestBody IssueClazzEntity issueClazz) {
        return R.status(issueClazzService.updateById(issueClazz));
    }
    /**
     * E呼即办 归口文档 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入issueClazz")
    public R submit(@Valid @RequestBody IssueClazzEntity issueClazz) {
        return R.status(issueClazzService.saveOrUpdate(issueClazz));
    }
    /**
     * E呼即办 归口文档 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(issueClazzService.removeBatchByIds(Func.toLongList(ids)));
    }
    /**
     * 获取部门树形结构
     */
    @GetMapping("/tree")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "树形结构", notes = "树形结构")
    public R<List<IssueClazzVO>> tree() {
        List<IssueClazzVO> tree = issueClazzService.tree();
        return R.data(tree);
    }
}
src/main/java/org/springblade/modules/issueClazz/dto/IssueClazzDTO.java
New file
@@ -0,0 +1,48 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * E呼即办 归口文档 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
public class IssueClazzDTO {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "code", type = IdType.ASSIGN_UUID)
    private String code;
    @ApiModelProperty(value = "", example = "")
    @TableField("name")
    private String name;
    @ApiModelProperty(value = "", example = "")
    @TableField("parent_code")
    private String parentCode;
}
src/main/java/org/springblade/modules/issueClazz/entity/IssueClazzEntity.java
New file
@@ -0,0 +1,53 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
 * E呼即办 归口文档 实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
@TableName("jczz_issue_clazz")
@ApiModel(value = "IssueClazz对象", description = "E呼即办 归口文档")
public class IssueClazzEntity  {
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "code", type = IdType.ASSIGN_UUID)
    private String code;
    @ApiModelProperty(value = "", example = "")
    @TableField("name")
    private String name;
    @ApiModelProperty(value = "", example = "")
    @TableField("parent_code")
    private String parentCode;
}
src/main/java/org/springblade/modules/issueClazz/mapper/IssueClazzMapper.java
New file
@@ -0,0 +1,44 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.mapper;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * E呼即办 归口文档 Mapper 接口
 *
 * @author BladeX
 * @since 2024-05-16
 */
public interface IssueClazzMapper extends BaseMapper<IssueClazzEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param issueClazz
     * @return
     */
    List<IssueClazzVO> selectIssueClazzPage(IPage page, IssueClazzVO issueClazz);
    List<IssueClazzVO> tree();
}
src/main/java/org/springblade/modules/issueClazz/mapper/IssueClazzMapper.xml
New file
@@ -0,0 +1,42 @@
<?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="org.springblade.modules.issueClazz.mapper.IssueClazzMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="issueClazzResultMap" type="org.springblade.modules.issueClazz.entity.IssueClazzEntity">
    </resultMap>
    <select id="selectIssueClazzPage" resultMap="issueClazzResultMap">
        select * from jczz_issue_clazz where is_deleted = 0
    </select>
    <resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
        <id column="id" property="id"/>
        <result column="parent_id" property="parentId"/>
        <result column="title" property="title"/>
        <result column="value" property="value"/>
        <result column="key" property="key"/>
        <result column="has_children" property="hasChildren"/>
    </resultMap>
    <select id="tree" resultMap="treeNodeResultMap">
        SELECT
            code,
            name AS title,
            code AS "value",
            code AS "key",
            parent_code
        FROM
            ( SELECT * FROM jczz_issue_clazz ORDER BY parent_code, code )
                org_query,
            ( SELECT @id := 10 ) initialisation
        WHERE
            (FIND_IN_SET( parent_code, @id ) > 0 or FIND_IN_SET( code, @id ) > 0)
          AND @id := CONCAT(@id,',',code)
    </select>
</mapper>
src/main/java/org/springblade/modules/issueClazz/service/IIssueClazzService.java
New file
@@ -0,0 +1,46 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * E呼即办 归口文档 服务类
 *
 * @author BladeX
 * @since 2024-05-16
 */
public interface IIssueClazzService extends IService<IssueClazzEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param issueClazz
     * @return
     */
    IPage<IssueClazzVO> selectIssueClazzPage(IPage<IssueClazzVO> page, IssueClazzVO issueClazz);
    List<IssueClazzVO> tree();
}
src/main/java/org/springblade/modules/issueClazz/service/impl/IssueClazzServiceImpl.java
New file
@@ -0,0 +1,51 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import org.springblade.modules.issueClazz.mapper.IssueClazzMapper;
import org.springblade.modules.issueClazz.service.IIssueClazzService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.system.vo.DeptVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * E呼即办 归口文档 服务实现类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Service
public class IssueClazzServiceImpl extends ServiceImpl<IssueClazzMapper, IssueClazzEntity> implements IIssueClazzService {
    @Override
    public IPage<IssueClazzVO> selectIssueClazzPage(IPage<IssueClazzVO> page, IssueClazzVO issueClazz) {
        return page.setRecords(baseMapper.selectIssueClazzPage(page, issueClazz));
    }
    @Override
    public List<IssueClazzVO> tree() {
        List<IssueClazzVO> tree = baseMapper.tree();
        return ForestNodeMerger.merge(tree);
    }
}
src/main/java/org/springblade/modules/issueClazz/vo/IssueClazzVO.java
New file
@@ -0,0 +1,93 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.system.vo.DeptVO;
import java.util.ArrayList;
import java.util.List;
/**
 * E呼即办 归口文档 视图实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class IssueClazzVO extends IssueClazzEntity  implements INode<IssueClazzVO> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 父节点ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;
    @JsonSerialize(using = ToStringSerializer.class)
    private String title;
    /**
     * 子孙节点
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<IssueClazzVO> children;
    /**
     * 是否有子孙节点
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Boolean hasChildren;
    @Override
    public List<IssueClazzVO> getChildren() {
        if (this.children == null) {
            this.children = new ArrayList<>();
        }
        return this.children;
    }
    /**
     * 上级机构
     */
    private String parentName;
    /**
     * 机构类型名称
     */
    private String deptCategoryName;
    private Boolean disabled;
    /**
     * 保持树型结构统一
     */
    private String name;
}
src/main/java/org/springblade/modules/issueClazz/wrapper/IssueClazzWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import java.util.Objects;
/**
 * E呼即办 归口文档 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-05-16
 */
public class IssueClazzWrapper extends BaseEntityWrapper<IssueClazzEntity, IssueClazzVO>  {
    public static IssueClazzWrapper build() {
        return new IssueClazzWrapper();
     }
    @Override
    public IssueClazzVO entityVO(IssueClazzEntity issueClazz) {
        IssueClazzVO issueClazzVO = Objects.requireNonNull(BeanUtil.copy(issueClazz, IssueClazzVO.class));
        //User createUser = UserCache.getUser(issueClazz.getCreateUser());
        //User updateUser = UserCache.getUser(issueClazz.getUpdateUser());
        //issueClazzVO.setCreateUserName(createUser.getName());
        //issueClazzVO.setUpdateUserName(updateUser.getName());
        return issueClazzVO;
    }
}