智慧保安后台管理项目备份
tangzy
2021-07-07 ee186fe4bb92d4067c9351ed7f4e45a78541461e
1.保安单位
2.荣誉
2 files modified
16 files added
843 ■■■■■ changed files
src/main/java/org/springblade/modules/dispatcher/controller/DispatcherController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/dto/DispatcherDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/entity/Dispatcher.java 80 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml 21 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/service/IDispatcherService.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/service/impl/DispatcherServiceImpl.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/vo/DispatcherVO.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/honor/controller/HonorController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/honor/dto/HonorDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/honor/entity/Honor.java 68 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/honor/mapper/HonorMapper.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/honor/mapper/HonorMapper.xml 19 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/honor/service/IHonorService.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/honor/service/impl/HonorServiceImpl.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/honor/vo/HonorVO.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/entity/Information.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 9 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/controller/DispatcherController.java
New file
@@ -0,0 +1,126 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.dispatcher.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.dispatcher.entity.Dispatcher;
import org.springblade.modules.dispatcher.vo.DispatcherVO;
import org.springblade.modules.dispatcher.service.IDispatcherService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 *  控制器
 *
 * @author BladeX
 * @since 2021-07-07
 */
@RestController
@AllArgsConstructor
@RequestMapping("/dispatcher")
@Api(value = "", tags = "接口")
public class DispatcherController extends BladeController {
    private final IDispatcherService dispatcherService;
    /**
     * 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入dispatcher")
    public R<Dispatcher> detail(Dispatcher dispatcher) {
        Dispatcher detail = dispatcherService.getOne(Condition.getQueryWrapper(dispatcher));
        return R.data(detail);
    }
    /**
     * 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入dispatcher")
    public R<IPage<Dispatcher>> list(Dispatcher dispatcher, Query query) {
        IPage<Dispatcher> pages = dispatcherService.page(Condition.getPage(query), Condition.getQueryWrapper(dispatcher));
        return R.data(pages);
    }
    /**
     * 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入dispatcher")
    public R<IPage<DispatcherVO>> page(DispatcherVO dispatcher, Query query) {
        IPage<DispatcherVO> pages = dispatcherService.selectDispatcherPage(Condition.getPage(query), dispatcher);
        return R.data(pages);
    }
    /**
     * 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入dispatcher")
    public R save(@Valid @RequestBody Dispatcher dispatcher) {
        return R.status(dispatcherService.save(dispatcher));
    }
    /**
     * 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入dispatcher")
    public R update(@Valid @RequestBody Dispatcher dispatcher) {
        return R.status(dispatcherService.updateById(dispatcher));
    }
    /**
     * 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入dispatcher")
    public R submit(@Valid @RequestBody Dispatcher dispatcher) {
        return R.status(dispatcherService.saveOrUpdate(dispatcher));
    }
    /**
     * 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(dispatcherService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/dispatcher/dto/DispatcherDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.dispatcher.dto;
import org.springblade.modules.dispatcher.entity.Dispatcher;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 数据传输对象实体类
 *
 * @author BladeX
 * @since 2021-07-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DispatcherDTO extends Dispatcher {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/dispatcher/entity/Dispatcher.java
New file
@@ -0,0 +1,80 @@
/*
 *      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.dispatcher.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-07
 */
@Data
@TableName("sys_dispatcher")
@ApiModel(value = "Dispatcher对象", description = "Dispatcher对象")
public class Dispatcher implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
    * 身份证
    */
        @ApiModelProperty(value = "身份证")
        private String cardid;
    /**
    * 保安人名称
    */
        @ApiModelProperty(value = "保安人名称")
        private String name;
    /**
    * 派遣人
    */
        @ApiModelProperty(value = "派遣人")
        private String dispatcher;
    /**
    * 派遣时间
    */
        @ApiModelProperty(value = "派遣时间")
        @TableField("dispatcherTime")
    private LocalDateTime dispatchertime;
    /**
    * 派遣地址
    */
        @ApiModelProperty(value = "派遣地址")
        @TableField("dispatcherAddress")
    private String dispatcheraddress;
    /**
     * 派遣地址
     */
    @ApiModelProperty(value = "派遣单位")
    @TableField("dispatcherCompany")
    private String dispatchercompany;
}
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.java
New file
@@ -0,0 +1,42 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.dispatcher.mapper;
import org.springblade.modules.dispatcher.entity.Dispatcher;
import org.springblade.modules.dispatcher.vo.DispatcherVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 *  Mapper 接口
 *
 * @author BladeX
 * @since 2021-07-07
 */
