zhongrj
2023-10-28 b410e9d09d60d47e1eed987d4bf2d9ac24d3607d
新增楼盘,场所,房屋,网格相关基础接口
1 files modified
120 files added
7035 ■■■■■ changed files
src/main/java/org/springblade/common/node/TreeNode.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/NodeTreeUtil.java 33 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java 133 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/dto/DoorplateAddressDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/entity/DoorplateAddressEntity.java 288 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml 22 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java 101 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/vo/DoorplateAddressVO.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/vo/FuncNode.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/wrapper/DoorplateAddressWrapper.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/controller/GridController.java 124 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/controller/GridRangeController.java 124 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/dto/GridDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/dto/GridRangeDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/entity/GridEntity.java 129 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/entity/GridRangeEntity.java 72 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/mapper/GridMapper.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/mapper/GridMapper.xml 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.xml 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/service/IGridRangeService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/service/IGridService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/service/impl/GridRangeServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/service/impl/GridServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/vo/GridRangeVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/vo/GridVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/wrapper/GridRangeWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/wrapper/GridWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/controller/HouseController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/controller/HouseLabelController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/controller/HouseRentalController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/controller/HouseTenantController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/controller/HouseholdController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/controller/HouseholdLabelController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/dto/HouseDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/dto/HouseLabelDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/dto/HouseRentalDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/dto/HouseTenantDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/dto/HouseholdDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/dto/HouseholdLabelDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/entity/HouseEntity.java 170 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/entity/HouseLabelEntity.java 78 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/entity/HouseRentalEntity.java 144 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/entity/HouseTenantEntity.java 95 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/entity/HouseholdEntity.java 228 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/entity/HouseholdLabelEntity.java 77 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.xml 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml 36 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml 31 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.xml 24 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdLabelMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdLabelMapper.xml 21 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml 56 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/IHouseLabelService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/IHouseRentalService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/IHouseService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/IHouseTenantService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/IHouseholdLabelService.java 45 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/IHouseholdService.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/impl/HouseRentalServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/impl/HouseTenantServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/impl/HouseholdLabelServiceImpl.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java 54 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/vo/HouseLabelVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/vo/HouseRentalVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/vo/HouseTenantVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/vo/HouseVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/vo/HouseholdLabelVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/vo/HouseholdVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/wrapper/HouseRentalWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/wrapper/HouseTenantWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/wrapper/HouseWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/wrapper/HouseholdLabelWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/wrapper/HouseholdWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/label/controller/LabelController.java 125 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/label/dto/LabelDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/label/entity/LabelEntity.java 73 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/label/mapper/LabelMapper.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/label/mapper/LabelMapper.xml 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/label/service/ILabelService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/label/vo/LabelVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/label/wrapper/LabelWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/controller/PlaceController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/controller/PlaceExtController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/controller/PlacePractitionerController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/dto/PlaceDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/dto/PlaceExtDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/dto/PlacePractitionerDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/entity/PlaceEntity.java 135 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/entity/PlaceExtEntity.java 123 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/entity/PlacePractitionerEntity.java 71 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml 17 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/service/IPlaceExtService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/service/IPlacePractitionerService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/service/IPlaceService.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/service/impl/PlaceExtServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/service/impl/PlacePractitionerServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java 54 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/vo/PlaceExtVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/vo/PlacePractitionerVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/vo/PlaceVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/wrapper/PlaceExtWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/wrapper/PlacePractitionerWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/wrapper/PlaceWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/resources/application-test.yml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/node/TreeNode.java
New file
@@ -0,0 +1,50 @@
package org.springblade.common.node;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
 * 视图实体类
 *
 * @author zhongrj
 */
@Data
public class TreeNode implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 名称
     */
    private String name;
    /**
     * 父节点ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;
    /**
     * 子孙节点
     */
    private List<TreeNode> children = new ArrayList<>();
    /**
     * 是否有子孙节点
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Boolean hasChildren;
}
src/main/java/org/springblade/common/utils/NodeTreeUtil.java
New file
@@ -0,0 +1,33 @@
package org.springblade.common.utils;
import org.springblade.common.node.TreeNode;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
 * node tree 工具类
 * @author zhongrj
 * @since 2023-10-28
 */
public class NodeTreeUtil {
    /**
     * 警员map 转 tree 组织机构
     * @param treeMap
     * @return
     */
    public static List<TreeNode> getNodeTree(Map<String, TreeNode> treeMap){
        List<TreeNode> tree = new ArrayList<>();
        if (treeMap.size() > 1) {
            treeMap.forEach((id, treeNode) -> {
                if (treeMap.containsKey(treeNode.getParentId())) {
                    treeMap.get(treeNode.getParentId()).getChildren().add(treeNode);
                } else {
                    tree.add(treeNode);
                }
            });
        }
        return tree;
    }
}
src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
New file
@@ -0,0 +1,133 @@
/*
 *      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.doorplateAddress.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.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.doorplateAddress.entity.DoorplateAddressEntity;
import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
import org.springblade.modules.doorplateAddress.wrapper.DoorplateAddressWrapper;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
/*
 * 门牌地址表(总台账数据) 控制器
 *
 * @author zhongrj
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-doorplateAddress/doorplateAddress")
@Api(value = "门牌地址表(总台账数据)", tags = "门牌地址表(总台账数据)接口")
public class DoorplateAddressController{
    private final IDoorplateAddressService doorplateAddressService;
    /**
     * 门牌地址表(总台账数据) 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入doorplateAddress")
    public R<DoorplateAddressVO> detail(DoorplateAddressEntity doorplateAddress) {
        DoorplateAddressEntity detail = doorplateAddressService.getOne(Condition.getQueryWrapper(doorplateAddress));
        return R.data(DoorplateAddressWrapper.build().entityVO(detail));
    }
    /**
     * 门牌地址表(总台账数据) 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入doorplateAddress")
    public R<IPage<DoorplateAddressVO>> list(DoorplateAddressEntity doorplateAddress, Query query) {
        IPage<DoorplateAddressEntity> pages = doorplateAddressService.page(Condition.getPage(query), Condition.getQueryWrapper(doorplateAddress));
        return R.data(DoorplateAddressWrapper.build().pageVO(pages));
    }
    /**
     * 门牌地址表(总台账数据) 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入doorplateAddress")
    public R<IPage<DoorplateAddressVO>> page(DoorplateAddressVO doorplateAddress, Query query) {
        IPage<DoorplateAddressVO> pages = doorplateAddressService.selectDoorplateAddressPage(Condition.getPage(query), doorplateAddress);
        return R.data(pages);
    }
    /**
     * 门牌地址表(总台账数据) 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入doorplateAddress")
    public R save(@Valid @RequestBody DoorplateAddressEntity doorplateAddress) {
        return R.status(doorplateAddressService.save(doorplateAddress));
    }
    /**
     * 门牌地址表(总台账数据) 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入doorplateAddress")
    public R update(@Valid @RequestBody DoorplateAddressEntity doorplateAddress) {
        return R.status(doorplateAddressService.updateById(doorplateAddress));
    }
    /**
     * 门牌地址表(总台账数据) 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入doorplateAddress")
    public R submit(@Valid @RequestBody DoorplateAddressEntity doorplateAddress) {
        return R.status(doorplateAddressService.saveOrUpdate(doorplateAddress));
    }
    /**
     * 门牌地址表(总台账数据) 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(doorplateAddressService.removeByIds(Func.toLongList(ids)));
    }
    /**
     * 根据角色获取功能集合数据
     * @param roleName
     * @return
     */
    @GetMapping("/getFuncList")
    public R getFuncList(String roleName) {
        return R.data(doorplateAddressService.getFuncList(roleName));
    }
}
src/main/java/org/springblade/modules/doorplateAddress/dto/DoorplateAddressDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.doorplateAddress.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
/**
 * 门牌地址表(总台账数据) 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DoorplateAddressDTO extends DoorplateAddressEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/doorplateAddress/entity/DoorplateAddressEntity.java
New file
@@ -0,0 +1,288 @@
/*
 *      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.doorplateAddress.entity;
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;
/**
 * 门牌地址表(总台账数据) 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_doorplate_address")
@ApiModel(value = "DoorplateAddress对象", description = "门牌地址表(总台账数据)")
public class DoorplateAddressEntity{
    /**
     * 地址编码
     */
    @ApiModelProperty(value = "地址编码")
    private String addressCode;
    /**
     * 地址名称
     */
    @ApiModelProperty(value = "地址名称")
    private String addressName;
    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private String lng;
    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private String lat;
    /**
     * 行政区编码
     */
    @ApiModelProperty(value = "行政区编码")
    private String regionCode;
    /**
     * 行政区名称
     */
    @ApiModelProperty(value = "行政区名称")
    private String regionName;
    /**
     * 乡镇街道编号
     */
    @ApiModelProperty(value = "乡镇街道编号")
    private String townStreetCode;
    /**
     * 乡镇街道名称
     */
    @ApiModelProperty(value = "乡镇街道名称")
    private String townStreetName;
    /**
     * 居委会(社区)编号
     */
    @ApiModelProperty(value = "居委会(社区)编号")
    private String neiCode;
    /**
     * 居委会(社区)名称
     */
    @ApiModelProperty(value = "居委会(社区)名称")
    private String neiName;
    /**
     * 街路巷编码
     */
    @ApiModelProperty(value = "街路巷编码")
    private String streetRuCode;
    /**
     * 街路巷名称
     */
    @ApiModelProperty(value = "街路巷名称")
    private String streetRuName;
    /**
     * 分局代码
     */
    @ApiModelProperty(value = "分局代码")
    private String branchCode;
    /**
     * 分局名称
     */
    @ApiModelProperty(value = "分局名称")
    private String branchName;
    /**
     * 派出所代码
     */
    @ApiModelProperty(value = "派出所代码")
    private String localPoliceStationCode;
    /**
     * 派出所名称
     */
    @ApiModelProperty(value = "派出所名称")
    private String localPoliceStationName;
    /**
     * 警务室代码
     */
    @ApiModelProperty(value = "警务室代码")
    private String policeAffairsCode;
    /**
     * 警务室名称
     */
    @ApiModelProperty(value = "警务室名称")
    private String policeAffairsName;
    /**
     * 单元编码
     */
    @ApiModelProperty(value = "单元编码")
    private String unitCode;
    /**
     * 单元号(名称)
     */
    @ApiModelProperty(value = "单元号(名称)")
    private String unitName;
    /**
     * 单元号字典码
     */
    @ApiModelProperty(value = "单元号字典码")
    private String unitNameDict;
    /**
     * 楼栋编码
     */
    @ApiModelProperty(value = "楼栋编码")
    private String buildingCode;
    /**
     * 楼栋号(名称)
     */
    @ApiModelProperty(value = "楼栋号(名称)")
    private String buildingName;
    /**
     * 户室号(名称)
     */
    @ApiModelProperty(value = "户室号(名称)")
    private String houseName;
    /**
     * 楼层
     */
    @ApiModelProperty(value = "楼层")
    private String floor;
    /**
     * 小区编码
     */
    @ApiModelProperty(value = "小区编码")
    private String districtCode;
    /**
     * 小区名称
     */
    @ApiModelProperty(value = "小区名称")
    private String districtName;
    /**
     * 地址主体编码
     */
    @ApiModelProperty(value = "地址主体编码")
    private String addressSubjectCode;
    /**
     * 地址主体
     */
    @ApiModelProperty(value = "地址主体")
    private String addressSubject;
    /**
     * 地址级别
     */
    @ApiModelProperty(value = "地址级别")
    private Integer addressLevel;
    /**
     * 父节点地址编码
     */
    @ApiModelProperty(value = "父节点地址编码")
    private String parentAddressCode;
    /**
     * 门牌地址编码
     */
    @ApiModelProperty(value = "门牌地址编码")
    private String houseAddressCode;
    /**
     * 采集照片url
     */
    @ApiModelProperty(value = "采集照片url")
    private String gatPicUrl;
    /**
     * 门牌状态
     */
    @ApiModelProperty(value = "门牌状态")
    private String doorplateStatus;
    /**
     * 门牌类型
     */
    @ApiModelProperty(value = "门牌类型")
    private String doorplateType;
    /**
     * 门牌类型编码
     */
    @ApiModelProperty(value = "门牌类型编码")
    private Integer doorplateTypeCode;
    /**
     * 门牌号
     */
    @ApiModelProperty(value = "门牌号")
    private Integer doorplateNum;
    /**
     * 门牌名称
     */
    @ApiModelProperty(value = "门牌名称")
    private String doorplateName;
    /**
     * 支门牌号
     */
    @ApiModelProperty(value = "支门牌号")
    private String branchDoorplateNum;
    /**
     * 大门名称
     */
    @ApiModelProperty(value = "大门名称")
    private String gateName;
    /**
     * 子小区名称
     */
    @ApiModelProperty(value = "子小区名称")
    private String childDistrictName;
    /**
     * 操作类型
     */
    @ApiModelProperty(value = "操作类型")
    private Integer operationType;
    /**
     * 经度-百度
     */
    @ApiModelProperty(value = "经度-百度")
    private String baiduLng;
    /**
     * 纬度-百度
     */
    @ApiModelProperty(value = "纬度-百度")
    private String baiduLat;
    /**
     * 经度-2000
     */
    @ApiModelProperty(value = "经度-2000")
    private String twoThoLng;
    /**
     * 纬度-2000
     */
    @ApiModelProperty(value = "纬度-2000")
    private String twoThoLat;
    /**
     * 民警姓名
     */
    @ApiModelProperty(value = "民警姓名")
    private String policeman;
    /**
     * 民警电话
     */
    @ApiModelProperty(value = "民警电话")
    private String policemanPhone;
    /**
     * 同来源分组
     */
    @ApiModelProperty(value = "同来源分组")
    private String sourceGroup;
    /**
     * 是否预留
     */
    @ApiModelProperty(value = "是否预留")
    private String isReserved;
}
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
New file
@@ -0,0 +1,60 @@
/*
 *      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.doorplateAddress.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
import java.util.List;
import java.util.Map;
/**
 * 门牌地址表(总台账数据) Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface DoorplateAddressMapper extends BaseMapper<DoorplateAddressEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param doorplateAddress
     * @return
     */
    List<DoorplateAddressVO> selectDoorplateAddressPage(IPage page,
                                                        @Param("doorplateAddress") DoorplateAddressVO doorplateAddress);
    /**
     * 查询区域数据
     * @return
     */
    List<TreeNode> getRegionListByGrouyTwon();
    /**
     * 查询区域数据
     * @return
     */
    List<TreeNode> getRegionListByGrouyNei();
}
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
New file
@@ -0,0 +1,22 @@
<?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.doorplateAddress.mapper.DoorplateAddressMapper">
    <!--自定义分页查询-->
    <select id="selectDoorplateAddressPage" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO">
        select * from jczz_doorplate_address where 1=1
    </select>
    <!--查询区域数据-街道-->
    <select id="getRegionListByGrouyTwon" resultType="org.springblade.common.node.TreeNode" >
        select town_street_name as name from jczz_doorplate_address group by town_street_name
    </select>
    <!--查询区域数据-社区-->
    <select id="getRegionListByGrouyNei" resultType="org.springblade.common.node.TreeNode" >
        select nei_name as name from jczz_doorplate_address group by nei_name
    </select>
