| 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.licet.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 lombok.AllArgsConstructor; |
| | | 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.springblade.modules.licet.entity.Licet; |
| | | import org.springblade.modules.licet.service.ILicetService; |
| | | import org.springblade.modules.licet.vo.LicetVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/licet") |
| | | @Api(value = "", tags = "接口") |
| | | public class LicetController extends BladeController { |
| | | |
| | | private final ILicetService licetService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入licet") |
| | | public R<Licet> detail(Licet licet) { |
| | | Licet detail = licetService.getOne(Condition.getQueryWrapper(licet)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入licet") |
| | | public R<IPage<Licet>> list(Licet licet, Query query) { |
| | | IPage<Licet> pages = licetService.page(Condition.getPage(query), Condition.getQueryWrapper(licet)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入licet") |
| | | public R<IPage<LicetVO>> page(LicetVO licet, Query query) { |
| | | IPage<LicetVO> pages = licetService.selectLicetPage(Condition.getPage(query), licet); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入licet") |
| | | public R save(@Valid @RequestBody Licet licet) { |
| | | return R.status(licetService.save(licet)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入licet") |
| | | public R update(@Valid @RequestBody Licet licet) { |
| | | return R.status(licetService.updateById(licet)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入licet") |
| | | public R submit(@Valid @RequestBody Licet licet) { |
| | | return R.status(licetService.saveOrUpdate(licet)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(licetService.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.licet.dto; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.licet.entity.Licet; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class LicetDTO extends Licet { |
| | | 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.licet.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @Data |
| | | @TableName("sys_licet") |
| | | @ApiModel(value = "Licet对象", description = "Licet对象") |
| | | public class Licet implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @ApiModelProperty(value = "id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 模板名称 |
| | | */ |
| | | @ApiModelProperty(value = "模板名称") |
| | | @TableField("originalName") |
| | | private String originalname; |
| | | /** |
| | | * 模板下载地址 |
| | | */ |
| | | @ApiModelProperty(value = "模板下载地址") |
| | | private String template; |
| | | /** |
| | | * 获取模板信息条件,0:保安服务许可申请,1:保安培训许可申请,2:设立分公司备案,3:自招保安单位备案,4:自招保安单位撤销备案,5:跨区域经营备案,6:武装押运许可申请,7:保安服务公司法人变更 |
| | | */ |
| | | @ApiModelProperty(value = "获取模板信息条件,0:保安服务许可申请,1:保安培训许可申请,2:设立分公司备案,3:自招保安单位备案,4:自招保安单位撤销备案,5:跨区域经营备案,6:武装押运许可申请,7:保安服务公司法人变更") |
| | | private String ptype; |
| | | |
| | | |
| | | } |
| 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.licet.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.licet.entity.Licet; |
| | | import org.springblade.modules.licet.vo.LicetVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | public interface LicetMapper extends BaseMapper<Licet> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param licet |
| | | * @return |
| | | */ |
| | | List<LicetVO> selectLicetPage(IPage page, LicetVO licet); |
| | | |
| | | } |
| 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.licet.mapper.LicetMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="licetResultMap" type="org.springblade.modules.licet.entity.Licet"> |
| | | <id column="id" property="id"/> |
| | | <result column="originalName" property="originalname"/> |
| | | <result column="template" property="template"/> |
| | | <result column="ptype" property="ptype"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectLicetPage" resultMap="licetResultMap"> |
| | | select * from sys_licet 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.licet.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.licet.entity.Licet; |
| | | import org.springblade.modules.licet.vo.LicetVO; |
| | | |
| | | /** |
| | | * 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | public interface ILicetService extends IService<Licet> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param licet |
| | | * @return |
| | | */ |
| | | IPage<LicetVO> selectLicetPage(IPage<LicetVO> page, LicetVO licet); |
| | | |
| | | } |
| 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.licet.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.licet.entity.Licet; |
| | | import org.springblade.modules.licet.mapper.LicetMapper; |
| | | import org.springblade.modules.licet.service.ILicetService; |
| | | import org.springblade.modules.licet.vo.LicetVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @Service |
| | | public class LicetServiceImpl extends ServiceImpl<LicetMapper, Licet> implements ILicetService { |
| | | |
| | | @Override |
| | | public IPage<LicetVO> selectLicetPage(IPage<LicetVO> page, LicetVO licet) { |
| | | return page.setRecords(baseMapper.selectLicetPage(page, licet)); |
| | | } |
| | | |
| | | } |
| 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.licet.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.licet.entity.Licet; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "LicetVO对象", description = "LicetVO对象") |
| | | public class LicetVO extends Licet { |
| | | 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.licetuser.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 lombok.AllArgsConstructor; |
| | | 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.springblade.modules.licetuser.entity.Licetuser; |
| | | import org.springblade.modules.licetuser.service.ILicetuserService; |
| | | import org.springblade.modules.licetuser.vo.LicetuserVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/licetuser") |
| | | @Api(value = "", tags = "接口") |
| | | public class LicetuserController extends BladeController { |
| | | |
| | | private final ILicetuserService licetuserService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入licetuser") |
| | | public R<Licetuser> detail(Licetuser licetuser) { |
| | | Licetuser detail = licetuserService.getOne(Condition.getQueryWrapper(licetuser)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/liceUp") |
| | | @ApiOperationSupport(order = 1) |
| | | public R liceUp(@Valid @RequestBody Licetuser licetuser) { |
| | | Map map = licetuserService.liceIn(licetuser.getUserid(),licetuser.getPtype()); |
| | | if (map==null){ |
| | | licetuserService.save(licetuser); |
| | | } |
| | | else { |
| | | String id = map.get("id").toString(); |
| | | Integer a= Integer.parseInt(id); |
| | | licetuser.setId(a); |
| | | licetuserService.updateById(licetuser); |
| | | } |
| | | return R.data("成功"); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入licetuser") |
| | | public R<IPage<Licetuser>> list(Licetuser licetuser, Query query) { |
| | | IPage<Licetuser> pages = licetuserService.page(Condition.getPage(query), Condition.getQueryWrapper(licetuser)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入licetuser") |
| | | public R<IPage<LicetuserVO>> page(LicetuserVO licetuser, Query query) { |
| | | IPage<LicetuserVO> pages = licetuserService.selectLicetuserPage(Condition.getPage(query), licetuser); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入licetuser") |
| | | public R save(@Valid @RequestBody Licetuser licetuser) { |
| | | return R.status(licetuserService.save(licetuser)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入licetuser") |
| | | public R update(@Valid @RequestBody Licetuser licetuser) { |
| | | return R.status(licetuserService.updateById(licetuser)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入licetuser") |
| | | public R submit(@Valid @RequestBody Licetuser licetuser) { |
| | | return R.status(licetuserService.saveOrUpdate(licetuser)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(licetuserService.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.licetuser.dto; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.licetuser.entity.Licetuser; |
| | | |
| | | /** |
| | | * 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class LicetuserDTO extends Licetuser { |
| | | 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.licetuser.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @Data |
| | | @TableName("sys_licetuser") |
| | | @ApiModel(value = "Licetuser对象", description = "Licetuser对象") |
| | | public class Licetuser implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private String userid; |
| | | /** |
| | | * 获取模板信息条件,0:保安服务许可申请,1:保安培训许可申请,2:设立分公司备案,3:自招保安单位备案,4:自招保安单位撤销备案,5:跨区域经营备案,6:武装押运许可申请,7:保安服务公司法人变更 |
| | | */ |
| | | @ApiModelProperty(value = "获取模板信息条件,0:保安服务许可申请,1:保安培训许可申请,2:设立分公司备案,3:自招保安单位备案,4:自招保安单位撤销备案,5:跨区域经营备案,6:武装押运许可申请,7:保安服务公司法人变更") |
| | | private String ptype; |
| | | /** |
| | | * 以上传的文件id,关联模板id |
| | | */ |
| | | @ApiModelProperty(value = "以上传的文件id,关联模板id") |
| | | private String templateid; |
| | | private String links; |
| | | |
| | | |
| | | } |
| 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.licetuser.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.licetuser.entity.Licetuser; |
| | | import org.springblade.modules.licetuser.vo.LicetuserVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | public interface LicetuserMapper extends BaseMapper<Licetuser> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param licetuser |
| | | * @return |
| | | */ |
| | | List<LicetuserVO> selectLicetuserPage(IPage page, LicetuserVO licetuser); |
| | | Map liceIn(String userid,String ptype); |
| | | |
| | | } |
| 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.licetuser.mapper.LicetuserMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="licetuserResultMap" type="org.springblade.modules.licetuser.entity.Licetuser"> |
| | | <id column="id" property="id"/> |
| | | <result column="userid" property="userid"/> |
| | | <result column="ptype" property="ptype"/> |
| | | <result column="templateid" property="templateid"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectLicetuserPage" resultMap="licetuserResultMap"> |
| | | select * from sys_licetuser where is_deleted = 0 |
| | | </select> |
| | | |
| | | <select id="liceIn" resultType="java.util.HashMap"> |
| | | select * from sys_licetuser where userid=#{userid} and ptype=#{ptype} |
| | | </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.licetuser.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.licetuser.entity.Licetuser; |
| | | import org.springblade.modules.licetuser.vo.LicetuserVO; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | public interface ILicetuserService extends IService<Licetuser> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param licetuser |
| | | * @return |
| | | */ |
| | | IPage<LicetuserVO> selectLicetuserPage(IPage<LicetuserVO> page, LicetuserVO licetuser); |
| | | Map liceIn(String userid,String ptype); |
| | | } |
| 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.licetuser.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.licetuser.entity.Licetuser; |
| | | import org.springblade.modules.licetuser.mapper.LicetuserMapper; |
| | | import org.springblade.modules.licetuser.service.ILicetuserService; |
| | | import org.springblade.modules.licetuser.vo.LicetuserVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @Service |
| | | public class LicetuserServiceImpl extends ServiceImpl<LicetuserMapper, Licetuser> implements ILicetuserService { |
| | | |
| | | @Override |
| | | public IPage<LicetuserVO> selectLicetuserPage(IPage<LicetuserVO> page, LicetuserVO licetuser) { |
| | | return page.setRecords(baseMapper.selectLicetuserPage(page, licetuser)); |
| | | } |
| | | |
| | | @Override |
| | | public Map liceIn(String userid,String ptype) { |
| | | return baseMapper.liceIn(userid,ptype); |
| | | } |
| | | |
| | | } |
| 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.licetuser.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.licetuser.entity.Licetuser; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-09-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "LicetuserVO对象", description = "LicetuserVO对象") |
| | | public class LicetuserVO extends Licetuser { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |