| New file |
| | |
| | | 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.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.PlaceDoorEntity; |
| | | import org.springblade.modules.place.vo.PlaceDoorVO; |
| | | import org.springblade.modules.place.wrapper.PlaceDoorWrapper; |
| | | import org.springblade.modules.place.service.IPlaceDoorService; |
| | | |
| | | /** |
| | | * 场所门牌关联表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-placeDoor/placeDoor") |
| | | @Api(value = "场所门牌关联表", tags = "场所门牌关联表接口") |
| | | public class PlaceDoorController{ |
| | | |
| | | private final IPlaceDoorService placeDoorService; |
| | | |
| | | /** |
| | | * 场所门牌关联表 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入placeDoor") |
| | | public R<PlaceDoorEntity> detail(PlaceDoorEntity placeDoor) { |
| | | PlaceDoorEntity detail = placeDoorService.getOne(Condition.getQueryWrapper(placeDoor)); |
| | | return R.data(detail); |
| | | } |
| | | /** |
| | | * 场所门牌关联表 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入placeDoor") |
| | | public R<IPage<PlaceDoorVO>> list(PlaceDoorEntity placeDoor, Query query) { |
| | | IPage<PlaceDoorEntity> pages = placeDoorService.page(Condition.getPage(query), Condition.getQueryWrapper(placeDoor)); |
| | | return R.data(PlaceDoorWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 场所门牌关联表 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入placeDoor") |
| | | public R<IPage<PlaceDoorVO>> page(PlaceDoorVO placeDoor, Query query) { |
| | | IPage<PlaceDoorVO> pages = placeDoorService.selectPlaceDoorPage(Condition.getPage(query), placeDoor); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 场所门牌关联表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入placeDoor") |
| | | public R save(@Valid @RequestBody PlaceDoorEntity placeDoor) { |
| | | return R.status(placeDoorService.save(placeDoor)); |
| | | } |
| | | |
| | | /** |
| | | * 场所门牌关联表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入placeDoor") |
| | | public R update(@Valid @RequestBody PlaceDoorEntity placeDoor) { |
| | | return R.status(placeDoorService.updateById(placeDoor)); |
| | | } |
| | | |
| | | /** |
| | | * 场所门牌关联表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入placeDoor") |
| | | public R submit(@Valid @RequestBody PlaceDoorEntity placeDoor) { |
| | | return R.status(placeDoorService.saveOrUpdate(placeDoor)); |
| | | } |
| | | |
| | | /** |
| | | * 场所门牌关联表 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(placeDoorService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.PlaceDoorEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 场所门牌关联表 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class PlaceDoorDTO extends PlaceDoorEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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 2024-02-01 |
| | | */ |
| | | @Data |
| | | @TableName("jczz_place_door") |
| | | @ApiModel(value = "PlaceDoor对象", description = "场所门牌关联表") |
| | | public class PlaceDoorEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @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 Long houseCode; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.PlaceDoorEntity; |
| | | import org.springblade.modules.place.vo.PlaceDoorVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 场所门牌关联表 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | public interface PlaceDoorMapper extends BaseMapper<PlaceDoorEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param placeDoor |
| | | * @return |
| | | */ |
| | | List<PlaceDoorVO> selectPlaceDoorPage(IPage page, PlaceDoorVO placeDoor); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?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.PlaceDoorMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="placeDoorResultMap" type="org.springblade.modules.place.entity.PlaceDoorEntity"> |
| | | <result column="id" property="id"/> |
| | | <result column="place_id" property="placeId"/> |
| | | <result column="house_code" property="houseCode"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectPlaceDoorPage" resultMap="placeDoorResultMap"> |
| | | select * from jczz_place_door where 1=1 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package org.springblade.modules.place.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.place.entity.PlaceDoorEntity; |
| | | import org.springblade.modules.place.vo.PlaceDoorVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 场所门牌关联表 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | public interface IPlaceDoorService extends IService<PlaceDoorEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param placeDoor |
| | | * @return |
| | | */ |
| | | IPage<PlaceDoorVO> selectPlaceDoorPage(IPage<PlaceDoorVO> page, PlaceDoorVO placeDoor); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.place.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.place.entity.PlaceDoorEntity; |
| | | import org.springblade.modules.place.vo.PlaceDoorVO; |
| | | import org.springblade.modules.place.mapper.PlaceDoorMapper; |
| | | import org.springblade.modules.place.service.IPlaceDoorService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 场所门牌关联表 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @Service |
| | | public class PlaceDoorServiceImpl extends ServiceImpl<PlaceDoorMapper, PlaceDoorEntity> implements IPlaceDoorService { |
| | | |
| | | @Override |
| | | public IPage<PlaceDoorVO> selectPlaceDoorPage(IPage<PlaceDoorVO> page, PlaceDoorVO placeDoor) { |
| | | return page.setRecords(baseMapper.selectPlaceDoorPage(page, placeDoor)); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.PlaceDoorEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 场所门牌关联表 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class PlaceDoorVO extends PlaceDoorEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.PlaceDoorEntity; |
| | | import org.springblade.modules.place.vo.PlaceDoorVO; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 场所门牌关联表 包装类,返回视图层所需的字段 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | public class PlaceDoorWrapper extends BaseEntityWrapper<PlaceDoorEntity, PlaceDoorVO> { |
| | | |
| | | public static PlaceDoorWrapper build() { |
| | | return new PlaceDoorWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public PlaceDoorVO entityVO(PlaceDoorEntity placeDoor) { |
| | | PlaceDoorVO placeDoorVO = Objects.requireNonNull(BeanUtil.copy(placeDoor, PlaceDoorVO.class)); |
| | | |
| | | //User createUser = UserCache.getUser(placeDoor.getCreateUser()); |
| | | //User updateUser = UserCache.getUser(placeDoor.getUpdateUser()); |
| | | //placeDoorVO.setCreateUserName(createUser.getName()); |
| | | //placeDoorVO.setUpdateUserName(updateUser.getName()); |
| | | |
| | | return placeDoorVO; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.police.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.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.vo.PoliceAffairsGridVO; |
| | | import org.springblade.modules.police.wrapper.PoliceAffairsGridWrapper; |
| | | import org.springblade.modules.police.service.IPoliceAffairsGridService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-policeAffairsGrid/policeAffairsGrid") |
| | | @Api(value = "警务网格(辖区)表", tags = "警务网格(辖区)表接口") |
| | | public class PoliceAffairsGridController { |
| | | |
| | | private final IPoliceAffairsGridService policeAffairsGridService; |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入policeAffairsGrid") |
| | | public R<PoliceAffairsGridEntity> detail(PoliceAffairsGridEntity policeAffairsGrid) { |
| | | PoliceAffairsGridEntity detail = policeAffairsGridService.getOne(Condition.getQueryWrapper(policeAffairsGrid)); |
| | | return R.data(detail); |
| | | } |
| | | /** |
| | | * 警务网格(辖区)表 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入policeAffairsGrid") |
| | | public R<IPage<PoliceAffairsGridVO>> list(PoliceAffairsGridEntity policeAffairsGrid, Query query) { |
| | | IPage<PoliceAffairsGridEntity> pages = policeAffairsGridService.page(Condition.getPage(query), Condition.getQueryWrapper(policeAffairsGrid)); |
| | | return R.data(PoliceAffairsGridWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入policeAffairsGrid") |
| | | public R<IPage<PoliceAffairsGridVO>> page(PoliceAffairsGridVO policeAffairsGrid, Query query) { |
| | | IPage<PoliceAffairsGridVO> pages = policeAffairsGridService.selectPoliceAffairsGridPage(Condition.getPage(query), policeAffairsGrid); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入policeAffairsGrid") |
| | | public R save(@Valid @RequestBody PoliceAffairsGridEntity policeAffairsGrid) { |
| | | return R.status(policeAffairsGridService.save(policeAffairsGrid)); |
| | | } |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入policeAffairsGrid") |
| | | public R update(@Valid @RequestBody PoliceAffairsGridEntity policeAffairsGrid) { |
| | | return R.status(policeAffairsGridService.updateById(policeAffairsGrid)); |
| | | } |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入policeAffairsGrid") |
| | | public R submit(@Valid @RequestBody PoliceAffairsGridEntity policeAffairsGrid) { |
| | | return R.status(policeAffairsGridService.saveOrUpdate(policeAffairsGrid)); |
| | | } |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(policeAffairsGridService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.police.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.police.entity.PoliceStationEntity; |
| | | import org.springblade.modules.police.vo.PoliceStationVO; |
| | | import org.springblade.modules.police.wrapper.PoliceStationWrapper; |
| | | import org.springblade.modules.police.service.IPoliceStationService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 派出所信息表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-policeStation/policeStation") |
| | | @Api(value = "派出所信息表", tags = "派出所信息表接口") |
| | | public class PoliceStationController{ |
| | | |
| | | private final IPoliceStationService policeStationService; |
| | | |
| | | /** |
| | | * 派出所信息表 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入policeStation") |
| | | public R<PoliceStationVO> detail(PoliceStationEntity policeStation) { |
| | | PoliceStationEntity detail = policeStationService.getOne(Condition.getQueryWrapper(policeStation)); |
| | | return R.data(PoliceStationWrapper.build().entityVO(detail)); |
| | | } |
| | | /** |
| | | * 派出所信息表 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入policeStation") |
| | | public R<IPage<PoliceStationVO>> list(PoliceStationEntity policeStation, Query query) { |
| | | IPage<PoliceStationEntity> pages = policeStationService.page(Condition.getPage(query), Condition.getQueryWrapper(policeStation)); |
| | | return R.data(PoliceStationWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 派出所信息表 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入policeStation") |
| | | public R<IPage<PoliceStationVO>> page(PoliceStationVO policeStation, Query query) { |
| | | IPage<PoliceStationVO> pages = policeStationService.selectPoliceStationPage(Condition.getPage(query), policeStation); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 派出所信息表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入policeStation") |
| | | public R save(@Valid @RequestBody PoliceStationEntity policeStation) { |
| | | return R.status(policeStationService.save(policeStation)); |
| | | } |
| | | |
| | | /** |
| | | * 派出所信息表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入policeStation") |
| | | public R update(@Valid @RequestBody PoliceStationEntity policeStation) { |
| | | return R.status(policeStationService.updateById(policeStation)); |
| | | } |
| | | |
| | | /** |
| | | * 派出所信息表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入policeStation") |
| | | public R submit(@Valid @RequestBody PoliceStationEntity policeStation) { |
| | | return R.status(policeStationService.saveOrUpdate(policeStation)); |
| | | } |
| | | |
| | | /** |
| | | * 派出所信息表 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(policeStationService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.police.dto; |
| | | |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class PoliceAffairsGridDTO extends PoliceAffairsGridEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.police.dto; |
| | | |
| | | import org.springblade.modules.police.entity.PoliceStationEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 派出所信息表 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class PoliceStationDTO extends PoliceStationEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.police.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | 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 2024-02-01 |
| | | */ |
| | | @Data |
| | | @TableName("jczz_police_affairs_grid") |
| | | @ApiModel(value = "PoliceAffairsGrid对象", description = "警务网格(辖区)表") |
| | | public class PoliceAffairsGridEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("主键id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * objectId |
| | | */ |
| | | @ApiModelProperty(value = "objectId") |
| | | private Integer objectId; |
| | | /** |
| | | * 警务室代码 |
| | | */ |
| | | @ApiModelProperty(value = "警务室代码") |
| | | private String jwsCode; |
| | | /** |
| | | * 民警用户id |
| | | */ |
| | | @ApiModelProperty(value = "民警用户id") |
| | | private Long userId; |
| | | /** |
| | | * 民警姓名 |
| | | */ |
| | | @ApiModelProperty(value = "民警姓名") |
| | | private String policeman; |
| | | /** |
| | | * 民警联系方式 |
| | | */ |
| | | @ApiModelProperty(value = "民警联系方式") |
| | | private String policemanPhone; |
| | | /** |
| | | * 社区编号 |
| | | */ |
| | | @ApiModelProperty(value = "社区编号") |
| | | private String communityCode; |
| | | /** |
| | | * 社区名称 |
| | | */ |
| | | @ApiModelProperty(value = "社区名称") |
| | | private String communityName; |
| | | /** |
| | | * 派出所编号 |
| | | */ |
| | | @ApiModelProperty(value = "派出所编号") |
| | | private String policeStationCode; |
| | | /** |
| | | * 派出所名称 |
| | | */ |
| | | @ApiModelProperty(value = "派出所名称") |
| | | private String policeStationName; |
| | | /* |
| | | * 辖区面数据 |
| | | * @TableField(typeHandler = GeometryTypeHandler.class) 操作面的时候用,平时注释掉 |
| | | */ |
| | | @ApiModelProperty(value = "辖区面数据") |
| | | // @TableField(typeHandler = GeometryTypeHandler.class) |
| | | private String geom; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty(value = "排序") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("创建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("更新人") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Long updateUser; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("更新时间") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableLogic |
| | | @ApiModelProperty("是否已删除 0:否 1:是") |
| | | private Integer isDeleted; |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.police.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | 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 2024-02-01 |
| | | */ |
| | | @Data |
| | | @TableName("jczz_police_station") |
| | | @ApiModel(value = "PoliceStation对象", description = "派出所信息表") |
| | | public class PoliceStationEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("主键id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 派出所编号 |
| | | */ |
| | | @ApiModelProperty(value = "派出所编号") |
| | | private String code; |
| | | /** |
| | | * 派出所名称 |
| | | */ |
| | | @ApiModelProperty(value = "派出所名称") |
| | | private String name; |
| | | /* |
| | | * 辖区面数据 |
| | | * @TableField(typeHandler = GeometryTypeHandler.class) 操作面的时候用,平时注释掉 |
| | | */ |
| | | @ApiModelProperty(value = "辖区面数据") |
| | | // @TableField(typeHandler = GeometryTypeHandler.class) |
| | | private String geom; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty(value = "排序") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("创建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("更新人") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Long updateUser; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("更新时间") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableLogic |
| | | @ApiModelProperty("是否已删除 0:否 1:是") |
| | | private Integer isDeleted; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.police.mapper; |
| | | |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.vo.PoliceAffairsGridVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | public interface PoliceAffairsGridMapper extends BaseMapper<PoliceAffairsGridEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param policeAffairsGrid |
| | | * @return |
| | | */ |
| | | List<PoliceAffairsGridVO> selectPoliceAffairsGridPage(IPage page, PoliceAffairsGridVO policeAffairsGrid); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?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.police.mapper.PoliceAffairsGridMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="policeAffairsGridResultMap" type="org.springblade.modules.police.entity.PoliceAffairsGridEntity"> |
| | | <result column="id" property="id"/> |
| | | <result column="object_id" property="objectId"/> |
| | | <result column="jws_code" property="jwsCode"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="policeman" property="policeman"/> |
| | | <result column="policeman_phone" property="policemanPhone"/> |
| | | <result column="community_code" property="communityCode"/> |
| | | <result column="community_name" property="communityName"/> |
| | | <result column="police_station_code" property="policeStationCode"/> |
| | | <result column="police_station_name" property="policeStationName"/> |
| | | <result column="geom" property="geom"/> |
| | | <result column="sort" property="sort"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectPoliceAffairsGridPage" resultMap="policeAffairsGridResultMap"> |
| | | select * from jczz_police_affairs_grid where is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * 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.police.mapper; |
| | | |
| | | import org.springblade.modules.police.entity.PoliceStationEntity; |
| | | import org.springblade.modules.police.vo.PoliceStationVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 派出所信息表 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | public interface PoliceStationMapper extends BaseMapper<PoliceStationEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param policeStation |
| | | * @return |
| | | */ |
| | | List<PoliceStationVO> selectPoliceStationPage(IPage page, PoliceStationVO policeStation); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?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.police.mapper.PoliceStationMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="policeStationResultMap" type="org.springblade.modules.police.entity.PoliceStationEntity"> |
| | | <result column="id" property="id"/> |
| | | <result column="code" property="code"/> |
| | | <result column="name" property="name"/> |
| | | <result column="geom" property="geom"/> |
| | | <result column="sort" property="sort"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectPoliceStationPage" resultMap="policeStationResultMap"> |
| | | select * from jczz_police_station where is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package org.springblade.modules.police.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.vo.PoliceAffairsGridVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | public interface IPoliceAffairsGridService extends IService<PoliceAffairsGridEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param policeAffairsGrid |
| | | * @return |
| | | */ |
| | | IPage<PoliceAffairsGridVO> selectPoliceAffairsGridPage(IPage<PoliceAffairsGridVO> page, PoliceAffairsGridVO policeAffairsGrid); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.police.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.police.entity.PoliceStationEntity; |
| | | import org.springblade.modules.police.vo.PoliceStationVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 派出所信息表 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | public interface IPoliceStationService extends IService<PoliceStationEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param policeStation |
| | | * @return |
| | | */ |
| | | IPage<PoliceStationVO> selectPoliceStationPage(IPage<PoliceStationVO> page, PoliceStationVO policeStation); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.police.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.vo.PoliceAffairsGridVO; |
| | | import org.springblade.modules.police.mapper.PoliceAffairsGridMapper; |
| | | import org.springblade.modules.police.service.IPoliceAffairsGridService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @Service |
| | | public class PoliceAffairsGridServiceImpl extends ServiceImpl<PoliceAffairsGridMapper, PoliceAffairsGridEntity> implements IPoliceAffairsGridService { |
| | | |
| | | @Override |
| | | public IPage<PoliceAffairsGridVO> selectPoliceAffairsGridPage(IPage<PoliceAffairsGridVO> page, PoliceAffairsGridVO policeAffairsGrid) { |
| | | return page.setRecords(baseMapper.selectPoliceAffairsGridPage(page, policeAffairsGrid)); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.police.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.police.entity.PoliceStationEntity; |
| | | import org.springblade.modules.police.vo.PoliceStationVO; |
| | | import org.springblade.modules.police.mapper.PoliceStationMapper; |
| | | import org.springblade.modules.police.service.IPoliceStationService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 派出所信息表 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @Service |
| | | public class PoliceStationServiceImpl extends ServiceImpl<PoliceStationMapper, PoliceStationEntity> implements IPoliceStationService { |
| | | |
| | | @Override |
| | | public IPage<PoliceStationVO> selectPoliceStationPage(IPage<PoliceStationVO> page, PoliceStationVO policeStation) { |
| | | return page.setRecords(baseMapper.selectPoliceStationPage(page, policeStation)); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.police.vo; |
| | | |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class PoliceAffairsGridVO extends PoliceAffairsGridEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.police.vo; |
| | | |
| | | import org.springblade.modules.police.entity.PoliceStationEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 派出所信息表 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class PoliceStationVO extends PoliceStationEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.police.wrapper; |
| | | |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.vo.PoliceAffairsGridVO; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 警务网格(辖区)表 包装类,返回视图层所需的字段 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | public class PoliceAffairsGridWrapper extends BaseEntityWrapper<PoliceAffairsGridEntity, PoliceAffairsGridVO> { |
| | | |
| | | public static PoliceAffairsGridWrapper build() { |
| | | return new PoliceAffairsGridWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public PoliceAffairsGridVO entityVO(PoliceAffairsGridEntity policeAffairsGrid) { |
| | | PoliceAffairsGridVO policeAffairsGridVO = Objects.requireNonNull(BeanUtil.copy(policeAffairsGrid, PoliceAffairsGridVO.class)); |
| | | |
| | | //User createUser = UserCache.getUser(policeAffairsGrid.getCreateUser()); |
| | | //User updateUser = UserCache.getUser(policeAffairsGrid.getUpdateUser()); |
| | | //policeAffairsGridVO.setCreateUserName(createUser.getName()); |
| | | //policeAffairsGridVO.setUpdateUserName(updateUser.getName()); |
| | | |
| | | return policeAffairsGridVO; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.police.wrapper; |
| | | |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.police.entity.PoliceStationEntity; |
| | | import org.springblade.modules.police.vo.PoliceStationVO; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 派出所信息表 包装类,返回视图层所需的字段 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-02-01 |
| | | */ |
| | | public class PoliceStationWrapper extends BaseEntityWrapper<PoliceStationEntity, PoliceStationVO> { |
| | | |
| | | public static PoliceStationWrapper build() { |
| | | return new PoliceStationWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public PoliceStationVO entityVO(PoliceStationEntity policeStation) { |
| | | PoliceStationVO policeStationVO = Objects.requireNonNull(BeanUtil.copy(policeStation, PoliceStationVO.class)); |
| | | |
| | | //User createUser = UserCache.getUser(policeStation.getCreateUser()); |
| | | //User updateUser = UserCache.getUser(policeStation.getUpdateUser()); |
| | | //policeStationVO.setCreateUserName(createUser.getName()); |
| | | //policeStationVO.setUpdateUserName(updateUser.getName()); |
| | | |
| | | return policeStationVO; |
| | | } |
| | | |
| | | |
| | | } |