智慧保安后台管理-验收版本
tangzy
2021-07-06 3c63a7ff96a43c73a7308d817e2160c2586e027f
1.入职登记管理
2.保安人员管理
5 files modified
16 files added
922 ■■■■■ changed files
src/main/java/org/springblade/common/config/BladeConfiguration.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/controller/PerformanceController.java 125 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/dto/PerformanceDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/entity/Performance.java 87 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/mapper/PerformanceMapper.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/mapper/PerformanceMapper.xml 22 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/service/IPerformanceService.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/service/impl/PerformanceServiceImpl.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/vo/PerformanceVO.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/registration/controller/RegistrationController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/registration/dto/RegistrationDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/registration/entity/Registration.java 118 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/registration/mapper/RegistrationMapper.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/registration/mapper/RegistrationMapper.xml 29 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/registration/service/IRegistrationService.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/registration/service/impl/RegistrationServiceImpl.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/registration/vo/RegistrationVO.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/MenuController.java 14 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/entity/User.java 5 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/BladeConfiguration.java
@@ -51,6 +51,7 @@
        secureRegistry.excludePathPatterns("/webjars/**");
        secureRegistry.excludePathPatterns("/swagger-resources/**");
        secureRegistry.excludePathPatterns("/druid/**");
        secureRegistry.excludePathPatterns("/performance/**");
        return secureRegistry;
    }
src/main/java/org/springblade/modules/performance/controller/PerformanceController.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.performance.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.performance.entity.Performance;
import org.springblade.modules.performance.vo.PerformanceVO;
import org.springblade.modules.performance.service.IPerformanceService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 *  保安员表现管理
 * @author BladeX
 * @since 2021-07-05
 */
@RestController
@AllArgsConstructor
@RequestMapping("/performance")
@Api(value = "", tags = "接口")
public class PerformanceController extends BladeController {
    private final IPerformanceService performanceService;
    /**
     * 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入performance")
    public R<Performance> detail(Performance performance) {
        Performance detail = performanceService.getOne(Condition.getQueryWrapper(performance));
        return R.data(detail);
    }
    /**
     * 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入performance")
    public R<IPage<Performance>> list(Performance performance, Query query) {
        IPage<Performance> pages = performanceService.page(Condition.getPage(query), Condition.getQueryWrapper(performance));
        return R.data(pages);
    }
    /**
     * 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入performance")
    public R<IPage<PerformanceVO>> page(PerformanceVO performance, Query query) {
        IPage<PerformanceVO> pages = performanceService.selectPerformancePage(Condition.getPage(query), performance);
        return R.data(pages);
    }
    /**
     * 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入performance")
    public R save(@Valid @RequestBody Performance performance) {
        return R.status(performanceService.save(performance));
    }
    /**
     * 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入performance")
    public R update(@Valid @RequestBody Performance performance) {
        return R.status(performanceService.updateById(performance));
    }
    /**
     * 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入performance")
    public R submit(@Valid @RequestBody Performance performance) {
        return R.status(performanceService.saveOrUpdate(performance));
    }
    /**
     * 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(performanceService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/performance/dto/PerformanceDTO.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.performance.dto;
import org.springblade.modules.performance.entity.Performance;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 数据传输对象实体类
 *
 * @author BladeX
 * @since 2021-07-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PerformanceDTO extends Performance {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/performance/entity/Performance.java
New file
@@ -0,0 +1,87 @@
/*
 *      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.performance.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * 实体类
 *
 * @author BladeX
 * @since 2021-07-05
 */
@Data
@TableName("sys_performance")
@ApiModel(value = "Performance对象", description = "Performance对象")
public class Performance implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
    * 保安人编码
    */
        @ApiModelProperty(value = "保安人编码")
        @TableField("securityId")
    private String securityid;
    /**
    * 工作态度
    */
        @ApiModelProperty(value = "工作态度")
        @TableField("workingAttitude")
    private String workingattitude;
    /**
    * 工作能力
    */
        @ApiModelProperty(value = "工作能力")
        @TableField("workingAbility")
    private String workingability;
    /**
    * 工作成效
    */
        @ApiModelProperty(value = "工作成效")
        @TableField("Achievements")
    private String achievements;
    /**
    * 评分
    */
        @ApiModelProperty(value = "评分")
        private String score;
    /**
    * 时间
    */
        @ApiModelProperty(value = "时间")
        private String time;
    /**
    * 租户ID
    */
        @ApiModelProperty(value = "租户ID")
        @TableField("tenantId")
    private String tenantid;
}
src/main/java/org/springblade/modules/performance/mapper/PerformanceMapper.java
New file
@@ -0,0 +1,42 @@
/*
 *      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.performance.mapper;
import org.springblade.modules.performance.entity.Performance;
import org.springblade.modules.performance.vo.PerformanceVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 *  Mapper 接口
 *
 * @author BladeX
 * @since 2021-07-05
 */
