5 files modified
16 files added
| | |
| | | secureRegistry.excludePathPatterns("/webjars/**"); |
| | | secureRegistry.excludePathPatterns("/swagger-resources/**"); |
| | | secureRegistry.excludePathPatterns("/druid/**"); |
| | | secureRegistry.excludePathPatterns("/performance/**"); |
| | | return secureRegistry; |
| | | } |
| | | |
| 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.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))); |
| | | } |
| | | |
| | | |
| | | } |
| 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.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; |
| | | |
| | | } |
| 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.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; |
| | | |
| | | |
| | | } |
| 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.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); |
| | | |
| | | } |
| 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.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> |
| 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.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); |
| | | |
| | | } |
| 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.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)); |
| | | } |
| | | |
| | | } |
| 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.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; |
| | | |
| | | } |
| 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.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))); |
| | | } |
| | | |
| | | |
| | | } |
| 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.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; |
| | | |
| | | } |
| 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.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; |
| | | |
| | | |
| | | } |
| 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.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); |
| | | |
| | | } |
| 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.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> |
| 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.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); |
| | | |
| | | } |
| 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.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)); |
| | | } |
| | | |
| | | } |
| 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.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; |
| | | |
| | | } |
| | |
| | | * 详情 |
| | | */ |
| | | @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) { |
| | |
| | | @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) { |
| | |
| | | @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) { |
| | |
| | | @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) { |
| | |
| | | @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) { |
| | |
| | | * 新增或修改 |
| | | */ |
| | | @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) { |
| | |
| | | * 删除 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 岗位id |
| | | */ |
| | | private String postId; |
| | | private String postId; /** |
| | | * 身份证号 |
| | | */ |
| | | private String cardid; |
| | | |
| | | |
| | | } |
| | |
| | | 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> |
| | |
| | | <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> |