</mapper>
src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
New file
@@ -0,0 +1,47 @@
/*
 *      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.doorplateAddress.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
/**
 * 门牌地址表(总台账数据) 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IDoorplateAddressService extends IService<DoorplateAddressEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param doorplateAddress
     * @return
     */
    IPage<DoorplateAddressVO> selectDoorplateAddressPage(IPage<DoorplateAddressVO> page, DoorplateAddressVO doorplateAddress);
    /**
     * 根据角色获取功能集合数据
     * @param roleName
     * @return
     */
    Object getFuncList(String roleName);
}
src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
New file
@@ -0,0 +1,101 @@
/*
 *      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.doorplateAddress.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.common.node.TreeNode;
import org.springblade.common.utils.NodeTreeUtil;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
import org.springblade.modules.doorplateAddress.mapper.DoorplateAddressMapper;
import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
import org.springblade.modules.house.service.IHouseholdLabelService;
import org.springblade.modules.house.service.IHouseholdService;
import org.springblade.modules.place.service.IPlaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.ArrayList;
import java.util.List;
/**
 * 门牌地址表(总台账数据) 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class DoorplateAddressServiceImpl extends ServiceImpl<DoorplateAddressMapper, DoorplateAddressEntity> implements IDoorplateAddressService {
    @Autowired
    private IPlaceService placeService;
    @Autowired
    private IHouseholdService householdService;
    @Override
    public IPage<DoorplateAddressVO> selectDoorplateAddressPage(IPage<DoorplateAddressVO> page, DoorplateAddressVO doorplateAddress) {
        return page.setRecords(baseMapper.selectDoorplateAddressPage(page, doorplateAddress));
    }
    /**
     * 根据角色获取功能集合数据
     * @param roleName
     * @return
     */
    @Override
    public Object getFuncList(String roleName) {
        List<TreeNode> list = new ArrayList<>();
        if (null!=roleName && !roleName.equals("")) {
            // 如果是网格管理员,系统管理员
            if (roleName.equals("网格管理员") || roleName.equals("系统管理员")){
                // 查询街道
                List<TreeNode> townList = baseMapper.getRegionListByGrouyTwon();
                // 查询社区
                List<TreeNode> neiList = baseMapper.getRegionListByGrouyNei();
                TreeNode node = townList.get(0);
                node.setHasChildren(true);
                // 遍历
                for (TreeNode treeNode : neiList) {
                    treeNode.setHasChildren(false);
                    node.getChildren().add(treeNode);
                }
                // 查询区域数据,当前只有西市街道数据
                return townList;
            }
            // 如果是场所负责人
            if (roleName.equals("场所负责人")){
                // 查询场所集合信息
                list = placeService.selectPlaceNodeList(AuthUtil.getUserId());
                // 返回
                return list;
            }
            // 如果是居民
            if (roleName.equals("居民")){
                // 查询房屋集合信息
                list = householdService.selectHouseNodeList(AuthUtil.getUserId());
                // 返回
                return list;
            }
        }
        return list;
    }
}
src/main/java/org/springblade/modules/doorplateAddress/vo/DoorplateAddressVO.java
New file
@@ -0,0 +1,18 @@
package org.springblade.modules.doorplateAddress.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
/**
 * 门牌地址表(总台账数据) 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DoorplateAddressVO extends DoorplateAddressEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/doorplateAddress/vo/FuncNode.java
New file
@@ -0,0 +1,4 @@
package org.springblade.modules.doorplateAddress.vo;
public class FuncNode {
}
src/main/java/org/springblade/modules/doorplateAddress/wrapper/DoorplateAddressWrapper.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.doorplateAddress.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
import org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO;
import java.util.Objects;
/**
 * 门牌地址表(总台账数据) 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class DoorplateAddressWrapper extends BaseEntityWrapper<DoorplateAddressEntity, DoorplateAddressVO>  {
    public static DoorplateAddressWrapper build() {
        return new DoorplateAddressWrapper();
     }
    @Override
    public DoorplateAddressVO entityVO(DoorplateAddressEntity doorplateAddress) {
        DoorplateAddressVO doorplateAddressVO = Objects.requireNonNull(BeanUtil.copy(doorplateAddress, DoorplateAddressVO.class));
        //User createUser = UserCache.getUser(doorplateAddress.getCreateUser());
        //User updateUser = UserCache.getUser(doorplateAddress.getUpdateUser());
        //doorplateAddressVO.setCreateUserName(createUser.getName());
        //doorplateAddressVO.setUpdateUserName(updateUser.getName());
        return doorplateAddressVO;
    }
}
src/main/java/org/springblade/modules/grid/controller/GridController.java
New file
@@ -0,0 +1,124 @@
/*
 *      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.grid.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.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.vo.GridVO;
import org.springblade.modules.grid.wrapper.GridWrapper;
import org.springblade.modules.grid.service.IGridService;
/**
 * 网格表 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-grid/grid")
@Api(value = "网格表", tags = "网格表接口")
public class GridController{
    private final IGridService gridService;
    /**
     * 网格表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入grid")
    public R<GridVO> detail(GridEntity grid) {
        GridEntity detail = gridService.getOne(Condition.getQueryWrapper(grid));
        return R.data(GridWrapper.build().entityVO(detail));
    }
    /**
     * 网格表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入grid")
    public R<IPage<GridVO>> list(GridEntity grid, Query query) {
        IPage<GridEntity> pages = gridService.page(Condition.getPage(query), Condition.getQueryWrapper(grid));
        return R.data(GridWrapper.build().pageVO(pages));
    }
    /**
     * 网格表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入grid")
    public R<IPage<GridVO>> page(GridVO grid, Query query) {
        IPage<GridVO> pages = gridService.selectGridPage(Condition.getPage(query), grid);
        return R.data(pages);
    }
    /**
     * 网格表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入grid")
    public R save(@Valid @RequestBody GridEntity grid) {
        return R.status(gridService.save(grid));
    }
    /**
     * 网格表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入grid")
    public R update(@Valid @RequestBody GridEntity grid) {
        return R.status(gridService.updateById(grid));
    }
    /**
     * 网格表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入grid")
    public R submit(@Valid @RequestBody GridEntity grid) {
        return R.status(gridService.saveOrUpdate(grid));
    }
    /**
     * 网格表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(gridService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/grid/controller/GridRangeController.java
New file
@@ -0,0 +1,124 @@
/*
 *      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.grid.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.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.grid.entity.GridRangeEntity;
import org.springblade.modules.grid.vo.GridRangeVO;
import org.springblade.modules.grid.wrapper.GridRangeWrapper;
import org.springblade.modules.grid.service.IGridRangeService;
/**
 * 网格范围表 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-gridRange/gridRange")
@Api(value = "网格范围表", tags = "网格范围表接口")
public class GridRangeController{
    private final IGridRangeService gridRangeService;
    /**
     * 网格范围表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入gridRange")
    public R<GridRangeVO> detail(GridRangeEntity gridRange) {
        GridRangeEntity detail = gridRangeService.getOne(Condition.getQueryWrapper(gridRange));
        return R.data(GridRangeWrapper.build().entityVO(detail));
    }
    /**
     * 网格范围表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入gridRange")
    public R<IPage<GridRangeVO>> list(GridRangeEntity gridRange, Query query) {
        IPage<GridRangeEntity> pages = gridRangeService.page(Condition.getPage(query), Condition.getQueryWrapper(gridRange));
        return R.data(GridRangeWrapper.build().pageVO(pages));
    }
    /**
     * 网格范围表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入gridRange")
    public R<IPage<GridRangeVO>> page(GridRangeVO gridRange, Query query) {
        IPage<GridRangeVO> pages = gridRangeService.selectGridRangePage(Condition.getPage(query), gridRange);
        return R.data(pages);
    }
    /**
     * 网格范围表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入gridRange")
    public R save(@Valid @RequestBody GridRangeEntity gridRange) {
        return R.status(gridRangeService.save(gridRange));
    }
    /**
     * 网格范围表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入gridRange")
    public R update(@Valid @RequestBody GridRangeEntity gridRange) {
        return R.status(gridRangeService.updateById(gridRange));
    }
    /**
     * 网格范围表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入gridRange")
    public R submit(@Valid @RequestBody GridRangeEntity gridRange) {
        return R.status(gridRangeService.saveOrUpdate(gridRange));
    }
    /**
     * 网格范围表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(gridRangeService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/grid/dto/GridDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.grid.dto;
import org.springblade.modules.grid.entity.GridEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 网格表 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GridDTO extends GridEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/grid/dto/GridRangeDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.grid.dto;
import org.springblade.modules.grid.entity.GridRangeEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 网格范围表 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GridRangeDTO extends GridRangeEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/grid/entity/GridEntity.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.grid.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 网格表 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_grid")
@ApiModel(value = "Grid对象", description = "网格表")
public class GridEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 社区名称
     */
    @ApiModelProperty(value = "社区名称")
    private String communityName;
    /**
     * 网格名称
     */
    @ApiModelProperty(value = "网格名称")
    private String gridName;
    /**
     * 负责人ID
     */
    @ApiModelProperty(value = "负责人ID")
    private Long userId;
    /**
     * 负责人名称
     */
    @ApiModelProperty(value = "负责人名称")
    private String principal;
    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    private String principalPhone;
    /**
     * 网格面数据
     */
    @ApiModelProperty(value = "网格面数据")
    private String geom;
    /**
     * 创建人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("创建人")
    private Long createUser;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;
    /**
     * 更新人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("更新人")
    private Long updateUser;
    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 是否删除
     */
    @TableLogic
    @ApiModelProperty("是否已删除 0:否  1:是")
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/grid/entity/GridRangeEntity.java
New file
@@ -0,0 +1,72 @@
/*
 *      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.grid.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serializable;
/**
 * 网格范围表 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_grid_range")
@ApiModel(value = "GridRange对象", description = "网格范围表")
public class GridRangeEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 网格ID
     */
    @ApiModelProperty(value = "网格ID")
    private Integer gridId;
    /**
     * 小区ID
     */
    @ApiModelProperty(value = "小区ID")
    private String districtCode;
    /**
     * 小区名称
     */
    @ApiModelProperty(value = "小区名称")
    private String districtName;
    /**
     * 幢
     */
    @ApiModelProperty(value = "幢")
    private String building;
}
src/main/java/org/springblade/modules/grid/mapper/GridMapper.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.grid.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.vo.GridVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 网格表 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface GridMapper extends BaseMapper<GridEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param grid
     * @return
     */
    List<GridVO> selectGridPage(IPage page,@Param("grid") GridVO grid);
}
src/main/java/org/springblade/modules/grid/mapper/GridMapper.xml
New file
@@ -0,0 +1,11 @@
<?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.grid.mapper.GridMapper">
    <!--自定义分页查询-->
    <select id="selectGridPage" resultType="org.springblade.modules.grid.vo.GridVO">
        select * from jczz_grid where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.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.grid.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.grid.entity.GridRangeEntity;