public interface PerformanceMapper extends BaseMapper<Performance> {
    /**
     * 自定义分页
     *
     * @param page
     * @param performance
     * @return
     */
    List<PerformanceVO> selectPerformancePage(IPage page, PerformanceVO performance);
}
src/main/java/org/springblade/modules/performance/mapper/PerformanceMapper.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.performance.mapper.PerformanceMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="performanceResultMap" type="org.springblade.modules.performance.entity.Performance">
        <id column="id" property="id"/>
        <result column="securityId" property="securityid"/>
        <result column="workingAttitude" property="workingattitude"/>
        <result column="workingAbility" property="workingability"/>
        <result column="Achievements" property="achievements"/>
        <result column="score" property="score"/>
        <result column="time" property="time"/>
        <result column="tenantId" property="tenantid"/>
    </resultMap>
    <select id="selectPerformancePage" resultMap="performanceResultMap">
        select * from sys_performance where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/performance/service/IPerformanceService.java
New file
@@ -0,0 +1,41 @@
/*
 *      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.performance.service;
import org.springblade.modules.performance.entity.Performance;
import org.springblade.modules.performance.vo.PerformanceVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 *  服务类
 *
 * @author BladeX
 * @since 2021-07-05
 */
public interface IPerformanceService extends IService<Performance> {
    /**
     * 自定义分页
     *
     * @param page
     * @param performance
     * @return
     */
    IPage<PerformanceVO> selectPerformancePage(IPage<PerformanceVO> page, PerformanceVO performance);
}
src/main/java/org/springblade/modules/performance/service/impl/PerformanceServiceImpl.java
New file
@@ -0,0 +1,41 @@
/*
 *      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.performance.service.impl;
import org.springblade.modules.performance.entity.Performance;
import org.springblade.modules.performance.vo.PerformanceVO;
import org.springblade.modules.performance.mapper.PerformanceMapper;
import org.springblade.modules.performance.service.IPerformanceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 *  服务实现类
 *
 * @author BladeX
 * @since 2021-07-05
 */
@Service
public class PerformanceServiceImpl extends ServiceImpl<PerformanceMapper, Performance> implements IPerformanceService {
    @Override
    public IPage<PerformanceVO> selectPerformancePage(IPage<PerformanceVO> page, PerformanceVO performance) {
        return page.setRecords(baseMapper.selectPerformancePage(page, performance));
    }
}
src/main/java/org/springblade/modules/performance/vo/PerformanceVO.java
New file
@@ -0,0 +1,36 @@
/*
 *      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.performance.vo;
import org.springblade.modules.performance.entity.Performance;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
 * 视图实体类
 *
 * @author BladeX
 * @since 2021-07-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PerformanceVO对象", description = "PerformanceVO对象")
public class PerformanceVO extends Performance {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/registration/controller/RegistrationController.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.registration.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.registration.entity.Registration;
import org.springblade.modules.registration.vo.RegistrationVO;
import org.springblade.modules.registration.service.IRegistrationService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 *  控制器
 *
 * @author BladeX
 * @since 2021-07-06
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-registration/registration")
@Api(value = "", tags = "接口")
public class RegistrationController extends BladeController {
    private final IRegistrationService registrationService;
    /**
     * 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入registration")
    public R<Registration> detail(Registration registration) {
        Registration detail = registrationService.getOne(Condition.getQueryWrapper(registration));
        return R.data(detail);
    }
    /**
     * 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入registration")
    public R<IPage<Registration>> list(Registration registration, Query query) {
        IPage<Registration> pages = registrationService.page(Condition.getPage(query), Condition.getQueryWrapper(registration));
        return R.data(pages);
    }
    /**
     * 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入registration")
    public R<IPage<RegistrationVO>> page(RegistrationVO registration, Query query) {
        IPage<RegistrationVO> pages = registrationService.selectRegistrationPage(Condition.getPage(query), registration);
        return R.data(pages);
    }
    /**
     * 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入registration")
    public R save(@Valid @RequestBody Registration registration) {
        return R.status(registrationService.save(registration));
    }
    /**
     * 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入registration")
    public R update(@Valid @RequestBody Registration registration) {
        return R.status(registrationService.updateById(registration));
    }
    /**
     * 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入registration")
    public R submit(@Valid @RequestBody Registration registration) {
        return R.status(registrationService.saveOrUpdate(registration));
    }
    /**
     * 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(registrationService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/registration/dto/RegistrationDTO.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.registration.dto;
import org.springblade.modules.registration.entity.Registration;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 数据传输对象实体类
 *
 * @author BladeX
 * @since 2021-07-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RegistrationDTO extends Registration {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/registration/entity/Registration.java
New file
@@ -0,0 +1,118 @@
/*
 *      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.registration.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * 实体类
 *
 * @author BladeX
 * @since 2021-07-06
 */