public interface DispatcherMapper extends BaseMapper<Dispatcher> {
    /**
     * 自定义分页
     *
     * @param page
     * @param dispatcher
     * @return
     */
    List<DispatcherVO> selectDispatcherPage(IPage page, DispatcherVO dispatcher);
}
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
New file
@@ -0,0 +1,21 @@
<?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.dispatcher.mapper.DispatcherMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="dispatcherResultMap" type="org.springblade.modules.dispatcher.entity.Dispatcher">
        <id column="id" property="id"/>
        <result column="cardid" property="cardid"/>
        <result column="name" property="name"/>
        <result column="dispatcher" property="dispatcher"/>
        <result column="dispatcherTime" property="dispatchertime"/>
        <result column="dispatcherAddress" property="dispatcheraddress"/>
        <result column="dispatchercompany" property="dispatchercompany"/>
    </resultMap>
    <select id="selectDispatcherPage" resultMap="dispatcherResultMap">
        select * from sys_dispatcher where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/dispatcher/service/IDispatcherService.java
New file
@@ -0,0 +1,41 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.dispatcher.service;
import org.springblade.modules.dispatcher.entity.Dispatcher;
import org.springblade.modules.dispatcher.vo.DispatcherVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 *  服务类
 *
 * @author BladeX
 * @since 2021-07-07
 */
public interface IDispatcherService extends IService<Dispatcher> {
    /**
     * 自定义分页
     *
     * @param page
     * @param dispatcher
     * @return
     */
    IPage<DispatcherVO> selectDispatcherPage(IPage<DispatcherVO> page, DispatcherVO dispatcher);
}
src/main/java/org/springblade/modules/dispatcher/service/impl/DispatcherServiceImpl.java
New file
@@ -0,0 +1,41 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.dispatcher.service.impl;
import org.springblade.modules.dispatcher.entity.Dispatcher;
import org.springblade.modules.dispatcher.vo.DispatcherVO;
import org.springblade.modules.dispatcher.mapper.DispatcherMapper;
import org.springblade.modules.dispatcher.service.IDispatcherService;
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-07
 */
@Service
public class DispatcherServiceImpl extends ServiceImpl<DispatcherMapper, Dispatcher> implements IDispatcherService {
    @Override
    public IPage<DispatcherVO> selectDispatcherPage(IPage<DispatcherVO> page, DispatcherVO dispatcher) {
        return page.setRecords(baseMapper.selectDispatcherPage(page, dispatcher));
    }
}
src/main/java/org/springblade/modules/dispatcher/vo/DispatcherVO.java
New file
@@ -0,0 +1,36 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.dispatcher.vo;
import org.springblade.modules.dispatcher.entity.Dispatcher;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
 * 视图实体类
 *
 * @author BladeX
 * @since 2021-07-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DispatcherVO对象", description = "DispatcherVO对象")