import org.springblade.modules.grid.vo.GridRangeVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 网格范围表 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface GridRangeMapper extends BaseMapper<GridRangeEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gridRange
     * @return
     */
    List<GridRangeVO> selectGridRangePage(IPage page,@Param("gridRange") GridRangeVO gridRange);
}
src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.xml
New file
@@ -0,0 +1,11 @@
<?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.grid.mapper.GridRangeMapper">
    <!--自定义分页查询-->
    <select id="selectGridRangePage" resultType="org.springblade.modules.grid.vo.GridRangeVO">
        select * from jczz_grid_range where 1=1
    </select>
</mapper>
src/main/java/org/springblade/modules/grid/service/IGridRangeService.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.grid.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.grid.entity.GridRangeEntity;
import org.springblade.modules.grid.vo.GridRangeVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 网格范围表 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IGridRangeService extends IService<GridRangeEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gridRange
     * @return
     */
    IPage<GridRangeVO> selectGridRangePage(IPage<GridRangeVO> page, GridRangeVO gridRange);
}
src/main/java/org/springblade/modules/grid/service/IGridService.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.grid.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.vo.GridVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 网格表 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IGridService extends IService<GridEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param grid
     * @return
     */
    IPage<GridVO> selectGridPage(IPage<GridVO> page, GridVO grid);
}
src/main/java/org/springblade/modules/grid/service/impl/GridRangeServiceImpl.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.grid.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.grid.entity.GridRangeEntity;
import org.springblade.modules.grid.vo.GridRangeVO;
import org.springblade.modules.grid.mapper.GridRangeMapper;
import org.springblade.modules.grid.service.IGridRangeService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 网格范围表 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class GridRangeServiceImpl extends ServiceImpl<GridRangeMapper, GridRangeEntity> implements IGridRangeService {
    @Override
    public IPage<GridRangeVO> selectGridRangePage(IPage<GridRangeVO> page, GridRangeVO gridRange) {
        return page.setRecords(baseMapper.selectGridRangePage(page, gridRange));
    }
}
src/main/java/org/springblade/modules/grid/service/impl/GridServiceImpl.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.grid.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.vo.GridVO;
import org.springblade.modules.grid.mapper.GridMapper;
import org.springblade.modules.grid.service.IGridService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 网格表 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class GridServiceImpl extends ServiceImpl<GridMapper, GridEntity> implements IGridService {
    @Override
    public IPage<GridVO> selectGridPage(IPage<GridVO> page, GridVO grid) {
        return page.setRecords(baseMapper.selectGridPage(page, grid));
    }
}
src/main/java/org/springblade/modules/grid/vo/GridRangeVO.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.grid.vo;
import org.springblade.modules.grid.entity.GridRangeEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 网格范围表 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GridRangeVO extends GridRangeEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/grid/vo/GridVO.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.grid.vo;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 网格表 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GridVO extends GridEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/grid/wrapper/GridRangeWrapper.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.grid.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.grid.entity.GridRangeEntity;
import org.springblade.modules.grid.vo.GridRangeVO;
import java.util.Objects;
/**
 * 网格范围表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class GridRangeWrapper extends BaseEntityWrapper<GridRangeEntity, GridRangeVO>  {
    public static GridRangeWrapper build() {
        return new GridRangeWrapper();
     }
    @Override
    public GridRangeVO entityVO(GridRangeEntity gridRange) {
        GridRangeVO gridRangeVO = Objects.requireNonNull(BeanUtil.copy(gridRange, GridRangeVO.class));
        //User createUser = UserCache.getUser(gridRange.getCreateUser());
        //User updateUser = UserCache.getUser(gridRange.getUpdateUser());
        //gridRangeVO.setCreateUserName(createUser.getName());
        //gridRangeVO.setUpdateUserName(updateUser.getName());
        return gridRangeVO;
    }
}
src/main/java/org/springblade/modules/grid/wrapper/GridWrapper.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.grid.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.vo.GridVO;
import java.util.Objects;
/**
 * 网格表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class GridWrapper extends BaseEntityWrapper<GridEntity, GridVO>  {
    public static GridWrapper build() {
        return new GridWrapper();
     }
    @Override
    public GridVO entityVO(GridEntity grid) {
        GridVO gridVO = Objects.requireNonNull(BeanUtil.copy(grid, GridVO.class));
        //User createUser = UserCache.getUser(grid.getCreateUser());
        //User updateUser = UserCache.getUser(grid.getUpdateUser());
        //gridVO.setCreateUserName(createUser.getName());
        //gridVO.setUpdateUserName(updateUser.getName());
        return gridVO;
    }
}
src/main/java/org/springblade/modules/house/controller/HouseController.java
New file
@@ -0,0 +1,126 @@
/*
 *      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.house.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.house.entity.HouseEntity;
import org.springblade.modules.house.vo.HouseVO;
import org.springblade.modules.house.wrapper.HouseWrapper;
import org.springblade.modules.house.service.IHouseService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 房屋 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-house/house")
@Api(value = "房屋", tags = "房屋接口")
public class HouseController extends BladeController {
    private final IHouseService houseService;
    /**
     * 房屋 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入house")
    public R<HouseVO> detail(HouseEntity house) {
        HouseEntity detail = houseService.getOne(Condition.getQueryWrapper(house));
        return R.data(HouseWrapper.build().entityVO(detail));
    }
    /**
     * 房屋 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入house")
    public R<IPage<HouseVO>> list(HouseEntity house, Query query) {
        IPage<HouseEntity> pages = houseService.page(Condition.getPage(query), Condition.getQueryWrapper(house));
        return R.data(HouseWrapper.build().pageVO(pages));
    }
    /**
     * 房屋 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入house")
    public R<IPage<HouseVO>> page(HouseVO house, Query query) {
        IPage<HouseVO> pages = houseService.selectHousePage(Condition.getPage(query), house);
        return R.data(pages);
    }
    /**
     * 房屋 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入house")
    public R save(@Valid @RequestBody HouseEntity house) {
        return R.status(houseService.save(house));
    }
    /**
     * 房屋 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入house")
    public R update(@Valid @RequestBody HouseEntity house) {
        return R.status(houseService.updateById(house));
    }
    /**
     * 房屋 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入house")
    public R submit(@Valid @RequestBody HouseEntity house) {
        return R.status(houseService.saveOrUpdate(house));
    }
    /**
     * 房屋 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(houseService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
New file
@@ -0,0 +1,126 @@
/*
 *      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.house.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.house.entity.HouseLabelEntity;
import org.springblade.modules.house.vo.HouseLabelVO;
import org.springblade.modules.house.wrapper.HouseLabelWrapper;
import org.springblade.modules.house.service.IHouseLabelService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 房屋-标签 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-houseLabel/houseLabel")
@Api(value = "房屋-标签", tags = "房屋-标签接口")
public class HouseLabelController extends BladeController {
    private final IHouseLabelService houseLabelService;
    /**
     * 房屋-标签 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入houseLabel")
    public R<HouseLabelVO> detail(HouseLabelEntity houseLabel) {
        HouseLabelEntity detail = houseLabelService.getOne(Condition.getQueryWrapper(houseLabel));
        return R.data(HouseLabelWrapper.build().entityVO(detail));
    }
    /**
     * 房屋-标签 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入houseLabel")
    public R<IPage<HouseLabelVO>> list(HouseLabelEntity houseLabel, Query query) {
        IPage<HouseLabelEntity> pages = houseLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(houseLabel));
        return R.data(HouseLabelWrapper.build().pageVO(pages));
    }
    /**
     * 房屋-标签 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入houseLabel")
    public R<IPage<HouseLabelVO>> page(HouseLabelVO houseLabel, Query query) {
        IPage<HouseLabelVO> pages = houseLabelService.selectHouseLabelPage(Condition.getPage(query), houseLabel);
        return R.data(pages);
    }
    /**
     * 房屋-标签 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入houseLabel")
    public R save(@Valid @RequestBody HouseLabelEntity houseLabel) {
        return R.status(houseLabelService.save(houseLabel));
    }
    /**
     * 房屋-标签 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入houseLabel")
    public R update(@Valid @RequestBody HouseLabelEntity houseLabel) {
        return R.status(houseLabelService.updateById(houseLabel));
    }
    /**
     * 房屋-标签 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入houseLabel")
    public R submit(@Valid @RequestBody HouseLabelEntity houseLabel) {
        return R.status(houseLabelService.saveOrUpdate(houseLabel));
    }
    /**
     * 房屋-标签 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(houseLabelService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/house/controller/HouseRentalController.java
New file
@@ -0,0 +1,126 @@
/*
 *      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.house.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.house.entity.HouseRentalEntity;
import org.springblade.modules.house.vo.HouseRentalVO;
import org.springblade.modules.house.wrapper.HouseRentalWrapper;
import org.springblade.modules.house.service.IHouseRentalService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 出租屋 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-houseRental/houseRental")
@Api(value = "出租屋", tags = "出租屋接口")
public class HouseRentalController extends BladeController {
    private final IHouseRentalService houseRentalService;
    /**
     * 出租屋 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入houseRental")
    public R<HouseRentalVO> detail(HouseRentalEntity houseRental) {
        HouseRentalEntity detail = houseRentalService.getOne(Condition.getQueryWrapper(houseRental));
        return R.data(HouseRentalWrapper.build().entityVO(detail));
    }
    /**
     * 出租屋 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入houseRental")
    public R<IPage<HouseRentalVO>> list(HouseRentalEntity houseRental, Query query) {
        IPage<HouseRentalEntity> pages = houseRentalService.page(Condition.getPage(query), Condition.getQueryWrapper(houseRental));
        return R.data(HouseRentalWrapper.build().pageVO(pages));
    }
    /**
     * 出租屋 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入houseRental")
    public R<IPage<HouseRentalVO>> page(HouseRentalVO houseRental, Query query) {
        IPage<HouseRentalVO> pages = houseRentalService.selectHouseRentalPage(Condition.getPage(query), houseRental);
        return R.data(pages);
    }
    /**
     * 出租屋 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入houseRental")
    public R save(@Valid @RequestBody HouseRentalEntity houseRental) {
        return R.status(houseRentalService.save(houseRental));
    }
    /**
     * 出租屋 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入houseRental")
    public R update(@Valid @RequestBody HouseRentalEntity houseRental) {
        return R.status(houseRentalService.updateById(houseRental));
    }
    /**
     * 出租屋 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入houseRental")
    public R submit(@Valid @RequestBody HouseRentalEntity houseRental) {
        return R.status(houseRentalService.saveOrUpdate(houseRental));
    }
    /**
     * 出租屋 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(houseRentalService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/house/controller/HouseTenantController.java
New file
@@ -0,0 +1,126 @@
/*
 *      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.house.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.house.entity.HouseTenantEntity;
import org.springblade.modules.house.vo.HouseTenantVO;
import org.springblade.modules.house.wrapper.HouseTenantWrapper;
import org.springblade.modules.house.service.IHouseTenantService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 租户管理 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-houseTenant/houseTenant")
@Api(value = "租户管理", tags = "租户管理接口")
public class HouseTenantController extends BladeController {
    private final IHouseTenantService houseTenantService;
    /**
     * 租户管理 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入houseTenant")
    public R<HouseTenantVO> detail(HouseTenantEntity houseTenant) {
        HouseTenantEntity detail = houseTenantService.getOne(Condition.getQueryWrapper(houseTenant));
        return R.data(HouseTenantWrapper.build().entityVO(detail));
    }
    /**
     * 租户管理 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入houseTenant")
    public R<IPage<HouseTenantVO>> list(HouseTenantEntity houseTenant, Query query) {
        IPage<HouseTenantEntity> pages = houseTenantService.page(Condition.getPage(query), Condition.getQueryWrapper(houseTenant));
        return R.data(HouseTenantWrapper.build().pageVO(pages));
    }
    /**
     * 租户管理 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入houseTenant")
    public R<IPage<HouseTenantVO>> page(HouseTenantVO houseTenant, Query query) {
        IPage<HouseTenantVO> pages = houseTenantService.selectHouseTenantPage(Condition.getPage(query), houseTenant);
        return R.data(pages);
    }
    /**
     * 租户管理 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入houseTenant")
    public R save(@Valid @RequestBody HouseTenantEntity houseTenant) {
        return R.status(houseTenantService.save(houseTenant));
    }
    /**
     * 租户管理 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入houseTenant")
    public R update(@Valid @RequestBody HouseTenantEntity houseTenant) {
        return R.status(houseTenantService.updateById(houseTenant));
    }
    /**
     * 租户管理 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入houseTenant")
    public R submit(@Valid @RequestBody HouseTenantEntity houseTenant) {
        return R.status(houseTenantService.saveOrUpdate(houseTenant));
    }
    /**
     * 租户管理 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(houseTenantService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/house/controller/HouseholdController.java
New file
@@ -0,0 +1,126 @@
/*
 *      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.house.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.house.entity.HouseholdEntity;
import org.springblade.modules.house.vo.HouseholdVO;
import org.springblade.modules.house.wrapper.HouseholdWrapper;
import org.springblade.modules.house.service.IHouseholdService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 住户 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-household/household")
@Api(value = "住户", tags = "住户接口")
public class HouseholdController extends BladeController {
    private final IHouseholdService householdService;
    /**
     * 住户 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入household")
    public R<HouseholdVO> detail(HouseholdEntity household) {
        HouseholdEntity detail = householdService.getOne(Condition.getQueryWrapper(household));
        return R.data(HouseholdWrapper.build().entityVO(detail));
    }
    /**
     * 住户 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入household")
    public R<IPage<HouseholdVO>> list(HouseholdEntity household, Query query) {
        IPage<HouseholdEntity> pages = householdService.page(Condition.getPage(query), Condition.getQueryWrapper(household));
        return R.data(HouseholdWrapper.build().pageVO(pages));
    }
    /**
     * 住户 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入household")
    public R<IPage<HouseholdVO>> page(HouseholdVO household, Query query) {
        IPage<HouseholdVO> pages = householdService.selectHouseholdPage(Condition.getPage(query), household);
        return R.data(pages);
    }
    /**
     * 住户 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入household")
    public R save(@Valid @RequestBody HouseholdEntity household) {
        return R.status(householdService.save(household));
    }
    /**
     * 住户 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入household")
    public R update(@Valid @RequestBody HouseholdEntity household) {
        return R.status(householdService.updateById(household));
    }
    /**
     * 住户 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入household")
    public R submit(@Valid @RequestBody HouseholdEntity household) {
        return R.status(householdService.saveOrUpdate(household));
    }
    /**
     * 住户 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(householdService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/house/controller/HouseholdLabelController.java
New file
@@ -0,0 +1,126 @@
/*
 *      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.house.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.house.entity.HouseholdLabelEntity;
import org.springblade.modules.house.vo.HouseholdLabelVO;
import org.springblade.modules.house.wrapper.HouseholdLabelWrapper;
import org.springblade.modules.house.service.IHouseholdLabelService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 住户-标签 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-householdLabel/householdLabel")
@Api(value = "住户-标签", tags = "住户-标签接口")
public class HouseholdLabelController extends BladeController {
    private final IHouseholdLabelService householdLabelService;
    /**
     * 住户-标签 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入householdLabel")
    public R<HouseholdLabelVO> detail(HouseholdLabelEntity householdLabel) {
        HouseholdLabelEntity detail = householdLabelService.getOne(Condition.getQueryWrapper(householdLabel));
        return R.data(HouseholdLabelWrapper.build().entityVO(detail));
    }
    /**
     * 住户-标签 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入householdLabel")
    public R<IPage<HouseholdLabelVO>> list(HouseholdLabelEntity householdLabel, Query query) {
        IPage<HouseholdLabelEntity> pages = householdLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(householdLabel));
        return R.data(HouseholdLabelWrapper.build().pageVO(pages));
    }
    /**
     * 住户-标签 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入householdLabel")
    public R<IPage<HouseholdLabelVO>> page(HouseholdLabelVO householdLabel, Query query) {
        IPage<HouseholdLabelVO> pages = householdLabelService.selectHouseholdLabelPage(Condition.getPage(query), householdLabel);
        return R.data(pages);
    }
    /**
     * 住户-标签 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入householdLabel")
    public R save(@Valid @RequestBody HouseholdLabelEntity householdLabel) {
        return R.status(householdLabelService.save(householdLabel));
    }
    /**
     * 住户-标签 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入householdLabel")
    public R update(@Valid @RequestBody HouseholdLabelEntity householdLabel) {
        return R.status(householdLabelService.updateById(householdLabel));
    }
    /**
     * 住户-标签 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入householdLabel")
    public R submit(@Valid @RequestBody HouseholdLabelEntity householdLabel) {
        return R.status(householdLabelService.saveOrUpdate(householdLabel));
    }
    /**
     * 住户-标签 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(householdLabelService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/house/dto/HouseDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.house.dto;
import org.springblade.modules.house.entity.HouseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 房屋 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseDTO extends HouseEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/dto/HouseLabelDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.house.dto;
import org.springblade.modules.house.entity.HouseLabelEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 房屋-标签 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseLabelDTO extends HouseLabelEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/dto/HouseRentalDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.house.dto;
import org.springblade.modules.house.entity.HouseRentalEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 出租屋 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseRentalDTO extends HouseRentalEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/dto/HouseTenantDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.house.dto;
import org.springblade.modules.house.entity.HouseTenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 租户管理 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseTenantDTO extends HouseTenantEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/dto/HouseholdDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.house.dto;
import org.springblade.modules.house.entity.HouseholdEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 住户 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseholdDTO extends HouseholdEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/dto/HouseholdLabelDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.house.dto;
import org.springblade.modules.house.entity.HouseholdLabelEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 住户-标签 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseholdLabelDTO extends HouseholdLabelEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/entity/HouseEntity.java
New file
@@ -0,0 +1,170 @@
/*
 *      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.house.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 房屋 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_house")
@ApiModel(value = "House对象", description = "房屋")
public class HouseEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 门牌地址编码
     */
    @ApiModelProperty(value = "门牌地址编码")
    private String houseCode;
    /**
     * 小区编码
     */
    @ApiModelProperty(value = "小区编码")
    private String districtCode;
    /**
     * 小区
     */
    @ApiModelProperty(value = "小区")
    private String districtName;
    /**
     * 房屋名称
     */
    @ApiModelProperty(value = "房屋名称")
    private String houseName;
    /**
     * 绑定手机
     */
    @ApiModelProperty(value = "绑定手机")
    private String phone;
    /**
     * 面积
     */
    @ApiModelProperty(value = "面积")
    private BigDecimal area;
    /**
     * 物业单价
     */
    @ApiModelProperty(value = "物业单价")
    private BigDecimal propertyPrice;
    /**
     * 服务到期
     */
    @ApiModelProperty(value = "服务到期")
    private Date serviceDue;
    /**
     * 楼层
     */
    @ApiModelProperty(value = "楼层")
    private Integer floor;
    /**
     * 幢
     */
    @ApiModelProperty(value = "幢")
    private String building;
    /**
     * 单元
     */
    @ApiModelProperty(value = "单元")
    private String unit;
    /**
     * 室
     */
    @ApiModelProperty(value = "室")
    private String room;
    /**
     * 幢编号
     */
    @ApiModelProperty(value = "幢编号")
    private Integer buildingNo;
    /**
     * 图片URLS
     */
    @ApiModelProperty(value = "图片URLS")
    private String imageUrls;
    /**
     * 创建人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("创建人")
    private String createUser;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;
    /**
     * 更新人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("更新人")
    private String updateUser;
    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 是否删除
     */
    @TableLogic
    @ApiModelProperty("是否已删除 0:否  1:是")
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/house/entity/HouseLabelEntity.java
New file
@@ -0,0 +1,78 @@
/*
 *      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.house.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serializable;
/**
 * 房屋-标签 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_house_label")
@ApiModel(value = "HouseLabel对象", description = "房屋-标签")
public class HouseLabelEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 门牌地址编码
     */
    @ApiModelProperty(value = "门牌地址编码")
    private String houseCode;
    /**
     * 标签ID
     */
    @ApiModelProperty(value = "标签ID")
    private Integer labelId;
    /**
     * 标签名称
     */
    @ApiModelProperty(value = "标签名称")
    private String labelName;
    /**
     * 颜色
     */
    @ApiModelProperty(value = "颜色")
    private String color;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
}
src/main/java/org/springblade/modules/house/entity/HouseRentalEntity.java
New file
@@ -0,0 +1,144 @@
/*
 *      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.house.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 出租屋 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_house_rental")
@ApiModel(value = "HouseRental对象", description = "出租屋")
public class HouseRentalEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 门牌地址编码
     */
    @ApiModelProperty(value = "门牌地址编码")
    private String houseCode;
    /**
     * 房屋名称
     */
    @ApiModelProperty(value = "房屋名称")
    private String houseName;
    /**
     * 租客关系(WGCCP_TENANT_RELATIONSHIP)
     */
    @ApiModelProperty(value = "租客关系(WGCCP_TENANT_RELATIONSHIP)")
    private String tenantRelationship;
    /**
     * 租房时间
     */
    @ApiModelProperty(value = "租房时间")
    private Date rentalTime;
    /**
     * 到期时间
     */
    @ApiModelProperty(value = "到期时间")
    private Date dueTime;
    /**
     * 房屋状态(WGCCP_HOUSE_STATUS)
     */
    @ApiModelProperty(value = "房屋状态(WGCCP_HOUSE_STATUS)")
    private String houseStatus;
    /**
     * 租房用途
     */
    @ApiModelProperty(value = "租房用途")
    private String rentalUse;
    /**
     * 合同附件URL
     */
    @ApiModelProperty(value = "合同附件URL")
    private String fileUrls;
    /**
     * 审核状态
     */
    @ApiModelProperty(value = "审核状态")
    private Integer auditStatus;
    /**
     * 创建人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("创建人")
    private String createUser;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;
    /**
     * 更新人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("更新人")
    private String updateUser;
    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 是否删除
     */
    @TableLogic
    @ApiModelProperty("是否已删除 0:否  1:是")
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/house/entity/HouseTenantEntity.java
New file
@@ -0,0 +1,95 @@
/*
 *      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.house.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serializable;
/**
 * 租户管理 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_house_tenant")
@ApiModel(value = "HouseTenant对象", description = "租户管理")
public class HouseTenantEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 出租屋ID
     */
    @ApiModelProperty(value = "出租屋ID")
    private Long housingRentalId;
    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    private String name;
    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    private String phone;
    /**
     * 身份证
     */
    @ApiModelProperty(value = "身份证")
    private String idCard;
    /**
     * 户籍
     */
    @ApiModelProperty(value = "户籍")
    private String domicile;
    /**
     * 工作单位
     */
    @ApiModelProperty(value = "工作单位")
    private String workUnit;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 是否删除
     */
    @TableLogic
    @ApiModelProperty("是否已删除 0:否  1:是")
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/house/entity/HouseholdEntity.java
New file
@@ -0,0 +1,228 @@
/*
 *      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.house.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 住户 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_household")
@ApiModel(value = "Household对象", description = "住户")
public class HouseholdEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 门牌地址编码
     */
    @ApiModelProperty(value = "门牌地址编码")
    private String houseCode;
    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    private String name;
    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    private String phoneNumber;
    /**
     * 绑定用户ID
     */
    @ApiModelProperty(value = "绑定用户ID")
    private Long associatedUserId;
    /**
     * 绑定用户名称
     */
    @ApiModelProperty(value = "绑定用户名称")
    private String associatedUserName;
    /**
     * 与角色关系
     */
    @ApiModelProperty(value = "与角色关系")
    private String relationship;
    /**
     * 主要联系人
     */
    @ApiModelProperty(value = "主要联系人")
    private String primaryContact;
    /**
     * 居住状态(WGCCP_RESIDENTIAL_STATUS)
     */
    @ApiModelProperty(value = "居住状态(WGCCP_RESIDENTIAL_STATUS)")
    private String residentialStatus;
    /**
     * 性别(SEX)
     */
    @ApiModelProperty(value = "性别(SEX)")
    private Short gender;
    /**
     * 生日
     */
    @ApiModelProperty(value = "生日")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    /**
     * 身份证
     */
    @ApiModelProperty(value = "身份证")
    private String idCard;
    /**
     * 港澳台通行证
     */
    @ApiModelProperty(value = "港澳台通行证")
    private String hkmtPass;
    /**
     * 护照
     */
    @ApiModelProperty(value = "护照")
    private String passport;
    /**
     * 民族(WGCCP_ETHNICITY)
     */
    @ApiModelProperty(value = "民族(WGCCP_ETHNICITY)")
    private String ethnicity;
    /**
     * 学历(WGCCP_EDUCATION)
     */
    @ApiModelProperty(value = "学历(WGCCP_EDUCATION)")
    private String education;
    /**
     * 户籍登记地
     */
    @ApiModelProperty(value = "户籍登记地")
    private String hukouRegistration;
    /**
     * 工作状态(WGCCP_WORK_STATUS)
     */
    @ApiModelProperty(value = "工作状态(WGCCP_WORK_STATUS)")
    private String workStatus;
    /**
     * 工作单位
     */
    @ApiModelProperty(value = "工作单位")
    private String employer;
    /**
     * 婚姻状态(WGCCP_MARITAL_STATUS)
     */
    @ApiModelProperty(value = "婚姻状态(WGCCP_MARITAL_STATUS)")
    private String maritalStatus;
    /**
     * 车牌号
     */
    @ApiModelProperty(value = "车牌号")
    private String cardNumber;
    /**
     * 其他联系方式
     */
    @ApiModelProperty(value = "其他联系方式")
    private String otherContact;
    /**
     * 现居住地址
     */
    @ApiModelProperty(value = "现居住地址")
    private String currentAddress;
    /**
     * 残疾证
     */
    @ApiModelProperty(value = "残疾证")
    private String disabilityCert;
    /**
     * 数据状态(ENABLED)
     */
    @ApiModelProperty(value = "数据状态(ENABLED)")
    private Short dataStatus;
    /**
     * 角色
     */
    @ApiModelProperty(value = "角色")
    private String roleType;
    /**
     * 是否党员
     */
    @ApiModelProperty(value = "是否党员")
    private String partyEmber;
    /**
     * 创建人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("创建人")
    private String createUser;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;
    /**
     * 更新人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("更新人")
    private String updateUser;
    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 是否删除
     */
    @TableLogic
    @ApiModelProperty("是否已删除 0:否  1:是")
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/house/entity/HouseholdLabelEntity.java
New file
@@ -0,0 +1,77 @@
/*
 *      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.house.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serializable;
/**
 * 住户-标签 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_household_label")
@ApiModel(value = "HouseholdLabel对象", description = "住户-标签")
public class HouseholdLabelEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 住户ID
     */
    @ApiModelProperty(value = "住户ID")
    private Long householdId;
    /**
     * 标签ID
     */
    @ApiModelProperty(value = "标签ID")
    private Integer labelId;
    /**
     * 标签名称
     */
    @ApiModelProperty(value = "标签名称")
    private String labelName;
    /**
     * 颜色
     */
    @ApiModelProperty(value = "颜色")
    private String color;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
}
src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.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.house.mapper;
import org.springblade.modules.house.entity.HouseLabelEntity;
import org.springblade.modules.house.vo.HouseLabelVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 房屋-标签 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface HouseLabelMapper extends BaseMapper<HouseLabelEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param houseLabel
     * @return
     */
    List<HouseLabelVO> selectHouseLabelPage(IPage page, HouseLabelVO houseLabel);
}
src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.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.house.mapper.HouseLabelMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="houseLabelResultMap" type="org.springblade.modules.house.entity.HouseLabelEntity">
    </resultMap>
    <select id="selectHouseLabelPage" resultMap="houseLabelResultMap">
        select * from jczz_house_label where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/house/mapper/HouseMapper.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.house.mapper;