@Data
@TableName("sys_registration")
@ApiModel(value = "Registration对象", description = "Registration对象")
public class Registration implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
    * 姓名
    */
        @ApiModelProperty(value = "姓名")
        private String name;
    /**
    * 性别
    */
        @ApiModelProperty(value = "性别")
        private String sex;
    /**
    * 籍贯
    */
        @ApiModelProperty(value = "籍贯")
        @TableField("nativePlace")
    private String nativeplace;
    /**
    * 民族
    */
        @ApiModelProperty(value = "民族")
        private String nation;
    /**
    * 学历
    */
        @ApiModelProperty(value = "学历")
        private String education;
    /**
    * 政治面貌
    */
        @ApiModelProperty(value = "政治面貌")
        private String politicaloutlook;
    /**
    * 身高
    */
        @ApiModelProperty(value = "身高")
        private Float height;
    /**
    * 联系电话
    */
        @ApiModelProperty(value = "联系电话")
        private String call;
    /**
    * 邮箱
    */
        @ApiModelProperty(value = "邮箱")
        private String email;
    /**
    * 联系地址
    */
        @ApiModelProperty(value = "联系地址")
        private String address;
    /**
    * 户口所在地
    */
        @ApiModelProperty(value = "户口所在地")
        private String registered ;
    /**
    * 身份证号
    */
        @ApiModelProperty(value = "身份证号")
        @TableField("cardId")
    private Integer cardid;
    /**
    * 从业信息
    */
        @ApiModelProperty(value = "从业信息")
        private String employment ;
    /**
    * 入职时间
    */
        @ApiModelProperty(value = "入职时间")
        private String rtime;
}
src/main/java/org/springblade/modules/registration/mapper/RegistrationMapper.java
New file
@@ -0,0 +1,42 @@
/*
 *      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.registration.mapper;
import org.springblade.modules.registration.entity.Registration;
import org.springblade.modules.registration.vo.RegistrationVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 *  Mapper 接口
 *
 * @author BladeX
 * @since 2021-07-06
 */
public interface RegistrationMapper extends BaseMapper<Registration> {
    /**
     * 自定义分页
     *
     * @param page
     * @param registration
     * @return
     */
    List<RegistrationVO> selectRegistrationPage(IPage page, RegistrationVO registration);
}
src/main/java/org/springblade/modules/registration/mapper/RegistrationMapper.xml
New file
@@ -0,0 +1,29 @@
<?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.registration.mapper.RegistrationMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="registrationResultMap" type="org.springblade.modules.registration.entity.Registration">
        <id column="id" property="id"/>
        <result column="name" property="name"/>
        <result column="sex" property="sex"/>
        <result column="nativePlace" property="nativeplace"/>
        <result column="nation" property="nation"/>
        <result column="education" property="education"/>
        <result column="politicaloutlook" property="politicaloutlook"/>
        <result column="height" property="height"/>
        <result column="call" property="call"/>
        <result column="email" property="email"/>
        <result column="address" property="address"/>
        <result column="registered " property="registered "/>
        <result column="cardId" property="cardid"/>
        <result column="employment " property="employment "/>
        <result column="rtime" property="rtime"/>
    </resultMap>
    <select id="selectRegistrationPage" resultMap="registrationResultMap">
        select * from sys_registration where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/registration/service/IRegistrationService.java