public class DispatcherVO extends Dispatcher {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/honor/controller/HonorController.java
New file
@@ -0,0 +1,126 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.honor.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.honor.entity.Honor;
import org.springblade.modules.honor.vo.HonorVO;
import org.springblade.modules.honor.service.IHonorService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 *  控制器
 *
 * @author BladeX
 * @since 2021-07-07
 */
@RestController
@AllArgsConstructor
@RequestMapping("/honor")
@Api(value = "", tags = "接口")
public class HonorController extends BladeController {
    private final IHonorService honorService;
    /**
     * 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入honor")
    public R<Honor> detail(Honor honor) {
        Honor detail = honorService.getOne(Condition.getQueryWrapper(honor));
        return R.data(detail);
    }
    /**
     * 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入honor")
    public R<IPage<Honor>> list(Honor honor, Query query) {
        IPage<Honor> pages = honorService.page(Condition.getPage(query), Condition.getQueryWrapper(honor));
        return R.data(pages);
    }
    /**
     * 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入honor")
    public R<IPage<HonorVO>> page(HonorVO honor, Query query) {
        IPage<HonorVO> pages = honorService.selectHonorPage(Condition.getPage(query), honor);
        return R.data(pages);
    }
    /**
     * 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入honor")
    public R save(@Valid @RequestBody Honor honor) {
        return R.status(honorService.save(honor));
    }
    /**
     * 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入honor")
    public R update(@Valid @RequestBody Honor honor) {
        return R.status(honorService.updateById(honor));
    }
    /**
     * 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入honor")
    public R submit(@Valid @RequestBody Honor honor) {
        return R.status(honorService.saveOrUpdate(honor));
    }
    /**
     * 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(honorService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/honor/dto/HonorDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.honor.dto;
import org.springblade.modules.honor.entity.Honor;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 数据传输对象实体类
 *
 * @author BladeX
 * @since 2021-07-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HonorDTO extends Honor {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/honor/entity/Honor.java
New file
@@ -0,0 +1,68 @@
/*
 *      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.honor.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-07
 */
@Data
@TableName("sys_honor")
@ApiModel(value = "Honor对象", description = "Honor对象")
public class Honor implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
    * 身份证
    */
        @ApiModelProperty(value = "身份证")
        private String cardid;
    /**
    * 名称
    */
        @ApiModelProperty(value = "名称")
        private String name;
    /**
    * 荣誉
    */
        @ApiModelProperty(value = "荣誉")
        private String honor;
    /**
    * 获取时间
    */
        @ApiModelProperty(value = "获取时间")
        @TableField("honorTime")
    private LocalDateTime honortime;
}
src/main/java/org/springblade/modules/honor/mapper/HonorMapper.java
New file
@@ -0,0 +1,42 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.honor.mapper;
import org.springblade.modules.honor.entity.Honor;
import org.springblade.modules.honor.vo.HonorVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 *  Mapper 接口
 *
 * @author BladeX
 * @since 2021-07-07
 */
public interface HonorMapper extends BaseMapper<Honor> {
    /**
     * 自定义分页
     *
     * @param page
     * @param honor
     * @return
     */
    List<HonorVO> selectHonorPage(IPage page, HonorVO honor);
}
src/main/java/org/springblade/modules/honor/mapper/HonorMapper.xml
New file
@@ -0,0 +1,19 @@
<?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.honor.mapper.HonorMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="honorResultMap" type="org.springblade.modules.honor.entity.Honor">
        <id column="id" property="id"/>
        <result column="cardid" property="cardid"/>
        <result column="name" property="name"/>
        <result column="honor" property="honor"/>
        <result column="honorTime" property="honortime"/>
    </resultMap>
    <select id="selectHonorPage" resultMap="honorResultMap">
        select * from sys_honor where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/honor/service/IHonorService.java
New file
@@ -0,0 +1,41 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.honor.service;
import org.springblade.modules.honor.entity.Honor;
import org.springblade.modules.honor.vo.HonorVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 *  服务类
 *
 * @author BladeX
 * @since 2021-07-07
 */
public interface IHonorService extends IService<Honor> {
    /**
     * 自定义分页
     *
     * @param page
     * @param honor
     * @return
     */
    IPage<HonorVO> selectHonorPage(IPage<HonorVO> page, HonorVO honor);
}
src/main/java/org/springblade/modules/honor/service/impl/HonorServiceImpl.java
New file
@@ -0,0 +1,41 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.honor.service.impl;
import org.springblade.modules.honor.entity.Honor;
import org.springblade.modules.honor.vo.HonorVO;
import org.springblade.modules.honor.mapper.HonorMapper;
import org.springblade.modules.honor.service.IHonorService;
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-07
 */
@Service
public class HonorServiceImpl extends ServiceImpl<HonorMapper, Honor> implements IHonorService {
    @Override
    public IPage<HonorVO> selectHonorPage(IPage<HonorVO> page, HonorVO honor) {
        return page.setRecords(baseMapper.selectHonorPage(page, honor));
    }
}
src/main/java/org/springblade/modules/honor/vo/HonorVO.java
New file
@@ -0,0 +1,36 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.honor.vo;
import org.springblade.modules.honor.entity.Honor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
 * 视图实体类
 *
 * @author BladeX
 * @since 2021-07-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "HonorVO对象", description = "HonorVO对象")
public class HonorVO extends Honor {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/information/entity/Information.java
@@ -136,5 +136,11 @@
    @ApiModelProperty(value = "租户ID")
    @TableField("tenantId")
    private String tenantid;
    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    @TableField("identification")
    private String identification;
}
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -8,13 +8,7 @@
        <result column="creditCode" property="creditcode"/>
        <result column="enterpriseName" property="enterprisename"/>
        <result column="representative" property="representative"/>
        <result column="
registrationStatus
" property="
registrationstatus
"/>
        <result column="registrationStatus" property="registrationstatus"/>
        <result column="establishTime" property="establishtime"/>
        <result column="registeredCapital" property="registeredcapital"/>
        <result column="capital" property="capital"/>
@@ -27,6 +21,7 @@
        <result column="region" property="region"/>
        <result column="registration" property="registration"/>
        <result column="industry" property="industry"/>
        <result column="identification" property="identification"/>
    </resultMap>