import org.springblade.modules.house.entity.HouseEntity;
import org.springblade.modules.house.vo.HouseVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 房屋 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface HouseMapper extends BaseMapper<HouseEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param house
     * @return
     */
    List<HouseVO> selectHousePage(IPage page, HouseVO house);
}
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
New file
@@ -0,0 +1,36 @@
<?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.house.mapper.HouseMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="houseResultMap" type="org.springblade.modules.house.entity.HouseEntity">
        <result column="id" property="id"/>
        <result column="house_code" property="houseCode"/>
        <result column="district_code" property="districtCode"/>
        <result column="district_name" property="districtName"/>
        <result column="house_name" property="houseName"/>
        <result column="phone" property="phone"/>
        <result column="area" property="area"/>
        <result column="property_price" property="propertyPrice"/>
        <result column="service_due" property="serviceDue"/>
        <result column="floor" property="floor"/>
        <result column="building" property="building"/>
        <result column="unit" property="unit"/>
        <result column="room" property="room"/>
        <result column="building_no" property="buildingNo"/>
        <result column="image_urls" property="imageUrls"/>
        <result column="create_user" property="createUser"/>
        <result column="created_time" property="createdTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="remark" property="remark"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="selectHousePage" resultMap="houseResultMap">
        select * from jczz_house where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.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.house.mapper;
