Commit f4cb3b2b authored by mengmeng's avatar mengmeng

add pension_document modules

parent 8f5a5179
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.annotation.LogOperation;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.ExcelUtils;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.PensionDocumentDTO;
import io.hmit.modules.serviceOrder.excel.PensionDocumentExcel;
import io.hmit.modules.serviceOrder.service.PensionDocumentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@RestController
@RequestMapping("serviceOrder/pensiondocument")
@Api(tags="文件信息表")
public class PensionDocumentController {
@Autowired
private PensionDocumentService pensionDocumentService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("serviceOrder:pensiondocument:page")
public Result<PageData<PensionDocumentDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<PensionDocumentDTO> page = pensionDocumentService.page(params);
return new Result<PageData<PensionDocumentDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("serviceOrder:pensiondocument:info")
public Result<PensionDocumentDTO> get(@PathVariable("id") Long id){
PensionDocumentDTO data = pensionDocumentService.get(id);
return new Result<PensionDocumentDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("serviceOrder:pensiondocument:save")
public Result save(@RequestBody PensionDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
pensionDocumentService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("serviceOrder:pensiondocument:update")
public Result update(@RequestBody PensionDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
pensionDocumentService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("serviceOrder:pensiondocument:delete")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
pensionDocumentService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("serviceOrder:pensiondocument:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PensionDocumentDTO> list = pensionDocumentService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PensionDocumentExcel.class);
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.annotation.LogOperation;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.ExcelUtils;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.UserDTO;
import io.hmit.modules.serviceOrder.excel.UserExcel;
import io.hmit.modules.serviceOrder.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 用户
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@RestController
@RequestMapping("serviceOrder/user")
@Api(tags="用户")
public class UserController {
@Autowired
private UserService userService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("serviceOrder:user:page")
public Result<PageData<UserDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<UserDTO> page = userService.page(params);
return new Result<PageData<UserDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("serviceOrder:user:info")
public Result<UserDTO> get(@PathVariable("id") Long id){
UserDTO data = userService.get(id);
return new Result<UserDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("serviceOrder:user:save")
public Result save(@RequestBody UserDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
userService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("serviceOrder:user:update")
public Result update(@RequestBody UserDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
userService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("serviceOrder:user:delete")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
userService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("serviceOrder:user:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<UserDTO> list = userService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, UserExcel.class);
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.PensionDocumentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Mapper
public interface PensionDocumentDao extends BaseDao<PensionDocumentEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 用户
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Mapper
public interface UserDao extends BaseDao<UserEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Data
@ApiModel(value = "文件信息表")
public class PensionDocumentDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "")
private Long id;
@ApiModelProperty(value = "文件名")
private String fileName;
@ApiModelProperty(value = "文件大小")
private Double fileSize;
@ApiModelProperty(value = "文件路径")
private String filePath;
@ApiModelProperty(value = "文件真实路径")
private String filePathAct;
@ApiModelProperty(value = "文件类型")
private String fileType;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "状态")
private String status;
@ApiModelProperty(value = "创建者dept_id")
private Long deptId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 用户
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Data
@ApiModel(value = "用户")
public class UserDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "关联sys_user中的id")
private Long userId;
@ApiModelProperty(value = "用户名")
private String username;
@ApiModelProperty(value = "手机号")
private String mobile;
@ApiModelProperty(value = "密码")
private String password;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "微信openid")
private String openid;
@ApiModelProperty(value = "生日")
private Date birthday;
@ApiModelProperty(value = "地址_地区")
private String addressArea;
@ApiModelProperty(value = "详细地址")
private String address;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("pension_document")
public class PensionDocumentEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 文件名
*/
private String fileName;
/**
* 文件大小
*/
private Double fileSize;
/**
* 文件路径
*/
private String filePath;
/**
* 文件真实路径
*/
private String filePathAct;
/**
* 文件类型
*/
private String fileType;
/**
* 备注
*/
private String remark;
/**
* 状态
*/
private String status;
/**
* 创建者dept_id
*/
private Long deptId;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 用户
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_user")
public class UserEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 关联sys_user中的id
*/
private Long userId;
/**
* 用户名
*/
private String username;
/**
* 手机号
*/
private String mobile;
/**
* 密码
*/
private String password;
/**
* 微信openid
*/
private String openid;
/**
* 生日
*/
private Date birthday;
/**
* 地址_地区
*/
private String addressArea;
/**
* 详细地址
*/
private String address;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Data
public class PensionDocumentExcel {
@Excel(name = "")
private Long id;
@Excel(name = "文件名")
private String fileName;
@Excel(name = "文件大小")
private Double fileSize;
@Excel(name = "文件路径")
private String filePath;
@Excel(name = "文件真实路径")
private String filePathAct;
@Excel(name = "文件类型")
private String fileType;
@Excel(name = "备注")
private String remark;
@Excel(name = "状态")
private String status;
@Excel(name = "创建者dept_id")
private Long deptId;
@Excel(name = "创建者")
private Long creator;
@Excel(name = "创建时间")
private Date createDate;
@Excel(name = "更新者")
private Long updater;
@Excel(name = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 用户
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Data
public class UserExcel {
@Excel(name = "id")
private Long id;
@Excel(name = "关联sys_user中的id")
private Long userId;
@Excel(name = "用户名")
private String username;
@Excel(name = "手机号")
private String mobile;
@Excel(name = "密码")
private String password;
@Excel(name = "创建时间")
private Date createDate;
@Excel(name = "微信openid")
private String openid;
@Excel(name = "生日")
private Date birthday;
@Excel(name = "地址_地区")
private String addressArea;
@Excel(name = "详细地址")
private String address;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionDocumentEntity;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
public interface PensionDocumentService extends CrudService<PensionDocumentEntity, PensionDocumentDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.UserDTO;
import io.hmit.modules.serviceOrder.entity.UserEntity;
/**
* 用户
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
public interface UserService extends CrudService<UserEntity, UserDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.PensionDocumentDao;
import io.hmit.modules.serviceOrder.dto.PensionDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionDocumentEntity;
import io.hmit.modules.serviceOrder.service.PensionDocumentService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Service
public class PensionDocumentServiceImpl extends CrudServiceImpl<PensionDocumentDao, PensionDocumentEntity, PensionDocumentDTO> implements PensionDocumentService {
@Override
public QueryWrapper<PensionDocumentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<PensionDocumentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.UserDao;
import io.hmit.modules.serviceOrder.dto.UserDTO;
import io.hmit.modules.serviceOrder.entity.UserEntity;
import io.hmit.modules.serviceOrder.service.UserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 用户
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Service
public class UserServiceImpl extends CrudServiceImpl<UserDao, UserEntity, UserDTO> implements UserService {
@Override
public QueryWrapper<UserEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<UserEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of 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="io.hmit.modules.serviceOrder.dao.PensionDocumentDao">
<resultMap type="io.hmit.modules.serviceOrder.entity.PensionDocumentEntity" id="pensionDocumentMap">
<result property="id" column="id"/>
<result property="fileName" column="file_name"/>
<result property="fileSize" column="file_size"/>
<result property="filePath" column="file_path"/>
<result property="filePathAct" column="file_path_act"/>
<result property="fileType" column="file_type"/>
<result property="remark" column="remark"/>
<result property="status" column="status"/>
<result property="deptId" column="dept_id"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
</mapper>
\ No newline at end of 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="io.hmit.modules.serviceOrder.dao.UserDao">
<resultMap type="io.hmit.modules.serviceOrder.entity.UserEntity" id="userMap">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="username" column="username"/>
<result property="mobile" column="mobile"/>
<result property="password" column="password"/>
<result property="createDate" column="create_date"/>
<result property="openid" column="openid"/>
<result property="birthday" column="birthday"/>
<result property="addressArea" column="address_area"/>
<result property="address" column="address"/>
</resultMap>
</mapper>
\ No newline at end of file
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.PensionDocumentDTO;
import io.hmit.modules.serviceOrder.service.PensionDocumentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@RestController
@RequestMapping("serviceOrder/pensiondocument")
@Api(tags="文件信息表")
public class PensionDocumentController {
@Autowired
private PensionDocumentService pensionDocumentService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<PensionDocumentDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<PensionDocumentDTO> page = pensionDocumentService.page(params);
return new Result<PageData<PensionDocumentDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<PensionDocumentDTO> get(@PathVariable("id") Long id){
PensionDocumentDTO data = pensionDocumentService.get(id);
return new Result<PensionDocumentDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody PensionDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
pensionDocumentService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody PensionDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
pensionDocumentService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
pensionDocumentService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.PensionDocumentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Mapper
public interface PensionDocumentDao extends BaseDao<PensionDocumentEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Data
@ApiModel(value = "文件信息表")
public class PensionDocumentDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "")
private Long id;
@ApiModelProperty(value = "文件名")
private String fileName;
@ApiModelProperty(value = "文件大小")
private Double fileSize;
@ApiModelProperty(value = "文件路径")
private String filePath;
@ApiModelProperty(value = "文件真实路径")
private String filePathAct;
@ApiModelProperty(value = "文件类型")
private String fileType;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "状态")
private String status;
@ApiModelProperty(value = "创建者dept_id")
private Long deptId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("pension_document")
public class PensionDocumentEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 文件名
*/
private String fileName;
/**
* 文件大小
*/
private Double fileSize;
/**
* 文件路径
*/
private String filePath;
/**
* 文件真实路径
*/
private String filePathAct;
/**
* 文件类型
*/
private String fileType;
/**
* 备注
*/
private String remark;
/**
* 状态
*/
private String status;
/**
* 创建者dept_id
*/
private Long deptId;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionDocumentEntity;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
public interface PensionDocumentService extends CrudService<PensionDocumentEntity, PensionDocumentDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.PensionDocumentDao;
import io.hmit.modules.serviceOrder.dto.PensionDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionDocumentEntity;
import io.hmit.modules.serviceOrder.service.PensionDocumentService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 文件信息表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-27
*/
@Service
public class PensionDocumentServiceImpl extends CrudServiceImpl<PensionDocumentDao, PensionDocumentEntity, PensionDocumentDTO> implements PensionDocumentService {
@Override
public QueryWrapper<PensionDocumentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<PensionDocumentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
......@@ -23,6 +23,7 @@ public class RoleServiceServiceImpl extends CrudServiceImpl<RoleServiceDao, Role
@Override
public QueryWrapper<RoleServiceEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
String o = (String)params.get("id");
QueryWrapper<RoleServiceEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
......@@ -31,4 +32,4 @@ public class RoleServiceServiceImpl extends CrudServiceImpl<RoleServiceDao, Role
}
}
\ No newline at end of file
}
serviceOrder<?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="io.hmit.modules.serviceOrder.dao.PensionDocumentDao">
<resultMap type="io.hmit.modules.serviceOrder.entity.PensionDocumentEntity" id="pensionDocumentMap">
<result property="id" column="id"/>
<result property="fileName" column="file_name"/>
<result property="fileSize" column="file_size"/>
<result property="filePath" column="file_path"/>
<result property="filePathAct" column="file_path_act"/>
<result property="fileType" column="file_type"/>
<result property="remark" column="remark"/>
<result property="status" column="status"/>
<result property="deptId" column="dept_id"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment