37 files modified
4 files added
| | |
| | | <artifactId>blade-core-test</artifactId> |
| | | <scope>test</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.belerweb</groupId> |
| | | <artifactId>pinyin4j</artifactId> |
| | | <version>2.5.1</version> |
| | | </dependency> |
| | | <!-- 报表 --> |
| | | <dependency> |
| | | <groupId>org.springblade</groupId> |
| | |
| | | secureRegistry.excludePathPatterns("/train/**"); |
| | | secureRegistry.excludePathPatterns("/examination/**"); |
| | | secureRegistry.excludePathPatterns("/experience/**"); |
| | | secureRegistry.excludePathPatterns("/jurisdiction/**"); |
| | | secureRegistry.excludePathPatterns("/permit/**"); |
| | | return secureRegistry; |
| | | } |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.permit.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | 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.boot.ctrl.BladeController; |
| | | 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.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springblade.modules.permit.service.IPermitService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/permit") |
| | | @RequestMapping("blade-permit/permit") |
| | | @Api(value = "", tags = "接口") |
| | | public class PermitController extends BladeController { |
| | | |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入permit") |
| | | public R save(@Valid @RequestBody Permit permit) { |
| | | permit.setType("2"); |
| | | permit.setPermitime(new Date()); |
| | | return R.status(permitService.save(permit)); |
| | | } |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.permit.dto; |
| | | |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | |
| | | */ |
| | | package org.springblade.modules.permit.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 实体类 |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date establishtime; |
| | | |
| | | @ApiModelProperty(value = "提交时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date permitime; |
| | | /** |
| | | * 注册资本 |
| | | */ |
| | |
| | | private String type; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | private String deptid; |
| | | private String ptype; |
| | | |
| | | @ApiModelProperty(value = "提交时间") |
| | | @TableField("establishTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date permitime; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.permit.mapper; |
| | | |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | <result column="industry" property="industry"/> |
| | | <result column="type" property="type"/> |
| | | <result column="permitime" property="permitime"/> |
| | | <result column="deptid" property="deptid"/> |
| | | <result column="ptype" property="ptype"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.permit.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | */ |
| | | package org.springblade.modules.permit.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springblade.modules.permit.mapper.PermitMapper; |
| | | import org.springblade.modules.permit.service.IPermitService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | */ |
| | | package org.springblade.modules.permit.vo; |
| | | |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | |
| | | */ |
| | | package org.springblade.modules.record.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | 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.boot.ctrl.BladeController; |
| | | 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.record.entity.Record; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import org.springblade.modules.record.service.IRecordService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-record/record") |
| | | @RequestMapping("/record") |
| | | @Api(value = "", tags = "接口") |
| | | public class RecordController extends BladeController { |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入record") |
| | | public R save(@Valid @RequestBody Record record) { |
| | | record.setType("2"); |
| | | return R.status(recordService.save(record)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | |
| | | return R.status(recordService.saveOrUpdate(record)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | |
| | | return R.status(recordService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.record.dto; |
| | | |
| | | import org.springblade.modules.record.entity.Record; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.record.entity.Record; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | |
| | | */ |
| | | package org.springblade.modules.record.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 实体类 |
| | |
| | | @ApiModelProperty(value = "注册资本") |
| | | @TableField("registeredCapital") |
| | | private String registeredcapital; |
| | | |
| | | /** |
| | | * 组织机构代码 |
| | | */ |
| | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private String deptid; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.record.mapper; |
| | | |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | <result column="perid" property="perid"/> |
| | | <result column="offices" property="offices"/> |
| | | <result column="officetime" property="officetime"/> |
| | | <result column="deptid" property="deptid"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.record.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | */ |
| | | package org.springblade.modules.record.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import org.springblade.modules.record.mapper.RecordMapper; |
| | | import org.springblade.modules.record.service.IRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | */ |
| | | package org.springblade.modules.record.vo; |
| | | |
| | | import org.springblade.modules.record.entity.Record; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import org.springblade.modules.record.entity.Record; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | |
| | | */ |
| | | package org.springblade.modules.recordk.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | 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.boot.ctrl.BladeController; |
| | | 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.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import org.springblade.modules.recordk.service.IRecordkService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-recordk/recordk") |
| | | @RequestMapping("/recordk") |
| | | @Api(value = "", tags = "接口") |
| | | public class RecordkController extends BladeController { |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入recordk") |
| | | public R save(@Valid @RequestBody Recordk recordk) { |
| | | recordk.setType("2"); |
| | | return R.status(recordkService.save(recordk)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | |
| | | return R.status(recordkService.saveOrUpdate(recordk)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | |
| | | return R.status(recordkService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.recordk.dto; |
| | | |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | |
| | | */ |
| | | package org.springblade.modules.recordk.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 实体类 |
| | |
| | | private Date officetime; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private String deptid; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.recordk.mapper; |
| | | |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | <result column="perid" property="perid"/> |
| | | <result column="offices" property="offices"/> |
| | | <result column="officetime" property="officetime"/> |
| | | <result column="deptid" property="deptid"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.recordk.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | */ |
| | | package org.springblade.modules.recordk.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import org.springblade.modules.recordk.mapper.RecordkMapper; |
| | | import org.springblade.modules.recordk.service.IRecordkService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | */ |
| | | package org.springblade.modules.recordk.vo; |
| | | |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | |
| | | */ |
| | | package org.springblade.modules.revoke.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | 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.boot.ctrl.BladeController; |
| | | 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.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import org.springblade.modules.revoke.service.IRevokeService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-revoke/revoke") |
| | | @RequestMapping("/revoke") |
| | | @Api(value = "", tags = "接口") |
| | | public class RevokeController extends BladeController { |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入revoke") |
| | | public R save(@Valid @RequestBody Revoke revoke) { |
| | | revoke.setType("2"); |
| | | revoke.setCtime(new Date()); |
| | | return R.status(revokeService.save(revoke)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | |
| | | return R.status(revokeService.saveOrUpdate(revoke)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | |
| | | return R.status(revokeService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.revoke.dto; |
| | | |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | |
| | | */ |
| | | package org.springblade.modules.revoke.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 实体类 |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date ctime; |
| | | private String deptid; |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.revoke.mapper; |
| | | |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | <result column="type" property="type"/> |
| | | <result column="reason" property="reason"/> |
| | | <result column="ctime" property="ctime"/> |
| | | <result column="deptid" property="deptid"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.revoke.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | */ |
| | | package org.springblade.modules.revoke.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import org.springblade.modules.revoke.mapper.RevokeMapper; |
| | | import org.springblade.modules.revoke.service.IRevokeService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | */ |
| | | package org.springblade.modules.revoke.vo; |
| | | |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | |
| | | /** |
| | | * 统一社会信用代码 |
| | | */ |
| | | @ApiModelProperty(value = "统一社会信用代码") |
| | | @ApiModelProperty(value = "社会信用代码") |
| | | @TableField("creditCode") |
| | | private String creditcode; |
| | | } |
| | |
| | | }) |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "列表", notes = "传入account和realName") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<IPage<UserVO>> list(@ApiIgnore @RequestParam Map<String, Object> user, Query query, BladeUser bladeUser) { |
| | | QueryWrapper<User> queryWrapper = Condition.getQueryWrapper(user, User.class); |
| | | IPage<User> pages = userService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(User::getTenantId, bladeUser.getTenantId()) : queryWrapper); |
| | |
| | | }) |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "列表", notes = "传入account和realName") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<IPage<UserVO>> page(@ApiIgnore User user, Query query, Long deptId, BladeUser bladeUser) { |
| | | user.setAccount("admin"); |
| | | IPage<User> pages = userService.selectUserPage(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId())); |
| | |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增或修改", notes = "传入User") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R submit(@Valid @RequestBody User user) { |
| | | CacheUtil.clear(USER_CACHE); |
| | | return R.status(userService.submit(user)); |
| | |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "删除", notes = "传入id集合") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R remove(@RequestParam String ids) { |
| | | CacheUtil.clear(USER_CACHE); |
| | | return R.status(userService.removeUser(ids)); |
| | |
| | | @PostMapping("/grant") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "权限设置", notes = "传入roleId集合以及menuId集合") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R grant(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds, |
| | | @ApiParam(value = "roleId集合", required = true) @RequestParam String roleIds) { |
| | | boolean temp = userService.grant(userIds, roleIds); |
| | |
| | | @PostMapping("/reset-password") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "初始化密码", notes = "传入userId集合") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R resetPassword(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds) { |
| | | boolean temp = userService.resetPassword(userIds); |
| | | return R.status(temp); |
| | |
| | | FROM |
| | | blade_dept dept |
| | | WHERE |
| | | dept.parent_id = #{param2} AND dept.is_deleted = 0 |
| | | dept.is_deleted = 0 |
| | | <if test="param2!=null and param2!=0"> |
| | | and dept.parent_id = #{param2} |
| | | </if> |
| | | <if test="param1!=null and param1!=''"> |
| | | and dept.tenant_id = #{param1} |
| | | </if> |
| New file |
| | |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414383135974703111', 1123598815738675201, 'permit', '许可申请', 'menu', '/permit/permit', NULL, 1, 1, 0, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414383135974703112', '1414383135974703111', 'permit_add', '新增', 'add', '/permit/permit/add', 'plus', 1, 2, 1, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414383135974703113', '1414383135974703111', 'permit_edit', '修改', 'edit', '/permit/permit/edit', 'form', 2, 2, 2, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414383135974703114', '1414383135974703111', 'permit_delete', '删除', 'delete', '/api/blade-permit/permit/remove', 'delete', 3, 2, 3, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414383135974703115', '1414383135974703111', 'permit_view', '查看', 'view', '/permit/permit/view', 'file-text', 4, 2, 2, 1, NULL, 0); |
| New file |
| | |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414384980960952326', 1123598815738675201, 'record', '许可申请', 'menu', '/record/record', NULL, 1, 1, 0, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414384980960952327', '1414384980960952326', 'record_add', '新增', 'add', '/record/record/add', 'plus', 1, 2, 1, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414384980960952328', '1414384980960952326', 'record_edit', '修改', 'edit', '/record/record/edit', 'form', 2, 2, 2, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414384980960952329', '1414384980960952326', 'record_delete', '删除', 'delete', '/api/blade-record/record/remove', 'delete', 3, 2, 3, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414384980960952330', '1414384980960952326', 'record_view', '查看', 'view', '/record/record/view', 'file-text', 4, 2, 2, 1, NULL, 0); |
| New file |
| | |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414386058427318278', 1123598815738675201, 'recordk', '跨区域备案', 'menu', '/recordk/recordk', NULL, 1, 1, 0, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414386058427318279', '1414386058427318278', 'recordk_add', '新增', 'add', '/recordk/recordk/add', 'plus', 1, 2, 1, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414386058427318280', '1414386058427318278', 'recordk_edit', '修改', 'edit', '/recordk/recordk/edit', 'form', 2, 2, 2, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414386058427318281', '1414386058427318278', 'recordk_delete', '删除', 'delete', '/api/blade-recordk/recordk/remove', 'delete', 3, 2, 3, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414386058427318282', '1414386058427318278', 'recordk_view', '查看', 'view', '/recordk/recordk/view', 'file-text', 4, 2, 2, 1, NULL, 0); |
| New file |
| | |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414385701290721286', 1123598815738675201, 'revoke', '备案撤销', 'menu', '/revoke/revoke', NULL, 1, 1, 0, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414385701290721287', '1414385701290721286', 'revoke_add', '新增', 'add', '/revoke/revoke/add', 'plus', 1, 2, 1, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414385701290721288', '1414385701290721286', 'revoke_edit', '修改', 'edit', '/revoke/revoke/edit', 'form', 2, 2, 2, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414385701290721289', '1414385701290721286', 'revoke_delete', '删除', 'delete', '/api/blade-revoke/revoke/remove', 'delete', 3, 2, 3, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1414385701290721290', '1414385701290721286', 'revoke_view', '查看', 'view', '/revoke/revoke/view', 'file-text', 4, 2, 2, 1, NULL, 0); |