import org.springblade.modules.house.entity.HouseRentalEntity;
import org.springblade.modules.house.vo.HouseRentalVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 出租屋 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface HouseRentalMapper extends BaseMapper<HouseRentalEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param houseRental
     * @return
     */
    List<HouseRentalVO> selectHouseRentalPage(IPage page, HouseRentalVO houseRental);
}
src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml
New file
@@ -0,0 +1,31 @@
<?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.house.mapper.HouseRentalMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="houseRentalResultMap" type="org.springblade.modules.house.entity.HouseRentalEntity">
        <result column="id" property="id"/>
        <result column="house_code" property="houseCode"/>
        <result column="house_name" property="houseName"/>
        <result column="tenant_relationship" property="tenantRelationship"/>
        <result column="rental_time" property="rentalTime"/>
        <result column="due_time" property="dueTime"/>
        <result column="house_status" property="houseStatus"/>
        <result column="rental_use" property="rentalUse"/>
        <result column="file_urls" property="fileUrls"/>
        <result column="audit_status" property="auditStatus"/>
        <result column="create_user" property="createUser"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="remark" property="remark"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="selectHouseRentalPage" resultMap="houseRentalResultMap">
        select * from jczz_house_rental where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.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.house.mapper;
import org.springblade.modules.house.entity.HouseTenantEntity;
import org.springblade.modules.house.vo.HouseTenantVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 租户管理 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface HouseTenantMapper extends BaseMapper<HouseTenantEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param houseTenant
     * @return
     */
    List<HouseTenantVO> selectHouseTenantPage(IPage page, HouseTenantVO houseTenant);
}
src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.xml
New file
@@ -0,0 +1,24 @@
<?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.house.mapper.HouseTenantMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="houseTenantResultMap" type="org.springblade.modules.house.entity.HouseTenantEntity">
        <result column="id" property="id"/>
        <result column="housing_rental_id" property="housingRentalId"/>
        <result column="name" property="name"/>
        <result column="phone" property="phone"/>
        <result column="id_card" property="idCard"/>
        <result column="domicile" property="domicile"/>
        <result column="work_unit" property="workUnit"/>
        <result column="remark" property="remark"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="selectHouseTenantPage" resultMap="houseTenantResultMap">
        select * from jczz_house_tenant where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/house/mapper/HouseholdLabelMapper.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.house.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.house.entity.HouseholdLabelEntity;
import org.springblade.modules.house.vo.HouseholdLabelVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 住户-标签 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface HouseholdLabelMapper extends BaseMapper<HouseholdLabelEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param householdLabel
     * @return
     */
    List<HouseholdLabelVO> selectHouseholdLabelPage(IPage page, HouseholdLabelVO householdLabel);
}
src/main/java/org/springblade/modules/house/mapper/HouseholdLabelMapper.xml
New file
@@ -0,0 +1,21 @@
<?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.house.mapper.HouseholdLabelMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="householdLabelResultMap" type="org.springblade.modules.house.entity.HouseholdLabelEntity">
        <result column="id" property="id"/>
        <result column="household_id" property="householdId"/>
        <result column="label_id" property="labelId"/>
        <result column="label_name" property="labelName"/>
        <result column="color" property="color"/>
        <result column="remark" property="remark"/>
    </resultMap>
    <!--自定义分页查询-->
    <select id="selectHouseholdLabelPage" resultMap="householdLabelResultMap">
        select * from jczz_household_label where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.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.house.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.house.entity.HouseholdEntity;
import org.springblade.modules.house.vo.HouseholdVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 住户 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface HouseholdMapper extends BaseMapper<HouseholdEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param household
     * @return
     */
    List<HouseholdVO> selectHouseholdPage(IPage page, HouseholdVO household);
    /**
     * 查询房屋集合信息
     * @param userId
     * @return
     */
    List<TreeNode> selectHouseNodeList(@Param("userId") Long userId);
}
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
New file
@@ -0,0 +1,56 @@
<?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.house.mapper.HouseholdMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="householdResultMap" type="org.springblade.modules.house.entity.HouseholdEntity">
        <result column="id" property="id"/>
        <result column="house_code" property="houseCode"/>
        <result column="name" property="name"/>
        <result column="phone_number" property="phoneNumber"/>
        <result column="associated_user_id" property="associatedUserId"/>
        <result column="associated_user_name" property="associatedUserName"/>
        <result column="relationship" property="relationship"/>
        <result column="primary_contact" property="primaryContact"/>
        <result column="residential_status" property="residentialStatus"/>
        <result column="gender" property="gender"/>
        <result column="birthday" property="birthday"/>
        <result column="id_card" property="idCard"/>
        <result column="hkmt_pass" property="hkmtPass"/>
        <result column="passport" property="passport"/>
        <result column="ethnicity" property="ethnicity"/>
        <result column="education" property="education"/>
        <result column="hukou_registration" property="hukouRegistration"/>
        <result column="work_status" property="workStatus"/>
        <result column="employer" property="employer"/>
        <result column="marital_status" property="maritalStatus"/>
        <result column="card_number" property="cardNumber"/>
        <result column="other_contact" property="otherContact"/>
        <result column="current_address" property="currentAddress"/>
        <result column="disability_cert" property="disabilityCert"/>
        <result column="data_status" property="dataStatus"/>
        <result column="role_type" property="roleType"/>
        <result column="party_ember" property="partyEmber"/>
        <result column="create_user" property="createUser"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="remark" property="remark"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <!--自定义分页数据查询-->
    <select id="selectHouseholdPage" resultMap="householdResultMap">
        select * from jczz_household where is_deleted = 0
    </select>
    <!--查询房屋集合信息-->
    <select id="selectHouseNodeList" resultType="org.springblade.common.node.TreeNode" >
        select jh.house_code as id,jda.address_name as name,false as hasChildren from jczz_household jh
        left join jczz_doorplate_address jda on jh.house_code = jda.address_code
        where 1=1
        and associated_user_id = #{userId}
    </select>