New file
@@ -0,0 +1,41 @@
/*
 *      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.registration.service;
import org.springblade.modules.registration.entity.Registration;
import org.springblade.modules.registration.vo.RegistrationVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 *  服务类
 *
 * @author BladeX
 * @since 2021-07-06
 */
public interface IRegistrationService extends IService<Registration> {
    /**
     * 自定义分页
     *
     * @param page
     * @param registration
     * @return
     */
    IPage<RegistrationVO> selectRegistrationPage(IPage<RegistrationVO> page, RegistrationVO registration);
}
src/main/java/org/springblade/modules/registration/service/impl/RegistrationServiceImpl.java
New file
@@ -0,0 +1,41 @@
/*
 *      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.registration.service.impl;
import org.springblade.modules.registration.entity.Registration;
import org.springblade.modules.registration.vo.RegistrationVO;
import org.springblade.modules.registration.mapper.RegistrationMapper;
import org.springblade.modules.registration.service.IRegistrationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 *  服务实现类
 *
 * @author BladeX
 * @since 2021-07-06
 */
@Service
public class RegistrationServiceImpl extends ServiceImpl<RegistrationMapper, Registration> implements IRegistrationService {
    @Override
    public IPage<RegistrationVO> selectRegistrationPage(IPage<RegistrationVO> page, RegistrationVO registration) {
        return page.setRecords(baseMapper.selectRegistrationPage(page, registration));
    }
}
src/main/java/org/springblade/modules/registration/vo/RegistrationVO.java
New file
@@ -0,0 +1,36 @@
/*
 *      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.registration.vo;
import org.springblade.modules.registration.entity.Registration;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
 * 视图实体类
 *
 * @author BladeX
 * @since 2021-07-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "RegistrationVO对象", description = "RegistrationVO对象")
public class RegistrationVO extends Registration {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/system/controller/MenuController.java
@@ -67,7 +67,7 @@
     * 详情
     */
    @GetMapping("/detail")
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入menu")
    public R<MenuVO> detail(Menu menu) {
@@ -83,7 +83,7 @@
        @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
        @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
    })
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "列表", notes = "传入menu")
    public R<List<MenuVO>> list(@ApiIgnore @RequestParam Map<String, Object> menu) {
@@ -99,7 +99,7 @@
        @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
        @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
    })
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "懒加载列表", notes = "传入menu")
    public R<List<MenuVO>> lazyList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) {
@@ -115,7 +115,7 @@
        @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
        @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
    })
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "菜单列表", notes = "传入menu")
    public R<List<MenuVO>> menuList(@ApiIgnore @RequestParam Map<String, Object> menu) {
@@ -131,7 +131,7 @@
        @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
        @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
    })
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "懒加载菜单列表", notes = "传入menu")
    public R<List<MenuVO>> lazyMenuList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) {
@@ -143,7 +143,7 @@
     * 新增或修改
     */
    @PostMapping("/submit")
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入menu")
    public R submit(@Valid @RequestBody Menu menu) {
@@ -162,7 +162,7 @@
     * 删除
     */
    @PostMapping("/remove")
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
src/main/java/org/springblade/modules/system/entity/User.java
@@ -90,7 +90,10 @@
    /**
     * 岗位id
     */
    private String postId;
    private String postId;    /**
     * 身份证号
     */
    private String cardid;
}
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -92,7 +92,7 @@
        FROM
            blade_dept dept
        WHERE
            dept.parent_id = #{param2} AND dept.is_deleted = 0
            dept.parent_id = #{param2} AND dept.is_deleted = 0 AND tenant_id!=000000
        <if test="param1!=null and param1!=''">
            and dept.tenant_id = #{param1}
        </if>
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -25,13 +25,12 @@
        <result column="role_id" property="roleId"/>
        <result column="dept_id" property="deptId"/>
        <result column="post_id" property="postId"/>
        <result column="cardid" property="cardid"/>
    </resultMap>
    <select id="selectUserPage" resultMap="userResultMap">
        select * from blade_user where is_deleted = 0
        <if test="tenantId!=null and tenantId != ''">
            and tenant_id = #{tenantId}
        </if>
            and tenant_id!=000000
        <if test="user.tenantId!=null and user.tenantId != ''">
            and tenant_id = #{user.tenantId}
        </if>