</mapper>
src/main/java/org/springblade/modules/house/service/IHouseLabelService.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.house.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.house.entity.HouseLabelEntity;
import org.springblade.modules.house.vo.HouseLabelVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 房屋-标签 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IHouseLabelService extends IService<HouseLabelEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param houseLabel
     * @return
     */
    IPage<HouseLabelVO> selectHouseLabelPage(IPage<HouseLabelVO> page, HouseLabelVO houseLabel);
}
src/main/java/org/springblade/modules/house/service/IHouseRentalService.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.house.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.house.entity.HouseRentalEntity;
import org.springblade.modules.house.vo.HouseRentalVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 出租屋 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IHouseRentalService extends IService<HouseRentalEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param houseRental
     * @return
     */
    IPage<HouseRentalVO> selectHouseRentalPage(IPage<HouseRentalVO> page, HouseRentalVO houseRental);
}
src/main/java/org/springblade/modules/house/service/IHouseService.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.house.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.house.entity.HouseEntity;
import org.springblade.modules.house.vo.HouseVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 房屋 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IHouseService extends IService<HouseEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param house
     * @return
     */
    IPage<HouseVO> selectHousePage(IPage<HouseVO> page, HouseVO house);
}
src/main/java/org/springblade/modules/house/service/IHouseTenantService.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.house.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.house.entity.HouseTenantEntity;
import org.springblade.modules.house.vo.HouseTenantVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 租户管理 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IHouseTenantService extends IService<HouseTenantEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param houseTenant
     * @return
     */
    IPage<HouseTenantVO> selectHouseTenantPage(IPage<HouseTenantVO> page, HouseTenantVO houseTenant);
}
src/main/java/org/springblade/modules/house/service/IHouseholdLabelService.java
New file
@@ -0,0 +1,45 @@
/*
 *      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.house.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.house.entity.HouseholdLabelEntity;
import org.springblade.modules.house.vo.HouseholdLabelVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 住户-标签 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IHouseholdLabelService extends IService<HouseholdLabelEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param householdLabel
     * @return
     */
    IPage<HouseholdLabelVO> selectHouseholdLabelPage(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel);
}
src/main/java/org/springblade/modules/house/service/IHouseholdService.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.house.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.house.entity.HouseholdEntity;
import org.springblade.modules.house.vo.HouseholdVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 住户 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IHouseholdService extends IService<HouseholdEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param household
     * @return
     */
    IPage<HouseholdVO> selectHouseholdPage(IPage<HouseholdVO> page, HouseholdVO household);
    /**
     * 查询房屋集合信息
     * @param userId
     * @return
     */
    List<TreeNode> selectHouseNodeList(Long userId);
}
src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.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.house.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.house.entity.HouseLabelEntity;
import org.springblade.modules.house.vo.HouseLabelVO;
import org.springblade.modules.house.mapper.HouseLabelMapper;
import org.springblade.modules.house.service.IHouseLabelService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 房屋-标签 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class HouseLabelServiceImpl extends ServiceImpl<HouseLabelMapper, HouseLabelEntity> implements IHouseLabelService {
    @Override
    public IPage<HouseLabelVO> selectHouseLabelPage(IPage<HouseLabelVO> page, HouseLabelVO houseLabel) {
        return page.setRecords(baseMapper.selectHouseLabelPage(page, houseLabel));
    }
}
src/main/java/org/springblade/modules/house/service/impl/HouseRentalServiceImpl.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.house.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.house.entity.HouseRentalEntity;
import org.springblade.modules.house.vo.HouseRentalVO;
import org.springblade.modules.house.mapper.HouseRentalMapper;
import org.springblade.modules.house.service.IHouseRentalService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 出租屋 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class HouseRentalServiceImpl extends ServiceImpl<HouseRentalMapper, HouseRentalEntity> implements IHouseRentalService {
    @Override
    public IPage<HouseRentalVO> selectHouseRentalPage(IPage<HouseRentalVO> page, HouseRentalVO houseRental) {
        return page.setRecords(baseMapper.selectHouseRentalPage(page, houseRental));
    }
}
src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.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.house.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.house.entity.HouseEntity;
import org.springblade.modules.house.vo.HouseVO;
import org.springblade.modules.house.mapper.HouseMapper;
import org.springblade.modules.house.service.IHouseService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 房屋 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class HouseServiceImpl extends ServiceImpl<HouseMapper, HouseEntity> implements IHouseService {
    @Override
    public IPage<HouseVO> selectHousePage(IPage<HouseVO> page, HouseVO house) {
        return page.setRecords(baseMapper.selectHousePage(page, house));
    }
}
src/main/java/org/springblade/modules/house/service/impl/HouseTenantServiceImpl.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.house.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.house.entity.HouseTenantEntity;
import org.springblade.modules.house.vo.HouseTenantVO;
import org.springblade.modules.house.mapper.HouseTenantMapper;
import org.springblade.modules.house.service.IHouseTenantService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 租户管理 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class HouseTenantServiceImpl extends ServiceImpl<HouseTenantMapper, HouseTenantEntity> implements IHouseTenantService {
    @Override
    public IPage<HouseTenantVO> selectHouseTenantPage(IPage<HouseTenantVO> page, HouseTenantVO houseTenant) {
        return page.setRecords(baseMapper.selectHouseTenantPage(page, houseTenant));
    }
}
src/main/java/org/springblade/modules/house/service/impl/HouseholdLabelServiceImpl.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.house.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.house.entity.HouseholdLabelEntity;
import org.springblade.modules.house.vo.HouseholdLabelVO;
import org.springblade.modules.house.mapper.HouseholdLabelMapper;
import org.springblade.modules.house.service.IHouseholdLabelService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 住户-标签 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class HouseholdLabelServiceImpl extends ServiceImpl<HouseholdLabelMapper, HouseholdLabelEntity> implements IHouseholdLabelService {
    @Override
    public IPage<HouseholdLabelVO> selectHouseholdLabelPage(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) {
        return page.setRecords(baseMapper.selectHouseholdLabelPage(page, householdLabel));
    }
}
src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
New file
@@ -0,0 +1,54 @@
/*
 *      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.house.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.house.entity.HouseholdEntity;
import org.springblade.modules.house.vo.HouseholdVO;
import org.springblade.modules.house.mapper.HouseholdMapper;
import org.springblade.modules.house.service.IHouseholdService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 住户 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class HouseholdServiceImpl extends ServiceImpl<HouseholdMapper, HouseholdEntity> implements IHouseholdService {
    @Override
    public IPage<HouseholdVO> selectHouseholdPage(IPage<HouseholdVO> page, HouseholdVO household) {
        return page.setRecords(baseMapper.selectHouseholdPage(page, household));
    }
    /**
     * 查询房屋集合信息
     * @param userId
     * @return
     */
    @Override
    public List<TreeNode> selectHouseNodeList(Long userId) {
        return baseMapper.selectHouseNodeList(userId);
    }
}
src/main/java/org/springblade/modules/house/vo/HouseLabelVO.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.house.vo;
import org.springblade.modules.house.entity.HouseLabelEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 房屋-标签 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseLabelVO extends HouseLabelEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/vo/HouseRentalVO.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.house.vo;
import org.springblade.modules.house.entity.HouseRentalEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 出租屋 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseRentalVO extends HouseRentalEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/vo/HouseTenantVO.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.house.vo;
import org.springblade.modules.house.entity.HouseTenantEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 租户管理 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseTenantVO extends HouseTenantEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/vo/HouseVO.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.house.vo;
import org.springblade.modules.house.entity.HouseEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 房屋 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseVO extends HouseEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/vo/HouseholdLabelVO.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.house.vo;
import org.springblade.modules.house.entity.HouseholdLabelEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 住户-标签 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseholdLabelVO extends HouseholdLabelEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/vo/HouseholdVO.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.house.vo;
import org.springblade.modules.house.entity.HouseholdEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 住户 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HouseholdVO extends HouseholdEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.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.house.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.house.entity.HouseLabelEntity;
import org.springblade.modules.house.vo.HouseLabelVO;
import java.util.Objects;
/**
 * 房屋-标签 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class HouseLabelWrapper extends BaseEntityWrapper<HouseLabelEntity, HouseLabelVO>  {
    public static HouseLabelWrapper build() {
        return new HouseLabelWrapper();
     }
    @Override
    public HouseLabelVO entityVO(HouseLabelEntity houseLabel) {
        HouseLabelVO houseLabelVO = Objects.requireNonNull(BeanUtil.copy(houseLabel, HouseLabelVO.class));
        //User createUser = UserCache.getUser(houseLabel.getCreateUser());
        //User updateUser = UserCache.getUser(houseLabel.getUpdateUser());
        //houseLabelVO.setCreateUserName(createUser.getName());
        //houseLabelVO.setUpdateUserName(updateUser.getName());
        return houseLabelVO;
    }
}
src/main/java/org/springblade/modules/house/wrapper/HouseRentalWrapper.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.house.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.house.entity.HouseRentalEntity;
import org.springblade.modules.house.vo.HouseRentalVO;
import java.util.Objects;
/**
 * 出租屋 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class HouseRentalWrapper extends BaseEntityWrapper<HouseRentalEntity, HouseRentalVO>  {
    public static HouseRentalWrapper build() {
        return new HouseRentalWrapper();
     }
    @Override
    public HouseRentalVO entityVO(HouseRentalEntity houseRental) {
        HouseRentalVO houseRentalVO = Objects.requireNonNull(BeanUtil.copy(houseRental, HouseRentalVO.class));
        //User createUser = UserCache.getUser(houseRental.getCreateUser());
        //User updateUser = UserCache.getUser(houseRental.getUpdateUser());
        //houseRentalVO.setCreateUserName(createUser.getName());
        //houseRentalVO.setUpdateUserName(updateUser.getName());
        return houseRentalVO;
    }
}
src/main/java/org/springblade/modules/house/wrapper/HouseTenantWrapper.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.house.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.house.entity.HouseTenantEntity;
import org.springblade.modules.house.vo.HouseTenantVO;
import java.util.Objects;
/**
 * 租户管理 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class HouseTenantWrapper extends BaseEntityWrapper<HouseTenantEntity, HouseTenantVO>  {
    public static HouseTenantWrapper build() {
        return new HouseTenantWrapper();
     }
    @Override
    public HouseTenantVO entityVO(HouseTenantEntity houseTenant) {
        HouseTenantVO houseTenantVO = Objects.requireNonNull(BeanUtil.copy(houseTenant, HouseTenantVO.class));
        //User createUser = UserCache.getUser(houseTenant.getCreateUser());
        //User updateUser = UserCache.getUser(houseTenant.getUpdateUser());
        //houseTenantVO.setCreateUserName(createUser.getName());
        //houseTenantVO.setUpdateUserName(updateUser.getName());
        return houseTenantVO;
    }
}
src/main/java/org/springblade/modules/house/wrapper/HouseWrapper.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.house.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.house.entity.HouseEntity;
import org.springblade.modules.house.vo.HouseVO;
import java.util.Objects;
/**
 * 房屋 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class HouseWrapper extends BaseEntityWrapper<HouseEntity, HouseVO>  {
    public static HouseWrapper build() {
        return new HouseWrapper();
     }
    @Override
    public HouseVO entityVO(HouseEntity house) {
        HouseVO houseVO = Objects.requireNonNull(BeanUtil.copy(house, HouseVO.class));
        //User createUser = UserCache.getUser(house.getCreateUser());
        //User updateUser = UserCache.getUser(house.getUpdateUser());
        //houseVO.setCreateUserName(createUser.getName());
        //houseVO.setUpdateUserName(updateUser.getName());
        return houseVO;
    }
}
src/main/java/org/springblade/modules/house/wrapper/HouseholdLabelWrapper.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.house.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.house.entity.HouseholdLabelEntity;
import org.springblade.modules.house.vo.HouseholdLabelVO;
import java.util.Objects;
/**
 * 住户-标签 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class HouseholdLabelWrapper extends BaseEntityWrapper<HouseholdLabelEntity, HouseholdLabelVO>  {
    public static HouseholdLabelWrapper build() {
        return new HouseholdLabelWrapper();
     }
    @Override
    public HouseholdLabelVO entityVO(HouseholdLabelEntity householdLabel) {
        HouseholdLabelVO householdLabelVO = Objects.requireNonNull(BeanUtil.copy(householdLabel, HouseholdLabelVO.class));
        //User createUser = UserCache.getUser(householdLabel.getCreateUser());
        //User updateUser = UserCache.getUser(householdLabel.getUpdateUser());
        //householdLabelVO.setCreateUserName(createUser.getName());
        //householdLabelVO.setUpdateUserName(updateUser.getName());
        return householdLabelVO;
    }
}
src/main/java/org/springblade/modules/house/wrapper/HouseholdWrapper.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.house.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.house.entity.HouseholdEntity;
import org.springblade.modules.house.vo.HouseholdVO;
import java.util.Objects;
/**
 * 住户 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class HouseholdWrapper extends BaseEntityWrapper<HouseholdEntity, HouseholdVO>  {
    public static HouseholdWrapper build() {
        return new HouseholdWrapper();
     }
    @Override
    public HouseholdVO entityVO(HouseholdEntity household) {
        HouseholdVO householdVO = Objects.requireNonNull(BeanUtil.copy(household, HouseholdVO.class));
        //User createUser = UserCache.getUser(household.getCreateUser());
        //User updateUser = UserCache.getUser(household.getUpdateUser());
        //householdVO.setCreateUserName(createUser.getName());
        //householdVO.setUpdateUserName(updateUser.getName());
        return householdVO;
    }
}
src/main/java/org/springblade/modules/label/controller/LabelController.java
New file
@@ -0,0 +1,125 @@
/*
 *      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.label.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.label.entity.LabelEntity;
import org.springblade.modules.label.vo.LabelVO;
import org.springblade.modules.label.wrapper.LabelWrapper;
import org.springblade.modules.label.service.ILabelService;
/**
 * 标签管理 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-label/label")
@Api(value = "标签管理", tags = "标签管理接口")
public class LabelController {
    private final ILabelService labelService;
    /**
     * 标签管理 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入label")
    public R<LabelVO> detail(LabelEntity label) {
        LabelEntity detail = labelService.getOne(Condition.getQueryWrapper(label));
        return R.data(LabelWrapper.build().entityVO(detail));
    }
    /**
     * 标签管理 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入label")
    public R<IPage<LabelVO>> list(LabelEntity label, Query query) {
        IPage<LabelEntity> pages = labelService.page(Condition.getPage(query), Condition.getQueryWrapper(label));
        return R.data(LabelWrapper.build().pageVO(pages));
    }
    /**
     * 标签管理 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入label")
    public R<IPage<LabelVO>> page(LabelVO label, Query query) {
        IPage<LabelVO> pages = labelService.selectLabelPage(Condition.getPage(query), label);
        return R.data(pages);
    }
    /**
     * 标签管理 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入label")
    public R save(@Valid @RequestBody LabelEntity label) {
        return R.status(labelService.save(label));
    }
    /**
     * 标签管理 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入label")
    public R update(@Valid @RequestBody LabelEntity label) {
        return R.status(labelService.updateById(label));
    }
    /**
     * 标签管理 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入label")
    public R submit(@Valid @RequestBody LabelEntity label) {
        return R.status(labelService.saveOrUpdate(label));
    }
    /**
     * 标签管理 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(labelService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/label/dto/LabelDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.label.dto;
import org.springblade.modules.label.entity.LabelEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 标签管理 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class LabelDTO extends LabelEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/label/entity/LabelEntity.java
New file
@@ -0,0 +1,73 @@
/*
 *      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.label.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
 * 标签管理 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_label")
@ApiModel(value = "Label对象", description = "标签管理")
public class LabelEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 父级id
     */
    @ApiModelProperty(value = "父级id")
    private Integer parentId;
    /**
     * 标签名称
     */
    @ApiModelProperty(value = "标签名称")
    private String labelName;
    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sort;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
}
src/main/java/org/springblade/modules/label/mapper/LabelMapper.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.label.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.label.entity.LabelEntity;
import org.springblade.modules.label.vo.LabelVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 标签管理 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface LabelMapper extends BaseMapper<LabelEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param label
     * @return
     */
    List<LabelVO> selectLabelPage(IPage page,@Param("label") LabelVO label);
}
src/main/java/org/springblade/modules/label/mapper/LabelMapper.xml
New file
@@ -0,0 +1,11 @@
<?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.label.mapper.LabelMapper">
    <!--自定义列表-->
    <select id="selectLabelPage" resultType="org.springblade.modules.label.vo.LabelVO">
        select * from jczz_label where 1=1
    </select>
</mapper>
src/main/java/org/springblade/modules/label/service/ILabelService.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.label.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.label.entity.LabelEntity;
import org.springblade.modules.label.vo.LabelVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 标签管理 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface ILabelService extends IService<LabelEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param label
     * @return
     */
    IPage<LabelVO> selectLabelPage(IPage<LabelVO> page, LabelVO label);
}
src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.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.label.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.label.entity.LabelEntity;
import org.springblade.modules.label.vo.LabelVO;
import org.springblade.modules.label.mapper.LabelMapper;
import org.springblade.modules.label.service.ILabelService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 标签管理 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class LabelServiceImpl extends ServiceImpl<LabelMapper, LabelEntity> implements ILabelService {
    @Override
    public IPage<LabelVO> selectLabelPage(IPage<LabelVO> page, LabelVO label) {
        return page.setRecords(baseMapper.selectLabelPage(page, label));
    }
}
src/main/java/org/springblade/modules/label/vo/LabelVO.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.label.vo;
import org.springblade.modules.label.entity.LabelEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 标签管理 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class LabelVO extends LabelEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/label/wrapper/LabelWrapper.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.label.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.label.entity.LabelEntity;
import org.springblade.modules.label.vo.LabelVO;
import java.util.Objects;
/**
 * 标签管理 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class LabelWrapper extends BaseEntityWrapper<LabelEntity, LabelVO>  {
    public static LabelWrapper build() {
        return new LabelWrapper();
     }
    @Override
    public LabelVO entityVO(LabelEntity label) {
        LabelVO labelVO = Objects.requireNonNull(BeanUtil.copy(label, LabelVO.class));
        //User createUser = UserCache.getUser(label.getCreateUser());
        //User updateUser = UserCache.getUser(label.getUpdateUser());
        //labelVO.setCreateUserName(createUser.getName());
        //labelVO.setUpdateUserName(updateUser.getName());
        return labelVO;
    }
}
src/main/java/org/springblade/modules/place/controller/PlaceController.java
New file
@@ -0,0 +1,126 @@
/*
 *      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.place.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.place.entity.PlaceEntity;
import org.springblade.modules.place.vo.PlaceVO;
import org.springblade.modules.place.wrapper.PlaceWrapper;
import org.springblade.modules.place.service.IPlaceService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 场所表 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-place/place")
@Api(value = "场所表", tags = "场所表接口")
public class PlaceController extends BladeController{
    private final IPlaceService placeService;
    /**
     * 场所表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入place")
    public R<PlaceVO> detail(PlaceEntity place) {
        PlaceEntity detail = placeService.getOne(Condition.getQueryWrapper(place));
        return R.data(PlaceWrapper.build().entityVO(detail));
    }
    /**
     * 场所表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入place")
    public R<IPage<PlaceVO>> list(PlaceEntity place, Query query) {
        IPage<PlaceEntity> pages = placeService.page(Condition.getPage(query), Condition.getQueryWrapper(place));
        return R.data(PlaceWrapper.build().pageVO(pages));
    }
    /**
     * 场所表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入place")
    public R<IPage<PlaceVO>> page(PlaceVO place, Query query) {
        IPage<PlaceVO> pages = placeService.selectPlacePage(Condition.getPage(query), place);
        return R.data(pages);
    }
    /**
     * 场所表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入place")
    public R save(@Valid @RequestBody PlaceEntity place) {
        return R.status(placeService.save(place));
    }
    /**
     * 场所表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入place")
    public R update(@Valid @RequestBody PlaceEntity place) {
        return R.status(placeService.updateById(place));
    }
    /**
     * 场所表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入place")
    public R submit(@Valid @RequestBody PlaceEntity place) {
        return R.status(placeService.saveOrUpdate(place));
    }
    /**
     * 场所表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(placeService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/place/controller/PlaceExtController.java
New file
@@ -0,0 +1,126 @@
/*
 *      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.place.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.place.entity.PlaceExtEntity;
import org.springblade.modules.place.vo.PlaceExtVO;
import org.springblade.modules.place.wrapper.PlaceExtWrapper;
import org.springblade.modules.place.service.IPlaceExtService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 场所详情表 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-placeExt/placeExt")
@Api(value = "场所详情表", tags = "场所详情表接口")
public class PlaceExtController{
    private final IPlaceExtService placeExtService;
    /**
     * 场所详情表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入placeExt")
    public R<PlaceExtVO> detail(PlaceExtEntity placeExt) {
        PlaceExtEntity detail = placeExtService.getOne(Condition.getQueryWrapper(placeExt));
        return R.data(PlaceExtWrapper.build().entityVO(detail));
    }
    /**
     * 场所详情表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入placeExt")
    public R<IPage<PlaceExtVO>> list(PlaceExtEntity placeExt, Query query) {
        IPage<PlaceExtEntity> pages = placeExtService.page(Condition.getPage(query), Condition.getQueryWrapper(placeExt));
        return R.data(PlaceExtWrapper.build().pageVO(pages));
    }
    /**
     * 场所详情表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入placeExt")
    public R<IPage<PlaceExtVO>> page(PlaceExtVO placeExt, Query query) {
        IPage<PlaceExtVO> pages = placeExtService.selectPlaceExtPage(Condition.getPage(query), placeExt);
        return R.data(pages);
    }
    /**
     * 场所详情表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入placeExt")
    public R save(@Valid @RequestBody PlaceExtEntity placeExt) {
        return R.status(placeExtService.save(placeExt));
    }
    /**
     * 场所详情表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入placeExt")
    public R update(@Valid @RequestBody PlaceExtEntity placeExt) {
        return R.status(placeExtService.updateById(placeExt));
    }
    /**
     * 场所详情表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入placeExt")
    public R submit(@Valid @RequestBody PlaceExtEntity placeExt) {
        return R.status(placeExtService.saveOrUpdate(placeExt));
    }
    /**
     * 场所详情表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(placeExtService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/place/controller/PlacePractitionerController.java
New file
@@ -0,0 +1,126 @@
/*
 *      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.place.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.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.place.entity.PlacePractitionerEntity;
import org.springblade.modules.place.vo.PlacePractitionerVO;
import org.springblade.modules.place.wrapper.PlacePractitionerWrapper;
import org.springblade.modules.place.service.IPlacePractitionerService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 场所从业人员 控制器
 *
 * @author BladeX
 * @since 2023-10-28
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-placePractitioner/placePractitioner")
@Api(value = "场所从业人员", tags = "场所从业人员接口")
public class PlacePractitionerController{
    private final IPlacePractitionerService placePractitionerService;
    /**
     * 场所从业人员 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入placePractitioner")
    public R<PlacePractitionerVO> detail(PlacePractitionerEntity placePractitioner) {
        PlacePractitionerEntity detail = placePractitionerService.getOne(Condition.getQueryWrapper(placePractitioner));
        return R.data(PlacePractitionerWrapper.build().entityVO(detail));
    }
    /**
     * 场所从业人员 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入placePractitioner")
    public R<IPage<PlacePractitionerVO>> list(PlacePractitionerEntity placePractitioner, Query query) {
        IPage<PlacePractitionerEntity> pages = placePractitionerService.page(Condition.getPage(query), Condition.getQueryWrapper(placePractitioner));
        return R.data(PlacePractitionerWrapper.build().pageVO(pages));
    }
    /**
     * 场所从业人员 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入placePractitioner")
    public R<IPage<PlacePractitionerVO>> page(PlacePractitionerVO placePractitioner, Query query) {
        IPage<PlacePractitionerVO> pages = placePractitionerService.selectPlacePractitionerPage(Condition.getPage(query), placePractitioner);
        return R.data(pages);
    }
    /**
     * 场所从业人员 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入placePractitioner")
    public R save(@Valid @RequestBody PlacePractitionerEntity placePractitioner) {
        return R.status(placePractitionerService.save(placePractitioner));
    }
    /**
     * 场所从业人员 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入placePractitioner")
    public R update(@Valid @RequestBody PlacePractitionerEntity placePractitioner) {
        return R.status(placePractitionerService.updateById(placePractitioner));
    }
    /**
     * 场所从业人员 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入placePractitioner")
    public R submit(@Valid @RequestBody PlacePractitionerEntity placePractitioner) {
        return R.status(placePractitionerService.saveOrUpdate(placePractitioner));
    }
    /**
     * 场所从业人员 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(placePractitionerService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/place/dto/PlaceDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.place.dto;
import org.springblade.modules.place.entity.PlaceEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 场所表 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PlaceDTO extends PlaceEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/place/dto/PlaceExtDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.place.dto;
import org.springblade.modules.place.entity.PlaceExtEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 场所详情表 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PlaceExtDTO extends PlaceExtEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/place/dto/PlacePractitionerDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.place.dto;
import org.springblade.modules.place.entity.PlacePractitionerEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 场所从业人员 数据传输对象实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PlacePractitionerDTO extends PlacePractitionerEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/place/entity/PlaceEntity.java
New file
@@ -0,0 +1,135 @@
/*
 *      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.place.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 场所表 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_place")
@ApiModel(value = "Place对象", description = "场所表")
public class PlaceEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 门牌地址编码
     */
    @ApiModelProperty(value = "门牌地址编码")
    private String houseAddressCode;
    /**
     * 场所负责人(关联用户表信息)
     */
    @ApiModelProperty(value = "场所负责人(关联用户表信息)")
    private String principal;
    /**
     * 场所名称
     */
    @ApiModelProperty(value = "场所名称")
    private String placeName;
    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private BigDecimal lng;
    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private BigDecimal lat;
    /**
     * 位置
     */
    @ApiModelProperty(value = "位置")
    private String localtion;
    /**
     * 场所照片
     */
    @ApiModelProperty(value = "场所照片")
    private String imageUrls;
    /**
     * 创建人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("创建人")
    private Long createUser;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;
    /**
     * 更新人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("更新人")
    private Long updateUser;
    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 是否删除
     */
    @TableLogic
    @ApiModelProperty("是否已删除 0:否  1:是")
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/place/entity/PlaceExtEntity.java
New file
@@ -0,0 +1,123 @@
/*
 *      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.place.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 场所详情表 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_place_ext")
@ApiModel(value = "PlaceExt对象", description = "场所详情表")
public class PlaceExtEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 场所ID
     */
    @ApiModelProperty(value = "场所ID")
    private Long placeId;
    /**
     * 营业执照图片URLS
     */
    @ApiModelProperty(value = "营业执照图片URLS")
    private String imageUrls;
    /**
     * 场所位置
     */
    @ApiModelProperty(value = "场所位置")
    private String localtion;
    /**
     * 法人信息
     */
    @ApiModelProperty(value = "法人信息")
    private String legalPerson;
    /**
     * 法人电话
     */
    @ApiModelProperty(value = "法人电话")
    private String legalTel;
    /**
     * 场所平面图URLS
     */
    @ApiModelProperty(value = "场所平面图URLS")
    private String planImageUrls;
    /**
     * 创建人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("创建人")
    private Long createUser;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;
    /**
     * 更新人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("更新人")
    private Long updateUser;
    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;
    /**
     * 是否删除
     */
    @TableLogic
    @ApiModelProperty("是否已删除 0:否  1:是")
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/place/entity/PlacePractitionerEntity.java
New file
@@ -0,0 +1,71 @@
/*
 *      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.place.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serializable;
/**
 * 场所从业人员 实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@TableName("jczz_place_practitioner")
@ApiModel(value = "PlacePractitioner对象", description = "场所从业人员")
public class PlacePractitionerEntity implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 场所ID
     */
    @ApiModelProperty(value = "场所ID")
    private Long placeId;
    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    private String name;
    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    private String telephone;
    /**
     * 暂住地
     */
    @ApiModelProperty(value = "暂住地")
    private String tempAddress;
}
src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.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.place.mapper;
import org.springblade.modules.place.entity.PlaceExtEntity;
import org.springblade.modules.place.vo.PlaceExtVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 场所详情表 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface PlaceExtMapper extends BaseMapper<PlaceExtEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param placeExt
     * @return
     */
    List<PlaceExtVO> selectPlaceExtPage(IPage page, PlaceExtVO placeExt);
}
src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml
New file
@@ -0,0 +1,11 @@
<?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.place.mapper.PlaceExtMapper">
    <!--自定义分页查询-->
    <select id="selectPlaceExtPage" resultType="org.springblade.modules.place.vo.PlaceExtVO">
        select * from jczz_place_ext where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.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.place.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.place.entity.PlaceEntity;
import org.springblade.modules.place.vo.PlaceVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 场所表 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface PlaceMapper extends BaseMapper<PlaceEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param place
     * @return
     */
    List<PlaceVO> selectPlacePage(IPage page, PlaceVO place);
    /**
     * 查询场所集合信息
     * @param userId
     * @return
     */
    List<TreeNode> selectPlaceNodeList(@Param("userId") String userId);
}
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
New file
@@ -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="org.springblade.modules.place.mapper.PlaceMapper">
    <!--自定义分页查询-->
    <select id="selectPlacePage" resultType="org.springblade.modules.place.vo.PlaceVO">
        select * from jczz_place where is_deleted = 0
    </select>
    <!--查询场所集合信息-->
    <select id="selectPlaceNodeList" resultType="org.springblade.common.node.TreeNode" >
        select id,place_name as name,false as hasChildren from jczz_place
        where 1=1
        and principal = #{userId}
    </select>
</mapper>
src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.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.place.mapper;
import org.springblade.modules.place.entity.PlacePractitionerEntity;
import org.springblade.modules.place.vo.PlacePractitionerVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 场所从业人员 Mapper 接口
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface PlacePractitionerMapper extends BaseMapper<PlacePractitionerEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param placePractitioner
     * @return
     */
    List<PlacePractitionerVO> selectPlacePractitionerPage(IPage page, PlacePractitionerVO placePractitioner);
}
src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml
New file
@@ -0,0 +1,11 @@
<?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.place.mapper.PlacePractitionerMapper">
    <!--自定义分页查询-->
    <select id="selectPlacePractitionerPage" resultType="org.springblade.modules.place.vo.PlacePractitionerVO">
        select * from jczz_place_practitioner where 1=1
    </select>
</mapper>
src/main/java/org/springblade/modules/place/service/IPlaceExtService.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.place.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.place.entity.PlaceExtEntity;
import org.springblade.modules.place.vo.PlaceExtVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 场所详情表 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IPlaceExtService extends IService<PlaceExtEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param placeExt
     * @return
     */
    IPage<PlaceExtVO> selectPlaceExtPage(IPage<PlaceExtVO> page, PlaceExtVO placeExt);
}
src/main/java/org/springblade/modules/place/service/IPlacePractitionerService.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.place.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.place.entity.PlacePractitionerEntity;
import org.springblade.modules.place.vo.PlacePractitionerVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 场所从业人员 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IPlacePractitionerService extends IService<PlacePractitionerEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param placePractitioner
     * @return
     */
    IPage<PlacePractitionerVO> selectPlacePractitionerPage(IPage<PlacePractitionerVO> page, PlacePractitionerVO placePractitioner);
}
src/main/java/org/springblade/modules/place/service/IPlaceService.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.place.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.place.entity.PlaceEntity;
import org.springblade.modules.place.vo.PlaceVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 场所表 服务类
 *
 * @author BladeX
 * @since 2023-10-28
 */
public interface IPlaceService extends IService<PlaceEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param place
     * @return
     */
    IPage<PlaceVO> selectPlacePage(IPage<PlaceVO> page, PlaceVO place);
    /**
     * 查询场所集合信息
     * @param userId
     * @return
     */
    List<TreeNode> selectPlaceNodeList(Long userId);
}
src/main/java/org/springblade/modules/place/service/impl/PlaceExtServiceImpl.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.place.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.place.entity.PlaceExtEntity;
import org.springblade.modules.place.vo.PlaceExtVO;
import org.springblade.modules.place.mapper.PlaceExtMapper;
import org.springblade.modules.place.service.IPlaceExtService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 场所详情表 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class PlaceExtServiceImpl extends ServiceImpl<PlaceExtMapper, PlaceExtEntity> implements IPlaceExtService {
    @Override
    public IPage<PlaceExtVO> selectPlaceExtPage(IPage<PlaceExtVO> page, PlaceExtVO placeExt) {
        return page.setRecords(baseMapper.selectPlaceExtPage(page, placeExt));
    }
}
src/main/java/org/springblade/modules/place/service/impl/PlacePractitionerServiceImpl.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.place.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.place.entity.PlacePractitionerEntity;
import org.springblade.modules.place.vo.PlacePractitionerVO;
import org.springblade.modules.place.mapper.PlacePractitionerMapper;
import org.springblade.modules.place.service.IPlacePractitionerService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 场所从业人员 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class PlacePractitionerServiceImpl extends ServiceImpl<PlacePractitionerMapper, PlacePractitionerEntity> implements IPlacePractitionerService {
    @Override
    public IPage<PlacePractitionerVO> selectPlacePractitionerPage(IPage<PlacePractitionerVO> page, PlacePractitionerVO placePractitioner) {
        return page.setRecords(baseMapper.selectPlacePractitionerPage(page, placePractitioner));
    }
}
src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java
New file
@@ -0,0 +1,54 @@
/*
 *      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.place.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.common.node.TreeNode;
import org.springblade.modules.place.entity.PlaceEntity;
import org.springblade.modules.place.vo.PlaceVO;
import org.springblade.modules.place.mapper.PlaceMapper;
import org.springblade.modules.place.service.IPlaceService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 场所表 服务实现类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Service
public class PlaceServiceImpl extends ServiceImpl<PlaceMapper, PlaceEntity> implements IPlaceService {
    @Override
    public IPage<PlaceVO> selectPlacePage(IPage<PlaceVO> page, PlaceVO place) {
        return page.setRecords(baseMapper.selectPlacePage(page, place));
    }
    /**
     * 查询场所集合信息
     * @param userId
     * @return
     */
    @Override
    public List<TreeNode> selectPlaceNodeList(Long userId) {
        return baseMapper.selectPlaceNodeList(userId.toString());
    }
}
src/main/java/org/springblade/modules/place/vo/PlaceExtVO.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.place.vo;
import org.springblade.modules.place.entity.PlaceExtEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 场所详情表 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PlaceExtVO extends PlaceExtEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/place/vo/PlacePractitionerVO.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.place.vo;
import org.springblade.modules.place.entity.PlacePractitionerEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 场所从业人员 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PlacePractitionerVO extends PlacePractitionerEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/place/vo/PlaceVO.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.place.vo;
import org.springblade.modules.place.entity.PlaceEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 场所表 视图实体类
 *
 * @author BladeX
 * @since 2023-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PlaceVO extends PlaceEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/place/wrapper/PlaceExtWrapper.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.place.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.place.entity.PlaceExtEntity;
import org.springblade.modules.place.vo.PlaceExtVO;
import java.util.Objects;
/**
 * 场所详情表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class PlaceExtWrapper extends BaseEntityWrapper<PlaceExtEntity, PlaceExtVO>  {
    public static PlaceExtWrapper build() {
        return new PlaceExtWrapper();
     }
    @Override
    public PlaceExtVO entityVO(PlaceExtEntity placeExt) {
        PlaceExtVO placeExtVO = Objects.requireNonNull(BeanUtil.copy(placeExt, PlaceExtVO.class));
        //User createUser = UserCache.getUser(placeExt.getCreateUser());
        //User updateUser = UserCache.getUser(placeExt.getUpdateUser());
        //placeExtVO.setCreateUserName(createUser.getName());
        //placeExtVO.setUpdateUserName(updateUser.getName());
        return placeExtVO;
    }
}
src/main/java/org/springblade/modules/place/wrapper/PlacePractitionerWrapper.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.place.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.place.entity.PlacePractitionerEntity;
import org.springblade.modules.place.vo.PlacePractitionerVO;
import java.util.Objects;
/**
 * 场所从业人员 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class PlacePractitionerWrapper extends BaseEntityWrapper<PlacePractitionerEntity, PlacePractitionerVO>  {
    public static PlacePractitionerWrapper build() {
        return new PlacePractitionerWrapper();
     }
    @Override
    public PlacePractitionerVO entityVO(PlacePractitionerEntity placePractitioner) {
        PlacePractitionerVO placePractitionerVO = Objects.requireNonNull(BeanUtil.copy(placePractitioner, PlacePractitionerVO.class));
        //User createUser = UserCache.getUser(placePractitioner.getCreateUser());
        //User updateUser = UserCache.getUser(placePractitioner.getUpdateUser());
        //placePractitionerVO.setCreateUserName(createUser.getName());
        //placePractitionerVO.setUpdateUserName(updateUser.getName());
        return placePractitionerVO;
    }
}
src/main/java/org/springblade/modules/place/wrapper/PlaceWrapper.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.place.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.place.entity.PlaceEntity;
import org.springblade.modules.place.vo.PlaceVO;
import java.util.Objects;
/**
 * 场所表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-10-28
 */
public class PlaceWrapper extends BaseEntityWrapper<PlaceEntity, PlaceVO>  {
    public static PlaceWrapper build() {
        return new PlaceWrapper();
     }
    @Override
    public PlaceVO entityVO(PlaceEntity place) {
        PlaceVO placeVO = Objects.requireNonNull(BeanUtil.copy(place, PlaceVO.class));
        //User createUser = UserCache.getUser(place.getCreateUser());
        //User updateUser = UserCache.getUser(place.getUpdateUser());
        //placeVO.setCreateUserName(createUser.getName());
        //placeVO.setUpdateUserName(updateUser.getName());
        return placeVO;
    }
}
src/main/resources/application-test.yml
@@ -14,7 +14,7 @@
    #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
    #  commandTimeout: 5000
  datasource:
    url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    url: jdbc:mysql://127.0.0.1:3308/jczz?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    username: root
    password: root